{combine_script id='common' load='footer' path='admin/themes/default/js/common.js'} {include file='include/colorbox.inc.tpl'} {combine_script id='LocalStorageCache' load='footer' path='admin/themes/default/js/LocalStorageCache.js'} {combine_script id='jquery.selectize' load='footer' path='themes/default/js/plugins/selectize.min.js'} {combine_css id='jquery.selectize' path="themes/default/js/plugins/selectize.{$themeconf.colorscheme}.css"} {footer_script} {* *} var categoriesCache = new CategoriesCache({ serverKey: '{$CACHE_KEYS.categories}', serverId: '{$CACHE_KEYS._hash}', rootUrl: '{$ROOT_URL}' }); categoriesCache.selectize(jQuery('[data-selectize=categories]'), { default: 0, filter: function(categories, options) { // remove itself and children var filtered = jQuery.grep(categories, function(cat) { return !(/\b{$CAT_ID}\b/.test(cat.uppercats)); }); filtered.push({ id: 0, fullname: '------------', global_rank: 0 }); return filtered; } }); jQuery(document).ready(function() { jQuery(document).on('click', '.refreshRepresentative', function(e) { var $this = jQuery(this); var method = 'pwg.categories.refreshRepresentative'; jQuery.ajax({ url: "ws.php?format=json&method="+method, type:"POST", data: { category_id: $this.data("category_id") }, success:function(data) { var data = jQuery.parseJSON(data); if (data.stat == 'ok') { jQuery(".albumThumbnailImage") .attr('href', data.result.url) .find("img").attr('src', data.result.src) .end().show(); jQuery(".albumThumbnailRandom").hide(); } else { alert("error on "+method); } }, error:function(XMLHttpRequest, textStatus, errorThrows) { alert("serious error on "+method); } }); e.preventDefault(); }); jQuery(document).on('click', '.deleteRepresentative', function(e) { var $this = jQuery(this); var method = 'pwg.categories.deleteRepresentative'; jQuery.ajax({ url: "ws.php?format=json&method="+method, type:"POST", data: { category_id: $this.data("category_id") }, success:function(data) { var data = jQuery.parseJSON(data); if (data.stat == 'ok') { jQuery(".albumThumbnailImage").hide(); jQuery(".albumThumbnailRandom").show(); } else { alert("error on "+method); } }, error:function(XMLHttpRequest, textStatus, errorThrows) { alert("serious error on "+method); } }); e.preventDefault(); }); jQuery(".deleteAlbum").click(function() { jQuery.colorbox({ inline:true, title:"{'delete album'|translate|escape:javascript}", href:".delete_popin" }); return false; }); function set_photo_deletion_mode() { if (jQuery("input[name=photo_deletion_mode]").length > 0) { var $photo_deletion_mode = jQuery("input[name=photo_deletion_mode]:checked").val(); jQuery("#deleteConfirm").data("photo_deletion_mode", $photo_deletion_mode); } } set_photo_deletion_mode(); jQuery("input[name=photo_deletion_mode]").change(function() { set_photo_deletion_mode(); }); jQuery("#deleteConfirm").click(function() { if (jQuery("input[name=photo_deletion_mode]").length > 0) { var $href = jQuery(this).attr("href"); jQuery(this).attr("href", $href+"&photo_deletion_mode="+jQuery(this).data("photo_deletion_mode")); } }); jQuery(document).on('click', '.close-delete_popin', function(e) { jQuery('.delete_popin').colorbox.close(); e.preventDefault(); }); }); {/footer_script} {html_style} .delete_popin { padding:20px 30px; } .delete_popin p { margin:0; } .delete_popin ul { padding:0; margin:30px 0; } .delete_popin ul li { list-style-type:none; margin:10px 0; } .delete_popin .buttonLike { padding:5px; margin-right:10px; } .delete_popin p.popin-actions { margin-top:30px; } {/html_style}

{$CATEGORIES_NAV} › {'Edit album'|@translate} {$TABSHEET_TITLE}

{'Informations'|@translate}
{if isset($representant) } {'Random photo'|@translate}

{if $representant.ALLOW_SET_RANDOM } {'Refresh'|@translate} {/if} {if isset($representant.ALLOW_DELETE) } | {'Delete'|translate} {/if}

{/if}
{'Properties'|@translate}

{'Name'|@translate}

{'Description'|@translate}

{if isset($parent_category) }

{'Parent album'|@translate}

{/if}

{'Lock'|@translate}

{if isset($CAT_COMMENTABLE)}

{'Comments'|@translate}

{/if}

{if $NB_SUBCATS == 0} {'Delete album "%s".'|translate:$CATEGORY_FULLNAME} {else} {'Delete album "%s" and its %d sub-albums.'|translate:$CATEGORIES_NAV:$NB_SUBCATS} {/if}

{if $NB_IMAGES_RECURSIVE > 0}
    {if $NB_IMAGES_ASSOCIATED_OUTSIDE > 0}
  • {/if} {if $NB_IMAGES_BECOMING_ORPHAN > 0}
  • {/if}
{/if}

{'Confirm deletion'|translate} {'Cancel'|translate}

{* $U_DELETE *}
{* #catModify *}