Ignore:
Timestamp:
Dec 20, 2013, 9:14:40 PM (10 years ago)
Author:
mistic100
Message:

add configuration page

File:
1 edited

Legend:

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

    r25979 r26061  
    33
    44  this.urlWS;
     5  this.urlSelf;
    56  this.multiView;
    67
     
    101102
    102103  // attach jquery handlers
    103   this.init = function(urlSelf) {
     104  this.init = function(open) {
    104105    $('body').prepend($ato); // ensure the bar is at the begining
    105106   
     
    109110    if ('localStorage' in window) {
    110111      if (window.localStorage.ato_panel_open == null) {
    111         window.localStorage.ato_panel_open = "true";
    112       }
    113 
    114       if (window.localStorage.ato_panel_open == "true") {
     112        window.localStorage.ato_panel_open = open;
     113      }
     114
     115      if (window.localStorage.ato_panel_open == 1) {
    115116        moveBody('show', false);
    116117      }
     
    151152    $ato.find('.switcher').on({
    152153      'change': function() {
    153         window.location.href = urlSelf + 'ato_'+ $(this).data('type') +'='+ $(this).val();
     154        window.location.href = __this.urlSelf + 'ato_'+ $(this).data('type') +'='+ $(this).val();
    154155      },
    155156      'click': function(e) {
     
    164165      moveBody('hide', true);
    165166
    166       if ('localStorage' in window) window.localStorage.ato_panel_open = "false";
     167      if ('localStorage' in window) window.localStorage.ato_panel_open = 0;
    167168      e.preventDefault();
    168169    });
     
    173174      moveBody('show', true);
    174175
    175       if ('localStorage' in window) window.localStorage.ato_panel_open = "true";
     176      if ('localStorage' in window) window.localStorage.ato_panel_open = 1;
    176177      e.preventDefault();
    177178    });
Note: See TracChangeset for help on using the changeset viewer.