From 8d2596c94f1aaf9d1493f47946ab0cad746e24d0 Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Thu, 22 Jan 2015 18:50:34 +0000 Subject: Fix #382 - but still need to make these private/protected --- library/WT/Theme/Administration.php | 4 ++-- library/WT/Theme/BaseTheme.php | 38 ++++++++++++++++++------------------- library/WT/Theme/Clouds.php | 6 +++--- library/WT/Theme/Colors.php | 6 +++--- library/WT/Theme/Fab.php | 6 +++--- library/WT/Theme/Minimal.php | 6 +++--- library/WT/Theme/Webtrees.php | 8 ++++---- library/WT/Theme/Xenea.php | 6 +++--- modules_v3/lightbox/module.php | 6 +++--- 9 files changed, 43 insertions(+), 43 deletions(-) diff --git a/library/WT/Theme/Administration.php b/library/WT/Theme/Administration.php index 509a7b98b6..934c8395ff 100644 --- a/library/WT/Theme/Administration.php +++ b/library/WT/Theme/Administration.php @@ -32,12 +32,12 @@ class Administration extends BaseTheme { WT_FONT_AWESOME_CSS_URL, WT_BOOTSTRAP_CSS_URL, WT_DATATABLES_BOOTSTRAP_CSS_URL, - $this->cssUrl() . 'style.css', + $this->assetUrl() . 'style.css', ); } /** {@inheritdoc} */ - public function cssUrl() { + public function assetUrl() { return 'themes/_administration/css-1.7.0/'; } diff --git a/library/WT/Theme/BaseTheme.php b/library/WT/Theme/BaseTheme.php index 88fa6e6d31..a8e59791ef 100644 --- a/library/WT/Theme/BaseTheme.php +++ b/library/WT/Theme/BaseTheme.php @@ -165,11 +165,11 @@ abstract class BaseTheme { } /** - * Where are our CSS assets? + * Where are our CSS, JS and other assets? * * @return string A relative path, such as "themes/foo/" */ - public function cssUrl() { + public function assetUrl() { return ''; } @@ -487,12 +487,12 @@ abstract class BaseTheme { */ public function icon(WT_Fact $fact) { $icon = 'images/facts/' . $fact->getTag() . '.png'; - $dir = substr($this->cssUrl(), strlen(WT_STATIC_URL)); + $dir = substr($this->assetUrl(), strlen(WT_STATIC_URL)); if (file_exists($dir . $icon)) { - return ''; + return ''; } elseif (file_exists($dir . 'images/facts/NULL.png')) { // Spacer image - for alignment - until we move to a sprite. - return ''; + return ''; } else { return ''; } @@ -1532,20 +1532,20 @@ abstract class BaseTheme { 'stats-small-chart-x' => 440, 'stats-small-chart-y' => 125, 'stats-large-chart-x' => 900, - 'image-dline' => $this->cssUrl() . 'images/dline.png', - 'image-dline2' => $this->cssUrl() . 'images/dline2.png', - 'image-hline' => $this->cssUrl() . 'images/hline.png', - 'image-spacer' => $this->cssUrl() . 'images/spacer.png', - 'image-vline' => $this->cssUrl() . 'images/vline.png', - 'image-add' => $this->cssUrl() . 'images/add.png', - 'image-button_family' => $this->cssUrl() . 'images/buttons/family.png', - 'image-minus' => $this->cssUrl() . 'images/minus.png', - 'image-plus' => $this->cssUrl() . 'images/plus.png', - 'image-remove' => $this->cssUrl() . 'images/delete.png', - 'image-search' => $this->cssUrl() . 'images/go.png', - 'image-default_image_F' => $this->cssUrl() . 'images/silhouette_female.png', - 'image-default_image_M' => $this->cssUrl() . 'images/silhouette_male.png', - 'image-default_image_U' => $this->cssUrl() . 'images/silhouette_unknown.png', + 'image-dline' => $this->assetUrl() . 'images/dline.png', + 'image-dline2' => $this->assetUrl() . 'images/dline2.png', + 'image-hline' => $this->assetUrl() . 'images/hline.png', + 'image-spacer' => $this->assetUrl() . 'images/spacer.png', + 'image-vline' => $this->assetUrl() . 'images/vline.png', + 'image-add' => $this->assetUrl() . 'images/add.png', + 'image-button_family' => $this->assetUrl() . 'images/buttons/family.png', + 'image-minus' => $this->assetUrl() . 'images/minus.png', + 'image-plus' => $this->assetUrl() . 'images/plus.png', + 'image-remove' => $this->assetUrl() . 'images/delete.png', + 'image-search' => $this->assetUrl() . 'images/go.png', + 'image-default_image_F' => $this->assetUrl() . 'images/silhouette_female.png', + 'image-default_image_M' => $this->assetUrl() . 'images/silhouette_male.png', + 'image-default_image_U' => $this->assetUrl() . 'images/silhouette_unknown.png', ); if (array_key_exists($parameter_name, $parameters)) { diff --git a/library/WT/Theme/Clouds.php b/library/WT/Theme/Clouds.php index 26c0920b03..f6dc84649d 100644 --- a/library/WT/Theme/Clouds.php +++ b/library/WT/Theme/Clouds.php @@ -27,13 +27,13 @@ use WT_Menu; */ class Clouds extends BaseTheme { /** {@inheritdoc} */ - public function cssUrl() { + public function assetUrl() { return 'themes/clouds/css-1.7.0/'; } /** {@inheritdoc} */ protected function favicon() { - return ''; + return ''; } /** {@inheritdoc} */ @@ -119,7 +119,7 @@ class Clouds extends BaseTheme { protected function stylesheets() { return array( 'themes/clouds/jquery-ui-1.11.2/jquery-ui.css', - $this->cssUrl() . 'style.css', + $this->assetUrl() . 'style.css', ); } diff --git a/library/WT/Theme/Colors.php b/library/WT/Theme/Colors.php index 38e70e50da..de7d683a35 100644 --- a/library/WT/Theme/Colors.php +++ b/library/WT/Theme/Colors.php @@ -35,7 +35,7 @@ class Colors extends Clouds { protected $sub_color; /** {@inheritdoc} */ - public function cssUrl() { + public function assetUrl() { return 'themes/colors/css-1.7.0/'; } @@ -156,8 +156,8 @@ class Colors extends Clouds { protected function stylesheets() { return array( 'themes/colors/jquery-ui-1.11.2/jquery-ui.css', - $this->cssUrl() . 'style.css', - $this->cssUrl() . 'palette/' . $this->sub_color . '.css', + $this->assetUrl() . 'style.css', + $this->assetUrl() . 'palette/' . $this->sub_color . '.css', ); } diff --git a/library/WT/Theme/Fab.php b/library/WT/Theme/Fab.php index 70b594ef98..07e19763e5 100644 --- a/library/WT/Theme/Fab.php +++ b/library/WT/Theme/Fab.php @@ -26,13 +26,13 @@ use WT_Menu; */ class Fab extends BaseTheme { /** {@inheritdoc} */ - public function cssUrl() { + public function assetUrl() { return 'themes/fab/css-1.7.0/'; } /** {@inheritdoc} */ protected function favicon() { - return ''; + return ''; } /** {@inheritdoc} */ @@ -110,7 +110,7 @@ class Fab extends BaseTheme { protected function stylesheets() { return array( 'themes/fab/jquery-ui-1.11.2/jquery-ui.css', - $this->cssUrl() . 'style.css', + $this->assetUrl() . 'style.css', ); } diff --git a/library/WT/Theme/Minimal.php b/library/WT/Theme/Minimal.php index 286d9d6076..b1beddf8c4 100644 --- a/library/WT/Theme/Minimal.php +++ b/library/WT/Theme/Minimal.php @@ -25,13 +25,13 @@ use WT_I18N; */ class Minimal extends BaseTheme { /** {@inheritdoc} */ - public function cssUrl() { + public function assetUrl() { return 'themes/minimal/css-1.7.0/'; } /** {@inheritdoc} */ protected function favicon() { - return ''; + return ''; } /** {@inheritdoc} */ @@ -107,7 +107,7 @@ class Minimal extends BaseTheme { protected function stylesheets() { return array( 'themes/minimal/jquery-ui-1.11.2/jquery-ui.css', - $this->cssUrl() . 'style.css', + $this->assetUrl() . 'style.css', ); } diff --git a/library/WT/Theme/Webtrees.php b/library/WT/Theme/Webtrees.php index 5eb4108e51..f6804195b4 100644 --- a/library/WT/Theme/Webtrees.php +++ b/library/WT/Theme/Webtrees.php @@ -26,13 +26,13 @@ use WT_I18N; */ class Webtrees extends BaseTheme { /** {@inheritdoc} */ - public function cssUrl() { + public function assetUrl() { return 'themes/webtrees/css-1.7.0/'; } /** {@inheritdoc} */ protected function favicon() { - return ''; + return ''; } /** {@inheritdoc} */ @@ -73,7 +73,7 @@ class Webtrees extends BaseTheme { 'chart-background-m' => 'b1cff0', 'distribution-chart-high-values' => '84beff', 'distribution-chart-low-values' => 'c3dfff', - 'image-search' => $this->cssUrl() . 'images/search.png', + 'image-search' => $this->assetUrl() . 'images/search.png', ); if (array_key_exists($parameter_name, $parameters)) { @@ -87,7 +87,7 @@ class Webtrees extends BaseTheme { protected function stylesheets() { return array( 'themes/webtrees/jquery-ui-1.11.2/jquery-ui.css', - $this->cssUrl() . 'style.css', + $this->assetUrl() . 'style.css', ); } diff --git a/library/WT/Theme/Xenea.php b/library/WT/Theme/Xenea.php index d90de4a671..f15e4eb522 100644 --- a/library/WT/Theme/Xenea.php +++ b/library/WT/Theme/Xenea.php @@ -25,13 +25,13 @@ use WT_I18N; */ class Xenea extends BaseTheme { /** {@inheritdoc} */ - public function cssUrl() { + public function assetUrl() { return 'themes/xenea/css-1.7.0/'; } /** {@inheritdoc} */ protected function favicon() { - return ''; + return ''; } /** {@inheritdoc} */ @@ -97,7 +97,7 @@ class Xenea extends BaseTheme { protected function stylesheets() { return array( 'themes/xenea/jquery-ui-1.11.2/jquery-ui.css', - $this->cssUrl() . 'style.css', + $this->assetUrl() . 'style.css', ); } diff --git a/modules_v3/lightbox/module.php b/modules_v3/lightbox/module.php index e3dc30cc9b..dac8f8698d 100644 --- a/modules_v3/lightbox/module.php +++ b/modules_v3/lightbox/module.php @@ -65,19 +65,19 @@ class lightbox_WT_Module extends WT_Module implements WT_Module_Tab { // Add a new media object if ($WT_TREE->getPreference('MEDIA_UPLOAD') >= WT_USER_ACCESS_LEVEL) { $html .= ''; - $html .= '' . WT_I18N::translate('Add a new media object') . ''; + $html .= '' . WT_I18N::translate('Add a new media object') . ''; $html .= WT_I18N::translate('Add a new media object'); $html .= ''; // Link to an existing item $html .= ''; - $html .= '' . WT_I18N::translate('Link to an existing media object') . ''; + $html .= '' . WT_I18N::translate('Link to an existing media object') . ''; $html .= WT_I18N::translate('Link to an existing media object'); $html .= ''; } if (WT_USER_GEDCOM_ADMIN && $this->get_media()) { // Popup Reorder Media $html .= ''; - $html .= '' . WT_I18N::translate('Re-order media') . ''; + $html .= '' . WT_I18N::translate('Re-order media') . ''; $html .= WT_I18N::translate('Re-order media'); $html .= ''; } -- cgit v1.3