From 3e6ba7acc3291f2268cbe9c9bef0a492b557babb Mon Sep 17 00:00:00 2001
From: Chad Kieffer
Date: Sun, 4 Oct 2009 00:27:22 -0600
Subject: Renamed most, if not all css selectors from gName to g-name. Moved a
few shared images from wind to lib. Deleted unused images in the admin_wind.
This will likely break a few ajax features.
---
modules/tag/helpers/tag.php | 6 +++---
modules/tag/helpers/tag_block.php | 2 +-
modules/tag/js/tag.js | 38 +++++++++++++++++------------------
modules/tag/views/admin_tags.html.php | 14 ++++++-------
modules/tag/views/tag_block.html.php | 10 ++++-----
5 files changed, 35 insertions(+), 35 deletions(-)
(limited to 'modules/tag')
diff --git a/modules/tag/helpers/tag.php b/modules/tag/helpers/tag.php
index be5461a4..d4278802 100644
--- a/modules/tag/helpers/tag.php
+++ b/modules/tag/helpers/tag.php
@@ -98,7 +98,7 @@ class tag_Core {
}
static function get_add_form($item) {
- $form = new Forge("tags", "", "post", array("id" => "gAddTagForm"));
+ $form = new Forge("tags", "", "post", array("id" => "g-add-tag-form"));
$label = $item->is_album() ?
t("Add tag to album") :
($item->is_photo() ? t("Add tag to photo") : t("Add tag to movie"));
@@ -111,7 +111,7 @@ class tag_Core {
}
static function get_rename_form($tag) {
- $form = new Forge("admin/tags/rename/$tag->id", "", "post", array("id" => "gRenameTagForm"));
+ $form = new Forge("admin/tags/rename/$tag->id", "", "post", array("id" => "g-rename-tag-form"));
$group = $form->group("rename_tag")->label(t("Rename Tag"));
$group->input("name")->label(t("Tag name"))->value($tag->name)->rules("required|length[1,64]");
$group->inputs["name"]->error_messages("in_use", t("There is already a tag with that name"));
@@ -120,7 +120,7 @@ class tag_Core {
}
static function get_delete_form($tag) {
- $form = new Forge("admin/tags/delete/$tag->id", "", "post", array("id" => "gDeleteTagForm"));
+ $form = new Forge("admin/tags/delete/$tag->id", "", "post", array("id" => "g-delete-tag-form"));
$group = $form->group("delete_tag")
->label(t("Really delete tag %tag_name?", array("tag_name" => $tag->name)));
$group->submit("")->value(t("Delete Tag"));
diff --git a/modules/tag/helpers/tag_block.php b/modules/tag/helpers/tag_block.php
index bbcc5fd1..37da0b16 100644
--- a/modules/tag/helpers/tag_block.php
+++ b/modules/tag/helpers/tag_block.php
@@ -27,7 +27,7 @@ class tag_block_Core {
switch ($block_id) {
case "tag":
$block = new Block();
- $block->css_id = "gTag";
+ $block->css_id = "g-tag";
$block->title = t("Popular Tags");
$block->content = new View("tag_block.html");
$block->content->cloud = tag::cloud(30);
diff --git a/modules/tag/js/tag.js b/modules/tag/js/tag.js
index bc2331c9..e2e6b782 100644
--- a/modules/tag/js/tag.js
+++ b/modules/tag/js/tag.js
@@ -3,28 +3,28 @@ $("document").ready(function() {
});
function ajaxify_tag_form() {
- $("#gTag form").ajaxForm({
+ $("#g-tag form").ajaxForm({
dataType: "json",
success: function(data) {
if (data.result == "success") {
- $.get($("#gTagCloud").attr("title"), function(data, textStatus) {
- $("#gTagCloud").html(data);
+ $.get($("#g-tag-cloud").attr("title"), function(data, textStatus) {
+ $("#g-tag-cloud").html(data);
});
}
- $("#gTag form").resetForm();
+ $("#g-tag form").resetForm();
}
});
}
function closeEditInPlaceForms() {
// closes currently open inplace edit forms
- if ($("#gRenameTagForm").length) {
- $("#gEditErrorMessage").remove();
- var li = $("#gRenameTagForm").parent();
- $("#gRenameTagForm").parent().html($("#gRenameTagForm").parent().data("revert"));
+ if ($("#g-rename-tag-form").length) {
+ $("#g-edit-error-message").remove();
+ var li = $("#g-rename-tag-form").parent();
+ $("#g-rename-tag-form").parent().html($("#g-rename-tag-form").parent().data("revert"));
li.height("");
- $(".gEditable", li).bind("click", editInPlace);
- $(".g-dialogLink", li).gallery_dialog();
+ $(".g-editable", li).bind("click", editInPlace);
+ $(".g-dialog-link", li).gallery_dialog();
}
}
@@ -41,7 +41,7 @@ function editInPlace(element) {
var tag_name = $(this).html();
var tag_width = $(this).width();
$(this).parent().data("revert", $(this).parent().html());
- var form = '
");
+ $("#g-tag-admin").before("" + data.message + "
");
}
}
});
diff --git a/modules/tag/views/admin_tags.html.php b/modules/tag/views/admin_tags.html.php
index a4bd5d8f..27813a91 100644
--- a/modules/tag/views/admin_tags.html.php
+++ b/modules/tag/views/admin_tags.html.php
@@ -3,18 +3,18 @@
var TAG_RENAME_URL = = html::js_string(url::site("admin/tags/rename/__ID__")) ?>;
$("document").ready(function() {
// using JS for adding link titles to avoid running t() for each tag
- $("#gTagAdmin .tag-name").attr("title", = t("Click to edit this tag")->for_js() ?>);
- $("#gTagAdmin .delete-link").attr("title", $(".delete-link:first span").html());
+ $("#g-tag-admin .tag-name").attr("title", = t("Click to edit this tag")->for_js() ?>);
+ $("#g-tag-admin .delete-link").attr("title", $(".delete-link:first span").html());
// In-place editing for tag admin
- $(".gEditable").bind("click", editInPlace);
+ $(".g-editable").bind("click", editInPlace);
});
// make some values available within tag.js
var csrf_token = "= $csrf ?>";
var save_i18n = = html::js_string(t("save")->for_html_attr()) ?>;
var cancel_i18n = = html::js_string(t("cancel")->for_html_attr()) ?>;
-
+
= t("Tag Admin") ?>
@@ -22,7 +22,7 @@
$tags_per_column = $tags->count()/5 ?>
$column_tag_count = 0 ?>
-
+
= t2("There is one tag", "There are %count tags", $tags->count()) ?>
@@ -47,10 +47,10 @@
endif ?>
- = html::clean($tag->name) ?>
+ = html::clean($tag->name) ?>
(= $tag->count ?>)
id") ?>"
- class="g-dialogLink delete-link g-button">
+ class="g-dialog-link delete-link g-button">
= t("Delete this tag") ?>
diff --git a/modules/tag/views/tag_block.html.php b/modules/tag/views/tag_block.html.php
index 59a4ef88..8c79b74a 100644
--- a/modules/tag/views/tag_block.html.php
+++ b/modules/tag/views/tag_block.html.php
@@ -1,8 +1,8 @@
-
-">
+
">
= $cloud ?>
= $form ?>
\ No newline at end of file
--
cgit v1.2.3