Ignore:
Timestamp:
Nov 23, 2013, 5:47:04 PM (10 years ago)
Author:
mistic100
Message:

quick edit for album
add language files
force default language for the toolbar
fix $_GET collision
orange save button
fix popup background color

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/AdminTools/template/public_controller.tpl

    r25654 r25655  
    6464    <li class="parent right"><a class="icon-cog-alt" href="#">{'Tools'|translate}</a>
    6565      <ul>
    66         <li><label>View as</label>
     66        <li><label>{'View as'|translate}</label>
    6767          <select class="switcher" data-type="view_as">
    6868            {html_options options=$ato.USERS selected=$ato.MULTIVIEW.view_as}
    6969          </select>
    7070        </li>
    71         <li><label>Theme</label>
     71        <li><label>{'Theme'|translate}</label>
    7272          <select class="switcher" data-type="theme">
    7373            {html_options options=$ato.THEMES selected=$ato.MULTIVIEW.theme}
    7474          </select>
    7575        </li>
    76         <li><label>Language</label>
     76        <li><label>{'Language'|translate}</label>
    7777          <select class="switcher" data-type="lang">
    7878            {html_options options=$ato.LANGS selected=$ato.MULTIVIEW.lang}
    7979          </select>
    8080        </li>
    81         <li><a class="icon-ato-check{if !$ato.MULTIVIEW.show_queries}-empty{/if}" href="{$ato.U_SELF}show_queries={(int)!$ato.MULTIVIEW.show_queries}">{'Show SQL queries'|translate}</a></li>
    82         <li><a class="icon-ato-check{if !$ato.MULTIVIEW.debug_l10n}-empty{/if}" href="{$ato.U_SELF}debug_l10n={(int)!$ato.MULTIVIEW.debug_l10n}">{'Debug languages'|translate}</a></li>
    83         <li><a class="icon-ato-check{if !$ato.MULTIVIEW.debug_template}-empty{/if}" href="{$ato.U_SELF}debug_template={(int)!$ato.MULTIVIEW.debug_template}">{'Debug template'|translate}</a></li>
    84         <li><a class="icon-ato-check{if !$ato.MULTIVIEW.template_combine_files}-empty{/if}" href="{$ato.U_SELF}template_combine_files={(int)!$ato.MULTIVIEW.template_combine_files}">{'Combine JS&amp;CSS'|translate}</a></li>
    85         <li><a class="icon-ato-check{if $ato.MULTIVIEW.no_history}-empty{/if}" href="{$ato.U_SELF}no_history={(int)!$ato.MULTIVIEW.no_history}">{'Save visit in history'|translate}</a></li>
    86         <li><a class="icon-ato-null" href="{$ato.U_SELF}purge_template=1">{'Purge compiled templates'|translate}</a></li>
     81        <li><a class="icon-ato-check{if !$ato.MULTIVIEW.show_queries}-empty{/if}" href="{$ato.U_SELF}ato_show_queries={(int)!$ato.MULTIVIEW.show_queries}">{'Show SQL queries'|translate}</a></li>
     82        <li><a class="icon-ato-check{if !$ato.MULTIVIEW.debug_l10n}-empty{/if}" href="{$ato.U_SELF}ato_debug_l10n={(int)!$ato.MULTIVIEW.debug_l10n}">{'Debug languages'|translate}</a></li>
     83        <li><a class="icon-ato-check{if !$ato.MULTIVIEW.debug_template}-empty{/if}" href="{$ato.U_SELF}ato_debug_template={(int)!$ato.MULTIVIEW.debug_template}">{'Debug template'|translate}</a></li>
     84        <li><a class="icon-ato-check{if !$ato.MULTIVIEW.template_combine_files}-empty{/if}" href="{$ato.U_SELF}ato_template_combine_files={(int)!$ato.MULTIVIEW.template_combine_files}">{'Combine JS&CSS'|translate}</a></li>
     85        <li><a class="icon-ato-check{if $ato.MULTIVIEW.no_history}-empty{/if}" href="{$ato.U_SELF}ato_no_history={(int)!$ato.MULTIVIEW.no_history}">{'Save visit in history'|translate}</a></li>
     86        <li><a class="icon-ato-null" href="{$ato.U_SELF}ato_purge_template=1">{'Purge compiled templates'|translate}</a></li>
    8787      </ul>
    8888    </li>
    8989  {if $ato.USER.id != $ato.MULTIVIEW.view_as}
    9090    <li class="right">
    91       &nbsp;&nbsp;{'Logged as <b>%s</b>, viewing as <b>%s</b>.'|translate:$ato.USER.username:$ato.CURRENT_USERNAME}
    92       <a href="{$ato.U_SELF}view_as={$ato.USER.id}">{'Revert'|translate}</a>
     91      &nbsp;&nbsp;{'Viewing as <b>%s</b>.'|translate:$ato.CURRENT_USERNAME}
     92      <a href="{$ato.U_SELF}ato_view_as={$ato.USER.id}">{'Revert'|translate}</a>
    9393    </li>
    9494  {/if}
     
    101101    <form method="post" action="{$ato.U_SELF}">
    102102      <fieldset class="left">
    103         <img src="{$current.derivatives.square->get_url()}" width="100" height="100">
    104         <br><input type="submit" value="{'Save'|translate}">
    105         <br><a href="#" class="icon-ato-cancel close-edit">{'Cancel'|translate}</a>
     103        <img src="{$ato.QUICK_EDIT.img->get_url()}" width="100" height="100">
     104        <input type="submit" value="{'Save'|translate}">
     105        <a href="#" class="icon-ato-cancel close-edit">{'Cancel'|translate}</a>
    106106      </fieldset>
    107107
     
    110110        <input type="text" name="name" id="quick_edit_name" value="{$ato.QUICK_EDIT.name|escape:html}">
    111111
     112      {if isset($ato.IS_PICTURE)}
    112113        <label for="quick_edit_author">{'Author'|translate}</label>
    113114        <input type="text" name="author" id="quick_edit_author" value="{$ato.QUICK_EDIT.author|escape:html}">
    114 
    115115
    116116        <label for="quick_edit_date_creation">{'Creation date'|translate}</label>
     
    125125        </select>
    126126
    127         <label for="quick_edit_comment">{'Description'|translate}</label>
    128         <textarea name="comment" id="quick_edit_comment">{$ato.QUICK_EDIT.comment}</textarea>
    129 
    130127        <label for="quick_edit_level">{'Who can see this photo?'|@translate}</label>
    131128        <select name="level" size="1">
    132129          {html_options options=$available_permission_levels selected=$ato.QUICK_EDIT.level}
    133130        </select>
     131      {/if}
     132
     133        <label for="quick_edit_comment">{'Description'|translate}</label>
     134        <textarea name="comment" id="quick_edit_comment">{$ato.QUICK_EDIT.comment}</textarea>
    134135      </fieldset>
    135136
     
    142143{footer_script require='jquery'}
    143144(function($){
     145  function moveBody(dir, anim) {
     146    var operator = dir=='show' ? '+=' : '-=';
     147   
     148    if (anim) {
     149      $('body').animate({ldelim}'margin-top': operator+ato_height});
     150     
     151      if ($('#the_page').css('position')=='absolute') {
     152        $('#the_page').animate({ldelim}'top': operator+ato_height});
     153      }
     154    }
     155    else {
     156      $('body').css({ldelim}'margin-top': operator+ato_height});
     157     
     158      if ($('#the_page').css('position')=='absolute') {
     159        $('#the_page').css({ldelim}'top': operator+ato_height});
     160      }
     161    }
     162  }
     163 
    144164  var $ato = $('#ato_header'),
    145165      $ato_closed = $('#ato_header_closed'),
     
    155175  if (window.localStorage.ato_panel_open == "true") {
    156176    $ato.show();
    157     $('body').css({ldelim}'margin-top': '+='+ato_height});
     177    moveBody('show', false);
    158178  }
    159179  else {
     
    184204  $ato.find('.switcher').on({
    185205    'change': function() {
    186       window.location.href = '{$ato.U_SELF}'+ $(this).data('type') +'='+ $(this).val();
     206      window.location.href = '{$ato.U_SELF}ato_'+ $(this).data('type') +'='+ $(this).val();
    187207    },
    188208    'click': function(e) {
     
    195215    $ato.slideUp();
    196216    $ato_closed.slideDown();
    197     $('body').animate({ldelim}'margin-top': '-='+ato_height});
     217    moveBody('hide', true);
    198218
    199219    window.localStorage.ato_panel_open = "false";
     
    204224    $ato.slideDown();
    205225    $ato_closed.slideUp();
    206     $('body').animate({ldelim}'margin-top': '+='+ato_height});
     226    moveBody('show', true);
    207227
    208228    window.localStorage.ato_panel_open = "true";
     
    269289  var $ato_edit = $('#ato_quick_edit');
    270290
    271   $ato_edit.css('background-color', $("#the_page #content").css('background-color'));
     291  var bg_color = $('#the_page #content').css('background-color');
     292  if (!bg_color || bg_color=='transparent') {
     293    bg_color = $('body').css('background-color');
     294  }
     295  $ato_edit.css('background-color', bg_color);
    272296
    273297  $ato_edit.find('.close-edit').on('click', function(e) {
     
    276300  });
    277301
     302{if isset($ato.IS_PICTURE)}
    278303  $ato_edit.find('.datepicker').datepicker({
    279304    dateFormat: 'yy-mm-dd'
     
    292317    }
    293318  );
     319{/if}
    294320
    295321  $(".edit-quick").colorbox({
Note: See TracChangeset for help on using the changeset viewer.