summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-10-07 19:09:10 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-10-07 19:09:10 -0700
commitfa2ec8825dcaeaceb4857e3880ee4eee5de5bf71 (patch)
treed7a16477d7890932ee1ae7bb91c95dd5d7010445 /modules
parente1a394b6bfb6b7c830eb353f2056d39fd8d1b0f7 (diff)
parentd71a8ef5d0d2d1ddbc450f1c5962b4c3b3a6fdcd (diff)
Merge branch 'master' of git@github.com:gallery/gallery3 into talmdal_dev
Diffstat (limited to 'modules')
-rw-r--r--modules/comment/views/admin_comments.html.php2
-rw-r--r--modules/g2_import/views/admin_g2_import.html.php2
-rw-r--r--modules/gallery/helpers/gallery.php8
-rw-r--r--modules/gallery/helpers/message.php2
-rw-r--r--modules/gallery/views/admin_advanced_settings.html.php2
-rw-r--r--modules/gallery/views/admin_dashboard.html.php4
-rw-r--r--modules/gallery/views/admin_sidebar.html.php4
-rw-r--r--modules/gallery/views/admin_themes.html.php8
-rw-r--r--modules/gallery/views/admin_users.html.php2
-rw-r--r--modules/gallery/views/permissions_browse.html.php2
-rw-r--r--modules/gallery/views/permissions_form.html.php12
-rw-r--r--modules/gallery/views/simple_uploader.html.php2
-rw-r--r--modules/organize/views/organize_dialog.html.php2
13 files changed, 28 insertions, 24 deletions
diff --git a/modules/comment/views/admin_comments.html.php b/modules/comment/views/admin_comments.html.php
index 62c64d12..e32a843f 100644
--- a/modules/comment/views/admin_comments.html.php
+++ b/modules/comment/views/admin_comments.html.php
@@ -38,7 +38,7 @@
<h1> <?= t("Manage Comments") ?> </h1>
<!-- @todo: Highlight active menu option -->
- <div id="g-admin-comments-menu">
+ <div id="g-admin-comments-menu" class="g-clearfix">
<?= $menu ?>
</div>
diff --git a/modules/g2_import/views/admin_g2_import.html.php b/modules/g2_import/views/admin_g2_import.html.php
index 51a1e245..fd8ae63c 100644
--- a/modules/g2_import/views/admin_g2_import.html.php
+++ b/modules/g2_import/views/admin_g2_import.html.php
@@ -30,7 +30,7 @@
<? if (g2_import::is_initialized()): ?>
<div id="g-admin-g2-import-details">
<h2> <?= t("Import") ?> </h2>
- <ul id="g-action-status">
+ <ul id="g-action-status" class="g-message-block">
<li class="g-success">
<?= t("Gallery version %version detected", array("version" => g2_import::version())) ?>
</li>
diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php
index 37a08d08..50e2c43b 100644
--- a/modules/gallery/helpers/gallery.php
+++ b/modules/gallery/helpers/gallery.php
@@ -92,8 +92,12 @@ class gallery_Core {
static function find_file($directory, $file, $required=false) {
$file_name = substr($file, 0, -strlen($ext = strrchr($file, '.')));
$file_name = Kohana::find_file($directory, $file_name, $required, substr($ext, 1));
- if (!$file_name && file_exists(DOCROOT . "lib/$file")) {
- return "lib/$file";
+ if (!$file_name) {
+ if (file_exists(DOCROOT . "lib/$directory/$file")) {
+ return "lib/$directory/$file";
+ } else if (file_exists(DOCROOT . "lib/$file")) {
+ return "lib/$file";
+ }
}
if (is_string($file_name)) {
diff --git a/modules/gallery/helpers/message.php b/modules/gallery/helpers/message.php
index 0d638571..02680655 100644
--- a/modules/gallery/helpers/message.php
+++ b/modules/gallery/helpers/message.php
@@ -81,7 +81,7 @@ class message_Core {
$buf[] = "<li class=\"" . self::severity_class($msg[1]) . "\">$msg[0]</li>";
}
if ($buf) {
- return "<ul id=\"g-action-status\">" . implode("", $buf) . "</ul>";
+ return "<ul id=\"g-action-status\" class=\"g-message-block\">" . implode("", $buf) . "</ul>";
}
}
diff --git a/modules/gallery/views/admin_advanced_settings.html.php b/modules/gallery/views/admin_advanced_settings.html.php
index 422bd8f7..70ecd261 100644
--- a/modules/gallery/views/admin_advanced_settings.html.php
+++ b/modules/gallery/views/admin_advanced_settings.html.php
@@ -4,7 +4,7 @@
<p>
<?= t("Here are internal Gallery configuration settings. Most of these settings are accessible elsewhere in the administrative console.") ?>
</p>
- <ul id="g-action-status">
+ <ul id="g-action-status" class="g-message-block">
<li class="g-warning">
<b><?= t("Change these values at your own risk!") ?></b>
</li>
diff --git a/modules/gallery/views/admin_dashboard.html.php b/modules/gallery/views/admin_dashboard.html.php
index 154aa172..f391547e 100644
--- a/modules/gallery/views/admin_dashboard.html.php
+++ b/modules/gallery/views/admin_dashboard.html.php
@@ -16,7 +16,7 @@
cursor: "move",
handle: $(".ui-widget-header"),
opacity: 0.6,
- placeholder: "g-drop-target",
+ placeholder: "g-target",
stop: update_blocks
});
@@ -26,7 +26,7 @@
cursor: "move",
handle: $(".ui-widget-header"),
opacity: 0.6,
- placeholder: "g-drop-target",
+ placeholder: "g-target",
stop: update_blocks
});
});
diff --git a/modules/gallery/views/admin_sidebar.html.php b/modules/gallery/views/admin_sidebar.html.php
index 3137a2a6..b4f339ae 100644
--- a/modules/gallery/views/admin_sidebar.html.php
+++ b/modules/gallery/views/admin_sidebar.html.php
@@ -4,7 +4,7 @@
$(".g-admin-blocks-list ul").sortable({
connectWith: ".g-sortable-blocks",
opacity: .7,
- placeholder: "ui-state-highlight",
+ placeholder: "g-target",
update: function(event,ui) {
if ($(this).attr("id") == "g-active-blocks") {
var active_blocks = "";
@@ -18,7 +18,7 @@
}
});
}
- },
+ }
}).disableSelection();
});
</script>
diff --git a/modules/gallery/views/admin_themes.html.php b/modules/gallery/views/admin_themes.html.php
index 714b3af8..a75d9f04 100644
--- a/modules/gallery/views/admin_themes.html.php
+++ b/modules/gallery/views/admin_themes.html.php
@@ -14,7 +14,7 @@
<div id="g-site-theme">
<h2> <?= t("Gallery theme") ?> </h2>
- <div class="g-block g-selected">
+ <div class="g-block g-selected g-clearfix">
<img src="<?= url::file("themes/{$site}/thumbnail.png") ?>"
alt="<?= html::clean_attribute($themes[$site]->name) ?>" />
<h3> <?= $themes[$site]->name ?> </h3>
@@ -29,7 +29,7 @@
<? foreach ($themes as $id => $info): ?>
<? if (!$info->site) continue ?>
<? if ($id == $site) continue ?>
- <div class="g-block">
+ <div class="g-block g-clearfix">
<a href="<?= url::site("admin/themes/preview/site/$id") ?>" class="g-dialog-link" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>">
<img src="<?= url::file("themes/{$id}/thumbnail.png") ?>"
alt="<?= html::clean_attribute($info->name) ?>" />
@@ -52,7 +52,7 @@
<div id="g-admin-theme">
<h2> <?= t("Admin theme") ?> </h2>
- <div class="g-block g-selected">
+ <div class="g-block g-selected g-clearfix">
<img src="<?= url::file("themes/{$admin}/thumbnail.png") ?>"
alt="<?= html::clean_attribute($themes[$admin]->name) ?>" />
<h3> <?= $themes[$admin]->name ?> </h3>
@@ -67,7 +67,7 @@
<? foreach ($themes as $id => $info): ?>
<? if (!$info->admin) continue ?>
<? if ($id == $admin) continue ?>
- <div class="g-block">
+ <div class="g-block g-clearfix">
<a href="<?= url::site("admin/themes/preview/admin/$id") ?>" class="g-dialog-link" title="<?= t("Theme Preview: %theme_name", array("theme_name" => $info->name))->for_html_attr() ?>">
<img src="<?= url::file("themes/{$id}/thumbnail.png") ?>"
alt="<?= html::clean_attribute($info->name) ?>" />
diff --git a/modules/gallery/views/admin_users.html.php b/modules/gallery/views/admin_users.html.php
index 28daff29..a127bc15 100644
--- a/modules/gallery/views/admin_users.html.php
+++ b/modules/gallery/views/admin_users.html.php
@@ -103,7 +103,7 @@
</div>
</div>
-<div id="g-group-admin" class="g-block">
+<div id="g-group-admin" class="g-block g-clearfix">
<a href="<?= url::site("admin/users/add_group_form") ?>"
class="g-dialog-link g-button g-right ui-icon-left ui-state-default ui-corner-all"
title="<?= t("Create a new group")->for_html_attr() ?>">
diff --git a/modules/gallery/views/permissions_browse.html.php b/modules/gallery/views/permissions_browse.html.php
index 540f2735..e432f56b 100644
--- a/modules/gallery/views/permissions_browse.html.php
+++ b/modules/gallery/views/permissions_browse.html.php
@@ -26,7 +26,7 @@
</script>
<div id="g-permissions">
<? if (!$htaccess_works): ?>
- <ul id="g-action-status">
+ <ul id="g-action-status" class="g-message-block">
<li class="g-error">
<?= t("Oh no! Your server needs a configuration change in order for you to hide photos! Ask your server administrator to enable <a %mod_rewrite_attrs>mod_rewrite</a> and set <a %apache_attrs><i>AllowOverride FileInfo Options</i></a> to fix this.",
array("mod_rewrite_attrs" => html::mark_clean('href="http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html" target="_blank"'),
diff --git a/modules/gallery/views/permissions_form.html.php b/modules/gallery/views/permissions_form.html.php
index e2871adb..f1714119 100644
--- a/modules/gallery/views/permissions_form.html.php
+++ b/modules/gallery/views/permissions_form.html.php
@@ -32,22 +32,22 @@
<? if ($allowed): ?>
<td class="g-allowed">
<a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)" title="<?= t('allowed through parent album, click to allow explicitly')->for_html_attr() ?>">
- <img src="<?= url::file(gallery::find_file("images", "ico-success-pale.png")) ?>" alt="<?= t('passive allowed icon')->for_html_attr() ?>" />
+ <img src="<?= url::file(gallery::find_file("images", "ico-success-passive.png")) ?>" alt="<?= t('passive allowed icon')->for_html_attr() ?>" />
</a>
<a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
title="<?= t('click to deny')->for_html_attr() ?>">
- <img src="<?= url::file(gallery::find_file("images", "ico-denied-gray.png")) ?>" alt="<?= t('inactive denied icon')->for_html_attr() ?>" />
+ <img src="<?= url::file(gallery::find_file("images", "ico-denied-inactive.png")) ?>" alt="<?= t('inactive denied icon')->for_html_attr() ?>" />
</a>
</td>
<? else: ?>
<td class="g-denied">
<a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
title="<?= t('click to allow')->for_html_attr() ?>">
- <img src="<?= url::file(gallery::find_file("images", "ico-success-gray.png")) ?>" alt="<?= t('inactive allowed icon')->for_html_attr() ?>" />
+ <img src="<?= url::file(gallery::find_file("images", "ico-success-inactive.png")) ?>" alt="<?= t('inactive allowed icon')->for_html_attr() ?>" />
</a>
<a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
title="<?= t('denied through parent album, click to deny explicitly')->for_html_attr() ?>">
- <img src="<?= url::file(gallery::find_file("images", "ico-denied-pale.png")) ?>" alt="<?= t('passive denied icon')->for_html_attr() ?>" />
+ <img src="<?= url::file(gallery::find_file("images", "ico-denied-passive.png")) ?>" alt="<?= t('passive denied icon')->for_html_attr() ?>" />
</a>
</td>
<? endif ?>
@@ -56,7 +56,7 @@
<td class="g-denied">
<a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
title="<?= t('click to allow')->for_html_attr() ?>">
- <img src="<?= url::file(gallery::find_file("images", "ico-success-gray.png")) ?>" alt="<?= t('inactive allowed icon')->for_html_attr() ?>" />
+ <img src="<?= url::file(gallery::find_file("images", "ico-success-inactive.png")) ?>" alt="<?= t('inactive allowed icon')->for_html_attr() ?>" />
</a>
<? if ($item->id == 1): ?>
<img src="<?= url::file(gallery::find_file("images", "ico-denied.png")) ?>" alt="<?= t('denied icon')->for_html_attr() ?>" title="<?= t('denied')->for_html_attr() ?>"/>
@@ -79,7 +79,7 @@
<? endif ?>
<a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
title="<?= t('click to deny')->for_html_attr() ?>">
- <img src="<?= url::file(gallery::find_file("images", "ico-denied-gray.png")) ?>" alt="<?= t('inactive denied icon')->for_html_attr() ?>" />
+ <img src="<?= url::file(gallery::find_file("images", "ico-denied-inactive.png")) ?>" alt="<?= t('inactive denied icon')->for_html_attr() ?>" />
</a>
</td>
<? endif ?>
diff --git a/modules/gallery/views/simple_uploader.html.php b/modules/gallery/views/simple_uploader.html.php
index ddad1fc4..ff73dd6f 100644
--- a/modules/gallery/views/simple_uploader.html.php
+++ b/modules/gallery/views/simple_uploader.html.php
@@ -12,7 +12,7 @@
<div id="g-add-photos">
<? if (ini_get("suhosin.session.encrypt")): ?>
- <ul id="g-action-status">
+ <ul id="g-action-status" class="g-message-block">
<li class="g-error">
<?= t("Error: your server is configured to use the <a href=\"%encrypt_url\"><code>suhosin.session.encrypt</code></a> setting from <a href=\"%suhosin_url\">Suhosin</a>. You must disable this setting to upload photos.",
array("encrypt_url" => "http://www.hardened-php.net/suhosin/configuration.html#suhosin.session.encrypt",
diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php
index dc627d10..7dcb01d9 100644
--- a/modules/organize/views/organize_dialog.html.php
+++ b/modules/organize/views/organize_dialog.html.php
@@ -12,7 +12,7 @@
<div class="yui-u first">
<h3><?= t("Albums") ?></h3>
</div>
- <div id="g-action-status" class="yui-u">
+ <div id="g-action-status" class="g-message-block yui-u">
<div class="g-info"><?= t("Drag and drop photos to re-order or move between albums") ?></div>
</div>
</div>