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

File:
1 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) {
Note: See TracChangeset for help on using the changeset viewer.