Changeset 26603


Ignore:
Timestamp:
Jan 10, 2014, 7:37:58 PM (11 years ago)
Author:
mistic100
Message:

add "Home" (admin) link, hide <select> until they are populated

Location:
extensions/AdminTools/template
Files:
3 edited

Legend:

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

    r26061 r26603  
    3232  // fill multiview selects
    3333  // data came from AJAX request or sessionStorage
    34   function populateMultiView($target) {
    35     if ($target.data('init')) return;
     34  function populateMultiView() {
     35    var $multiview = $ato.find('.multiview');
     36
     37    if ($multiview.data('init')) return;
    3638
    3739    var render = function(data) {
     
    4042        html+= '<option value="'+ user.id +'">'+ user.username +'</option>';
    4143      });
    42       $target.find('select[data-type="view_as"]').html(html)
     44      $multiview.find('select[data-type="view_as"]').html(html)
    4345        .val(__this.multiView.view_as);
    4446
     
    4749        html+= '<option value="'+ theme +'">'+ theme +'</option>';
    4850      });
    49       $target.find('select[data-type="theme"]').html(html)
     51      $multiview.find('select[data-type="theme"]').html(html)
    5052        .val(__this.multiView.theme);
    5153
     
    5456        html+= '<option value="'+ language.id +'">'+ language.name +'</option>';
    5557      });
    56       $target.find('select[data-type="lang"]').html(html)
     58      $multiview.find('select[data-type="lang"]').html(html)
    5759        .val(__this.multiView.lang);
    5860
    59       $target.data('init', true);
     61      $multiview.data('init', true);
     62
     63      $multiview.find('.switcher').show();
    6064    };
    6165
     
    130134      'click': function() {
    131135        if ($(this).hasClass('multiview')) {
    132           populateMultiView($(this).find('ul'));
     136          populateMultiView();
    133137        }
    134138        $(this).find('ul').toggle();
  • extensions/AdminTools/template/public_controller.tpl

    r26061 r26603  
    7474    <li class="parent"><a href="#" class="icon-menu ato-min-1">{'Administration'|translate}</a>
    7575      <ul>
     76        <li><a class="icon-home" href="{$ato.U_SITE_ADMIN}intro">{'Home'|translate}</a></li>
    7677        <li><a class="icon-picture" href="{$ato.U_SITE_ADMIN}batch_manager">{'Photos'|translate}</a></li>
    7778        <li><a class="icon-sitemap" href="{$ato.U_SITE_ADMIN}cat_list">{'Albums'|translate}</a></li>
     
    7980        <li><a class="icon-puzzle" href="{$ato.U_SITE_ADMIN}plugins">{'Plugins'|translate}</a></li>
    8081        <li><a class="icon-wrench" href="{$ato.U_SITE_ADMIN}maintenance">{'Tools'|translate}</a></li>
    81         <li><a class="icon-cog" href="{$ato.U_SITE_ADMIN}configuration">{'Options'|translate}</a></li>
     82        <li><a class="icon-cog" href="{$ato.U_SITE_ADMIN}configuration">{'Configuration'|translate}</a></li>
    8283      </ul>
    8384    </li>
  • extensions/AdminTools/template/style.css

    r26061 r26603  
    119119      padding:2px 3px;
    120120    }
     121  #ato_header .switcher {
     122    display:none;
     123  }
    121124
    122125#ato_header_closed:not(.smartpocket) {
Note: See TracChangeset for help on using the changeset viewer.