Ignore:
Timestamp:
Dec 5, 2013, 8:36:36 PM (10 years ago)
Author:
mistic100
Message:

fix security problem, fix sql fatal error, try to fix display on smartpocket

Location:
extensions/AdminTools/template
Files:
2 edited

Legend:

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

    r25675 r25791  
    102102    <form method="post" action="{$ato.U_SELF}">
    103103      <fieldset class="left">
    104         <img src="{$ato.QUICK_EDIT.img->get_url()}" width="100" height="100">
     104        <img src="{$ato.QUICK_EDIT.img}" width="100" height="100">
    105105        <input type="submit" value="{'Save'|translate}">
    106106        <a href="#" class="icon-ato-cancel close-edit">{'Cancel'|translate}</a>
     
    150150      $('body').animate({ldelim}'margin-top': operator+ato_height});
    151151     
    152       if ($('#the_page').css('position')=='absolute') {
    153         $('#the_page').animate({ldelim}'top': operator+ato_height});
     152      if ($('#the_page, [data-role="page"]').css('position')=='absolute') {
     153        $('#the_page, [data-role="page"]').animate({ldelim}'top': operator+ato_height});
    154154      }
    155155    }
     
    157157      $('body').css({ldelim}'margin-top': operator+ato_height});
    158158     
    159       if ($('#the_page').css('position')=='absolute') {
    160         $('#the_page').css({ldelim}'top': operator+ato_height});
     159      if ($('#the_page, [data-role="page"]').css('position')=='absolute') {
     160        $('#the_page, [data-role="page"]').css({ldelim}'top': operator+ato_height});
    161161      }
    162162    }
     
    168168      urlWS = '{$ROOT_URL}ws.php?format=json&method=';
    169169
    170   $('body').prepend($ato);
     170  $('body').prepend($ato); // ensure the bar is at the begining
     171 
     172  {if $themeconf.mobile}
     173    var $headerbar = $('div[data-role="header"] .title');
     174    if ($headerbar.length == 1) {
     175      $ato_closed.addClass('smartpocket');
     176      $ato_closed.find('a').attr({
     177        'data-iconpos':'notext',
     178        'data-role':'button'
     179      });
     180      $headerbar.prepend($ato_closed);   
     181    }
     182  {/if}
    171183
    172184  if (window.localStorage.ato_panel_open == null) {
     
    289301{if isset($ato.QUICK_EDIT)}
    290302  var $ato_edit = $('#ato_quick_edit');
    291 
    292   var bg_color = $('#the_page #content').css('background-color');
    293   if (!bg_color || bg_color=='transparent') {
    294     bg_color = $('body').css('background-color');
    295   }
    296   $ato_edit.css('background-color', bg_color);
     303 
     304 
     305  setTimeout(function() {
     306    var bg_color = 'white';
     307    var selectors = ['#the_page #content', '[data-role="page"]', 'body'];
     308   
     309    for (var i=0; i<selectors.length; i++) {
     310      var color = $(selectors[i]).css('background-color');
     311      console.log(selectors[i], color);
     312      if (color && color!='transparent') {
     313        bg_color = color;
     314        break;
     315      }
     316    }
     317
     318    $ato_edit.css('background-color', bg_color);
     319  }, 1000);
    297320
    298321  $ato_edit.find('.close-edit').on('click', function(e) {
  • extensions/AdminTools/template/style.css

    r25655 r25791  
    77#ato_header, #ato_header_closed {
    88  display:none;
     9}
     10#ato_header, #ato_header_closed:not(.smartpocket) {
    911  position:fixed;
    1012  top:0;
     
    2830  white-space:nowrap;
    2931}
    30   #ato_header_root li a, #ato_header_closed a {
     32  #ato_header_root li a, #ato_header_closed:not(.smartpocket) a {
    3133    display:inline-block;
    3234    padding:5px 10px;
     
    5456    border-right:1px solid #222;
    5557  }
    56   #ato_header_root>li a, #ato_header_closed a {
     58  #ato_header_root>li a, #ato_header_closed:not(.smartpocket) a {
    5759    color:#ddd;
    5860    text-shadow:1px 1px 0px #222;
     
    6264    text-shadow:none;
    6365  }
    64   #ato_header_root>li:not(.disabled):hover, #ato_header_closed:hover {
     66  #ato_header_root>li:not(.disabled):hover, #ato_header_closed:not(.smartpocket):hover {
    6567    background:#222;
    6668    background-image:linear-gradient(to bottom, #222, #353535);
     
    113115    }
    114116
    115 #ato_header_closed {
     117#ato_header_closed:not(.smartpocket) {
    116118  left:10px;
    117119  font-size:20px;
     
    121123  height:35px;
    122124}
    123   #ato_header_closed a {
     125  #ato_header_closed:not(.smartpocket) a {
    124126    padding:4px;
    125127  }
     128#ato_header_closed.smartpocket {
     129  float:left;
     130  margin-right:10px;
     131}
     132  #ato_header_closed.smartpocket .ui-btn-inner {
     133    display:none;
     134  }
     135
    126136#ato_header_root a.close-panel {
    127137  padding:6px 1px 4px 5px;
Note: See TracChangeset for help on using the changeset viewer.