remplace FCBKcomplete by TokenInput
git-svn-id: http://piwigo.org/svn/trunk@10970 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
5a1c5acb0e
commit
daa0bdd09e
10 changed files with 857 additions and 729 deletions
|
|
@ -5,21 +5,26 @@
|
|||
pwg_initialization_datepicker("#date_creation_day", "#date_creation_month", "#date_creation_year", "#date_creation_linked_date", "#date_creation_action_set");
|
||||
{/literal}{/footer_script}
|
||||
|
||||
{combine_script id='jquery.fcbkcomplete' load='footer' require='jquery' path='themes/default/js/plugins/jquery.fcbkcomplete.js'}
|
||||
{combine_script id='jquery.tokeninput' load='footer' require='jquery' path='themes/default/js/plugins/jquery.tokeninput.js'}
|
||||
{combine_script id='jquery.progressBar' load='footer' path='themes/default/js/plugins/jquery.progressbar.min.js'}
|
||||
{combine_script id='jquery.ajaxmanager' load='footer' path='themes/default/js/plugins/jquery.ajaxmanager.js'}
|
||||
|
||||
{footer_script require='jquery.fcbkcomplete'}{literal}
|
||||
{footer_script require='jquery.tokeninput'}{literal}
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#tags").fcbkcomplete({
|
||||
json_url: "admin.php?fckb_tags=1",
|
||||
cache: false,
|
||||
filter_case: false,
|
||||
filter_hide: true,
|
||||
firstselected: true,
|
||||
filter_selected: true,
|
||||
maxitems: 100,
|
||||
newel: true
|
||||
jQuery.getJSON('admin.php?fckb_tags=1', function(data) {
|
||||
jQuery("#tags").tokenInput(
|
||||
data,
|
||||
{
|
||||
{/literal}
|
||||
hintText: '{'Type in a search term'|@translate}',
|
||||
noResultsText: '{'No results'|@translate}',
|
||||
searchingText: '{'Searching...'|@translate}',
|
||||
animateDropdown: false,
|
||||
preventDuplicates: true,
|
||||
allowCreation: true
|
||||
{literal}
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
{/literal}{/footer_script}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
{include file='include/datepicker.inc.tpl'}
|
||||
{include file='include/colorbox.inc.tpl'}
|
||||
|
||||
{combine_script id='jquery.fcbkcomplete' load='async' require='jquery' path='themes/default/js/plugins/jquery.fcbkcomplete.js'}
|
||||
{footer_script require='jquery.fcbkcomplete'}
|
||||
{combine_script id='jquery.tokeninput' load='async' require='jquery' path='themes/default/js/plugins/jquery.tokeninput.js'}
|
||||
{footer_script require='jquery.tokeninput'}
|
||||
var tag_boxes_selector = "";
|
||||
{foreach from=$elements item=element name=element}
|
||||
{if $smarty.foreach.element.first}
|
||||
|
|
@ -15,16 +15,21 @@ prefix = ", ";
|
|||
{/foreach}
|
||||
{literal}
|
||||
jQuery(document).ready(function() {
|
||||
$(tag_boxes_selector).fcbkcomplete({
|
||||
json_url: "admin.php?fckb_tags=1",
|
||||
cache: false,
|
||||
filter_case: false,
|
||||
filter_hide: true,
|
||||
firstselected: true,
|
||||
filter_selected: true,
|
||||
maxitems: 100,
|
||||
newel: true
|
||||
});
|
||||
jQuery.getJSON('admin.php?fckb_tags=1', function(data) {
|
||||
jQuery(tag_boxes_selector).tokenInput(
|
||||
data,
|
||||
{
|
||||
{/literal}
|
||||
hintText: '{'Type in a search term'|@translate}',
|
||||
noResultsText: '{'No results'|@translate}',
|
||||
searchingText: '{'Searching...'|@translate}',
|
||||
animateDropdown: false,
|
||||
preventDuplicates: true,
|
||||
allowCreation: true
|
||||
{literal}
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$("a.preview-box").colorbox();
|
||||
});
|
||||
|
|
@ -112,7 +117,7 @@ jQuery(document).ready(function() {
|
|||
|
||||
<select id="tags-{$element.ID}" name="tags-{$element.ID}">
|
||||
{foreach from=$element.TAGS item=tag}
|
||||
<option value="{$tag.value}" class="selected">{$tag.key}</option>
|
||||
<option value="{$tag.id}" class="selected">{$tag.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,19 +2,24 @@
|
|||
{include file='include/dbselect.inc.tpl'}
|
||||
{include file='include/datepicker.inc.tpl'}
|
||||
|
||||
{combine_script id='jquery.fcbkcomplete' load='async' require='jquery' path='themes/default/js/plugins/jquery.fcbkcomplete.js'}
|
||||
{footer_script require='jquery.fcbkcomplete'}{literal}
|
||||
{combine_script id='jquery.tokeninput' load='async' require='jquery' path='themes/default/js/plugins/jquery.tokeninput.js'}
|
||||
{footer_script require='jquery.tokeninput'}{literal}
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#tags").fcbkcomplete({
|
||||
json_url: "admin.php?fckb_tags=1",
|
||||
cache: false,
|
||||
filter_case: false,
|
||||
filter_hide: true,
|
||||
firstselected: true,
|
||||
filter_selected: true,
|
||||
maxitems: 100,
|
||||
newel: true
|
||||
});
|
||||
jQuery.getJSON('admin.php?fckb_tags=1', function(data) {
|
||||
jQuery("#tags").tokenInput(
|
||||
data,
|
||||
{
|
||||
{/literal}
|
||||
hintText: '{'Type in a search term'|@translate}',
|
||||
noResultsText: '{'No results'|@translate}',
|
||||
searchingText: '{'Searching...'|@translate}',
|
||||
animateDropdown: false,
|
||||
preventDuplicates: true,
|
||||
allowCreation: true
|
||||
{literal}
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
{/literal}{/footer_script}
|
||||
|
||||
|
|
@ -137,7 +142,7 @@ pwg_initialization_datepicker("#date_creation_day", "#date_creation_month", "#da
|
|||
<td>
|
||||
<select id="tags" name="tags">
|
||||
{foreach from=$tags item=tag}
|
||||
<option value="{$tag.value}" class="selected">{$tag.key}</option>
|
||||
<option value="{$tag.id}" class="selected">{$tag.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue