{style} {literal} .image_action { display: block; width: 20px; height: 20px; background-repeat: no-repeat; background-position: center center; } {/literal} {/style} {script} {literal} $(".actions_node a.ow_ic_delete").click(function(){ if ( !confirm(OW.getLanguageText('ocsslider', 'confirm_image_delete')) ) { return false; } var id = $(this).attr('rel'); var url = {/literal}{$ajaxDeleteUrl}{literal}; $.ajax({ url: url, type: 'post', dataType: 'json', data: {imageId : id}, success: function(data){ if ( data.result ) { OW.info(data.message); document.location.reload(); }} }); }); $(".actions_node a.ow_ic_up_arrow").click(function(){ var id = $(this).attr('rel'); var url = {/literal}{$ajaxReorderUrl}{literal}; $.ajax({ url: url, type: 'post', dataType: 'json', data: {imageId : id, sort: 'up'}, success: function(data){ if ( data.result ) { OW.info(data.message); document.location.reload(); }} }); }); $(".actions_node a.ow_ic_down_arrow").click(function(){ var id = $(this).attr('rel'); var url = {/literal}{$ajaxReorderUrl}{literal}; $.ajax({ url: url, type: 'post', dataType: 'json', data: {imageId : id, sort: 'down'}, success: function(data){ if ( data.result ) { OW.info(data.message); document.location.reload(); }} }); }); $(".actions_node a.ow_ic_edit").click(function(){ var id = $(this).attr('rel'); var url = "{/literal}{url_for for=OCSSLIDER_CTRL_Admin:ajaxGetImage}{literal}"; var image_src = $(this).parent().parent().find('img.ow_slider_image').attr('src'); var img = $(''); $("img.ow_image_preview", "#edit_image_cont").replaceWith(img); var $form_content = $("#edit_image_cont").children(); $("input[name=image_title]", $form_content).val(""); $("input[name=href]", $form_content).val(""); $.ajax({ url: url, type: 'post', dataType: 'json', data: {id : id}, success: function(result){ if ( result.title != undefined ) { window.edit_image_floatbox = new OW_FloatBox({ $title: '', $contents: $form_content, icon_class: 'ow_ic_edit', width: 500 }); $("input[name=image_id]", $form_content).val(id); $("input[name=image_title]", $form_content).val(result.title); $("input[name=href]", $form_content).val(result.href); } } }); }); {/literal} {/script} {$menu}
{block_decorator name='box_cap' langLabel='ocsslider+add_image' iconClass='ow_ic_add'}{/block_decorator} {block_decorator name='box'} {form name='add-image-form'} {/form}
{label name='image'} {input name='image'} {text key='ocsslider+image_desc'}
{label name='href'} {input name='href'}
{label name='title'} {input name='title'}
{submit name='add'}
{/block_decorator}
{block_decorator name='box_cap' type='empty' langLabel='ocsslider+image_list' iconClass='ow_ic_picture'}{/block_decorator} {block_decorator name='box' type='empty'} {foreach from=$images item='img' name='i'} {/foreach}
{if $img.dto->title != ''}
{$img.dto->title}
{/if}
{if !$smarty.foreach.i.first} {/if} {if !$smarty.foreach.i.last} {/if}
{/block_decorator}