mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
related to #1693 check if tag cookies exists
This commit is contained in:
committed by
plegall
parent
ecfa090d6d
commit
bc2f884f4a
@@ -7,7 +7,9 @@ jQuery.fn.pwgAddAlbum = function(options) {
|
||||
$target = jQuery('[name="'+ $button.data('addAlbum') +'"]'),
|
||||
cache = $target.data('cache');
|
||||
|
||||
if (!$target[0].selectize) {
|
||||
console.log(cache);
|
||||
|
||||
if ($target[0] && !$target[0].selectize) {
|
||||
jQuery.error('pwgAddAlbum: target must use selectize');
|
||||
}
|
||||
if (!cache) {
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
const formatMode = {if $DISPLAY_FORMATS}true{else}false{/if};
|
||||
const haveFormatsOriginal = {if $HAVE_FORMATS_ORIGINAL}true{else}false{/if};
|
||||
const originalImageId = haveFormatsOriginal? '{$FORMATS_ORIGINAL_INFO['id']}' : -1;
|
||||
const originalImageId = haveFormatsOriginal? '{if isset($FORMATS_ORIGINAL_INFO['id'])} {$FORMATS_ORIGINAL_INFO['id']} {else} -1 {/if}' : -1;
|
||||
|
||||
{* <!-- CATEGORIES --> *}
|
||||
if (!formatMode) {
|
||||
|
||||
@@ -44,6 +44,12 @@ $(document).ready(function() {
|
||||
{combine_script id='tags' load='footer' path='admin/themes/default/js/tags.js'}
|
||||
{combine_script id='jquery.cookie' path='themes/default/js/jquery.cookie.js' load='footer'}
|
||||
|
||||
{footer_script}
|
||||
if (!$.cookie("pwg_tags_per_page")) {
|
||||
$.cookie("pwg_tags_per_page", "100");
|
||||
}
|
||||
{/footer_script}
|
||||
|
||||
<meta http-equiv='cache-control' content='no-cache'>
|
||||
<meta http-equiv='expires' content='0'>
|
||||
<meta http-equiv='pragma' content='no-cache'>
|
||||
@@ -210,22 +216,22 @@ $(document).ready(function() {
|
||||
<div class="pagination-per-page">
|
||||
<span class="thumbnailsActionsShow" style="font-weight: bold;">{'Display'|@translate}</span>
|
||||
<a id="100"
|
||||
{if $smarty.cookies.pwg_tags_per_page == 100 || !$smarty.cookies.pwg_tags_per_page}
|
||||
{if !isset($smarty.cookies.pwg_tags_per_page) || !$smarty.cookies.pwg_tags_per_page || $smarty.cookies.pwg_tags_per_page == 100}
|
||||
class="selected"
|
||||
{/if}
|
||||
>100</a>
|
||||
<a id="200"
|
||||
{if $smarty.cookies.pwg_tags_per_page == 200}
|
||||
{if isset($smarty.cookies.pwg_tags_per_page) && $smarty.cookies.pwg_tags_per_page == 200}
|
||||
class="selected"
|
||||
{/if}
|
||||
>200</a>
|
||||
<a id="500"
|
||||
{if $smarty.cookies.pwg_tags_per_page == 500}
|
||||
{if isset($smarty.cookies.pwg_tags_per_page) && $smarty.cookies.pwg_tags_per_page == 500}
|
||||
class="selected"
|
||||
{/if}
|
||||
>500</a>
|
||||
<a id="1000"
|
||||
{if $smarty.cookies.pwg_tags_per_page == 1000}
|
||||
{if isset($smarty.cookies.pwg_tags_per_page) && $smarty.cookies.pwg_tags_per_page == 1000}
|
||||
class="selected"
|
||||
{/if}
|
||||
>1000</a>
|
||||
|
||||
Reference in New Issue
Block a user