summaryrefslogtreecommitdiff
path: root/modules/tag/js
diff options
context:
space:
mode:
authorChad Kieffer <ckieffer@gmail.com>2009-10-17 12:48:54 -0600
committerChad Kieffer <ckieffer@gmail.com>2009-10-17 12:48:54 -0600
commitf2b6ec6637c130044cc08ff186433f10ad2f3839 (patch)
treea567261190b76eb2c94a82f2d35d64763415fd71 /modules/tag/js
parent99db7e274818e4c3331cf55aba1d8a47d6ab8dde (diff)
Move tag css from theme to the module. Introduced generic .g-inline class for inline elements, including lists and forms.
Diffstat (limited to 'modules/tag/js')
-rw-r--r--modules/tag/js/tag.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/modules/tag/js/tag.js b/modules/tag/js/tag.js
index e2e6b782..17845272 100644
--- a/modules/tag/js/tag.js
+++ b/modules/tag/js/tag.js
@@ -8,8 +8,8 @@ function ajaxify_tag_form() {
success: function(data) {
if (data.result == "success") {
$.get($("#g-tag-cloud").attr("title"), function(data, textStatus) {
- $("#g-tag-cloud").html(data);
- });
+ $("#g-tag-cloud").html(data);
+ });
}
$("#g-tag form").resetForm();
}
@@ -18,10 +18,10 @@ function ajaxify_tag_form() {
function closeEditInPlaceForms() {
// closes currently open inplace edit forms
- if ($("#g-rename-tag-form").length) {
+ if ($("#g-edit-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"));
+ var li = $("#g-edit-tag-form").parent();
+ $("#g-edit-tag-form").parent().html($("#g-edit-tag-form").parent().data("revert"));
li.height("");
$(".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 = '<form id="g-rename-tag-form" method="post" class="ui-helper-clearfix" ';
+ var form = '<form id="g-edit-tag-form" method="post" class="g-inline ui-helper-clearfix" ';
form += 'action="' + TAG_RENAME_URL.replace('__ID__', tag_id) + '">';
form += '<input name="csrf" type="hidden" value="' + csrf_token + '" />';
form += '<input id="name" name="name" type="text" class="textbox" value="' +
@@ -52,14 +52,14 @@ function editInPlace(element) {
// add edit form
$(this).parent().html(form);
- $("#g-rename-tag-form #name")
+ $("#g-edit-tag-form #name")
.width(tag_width+30)
.focus();
- //$("#g-rename-tag-form").parent().height( $("#g-rename-tag-form").height() );
- $("#g-rename-tag-form a").bind("click", closeEditInPlaceForms);
+ //$("#g-edit-tag-form").parent().height( $("#g-edit-tag-form").height() );
+ $("#g-edit-tag-form a").bind("click", closeEditInPlaceForms);
ajaxify_editInPlaceForm = function() {
- $("#g-rename-tag-form").ajaxForm({
+ $("#g-edit-tag-form").ajaxForm({
dataType: "json",
success: function(data) {
if (data.result == "success") {
@@ -68,7 +68,7 @@ function editInPlace(element) {
console.log(data);
window.location.reload();
} else if (data.result == "error") {
- $("#g-rename-tag-form #name")
+ $("#g-edit-tag-form #name")
.addClass("g-error")
.focus();
$("#g-tag-admin").before("<p id=\"g-edit-error-message\" class=\"g-error\">" + data.message + "</p>");