Changeset 4767 in subversion


Ignore:
Timestamp:
May 14, 2011 3:25:13 AM (2 years ago)
Author:
alec
Message:
Location:
trunk/roundcubemail
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/js/app.js

    r4761 r4767  
    395395        // display 'loading' message on form submit, lock submit button 
    396396        $('form').submit(function () { 
    397           $('input[type=submit]', this).attr('disabled', true); 
     397          $('input[type=submit]', this).prop('disabled', true); 
    398398          rcmail.display_message('', 'loading'); 
    399399        }); 
     
    40194019    if (elem.length) { 
    40204020      elem.show().focus(); 
    4021       $(menu).children('option[value="'+col+'"]').attr('disabled', true); 
     4021      $(menu).children('option[value="'+col+'"]').prop('disabled', true); 
    40224022    } 
    40234023    else { 
     
    40434043          input = $('<input>') 
    40444044            .addClass('ff_'+col) 
    4045             .attr('type', 'text') 
    4046             .attr('name', '_'+col+name_suffix) 
    4047             .attr('size', colprop.size) 
     4045            .attr({type: 'text', name: '_'+col+name_suffix, size: colprop.size}) 
    40484046            .appendTo(cell); 
    40494047 
     
    40524050        else if (colprop.type == 'composite') { 
    40534051          var childcol, cp, first; 
    4054           for (var childcol in colprop.childs) { 
     4052          for (childcol in colprop.childs) { 
    40554053            cp = colprop.childs[childcol]; 
    40564054            input = $('<input>') 
    40574055              .addClass('ff_'+childcol) 
    4058               .attr('type', 'text') 
    4059               .attr('name', '_'+childcol+name_suffix) 
    4060               .attr('size', cp.size) 
     4056              .attr({type: 'text', name: '_'+childcol+name_suffix, size: cp.size}) 
    40614057              .appendTo(cell); 
    40624058            cell.append(" "); 
     
    40814077          var delbutton = $('<a href="#del"></a>') 
    40824078            .addClass('contactfieldbutton deletebutton') 
    4083             .attr('title', this.get_label('delete')) 
    4084             .attr('rel', col) 
     4079            .attr({title: this.get_label('delete'), rel: col}) 
    40854080            .html(this.env.delbutton) 
    40864081            .click(function(){ ref.delete_edit_field(this); return false }) 
     
    40934088          if (!colprop.count) colprop.count = 0; 
    40944089          if (++colprop.count == colprop.limit && colprop.limit) 
    4095             $(menu).children('option[value="'+col+'"]').attr('disabled', true); 
     4090            $(menu).children('option[value="'+col+'"]').prop('disabled', true); 
    40964091        } 
    40974092      } 
     
    41204115      var option = addmenu.children('option[value="'+col+'"]'); 
    41214116      if (option.length) 
    4122         option.attr('disabled', false); 
     4117        option.prop('disabled', false); 
    41234118      else 
    41244119        option = $('<option>').attr('value', col).html(colprop.label).appendTo(addmenu); 
     
    41264121    } 
    41274122  }; 
    4128  
    41294123 
    41304124  this.upload_contact_photo = function(form) 
     
    43934387 
    43944388      // update subscription checkbox 
    4395       $('input[name="_subscribed[]"]', row).val(name).attr('checked', true); 
     4389      $('input[name="_subscribed[]"]', row).val(name).prop('checked', true); 
    43964390    } 
    43974391 
     
    45024496    var id = this.get_folder_row_id(folder); 
    45034497    if (id) 
    4504       $('input[name="_subscribed[]"]', $('#'+id)).attr('disabled', true); 
     4498      $('input[name="_subscribed[]"]', $('#'+id)).prop('disabled', true); 
    45054499  }; 
    45064500 
  • trunk/roundcubemail/skins/default/functions.js

    r4761 r4767  
    177177    var pos = $(ref).offset(); 
    178178    obj.css({ left:pos.left, top:(pos.top + ref.offsetHeight + 2)}) 
    179         .find(':checked').attr('checked', false); 
     179        .find(':checked').prop('checked', false); 
    180180 
    181181    if (rcmail.env.search_mods) { 
    182182      var search_mods = rcmail.env.search_mods[rcmail.env.mailbox] ? rcmail.env.search_mods[rcmail.env.mailbox] : rcmail.env.search_mods['*']; 
    183183      for (var n in search_mods) 
    184         $('#s_mod_' + n).attr('checked', true); 
     184        $('#s_mod_' + n).prop('checked', true); 
    185185    } 
    186186  } 
     
    220220    obj.css({ left:pos.left, top:(pos.top + ref.offsetHeight + 2)}); 
    221221    // set form values 
    222     $('input[name="sort_col"][value="'+rcmail.env.sort_col+'"]').attr('checked', 1); 
    223     $('input[name="sort_ord"][value="DESC"]').attr('checked', rcmail.env.sort_order=='DESC' ? 1 : 0); 
    224     $('input[name="sort_ord"][value="ASC"]').attr('checked', rcmail.env.sort_order=='DESC' ? 0 : 1); 
    225     $('input[name="view"][value="thread"]').attr('checked', rcmail.env.threading ? 1 : 0); 
    226     $('input[name="view"][value="list"]').attr('checked', rcmail.env.threading ? 0 : 1); 
     222    $('input[name="sort_col"][value="'+rcmail.env.sort_col+'"]').prop('checked', true); 
     223    $('input[name="sort_ord"][value="DESC"]').prop('checked', rcmail.env.sort_order == 'DESC'); 
     224    $('input[name="sort_ord"][value="ASC"]').prop('checked', rcmail.env.sort_order != 'DESC'); 
     225    $('input[name="view"][value="thread"]').prop('checked', rcmail.env.threading ? true : false); 
     226    $('input[name="view"][value="list"]').prop('checked', rcmail.env.threading ? false : true); 
    227227    // list columns 
    228     var cols = $('input[name="list_col[]"]'); 
     228    var found, cols = $('input[name="list_col[]"]'); 
    229229    for (var i=0; i<cols.length; i++) { 
    230       var found = 0; 
    231230      if (cols[i].value != 'from') 
    232231        found = jQuery.inArray(cols[i].value, rcmail.env.coltypes) != -1; 
    233232      else 
    234233        found = (jQuery.inArray('from', rcmail.env.coltypes) != -1 
    235             || jQuery.inArray('to', rcmail.env.coltypes) != -1); 
    236       $(cols[i]).attr('checked',found ? 1 : 0); 
     234                || jQuery.inArray('to', rcmail.env.coltypes) != -1); 
     235      $(cols[i]).prop('checked', found); 
    237236    } 
    238237  } 
Note: See TracChangeset for help on using the changeset viewer.