summaryrefslogtreecommitdiff
path: root/modules/tag/js
diff options
context:
space:
mode:
Diffstat (limited to 'modules/tag/js')
-rw-r--r--modules/tag/js/tag.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/modules/tag/js/tag.js b/modules/tag/js/tag.js
index a1eaeecd..aaae9e72 100644
--- a/modules/tag/js/tag.js
+++ b/modules/tag/js/tag.js
@@ -7,7 +7,7 @@ function ajaxify_tag_form() {
dataType: "json",
success: function(data) {
if (data.result == "success") {
- $.get($("#gTagCloud").attr("src"), function(data, textStatus) {
+ $.get($("#gTagCloud").attr("title"), function(data, textStatus) {
$("#gTagCloud").html(data);
});
}
@@ -23,22 +23,28 @@ function closeEditInPlaceForms() {
$("#gRenameTagForm").parent().html($("#gRenameTagForm").parent().data("revert"));
li.height("");
$(".gEditable", li).bind("click", editInPlace);
- $(".gDialogLink", li).bind("click", handleDialogEvent);
+ $(".gDialogLink", li).gallery_dialog();
}
}
+function str_replace(search_term, replacement, string) {
+ var temp = string.split(search_term);
+ return temp.join(replacement);
+}
+
function editInPlace(element) {
closeEditInPlaceForms();
// create edit form
var tag_id = $(this).attr('id').substr(5);
- var tag_name = $(this).text();
+ var tag_name = $(this).html();
var tag_width = $(this).width();
$(this).parent().data("revert", $(this).parent().html());
var form = '<form id="gRenameTagForm" method="post" class="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="' + tag_name + '" />';
+ form += '<input id="name" name="name" type="text" class="textbox" value="' +
+ str_replace('"', "&quot;", tag_name) + '" />';
form += '<input type="submit" class="submit ui-state-default ui-corner-all" value="' + save_i18n + '" i/>';
form += '<a href="#">' + cancel_i18n + '</a>';
form += '</form>';
@@ -66,3 +72,4 @@ function editInPlace(element) {
};
ajaxify_editInPlaceForm();
}
+