aboutsummaryrefslogtreecommitdiffstats
path: root/admin/template/goto/picture_modify.tpl
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-03-06 22:10:23 +0000
committerplegall <plg@piwigo.org>2010-03-06 22:10:23 +0000
commit1c545c601beeeaafacd367d7af2077742c0fcce6 (patch)
tree95ac1513741ea80c6bed3afd6869a1fdd3ec0bed /admin/template/goto/picture_modify.tpl
parent97a8ddcfe7c8d3f50b3e577c0915c551e7af12fa (diff)
feature 724: improved "add tags" form. Instead of a big list of checkboxes,
displays a dynamic list of tags with jQuery, with suggestions based on existing tags and the ability to create new tags on the fly. The change was applied only on admin/picture_modify.php for test purpose. Note : FCBKcomplete 2.7 had a bug on "remote tag" click, and the bug was fixed on 2.7.1. But the suggestions were not working with 2.7.1. So I took the 2.7 and applied the tiny change to make the "remove tag" click work. git-svn-id: http://piwigo.org/svn/trunk@5067 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/template/goto/picture_modify.tpl27
1 files changed, 25 insertions, 2 deletions
diff --git a/admin/template/goto/picture_modify.tpl b/admin/template/goto/picture_modify.tpl
index 4c8315d9b..77f1671a6 100644
--- a/admin/template/goto/picture_modify.tpl
+++ b/admin/template/goto/picture_modify.tpl
@@ -1,8 +1,25 @@
-
{include file='include/autosize.inc.tpl'}
{include file='include/dbselect.inc.tpl'}
{include file='include/datepicker.inc.tpl'}
+{known_script id="jquery.fcbkcomplete" src=$ROOT_URL|@cat:"template-common/lib/plugins/jquery.fcbkcomplete.js"}
+{literal}
+<script type="text/javascript">
+ $(document).ready(function() {
+ $("#tags").fcbkcomplete({
+ json_url: "admin.php?fckb_tags=1",
+ cache: false,
+ filter_case: true,
+ filter_hide: true,
+ firstselected: true,
+ filter_selected: true,
+ maxitems: 10,
+ newel: true
+ });
+ });
+</script>
+{/literal}
+
{literal}
<script type="text/javascript">
pwg_initialization_datepicker("#date_creation_day", "#date_creation_month", "#date_creation_year", "#date_creation_linked_date", "#date_creation_action_set");
@@ -119,7 +136,13 @@
<tr>
<td><strong>{'Tags'|@translate}</strong></td>
- <td>{$TAG_SELECTION}</td>
+ <td>
+<select id="tags" name="tags">
+{foreach from=$tags item=tag}
+ <option value="{$tag.value}" class="selected">{$tag.caption}</option>
+{/foreach}
+</select>
+ </td>
</tr>