Changeset 7fc056c3 in github
- Timestamp:
- May 3, 2011 4:18:40 AM (2 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 1abb97f
- Parents:
- 4d7fbd5
- Files:
-
- 4 edited
-
CHANGELOG (modified) (1 diff)
-
program/include/html.php (modified) (1 diff)
-
program/js/app.js (modified) (5 diffs)
-
program/steps/mail/compose.inc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG
r2d889ec r7fc056c3 2 2 =========================== 3 3 4 - Enable multiselection for attachments uploading in capable browsers (#1485969) 4 5 - Add possibility to change HTML editor configuration by skin 5 6 - Fix a bug where selecting too many contacts would produce too large URI request (#1487892) -
program/include/html.php
r6f6efa2 r7fc056c3 272 272 protected $allowed = array('type','name','value','size','tabindex', 273 273 'autocomplete','checked','onchange','onclick','disabled','readonly', 274 'spellcheck','results','maxlength','src' );274 'spellcheck','results','maxlength','src','multiple'); 275 275 276 276 /** -
program/js/app.js
rcf58ce8 r7fc056c3 474 474 // trigger plugin hooks 475 475 this.triggerEvent('actionbefore', {props:props, action:command}); 476 var event_ret = this.triggerEvent('before'+command, props);477 if ( event_ret !== undefined) {476 var ret = this.triggerEvent('before'+command, props); 477 if (ret !== undefined) { 478 478 // abort if one the handlers returned false 479 if ( event_ret === false)479 if (ret === false) 480 480 return false; 481 481 else 482 props = event_ret;482 props = ret; 483 483 } 484 484 … … 3172 3172 return false; 3173 3173 3174 // get file input fields 3175 var send = false; 3176 for (var n=0; n<form.elements.length; n++) 3177 if (form.elements[n].type=='file' && form.elements[n].value) { 3178 send = true; 3179 break; 3180 } 3174 // get file input field, count files on capable browser 3175 var field = $('input[type=file]', form).get(0), 3176 files = field.files ? field.files.length : field.value ? 1 : 0; 3181 3177 3182 3178 // create hidden iframe and post upload form 3183 if ( send) {3179 if (files) { 3184 3180 var frame_name = this.async_upload_form(form, 'upload', function(e) { 3185 3181 var d, content = ''; … … 3204 3200 3205 3201 // display upload indicator and cancel button 3206 var content = this.get_label('uploading' ),3202 var content = this.get_label('uploading' + (files > 1 ? 'many' : '')), 3207 3203 ts = frame_name.replace(/^rcmupload/, ''); 3208 3204 … … 3226 3222 return false; 3227 3223 3228 var li = $('<li>').attr('id', name).html(att.html); 3229 var indicator; 3224 var indicator, li = $('<li>').attr('id', name).html(att.html); 3230 3225 3231 3226 // replace indicator's li … … 3254 3249 3255 3250 var list = this.gui_objects.attachmentlist.getElementsByTagName("li"); 3256 for (i=0; i<list.length;i++)3251 for (i=0; i<list.length; i++) 3257 3252 if (list[i].id == name) 3258 3253 this.gui_objects.attachmentlist.removeChild(list[i]); -
program/steps/mail/compose.inc
rfc072bf r7fc056c3 1149 1149 if ($max_postsize && $max_postsize < $max_filesize) 1150 1150 $max_filesize = $max_postsize; 1151 1152 $OUTPUT->set_env('max_filesize', $max_filesize); 1151 1153 $max_filesize = show_bytes($max_filesize); 1152 1154 … … 1173 1175 $attrib['type'] = 'file'; 1174 1176 $attrib['name'] = '_attachments[]'; 1177 $attrib['multiple'] = 'multiple'; 1178 1175 1179 $field = new html_inputfield($attrib); 1176 1180 return $field->show();
Note: See TracChangeset
for help on using the changeset viewer.
