Changeset 11636

Show
Ignore:
Timestamp:
03/01/11 15:59:19 (2 years ago)
Author:
mbrevda
Message:

should fix #4890 - IE SUCKS! IE SUCKS! IE SUCKS! IE SUCKS!

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.9/core/advancedsettings.js

    r11276 r11636  
    1616        break; 
    1717    } 
    18     var send_reload = $('#need_reload_block').size() == 0 ? '1':'0'; 
     18   var send_reload = $('#need_reload_block').size() == 0 ? '1':'0'; 
    1919    $.ajax({ 
    2020      type: 'POST', 
     
    4242        } 
    4343        if (data.saved) { 
    44           mythis.parent().delay(500).fadeOut(); 
     44          //remove save button 
    4545          mythis.unbind('click', savebinder); 
    46  
     46          mythis.fadeOut('normal', function(){ 
     47            mythis.closest('tr').find('.savetd').hide(); 
     48          }); 
     49           
     50          //hide retor to defualt if its we have reverted to defualt 
     51          //should not be nesesary -MB 
     52          /* 
     53          input = mythis.closest('tr').find('input.valueinput').val() ; 
     54          defval = mythis.closest('tr').find('input.adv_set_default').attr('data-default') 
     55          console.log(input, defval) 
     56          if(input == defval){ 
     57            mythis.closest('tr').find('input.adv_set_default').fadeOut() 
     58          } 
     59          */ 
    4760          // If they changed the page layout 
    4861          switch (mykey) { 
     
    97110  //show save button 
    98111  $('.valueinput').bind('keyup keypress keydown paste change', function(){ 
    99     var myel = $(this).parent().next().next(); 
     112    var save = $(this).closest('tr').find('input.save'); 
     113    //this is hidden seperatly from the td due to some ie issues, hence we show it separately 
     114    $(this).closest('tr').find('.savetd').show();  
     115 
    100116    //if the value was changed since the last page refresh 
    101117    if($(this).val() != $(this).attr('data-valueinput-orig')){ 
    102       myel.stop(true, true).delay(100).fadeIn(); 
     118      save.stop(true, true).delay(100).fadeIn(); 
    103119      //only bind if not already bound 
    104       if (myel.children(".save").data("events") == undefined 
    105         || typeof(myel.children('.save').data('events')["click"]) == undefined 
    106       ) { 
    107         myel.children('.save').bind('click', savebinder); 
     120      if (save.data("events") == undefined || typeof(save.data('events')["click"]) == undefined) { 
     121        save.bind('click', savebinder); 
    108122      } 
    109123      //show 'revert to defualt' 
    110       $(this).parent().next().find('input').show() 
     124      $(this).closest('tr').find('input.adv_set_default').show() 
    111125    } else { 
    112       myel.stop(true, true).delay(100).fadeOut(); 
    113       myel.children('.save').unbind('click', savebinder); 
     126      save.stop(true, true).delay(100).fadeOut('normal', function(){ 
     127            $(this).closest('tr').find('.savetd').hide(); 
     128            $(this).closest('tr').find('input.adv_set_default').fadeOut() 
     129        }).unbind('click', savebinder);  
    114130    } 
    115131     
  • modules/branches/2.9/core/core.css

    r11583 r11636  
    1919} 
    2020.save, .adv_set_default{border-style: none;} 
    21 .savetd{display:none;} 
     21.savetd, .save{display:none;} 
  • modules/branches/2.9/core/page.advancedsettings.php

    r11627 r11636  
    145145    if(!$c['readonly'] || $amp_conf['AS_OVERRIDE_READONLY'] && !$c['hidden']){ 
    146146      echo '<td><input type="image" class="adv_set_default" src="images/default-option.png" data-key="'.$c['keyword'].'" data-default="'.$c['defaultval'].'" title="'._('Revert to Default').'"' 
    147         . 'data-type="' . (($c['type'] == CONF_TYPE_BOOL) ? 'BOOL' : '') . '" '  
     147        . ' data-type="' . (($c['type'] == CONF_TYPE_BOOL) ? 'BOOL' : '') . '" '  
    148148        . (($amp_conf[$c['keyword']] == $c['defaultval']) ? ' style="display:none" ' : '')  
    149149        .'"></td>'; 
     
    151151        . $c['keyword']  
    152152        . '" title="' . _('Save') . '"' 
    153         . 'data-type="' . (($c['type'] == CONF_TYPE_BOOL) ? 'BOOL' : '') . '" '  
     153        . ' data-type="' . (($c['type'] == CONF_TYPE_BOOL) ? 'BOOL' : '') . '" '  
    154154        . '></td>'; 
    155155    }