summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/comment/helpers/comment_theme.php1
-rw-r--r--modules/comment/js/comment.js18
-rw-r--r--modules/gallery/views/upgrader.html.php2
-rw-r--r--modules/organize/js/organize.js2
-rw-r--r--themes/admin_default/views/admin.html.php2
-rw-r--r--themes/admin_default/views/block.html.php3
-rw-r--r--themes/default/views/block.html.php2
7 files changed, 19 insertions, 11 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/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) {
diff --git a/themes/admin_default/views/admin.html.php b/themes/admin_default/views/admin.html.php
index f77881bb..ef15ed25 100644
--- a/themes/admin_default/views/admin.html.php
+++ b/themes/admin_default/views/admin.html.php
@@ -43,7 +43,7 @@
<div id="gHeader">
<?= $theme->admin_header_top() ?>
<ul id="gLoginMenu">
- <li class="first"><?= html::anchor(item::root()->url(), "&larr; ".t("Back to the Gallery")) ?></li>
+ <li class="first"><?= html::anchor(item::root()->abs_url(), "&larr; ".t("Back to the Gallery")) ?></li>
<li id="gLogoutLink"><a href="<?= url::site("logout?csrf=$csrf&amp;continue=" . urlencode(item::root()->url())) ?>"><?= t("Logout") ?></a></li>
</ul>
<a id="gLogo" href="<?= item::root()->url() ?>" title="<?= t("go back to the Gallery")->for_html_attr() ?>">
diff --git a/themes/admin_default/views/block.html.php b/themes/admin_default/views/block.html.php
index 21512d02..6cbea76e 100644
--- a/themes/admin_default/views/block.html.php
+++ b/themes/admin_default/views/block.html.php
@@ -1,4 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
+<? if ($anchor): ?>
+<a name="<?= $anchor ?>"></a>
+<? endif ?>
<div block_id="<?= $id ?>" id="<?= $css_id ?>" class="gBlock ui-widget">
<div class="ui-dialog-titlebar ui-widget-header ui-helper-clearfix ui-icon-right">
<? if ($css_id != "gBlockAdder"): ?>
diff --git a/themes/default/views/block.html.php b/themes/default/views/block.html.php
index 37504861..e8cff833 100644
--- a/themes/default/views/block.html.php
+++ b/themes/default/views/block.html.php
@@ -1,5 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
+<? if ($anchor): ?>
<a name="<?= $anchor ?>"></a>
+<? endif ?>
<div id="<?= $css_id ?>" class="gBlock">
<h2><?= $title ?></h2>
<div class="gBlockContent">