summaryrefslogtreecommitdiff
path: root/modules/tag/views
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-11-05 12:59:37 -0800
committerTim Almdal <tnalmdal@shaw.ca>2009-11-05 13:01:01 -0800
commit72a8ce696e37a74ed8bbea31364b39f9e0776bbc (patch)
treeed19098efa52d1869457308c2d485a4e9e21387a /modules/tag/views
parent03408f3e39bbb0b407b2949721090dd6b07913ac (diff)
Refactor out the in place editting and use the new gallery.in_place_edit widget to manage the tag renames. Part the fix for ticket #750.
Diffstat (limited to 'modules/tag/views')
-rw-r--r--modules/tag/views/admin_tags.html.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/modules/tag/views/admin_tags.html.php b/modules/tag/views/admin_tags.html.php
index 10d7921a..b637a7f1 100644
--- a/modules/tag/views/admin_tags.html.php
+++ b/modules/tag/views/admin_tags.html.php
@@ -1,18 +1,15 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<script type="text/javascript">
- 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
$("#g-tag-admin .g-tag-name").attr("title", <?= t("Click to edit this tag")->for_js() ?>);
$("#g-tag-admin .g-delete-link").attr("title", $(".g-delete-link:first span").html());
// In-place editing for tag admin
- $(".g-editable").bind("click", editInPlace);
+ $(".g-editable").gallery_in_place_edit({
+ form_url: <?= html::js_string(url::site("admin/tags/form_rename/__ID__")) ?>
+ });
});
- // 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()) ?>;
</script>
<? $tags_per_column = $tags->count()/5 ?>