summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2015-01-22 18:50:34 +0000
committerGreg Roach <fisharebest@gmail.com>2015-01-22 18:50:34 +0000
commit8d2596c94f1aaf9d1493f47946ab0cad746e24d0 (patch)
tree9d66b77f8c964cb4ce58cd9163166db972a819c6
parentc7c091304a23c9b6b130ec7ccad00a3c21056d08 (diff)
downloadwebtrees-8d2596c94f1aaf9d1493f47946ab0cad746e24d0.tar.gz
webtrees-8d2596c94f1aaf9d1493f47946ab0cad746e24d0.tar.bz2
webtrees-8d2596c94f1aaf9d1493f47946ab0cad746e24d0.zip
Fix #382 - but still need to make these private/protected
-rw-r--r--library/WT/Theme/Administration.php4
-rw-r--r--library/WT/Theme/BaseTheme.php38
-rw-r--r--library/WT/Theme/Clouds.php6
-rw-r--r--library/WT/Theme/Colors.php6
-rw-r--r--library/WT/Theme/Fab.php6
-rw-r--r--library/WT/Theme/Minimal.php6
-rw-r--r--library/WT/Theme/Webtrees.php8
-rw-r--r--library/WT/Theme/Xenea.php6
-rw-r--r--modules_v3/lightbox/module.php6
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 '<img src="' . $this->cssUrl() . $icon . '" title="' . WT_Gedcom_Tag::getLabel($fact->getTag()) . '">';
+ return '<img src="' . $this->assetUrl() . $icon . '" title="' . WT_Gedcom_Tag::getLabel($fact->getTag()) . '">';
} elseif (file_exists($dir . 'images/facts/NULL.png')) {
// Spacer image - for alignment - until we move to a sprite.
- return '<img src="' . Theme::theme()->cssUrl() . 'images/facts/NULL.png">';
+ return '<img src="' . Theme::theme()->assetUrl() . 'images/facts/NULL.png">';
} 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 '<link rel="icon" href="' . $this->cssUrl() . 'favicon.png" type="image/png">';
+ return '<link rel="icon" href="' . $this->assetUrl() . 'favicon.png" type="image/png">';
}
/** {@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 '<link rel="icon" href="' . $this->cssUrl() . 'favicon.png" type="image/png">';
+ return '<link rel="icon" href="' . $this->assetUrl() . 'favicon.png" type="image/png">';
}
/** {@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 '<link rel="icon" href="' . $this->cssUrl() . 'favicon.png" type="image/png">';
+ return '<link rel="icon" href="' . $this->assetUrl() . 'favicon.png" type="image/png">';
}
/** {@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 '<link rel="icon" href="' . $this->cssUrl() . 'favicon.png" type="image/png">';
+ return '<link rel="icon" href="' . $this->assetUrl() . 'favicon.png" type="image/png">';
}
/** {@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 '<link rel="icon" href="' . $this->cssUrl() . 'favicon.png" type="image/png">';
+ return '<link rel="icon" href="' . $this->assetUrl() . 'favicon.png" type="image/png">';
}
/** {@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 .= '<span><a href="#" onclick="window.open(\'addmedia.php?action=showmediaform&linktoid=' . $controller->record->getXref() . '\', \'_blank\', \'resizable=1,scrollbars=1,top=50,height=780,width=600\');return false;">';
- $html .= '<img src="' . Theme::theme()->cssUrl() . 'images/image_add.png" id="head_icon" class="icon" title="' . WT_I18N::translate('Add a new media object') . '" alt="' . WT_I18N::translate('Add a new media object') . '">';
+ $html .= '<img src="' . Theme::theme()->assetUrl() . 'images/image_add.png" id="head_icon" class="icon" title="' . WT_I18N::translate('Add a new media object') . '" alt="' . WT_I18N::translate('Add a new media object') . '">';
$html .= WT_I18N::translate('Add a new media object');
$html .= '</a></span>';
// Link to an existing item
$html .= '<span><a href="#" onclick="window.open(\'inverselink.php?linktoid=' . $controller->record->getXref() . '&linkto=person\', \'_blank\', \'resizable=1,scrollbars=1,top=50,height=300,width=450\');">';
- $html .= '<img src="' . Theme::theme()->cssUrl() . 'images/image_link.png" id="head_icon" class="icon" title="' . WT_I18N::translate('Link to an existing media object') . '" alt="' . WT_I18N::translate('Link to an existing media object') . '">';
+ $html .= '<img src="' . Theme::theme()->assetUrl() . 'images/image_link.png" id="head_icon" class="icon" title="' . WT_I18N::translate('Link to an existing media object') . '" alt="' . WT_I18N::translate('Link to an existing media object') . '">';
$html .= WT_I18N::translate('Link to an existing media object');
$html .= '</a></span>';
}
if (WT_USER_GEDCOM_ADMIN && $this->get_media()) {
// Popup Reorder Media
$html .= '<span><a href="#" onclick="reorder_media(\'' . $controller->record->getXref() . '\')">';
- $html .= '<img src="' . Theme::theme()->cssUrl() . 'images/images.png" id="head_icon" class="icon" title="' . WT_I18N::translate('Re-order media') . '" alt="' . WT_I18N::translate('Re-order media') . '">';
+ $html .= '<img src="' . Theme::theme()->assetUrl() . 'images/images.png" id="head_icon" class="icon" title="' . WT_I18N::translate('Re-order media') . '" alt="' . WT_I18N::translate('Re-order media') . '">';
$html .= WT_I18N::translate('Re-order media');
$html .= '</a></span>';
}