Edit File: picker_contents.tpl
{if !$smarty.request.extra} <script type="text/javascript"> (function(_, $) { _.tr('text_items_added', '{__("text_items_added")|escape:"javascript"}'); $.ceEvent('on', 'ce.formpost_videos_form', function(frm, elm) { var videos = {}; if ($('input.cm-item:checked', frm).length > 0) { $('input.cm-item:checked', frm).each( function() { var id = $(this).val(); videos[id] = $('#video_' + id).text(); }); $.ceEvent('trigger', 'ce.picker_transfer_js_items', [videos]); {literal} $.cePicker('add_js_item', frm.data('caResultId'), videos, 'v', { '{video_id}': '%id', '{video}': '%item' }); {/literal} $.ceNotification('show', { type: 'N', title: _.tr('notice'), message: _.tr('text_items_added'), message_state: 'I' }); } return false; }); }(Tygh, Tygh.$)); </script> {/if} <form action="{$smarty.request.extra|fn_url}" data-ca-result-id="{$smarty.request.data_id}" method="post" name="videos_form" class="form-edit"> {include file="common/pagination.tpl" div_id="pagination_`$smarty.request.content_id`"} {if $videos} <table width="100%" class="table table-middle"> <thead> <tr> <th> {include file="common/check_items.tpl"} </th> <th>{__("video")}</th> </tr> </thead> <tbody> {foreach from=$videos item=n} <tr> <td> <input type="checkbox" name="{$smarty.request.checkbox_name|default:"video_ids"}[]" value="{$n.video_id}" class="cm-item" /> </td> <td width="100%" id="video_{$n.video_id}">{$n.video}</td> </tr> {/foreach} </tbody> </table> {else} <p class="no-items">{__("no_data")}</p> {/if} {include file="common/pagination.tpl" div_id="pagination_`$smarty.request.content_id`"} {if $videos} <div class="buttons-container"> {include file="buttons/add_close.tpl" but_text=__("add_video") but_close_text=__("add_video_and_close") is_js=$smarty.request.extra|fn_is_empty} </div> {/if} </form>
Back to File Manager