Lines Matching +full:cancel +full:- +full:in +full:- +full:progress
2 * http://github.com/valums/file-uploader
4 * Multiple file upload component with progress-bar, drag-and-drop.
20 for (var prop in second){
26 * Searches for a given element in the array, returns -1 if it is not present.
38 if (from in arr && arr[from] === elt){
42 return -1;
90 // compareposition returns false in this case
119 * Fixes opacity in IE6-8.
182 * obj2url() takes a json-object as argument and generates
189 * will result in:
193 * @param Object JSON-Object
194 * @param String current querystring-part
202 ? (/\[\]$/.test(temp)) // prevent double-encoding
222 // we wont use a for-in-loop on an array (performance)
227 // for anything else but a scalar, we will use for-in-loop
228 for (var i in obj){
267 // return false to cancel submit
364 this._filesInProgress--;
370 this._filesInProgress--;
410 // fix missing properties in Safari
447 name = name.slice(0, 19) + '...' + name.slice(-13);
452 var ext = (-1 !== fileName.indexOf('.')) ? fileName.replace(/.*[.]/, '').toLowerCase() : '';
464 var i = -1;
476 * Class that creates upload widget with drag-and-drop and file list
486 // if set, will be used instead of qq-upload-list in template
489 template: '<div class="qq-uploader">' +
490 '<div class="qq-upload-drop-area"><span>Drop files here to upload</span></div>' +
491 '<div class="qq-upload-button">Upload a file</div>' +
492 '<ul class="qq-upload-list"></ul>' +
495 // template for one item in file list
497 '<span class="qq-upload-file"></span>' +
498 '<span class="qq-upload-spinner"></span>' +
499 '<span class="qq-upload-size"></span>' +
500 '<a class="qq-upload-cancel" href="#">Cancel</a>' +
501 '<span class="qq-upload-failed-text">Failed</span>' +
506 button: 'qq-upload-button',
507 drop: 'qq-upload-drop-area',
508 dropActive: 'qq-upload-drop-area-active',
509 list: 'qq-upload-list',
511 file: 'qq-upload-file',
512 spinner: 'qq-upload-spinner',
513 size: 'qq-upload-size',
514 cancel: 'qq-upload-cancel', property
517 // used in css to hide progress spinner
518 success: 'qq-upload-success',
519 fail: 'qq-upload-fail'
542 * Gets one of the elements listed in this._options.classes
617 qq.remove(this._find(item, 'cancel'));
639 // there can't be txt nodes in dynamically created list
647 * delegate click event for cancel link
657 if (qq.hasClass(target, self._classes.cancel)){
661 self._handler.cancel(item.qqFileId);
744 // do not check dt.types.contains in webkit, because it crashes safari 4
745 isWebkit = navigator.userAgent.indexOf("AppleWebKit") > -1;
747 // dt.effectAllowed is none in Safari 5
763 hoverClass: 'qq-upload-button-hover',
764 focusClass: 'qq-upload-button-focus'
775 // Make sure browse button is in the right side
776 // in Internet Explorer
809 // in Opera only 'browse' button
844 // which is unacceptable in our case, disable keyboard access
847 input.setAttribute('tabIndex', "-1");
870 // params for files in queue
900 cancel: function(id){ method in qq.UploadHandlerAbstract
933 * Actual cancel method
946 var nextId = this._queue[max-1];
967 var id = 'qq-upload-handler-iframe' + qq.getUniqueId();
989 // to cancel request set src to something else
1020 // timeout added to fix busy state in FF3.6
1034 // the request stops, but in IE load
1044 // In Opera event is fired second time
1058 // iframe.contentWindow.document - for IE<7
1078 // won't be properly registered in IE6, and new window
1097 // We can't use the following code in IE6
1100 // form.setAttribute('enctype', 'multipart/form-data');
1101 // Because in this case file won't be attached to request
1102 var form = qq.toElement('<form method="post" enctype="multipart/form-data"></form>');
1125 // current loaded size in bytes for each file
1135 'multiple' in input &&
1146 * Returns id to use with upload, cancel
1150 throw new Error('Passed obj in not a File (in qq.UploadHandlerXhr)');
1153 return this._files.push(file) - 1;
1157 // fix missing name in Safari 4
1172 * @param {Object} params name-value string pairs
1203 xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
1204 xhr.setRequestHeader("X-File-Name", encodeURIComponent(name));
1205 xhr.setRequestHeader("Content-Type", "application/octet-stream");
1218 this.log("xhr - server response received");