Changeset 4767 in subversion
- Timestamp:
- May 14, 2011 3:25:13 AM (2 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 2 edited
-
program/js/app.js (modified) (10 diffs)
-
skins/default/functions.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/js/app.js
r4761 r4767 395 395 // display 'loading' message on form submit, lock submit button 396 396 $('form').submit(function () { 397 $('input[type=submit]', this). attr('disabled', true);397 $('input[type=submit]', this).prop('disabled', true); 398 398 rcmail.display_message('', 'loading'); 399 399 }); … … 4019 4019 if (elem.length) { 4020 4020 elem.show().focus(); 4021 $(menu).children('option[value="'+col+'"]'). attr('disabled', true);4021 $(menu).children('option[value="'+col+'"]').prop('disabled', true); 4022 4022 } 4023 4023 else { … … 4043 4043 input = $('<input>') 4044 4044 .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}) 4048 4046 .appendTo(cell); 4049 4047 … … 4052 4050 else if (colprop.type == 'composite') { 4053 4051 var childcol, cp, first; 4054 for ( varchildcol in colprop.childs) {4052 for (childcol in colprop.childs) { 4055 4053 cp = colprop.childs[childcol]; 4056 4054 input = $('<input>') 4057 4055 .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}) 4061 4057 .appendTo(cell); 4062 4058 cell.append(" "); … … 4081 4077 var delbutton = $('<a href="#del"></a>') 4082 4078 .addClass('contactfieldbutton deletebutton') 4083 .attr('title', this.get_label('delete')) 4084 .attr('rel', col) 4079 .attr({title: this.get_label('delete'), rel: col}) 4085 4080 .html(this.env.delbutton) 4086 4081 .click(function(){ ref.delete_edit_field(this); return false }) … … 4093 4088 if (!colprop.count) colprop.count = 0; 4094 4089 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); 4096 4091 } 4097 4092 } … … 4120 4115 var option = addmenu.children('option[value="'+col+'"]'); 4121 4116 if (option.length) 4122 option. attr('disabled', false);4117 option.prop('disabled', false); 4123 4118 else 4124 4119 option = $('<option>').attr('value', col).html(colprop.label).appendTo(addmenu); … … 4126 4121 } 4127 4122 }; 4128 4129 4123 4130 4124 this.upload_contact_photo = function(form) … … 4393 4387 4394 4388 // update subscription checkbox 4395 $('input[name="_subscribed[]"]', row).val(name). attr('checked', true);4389 $('input[name="_subscribed[]"]', row).val(name).prop('checked', true); 4396 4390 } 4397 4391 … … 4502 4496 var id = this.get_folder_row_id(folder); 4503 4497 if (id) 4504 $('input[name="_subscribed[]"]', $('#'+id)). attr('disabled', true);4498 $('input[name="_subscribed[]"]', $('#'+id)).prop('disabled', true); 4505 4499 }; 4506 4500 -
trunk/roundcubemail/skins/default/functions.js
r4761 r4767 177 177 var pos = $(ref).offset(); 178 178 obj.css({ left:pos.left, top:(pos.top + ref.offsetHeight + 2)}) 179 .find(':checked'). attr('checked', false);179 .find(':checked').prop('checked', false); 180 180 181 181 if (rcmail.env.search_mods) { 182 182 var search_mods = rcmail.env.search_mods[rcmail.env.mailbox] ? rcmail.env.search_mods[rcmail.env.mailbox] : rcmail.env.search_mods['*']; 183 183 for (var n in search_mods) 184 $('#s_mod_' + n). attr('checked', true);184 $('#s_mod_' + n).prop('checked', true); 185 185 } 186 186 } … … 220 220 obj.css({ left:pos.left, top:(pos.top + ref.offsetHeight + 2)}); 221 221 // 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); 227 227 // list columns 228 var cols = $('input[name="list_col[]"]');228 var found, cols = $('input[name="list_col[]"]'); 229 229 for (var i=0; i<cols.length; i++) { 230 var found = 0;231 230 if (cols[i].value != 'from') 232 231 found = jQuery.inArray(cols[i].value, rcmail.env.coltypes) != -1; 233 232 else 234 233 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); 237 236 } 238 237 }
Note: See TracChangeset
for help on using the changeset viewer.
