Commit cc057166 authored by Aaron Wells's avatar Aaron Wells Committed by Robert Lyon

Removing all hard-coded references to "$themename/$static"

Bug 1465107

Change-Id: Ib5e87262d97e420667247d3c931d99f8adde75ee
parent 7def6da9
......@@ -41,7 +41,7 @@ $pagination = build_pagination(array(
));
$css = array(
'<link rel="stylesheet" type="text/css" href="' . get_config('wwwroot') . 'theme/raw/static/style/skin.css">',
'<link rel="stylesheet" type="text/css" href="' . $THEME->get_url('style/skin.css') . '">',
);
......
......@@ -88,7 +88,7 @@ else {
}
else {
// use the Mahara logo
$image = get_config('wwwroot') . 'theme/raw/static/images/site-logo.png';
$image = $THEME->get_image_url('site-logo');
}
// if the owner has a personal website set, use it as the author URI
......
......@@ -72,7 +72,7 @@ class PluginExportHtml extends PluginExport {
foreach ($themedirs as $theme => $themedir) {
foreach ($stylesheets as $stylesheet) {
if (is_readable($themedir . 'style/' . $stylesheet)) {
array_unshift($this->stylesheets[''], 'theme/' . $theme . '/static/style/' . $stylesheet);
array_unshift($this->stylesheets[''], 'theme/' . $theme . '/style/' . $stylesheet);
}
}
}
......
......@@ -148,7 +148,7 @@ $selflink = get_config('wwwroot') . 'interaction/forum/atom.php?type=' . $feedty
$postcount = 20;
$postrecords = get_records_sql_array($sql, array($id, $postcount));
$image = get_config('wwwroot') . 'theme/raw/static/images/site-logo.png';
$image = $THEME->get_image_url('site-logo');
$updated = ($postrecords) ? atom_date($postrecords[0]->ctime) : '';
$generator = array(
......
......@@ -7,4 +7,4 @@ Version: 3.14
Changes:
* Added a pager hook for reskining
* Changed name and path of images in theme/raw/static/style/jquery.rating.css
* Changed name and path of images in theme/raw/style/jquery.rating.css
......@@ -10,7 +10,7 @@ Licence: CookieConsent is GPLv3 licensed (see: http://sitebeam.net/cookiecons
Modifications:
- changed 'plugin.js' line 1525 from 'Open+Sans:400,600:latin' to 'Open+Sans:400,600:latin,latin-ext' to avoid UTF-8 character display issues
- renamed 'style.css' to 'cookieconsent.css' and copied/moved it to htdocs/raw/static/style
- renamed 'style.css' to 'cookieconsent.css' and copied/moved it to htdocs/raw/style
- decrease all font-size properties in 'cookieconsent.css' for smaller text (all changes marked with: /*changed*/)
- changed some height and max-height properties in 'cookieconsent.css' (all changes marked with: /*changed*/)
- Set the cookie's "secure" flag if the page is served via HTTPS
......
......@@ -33,7 +33,7 @@ Dependency package: jquery-ui
Changes:
* Added key bindings for the increasing/decreasing of the hour/minute bars
* Added css tweaking into the theme/raw/static/style/datepicker.css
* Added css tweaking into the theme/raw/style/datepicker.css
jQuery UI plugin touch-punch
......
......@@ -19,7 +19,7 @@ function responsiveNav(navTarget, wrapper) {
navTarget.each(function() {
navWidth += $j(this).outerWidth();
});
// Use the media query from theme/default/static/style/style.css
// Use the media query from theme/default/style/style.css
var breakpoint = 768;
var loginboxorder = 1;
$j(window).bind('load resize orientationchange', function() {
......
<!-- @license http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later -->
<!-- @copyright For copyright information on Mahara, please see the README file distributed with this software. -->
<h3>Show controls to add and remove columns when editing a page</h3>
<p>You can choose to display a row with buttons <img src="../../theme/raw/static/images/btn_addcolumnleft.png" alt="add"> <img src="../../theme/raw/static/images/btn_removecolumn.png" alt="remove"> in the page editor. These buttons add and remove columns from that page.</p>
<p>You can choose to display a row with buttons
<span class="btn btn-success btn-xs text-left" title="Add column">
<span class="mrs icon-long-arrow-down icon-rotate-45 icon icon-sm"></span>
<span class="icon-plus icon icon-sm"></span>
</span> and
<span title="Remove this column" class="text-center btn btn-primary btn-xs">
<span class="icon-times-circle icon icon-sm"></span>
</span>
in the page editor. These buttons add and remove columns from that page.</p>
<p>Even if not enabled, you can change the number of columns for your page in the page layout section.</p>
......@@ -4,4 +4,4 @@
<p>This can be a http://... or https://... URL to an image elsewhere on your site or externally.</p>
<p>It can also be a license:... URL to specify license icons from the Mahara theme. For example, the
URL <pre>license:gfdl.png</pre> would refer to the file
<pre>static/images/license/gfdl.png</pre> in the theme.</p>
<pre>images/license/gfdl.png</pre> in the theme.</p>
......@@ -2180,17 +2180,6 @@ function pieform_reply($code, $data) {
// force the user to fix their form
}
function pieform_element_calendar_configure($element) {
global $THEME;
$element['jsroot'] = get_config('wwwroot') . 'js/jquery/jquery-ui/';
$element['themefile'] = $THEME->get_url('style/datepicker.css');
$element['imagefile'] = $THEME->get_url('images/calendar.png');
$language = substr(current_language(), 0, 2);
$element['language'] = $language;
return $element;
}
function pieform_element_textarea_configure($element) {
if (!array_key_exists('resizable', $element)) {
$element['resizable'] = true;
......
......@@ -36,7 +36,7 @@
* @param array $element The element to render
* @return string The HTML for the element
*/
function pieform_element_calendar(Pieform $form, $element) {/*{{{*/
function pieform_element_calendar(Pieform $form, $element) {
global $LANGDIRECTION;
$id = $form->get_name() . '_' . $element['name'];
......@@ -117,7 +117,7 @@ function pieform_element_calendar(Pieform $form, $element) {/*{{{*/
</script>';
return $result;
}/*}}}*/
}
/**
* Sets default attributes of the calendar element.
......@@ -125,16 +125,17 @@ function pieform_element_calendar(Pieform $form, $element) {/*{{{*/
* @param array $element The element to configure
* @return array The configured element
*/
function pieform_element_calendar_set_attributes($element) {/*{{{*/
$element['jsroot'] = isset($element['jsroot']) ? $element['jsroot'] : '';
$element['language'] = isset($element['language']) ? $element['language'] : 'en';
$element['theme'] = isset($element['theme']) ? $element['theme'] : 'raw';
function pieform_element_calendar_set_attributes($element) {
global $THEME;
$element['jsroot'] = get_config('wwwroot') . 'js/jquery/jquery-ui/';
// $element['imagefile'] = $THEME->get_image_url('calendar');
$element['language'] = substr(current_language(), 0, 2);
$element['caloptions']['ifFormat'] = isset($element['caloptions']['ifFormat']) ? $element['caloptions']['ifFormat'] : '%Y/%m/%d';
$element['caloptions']['dateFormat'] = isset($element['caloptions']['dateFormat']) ? $element['caloptions']['dateFormat'] : get_string('calendar_dateFormat', 'langconfig');
$element['caloptions']['timeFormat'] = isset($element['caloptions']['timeFormat']) ? $element['caloptions']['timeFormat'] : get_string('calendar_timeFormat', 'langconfig');
return $element;
}/*}}}*/
}
/**
* Returns code to go in <head> for the given calendar instance
......@@ -142,22 +143,10 @@ function pieform_element_calendar_set_attributes($element) {/*{{{*/
* @param array $element The element to get <head> code for
* @return array An array of HTML elements to go in the <head>
*/
function pieform_element_calendar_get_headdata($element) {/*{{{*/
if (isset($element['themefile'])) {
$themefile = $element['themefile'];
}
else if (isset($element['theme'])) {
if (file_exists(get_config('docroot') . 'theme/' . $element['theme'] . '/static/style/datepicker.css')) {
$themefile = get_config('wwwroot') . 'theme/' . $element['theme'] . '/static/style/datepicker.css';
}
else {
throw new PieformException('No theme file for calendar "' . $element['name'] . '": please make sure themefile "' . get_config('docroot') . 'theme/' . $element['theme'] . '/static/style/datepicker.css" exists');
}
}
else {
throw new PieformException('No theme chosen for calendar "' . $element['name'] . '": please set themefile or theme');
}
function pieform_element_calendar_get_headdata($element) {
global $THEME;
$themefile = $THEME->get_url('style/datepicker.css');
$libjs = $element['jsroot'] . 'js/jquery-ui-1.10.2.min.js';
$libcss = $element['jsroot'] . 'css/ui-lightness/jquery-ui-1.10.2.min.css';
$timeaddonjs = $element['jsroot'] . 'js/jquery-ui-timepicker-addon.js';
......@@ -191,7 +180,7 @@ EOF;
'<script type="application/javascript">' . $extrajs . '</script>',
);
return $result;
}/*}}}*/
}
/**
* Retrieves the value of the calendar as a unix timestamp
......@@ -200,7 +189,7 @@ EOF;
* @param array $element The element to get the value for
* @return int The unix timestamp represented by the calendar
*/
function pieform_element_calendar_get_value(Pieform $form, $element) {/*{{{*/
function pieform_element_calendar_get_value(Pieform $form, $element) {
$name = $element['name'];
$global = ($form->get_property('method') == 'get') ? $_GET : $_POST;
......@@ -227,7 +216,7 @@ function pieform_element_calendar_get_value(Pieform $form, $element) {/*{{{*/
}
return null;
}/*}}}*/
}
/**
* Retrieves the values of the internationalised strings for a calendar
......@@ -237,7 +226,7 @@ function pieform_element_calendar_get_value(Pieform $form, $element) {/*{{{*/
* @param array $options The datepicker options array
* @return array $options The datepicker options array with the new lang strings added
*/
function pieform_element_calendar_get_lang_strings($options, $langdirection = 'ltr') {/*{{{*/
function pieform_element_calendar_get_lang_strings($options, $langdirection = 'ltr') {
// Set up internationalisation
$lang_options = array('clearText','closeText','closeStatus','prevText','prevStatus',
'nextText','nextStatus','currentText','currentStatus',
......@@ -256,4 +245,4 @@ function pieform_element_calendar_get_lang_strings($options, $langdirection = 'l
}
$options['isRTL'] = ($langdirection == 'rtl') ? true : false;
return $options;
}/*}}}*/
}
......@@ -1336,7 +1336,7 @@ function theme_setup() {
/**
* This function returns the full url to an image
* Always use it to get image urls
* @param $imagelocation path to image relative to theme/$theme/static/
* @param $imagelocation path to image relative to theme/$theme/
* @param $pluginlocation path to plugin relative to docroot
*/
function theme_get_url($location, $pluginlocation='', $all = false) {
......@@ -1353,7 +1353,7 @@ function theme_get_url($location, $pluginlocation='', $all = false) {
/**
* This function returns the full path to an image
* Always use it to get image paths
* @param $imagelocation path to image relative to theme/$theme/static/
* @param $imagelocation path to image relative to theme/$theme/
* @param $pluginlocation path to plugin relative to docroot
*/
function theme_get_path($location, $pluginlocation='', $all=false) {
......
......@@ -63,7 +63,7 @@ ALL themes in the site.
Examples:
* Core emplate file: local/theme/templates/index.tpl
* Core stylesheet: local/theme/static/style/style.css
* Core static file: local/theme/static/images/site-logo.png
* Core stylesheet: local/theme/style/style.css
* Core static file: local/theme/images/site-logo.png
* Plugin template file: local/theme/artefact/file/templates/profileicons.tpl
* Plugin static file: local/theme/blocktype/creativecommons/static/images/seal.png
* Plugin static file: local/theme/blocktype/creativecommons/images/seal.png
......@@ -75,7 +75,7 @@ $pagination = build_pagination(array(
));
$css = array(
'<link rel="stylesheet" type="text/css" href="' . get_config('wwwroot') . 'theme/raw/static/style/skin.css">',
'<link rel="stylesheet" type="text/css" href="' . $THEME->get_url('style/skin.css') . '">',
);
$smarty = smarty(array(), $css);
......
......@@ -4,7 +4,7 @@
{if $secfacetterm == "Image" && $record->thumb}
<div class="thumbnail-image"><img src="{$record->thumb}" alt=""></div>
{else}
<div class="thumbnail-image"><img src="{$WWWROOT}search/elasticsearch/theme/raw/static/images/thumbnail-{$secfacetterm|lower}.png" alt=""></div>
<div class="thumbnail-image"><img src="{$WWWROOT}search/elasticsearch/theme/raw/images/thumbnail-{$secfacetterm|lower}.png" alt=""></div>
{/if}
{/if}
{if $record->link}
......
......@@ -102,7 +102,7 @@ $skinform = pieform(array(
));
$css = array(
//'<link rel="stylesheet" type="text/css" href="' . get_config('wwwroot') . 'theme/raw/static/style/skin.css">',
//'<link rel="stylesheet" type="text/css" href="' . $THEME->get_url('style/skin.css') . '">',
);
$displaylink = $view->get_url();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment