diff options
author | plegall <plg@piwigo.org> | 2010-03-19 12:50:19 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2010-03-19 12:50:19 +0000 |
commit | 3a076f460d89628e75a7e9e693be0c3962ac2c39 (patch) | |
tree | 2155ac51c61e251057a1d9127b54a4d8588950df /admin/themes | |
parent | b7fee65e8fccc08b3741bc63725f58aae73eb456 (diff) |
feature 724: FCBKcomplete propagated to element_set_global and
element_set_unit to manage tags.
Note: multiple instances of FCBKcomplete on the same page does not work as
good as a single instance.
git-svn-id: http://piwigo.org/svn/trunk@5188 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/themes')
-rw-r--r-- | admin/themes/default/template/element_set_global.tpl | 26 | ||||
-rw-r--r-- | admin/themes/default/template/element_set_unit.tpl | 29 |
2 files changed, 53 insertions, 2 deletions
diff --git a/admin/themes/default/template/element_set_global.tpl b/admin/themes/default/template/element_set_global.tpl index fffea3f09..6291013ad 100644 --- a/admin/themes/default/template/element_set_global.tpl +++ b/admin/themes/default/template/element_set_global.tpl @@ -7,6 +7,24 @@ </script> {/literal} +{known_script id="jquery.fcbkcomplete" src=$ROOT_URL|@cat:"themes/default/js/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} + <h2>{'Batch management'|@translate}</h2> <h3>{$CATEGORIES_NAV}</h3> @@ -108,7 +126,13 @@ <tr> <td>{'add tags'|@translate}</td> - <td>{if !empty($ADD_TAG_SELECTION)}{$ADD_TAG_SELECTION}{else}<p>{'No tag defined. Use Administration>Pictures>Tags'|@translate}</p>{/if}</td> + <td> +<select id="tags" name="add_tags"> +{foreach from=$tags item=tag} + <option value="{$tag.value}" class="selected">{$tag.caption}</option> +{/foreach} +</select> + </td> </tr> {if !empty($DEL_TAG_SELECTION)} diff --git a/admin/themes/default/template/element_set_unit.tpl b/admin/themes/default/template/element_set_unit.tpl index 4e188590b..d31b5a95c 100644 --- a/admin/themes/default/template/element_set_unit.tpl +++ b/admin/themes/default/template/element_set_unit.tpl @@ -2,6 +2,25 @@ {include file='include/autosize.inc.tpl'} {include file='include/datepicker.inc.tpl'} +{known_script id="jquery.fcbkcomplete" src=$ROOT_URL|@cat:"themes/default/js/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} + + <h2>{'Batch management'|@translate}</h2> <h3>{$CATEGORIES_NAV}</h3> @@ -75,7 +94,15 @@ <tr> <td><strong>{'Tags'|@translate}</strong></td> - <td>{$element.TAG_SELECTION}</td> + <td> + +<select class="tags" name="tags-{$element.ID}"> +{foreach from=$element.TAGS item=tag} + <option value="{$tag.value}" class="selected">{$tag.caption}</option> +{/foreach} +</select> + + </td> </tr> <tr> |