summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-09-13 22:31:23 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-09-13 22:31:23 -0700
commit0b0586a224777bb12d86b5661f7826d48137873c (patch)
tree76d626b67200ee142ebb8a94240cb2d7aa50e6cb /modules
parentdbeadfc2ab7e645a9e5a92e05cb5d90f4329480c (diff)
parentc527e70f26a85403633c9c8c7d32cc3b30cf625e (diff)
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'modules')
-rw-r--r--modules/comment/helpers/comment_theme.php1
-rw-r--r--modules/comment/js/comment.js18
-rw-r--r--modules/gallery/controllers/albums.php12
-rw-r--r--modules/gallery/helpers/gallery.php2
-rw-r--r--modules/gallery/views/upgrader.html.php2
-rw-r--r--modules/organize/js/organize.js2
6 files changed, 21 insertions, 16 deletions
diff --git a/modules/comment/helpers/comment_theme.php b/modules/comment/helpers/comment_theme.php
index 38a00b5c..e9b402f6 100644
--- a/modules/comment/helpers/comment_theme.php
+++ b/modules/comment/helpers/comment_theme.php
@@ -27,6 +27,7 @@ class comment_theme_Core {
$block = new Block;
$block->css_id = "gComments";
$block->title = t("Comments");
+ $block->anchor = "comments";
$view = new View("comments.html");
$view->comments = ORM::factory("comment")
diff --git a/modules/comment/js/comment.js b/modules/comment/js/comment.js
index 9fd63c1a..bff83770 100644
--- a/modules/comment/js/comment.js
+++ b/modules/comment/js/comment.js
@@ -1,13 +1,15 @@
$("document").ready(function() {
$("#gAddCommentButton").click(function(event) {
event.preventDefault();
- $.get($(this).attr("href"),
- {},
- function(data) {
- $("#gCommentDetail").append(data);
- ajaxify_comment_form();
- });
- });
+ if (!$("#gAddCommentForm").length) {
+ $.get($(this).attr("href"),
+ {},
+ function(data) {
+ $("#gCommentDetail").append(data);
+ ajaxify_comment_form();
+ });
+ }
+ });
});
function ajaxify_comment_form() {
@@ -22,7 +24,7 @@ function ajaxify_comment_form() {
$.get(data.resource, function(data, textStatus) {
$("#gComments .gBlockContent ul:first").append("<li>"+data+"</li>");
$("#gComments .gBlockContent ul:first li:last").effect("highlight", {color: "#cfc"}, 8000);
- $("#gAddCommentForm").hide(2000);
+ $("#gAddCommentForm").hide(2000).remove();
$("#gNoCommentsYet").hide(2000);
});
}
diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php
index 183c26d0..08a60132 100644
--- a/modules/gallery/controllers/albums.php
+++ b/modules/gallery/controllers/albums.php
@@ -40,11 +40,13 @@ class Albums_Controller extends Items_Controller {
if ($show) {
$index = $album->get_position($show);
- $page = ceil($index / $page_size);
- if ($page == 1) {
- url::redirect($album->abs_url());
- } else {
- url::redirect($album->abs_url("page=$page"));
+ if ($index) {
+ $page = ceil($index / $page_size);
+ if ($page == 1) {
+ url::redirect($album->abs_url());
+ } else {
+ url::redirect($album->abs_url("page=$page"));
+ }
}
}
diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php
index 813134eb..a892287f 100644
--- a/modules/gallery/helpers/gallery.php
+++ b/modules/gallery/helpers/gallery.php
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class gallery_Core {
- const VERSION = "3.0 git (pre-beta3)";
+ const VERSION = "3.0 beta 3";
/**
* If Gallery is in maintenance mode, then force all non-admins to get routed to a "This site is
diff --git a/modules/gallery/views/upgrader.html.php b/modules/gallery/views/upgrader.html.php
index 5f93c2d5..8a01cd29 100644
--- a/modules/gallery/views/upgrader.html.php
+++ b/modules/gallery/views/upgrader.html.php
@@ -81,7 +81,7 @@
<? else: // can_upgrade ?>
<h1> <?= t("Who are you?") ?> </h1>
<p>
- <?= t("You're not logged in as an administrator, so we have to verify you to make sure it's ok for you to do an upgrade. To prove you can run an upgrade, create a file called %name in your <b>gallery3/var/tmp</b> directory.", array("name" => "<br/><b>$upgrade_token</b>")) ?>
+ <?= t("You're not logged in as an administrator, so we have to verify you to make sure it's ok for you to do an upgrade. To prove you can run an upgrade, create a file called <br/><b>%name</b> in your <b>gallery3/var/tmp</b> directory.", array("name" => "$upgrade_token")) ?>
</p>
<a href="<?= url::site("upgrader?") ?>"><?= t("Ok, I've done that") ?></a>
<? endif // can_upgrade ?>
diff --git a/modules/organize/js/organize.js b/modules/organize/js/organize.js
index 7d204708..cfaff01c 100644
--- a/modules/organize/js/organize.js
+++ b/modules/organize/js/organize.js
@@ -142,7 +142,7 @@
$("#gDialog").bind("dialogopen", function(event, ui) {
$("#gOrganize").height($("#gDialog").innerHeight() - 20);
$("#gOrganizeMicroThumbPanel").height($("#gDialog").innerHeight() - 90);
- $("#gOrganizeAlbumTree").height($("#gDialog").innerHeight() - 59);
+ $("#gOrganizeTreeContainer").height($("#gDialog").innerHeight() - 59);
});
$("#gDialog").bind("dialogclose", function(event, ui) {