From ae974849bc5a2b2289e264c5166cfcae3a360450 Mon Sep 17 00:00:00 2001 From: mistic100 Date: Thu, 7 Nov 2013 15:30:59 +0000 Subject: feature 2995 and feature 2997 change organization of configuration page add theme parameter on GUI change links color of dark mail theme (pink) remove main themes css files git-svn-id: http://piwigo.org/svn/trunk@25372 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/themes/default/template/configuration.tpl | 455 +++++++++++++----------- 1 file changed, 249 insertions(+), 206 deletions(-) (limited to 'admin/themes/default/template/configuration.tpl') diff --git a/admin/themes/default/template/configuration.tpl b/admin/themes/default/template/configuration.tpl index aab3afd00..bb5531e60 100644 --- a/admin/themes/default/template/configuration.tpl +++ b/admin/themes/default/template/configuration.tpl @@ -1,13 +1,5 @@ -{footer_script}{literal} -jQuery(document).ready(function(){ - jQuery("#activate_comments").change(function(){ - if ($(this).is(':checked')) { - jQuery("#comments_param_warp").show(); - } else { - jQuery("#comments_param_warp").hide(); - } - }); - +{footer_script} +(function(){ var targets = { 'input[name="rate"]' : '#rate_anonymous', 'input[name="allow_user_registration"]' : '#email_admin_on_new_user', @@ -22,47 +14,110 @@ jQuery(document).ready(function(){ jQuery(target).toggle(jQuery(selector).is(':checked')); (function(target){ - jQuery(selector).bind('change', function() { + jQuery(selector).on('change', function() { jQuery(target).toggle($(this).is(':checked')); }); })(target); }; -}); -{/literal}{/footer_script} +}()); +{/footer_script}

{'Piwigo configuration'|@translate} {$TABSHEET_TITLE}

{if !isset($default)}
{/if} +
{if isset($main)} -
- +
+ {'Basic settings'|translate}
  • - - +
  • - - +
  • + +
  • + + + {foreach from=$main.order_by item=order} + + + {'delete'|@translate} + + {/foreach} + + {if !isset($ORDER_BY_IS_CUSTOM)} + {'Add a criteria'|@translate} + {else} + {'You can\'t define a default photo order because you have a custom setting in your local configuration.'|@translate} + {/if} +
  • +
+ +{if !isset($ORDER_BY_IS_CUSTOM)} +{footer_script require='jquery'} +(function(){ +// counters for displaying of addFilter link +var fields = {$main.order_by|@count}, + max_fields = Math.ceil({$main.order_by_options|@count}/2); + +function updateAddFilterLink() { + if (fields >= max_fields) { + jQuery('.addFilter').css('display', 'none'); + } else { + jQuery('.addFilter').css('display', ''); + } +} + +function updateRemoveFilterTrigger() { + jQuery(".removeFilter").click(function() { + jQuery(this).parent('span.filter').remove(); + fields--; + updateAddFilterLink(); + }); + + jQuery(".removeFilter").css('display', ''); + jQuery(".filter:first .removeFilter").css('display', 'none'); +} + + +jQuery('.addFilter').click(function() { + jQuery(this).prev('span.filter').clone().insertBefore($(this)); + jQuery(this).prev('span.filter').children('select[name="order_by[]"]').val(''); + fields++; + updateRemoveFilterTrigger(); + updateAddFilterLink(); +}); + +updateRemoveFilterTrigger(); +updateAddFilterLink(); +}()); +{/footer_script} +{/if} +
+ +
+ {'Permissions'|translate} +
  • -
  • -
  • - -
  • -
  • -
  • +
-
  • - -
  • - -
  • - - - {foreach from=$main.order_by item=order} - - - {'delete'|@translate} - - {/foreach} - - {if !isset($ORDER_BY_IS_CUSTOM)} - {'Add a criteria'|@translate} - {else} - {'You can\'t define a default photo order because you have a custom setting in your local configuration.'|@translate} - {/if} -
  • - -{if !isset($ORDER_BY_IS_CUSTOM)} {footer_script require='jquery'} -// counters for displaying of addFilter link -fields = {$main.order_by|@count}; max_fields = Math.ceil({$main.order_by_options|@count}/2); - -{literal} -function updateAddFilterLink() { - if (fields >= max_fields) { - $('.addFilter').css('display', 'none'); +jQuery("#activate_comments").change(function(){ + if ($(this).is(':checked')) { + jQuery("#comments_param_warp").show(); } else { - $('.addFilter').css('display', ''); + jQuery("#comments_param_warp").hide(); } -} - -function updateRemoveFilterTrigger() { - $(".removeFilter").click(function () { - $(this).parent('span.filter').remove(); - fields--; - updateAddFilterLink(); - }); - - $(".removeFilter").css('display', ''); - $(".filter:first .removeFilter").css('display', 'none'); -} - -jQuery(document).ready(function () { - $('.addFilter').click(function() { - $(this).prev('span.filter').clone().insertBefore($(this)); - $(this).prev('span.filter').children('select[name="order_by[]"]').val(''); - - fields++; - updateRemoveFilterTrigger(); - updateAddFilterLink(); - }); - - updateRemoveFilterTrigger(); - updateAddFilterLink(); }); -{/literal} {/footer_script} -{/if} +
    + +
    + {'Miscellaneous'|translate} +
      +
    • + +
    • {'Save visits in history for'|@translate} -
    • +
    • + + +
      + {foreach from=$main.mail_theme_options item=name key=theme} +
      + + {'Preview'|translate} +
      + {/foreach} +
    • + +{include file='include/colorbox.inc.tpl'} +{footer_script require='jquery'} +jQuery(".themeBoxes a").colorbox(); + +jQuery("input[name='mail_theme']").change(function() { + jQuery("input[name='mail_theme']").parents(".themeBox").removeClass("themeDefault"); + jQuery(this).parents(".themeBox").addClass("themeDefault"); +}); +{/footer_script}
    {/if} {if isset($comments)} -
    +
    • @@ -248,6 +285,7 @@ jQuery(document).ready(function () { {'Allow users to edit their own comments'|@translate}
    • +
    • {'Notify administrators when a comment is'|@translate} -
    • @@ -281,13 +319,12 @@ jQuery(document).ready(function () { {if isset($sizes)} {footer_script} -var labelMaxWidth = "{'Maximum width'|@translate}"; -var labelWidth = "{'Width'|@translate}"; +(function(){ + var labelMaxWidth = "{'Maximum width'|@translate}", + labelWidth = "{'Width'|@translate}", + labelMaxHeight = "{'Maximum height'|@translate}", + labelHeight = "{'Height'|@translate}"; -var labelMaxHeight = "{'Maximum height'|@translate}"; -var labelHeight = "{'Height'|@translate}"; -{literal} -jQuery(document).ready(function(){ function toggleResizeFields(size) { var checkbox = jQuery("#original_resize"); var needToggle = jQuery("#sizeEdit-original"); @@ -301,7 +338,9 @@ jQuery(document).ready(function(){ } toggleResizeFields("original"); - jQuery("#original_resize").click(function () {toggleResizeFields("original")}); + jQuery("#original_resize").click(function () { + toggleResizeFields("original"); + }); jQuery("a[id^='sizeEditOpen-']").click(function(){ var sizeName = jQuery(this).attr("id").split("-")[1]; @@ -329,9 +368,8 @@ jQuery(document).ready(function(){ jQuery(this).css("visibility", "hidden"); return false; }); - -}); -{/literal}{/footer_script} +}()); +{/footer_script} {html_style}{literal} .sizeEnable {width:50px;} @@ -347,13 +385,11 @@ jQuery(document).ready(function(){ {'Original Size'|@translate} {if $is_gd}
      - + {'Resize after upload disabled due to the use of GD as graphic library'|@translate} + + + +
      {else}
      @@ -392,99 +428,102 @@ jQuery(document).ready(function(){
      {'Multiple Size'|@translate} - + - -{foreach from=$derivatives item=d key=type} - - +
      - -
      + {foreach from=$derivatives item=d key=type} + + - + - - - - - - - - - {/if} - - - - -
      + + - {$d.w} x {$d.h} {'pixels'|@translate}{if $d.crop}, {'Crop'|@translate|lower}{/if} - + {$d.w} x {$d.h} {'pixels'|@translate}{if $d.crop}, {'Crop'|@translate|lower}{/if} + - - {'edit'|@translate} - -
      - - {if !$d.must_square} - - - - {/if} + + - - + + + + {/foreach} +
      - -
      + + {'edit'|@translate} + +
      {if $d.must_square or $d.crop}{'Width'|@translate}{else}{'Maximum width'|@translate}{/if}
      + + {if !$d.must_square} + + + + {/if} + + + + + + + {if !$d.must_square} + + + + + {/if} + + - + +
      + +
      {if $d.must_square or $d.crop}{'Width'|@translate}{else}{'Maximum width'|@translate}{/if} + + {'pixels'|@translate} + {if isset($ferrors.$type.w)}!{/if} +
      {if $d.crop}{'Height'|@translate}{else}{'Maximum height'|@translate}{/if} + + {'pixels'|@translate} + {if isset($ferrors.$type.h)}!{/if} +
      {'Sharpen'|@translate} - - {'pixels'|@translate} - {if isset($ferrors.$type.w)}!{/if} + + % + {if isset($ferrors.$type.sharpen)}!{/if}
      {* #sizeEdit *} +
      - {if !$d.must_square} -
      {if $d.crop}{'Height'|@translate}{else}{'Maximum height'|@translate}{/if} - - {'pixels'|@translate} - {if isset($ferrors.$type.h)}!{/if} -
      {'Sharpen'|@translate} - - % - {if isset($ferrors.$type.sharpen)}!{/if} -
      {* #sizeEdit *} - - -{/foreach} - - -

      - {'Image Quality'|@translate} - % - {if isset($ferrors.resize_quality)}!{/if} -

      -

      - {'Reset to default values'|@translate} -

      +

      + {'Image Quality'|@translate} + % + {if isset($ferrors.resize_quality)}!{/if} +

      +

      + {'Reset to default values'|@translate} +

      {if !empty($custom_derivatives)} -
      {'custom'|@translate} -{foreach from=$custom_derivatives item=time key=custom} - -{/foreach} -
      +
      + {'custom'|@translate} + + {foreach from=$custom_derivatives item=time key=custom} + + {/foreach} +
      +
      {/if}
      @@ -492,13 +531,12 @@ jQuery(document).ready(function(){ {if isset($watermark)} -{footer_script}{literal} -jQuery(document).ready(function() { - +{footer_script} +(function(){ function onWatermarkChange() { var val = jQuery("#wSelect").val(); if (val.length) { - jQuery("#wImg").attr('src', {/literal}'{$ROOT_URL}'{literal}+val).show(); + jQuery("#wImg").attr('src', '{$ROOT_URL}'+val).show(); } else { jQuery("#wImg").hide(); @@ -526,22 +564,24 @@ jQuery(document).ready(function() { jQuery("#addWatermark, #selectWatermark").toggle(); return false; }); -}); -{/literal}{/footer_script} +}()); +{/footer_script} -
      +
      • {* #selectWatermark *} +
        + {* #selectWatermark *} {'add a new watermark'|@translate} {'... or '|@translate}{'Select a file'|@translate} -
        (png) +
        + (png) {if isset($ferrors.watermarkImage)}!{/if}
        {* #addWatermark *}
      • @@ -557,7 +597,7 @@ jQuery(document).ready(function() {
      • {'pixels'|@translate}
      • @@ -572,10 +612,11 @@ jQuery(document).ready(function() {
      +
      @@ -812,5 +853,7 @@ jQuery(document).ready(function() { {/if} {if isset($default)} +
      {$PROFILE_CONTENT} +
      {/if} -- cgit v1.2.3