feature 724: bug fixed on element_set_unit for FCKB, better use

$("#tags-123, #tags-456") than $(".tags") to apply FCKB widget on
the select box.

Use a dedicated function to return the tag list, formatted for FCKB.

git-svn-id: http://piwigo.org/svn/trunk@5189 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall
2010-03-19 13:15:02 +00:00
parent 3a076f460d
commit 3f8d84cbe6
2 changed files with 15 additions and 18 deletions
@@ -3,10 +3,19 @@
{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">
var tag_boxes_selector = "";
{foreach from=$elements item=element name=element}
{if $smarty.foreach.element.first}
var prefix = "";
{else}
prefix = ", ";
{/if}
tag_boxes_selector = tag_boxes_selector + prefix + "#tags-" + {$element.ID};
{/foreach}
{literal}
$(document).ready(function() {
$(".tags").fcbkcomplete({
$(tag_boxes_selector).fcbkcomplete({
json_url: "admin.php?fckb_tags=1",
cache: false,
filter_case: true,
@@ -96,7 +105,7 @@
<td><strong>{'Tags'|@translate}</strong></td>
<td>
<select class="tags" name="tags-{$element.ID}">
<select id="tags-{$element.ID}" name="tags-{$element.ID}">
{foreach from=$element.TAGS item=tag}
<option value="{$tag.value}" class="selected">{$tag.caption}</option>
{/foreach}