Version 4.1.19
This commit is contained in:
1 parent
28bd025b35
commit
2bd5025018
2674 files changed
+233518
-77766
No files matched your search
Whitespace-only changes.
+7
-2
@@ -118,10 +118,15 @@
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.plupload_file_loading .plupload_file_thumb {
|
||||
.plupload_thumb_loading {
|
||||
background: #eee url(../img/loading.gif) center no-repeat;
|
||||
}
|
||||
|
||||
.plupload_thumb_loading .plupload_file_dummy,
|
||||
.plupload_thumb_embedded .plupload_file_dummy {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.plupload_file_name {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@@ -344,7 +349,7 @@
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
plupload_message i {
|
||||
.plupload_message i {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
|
||||
Whitespace-only changes.
Whitespace-only changes.
+45
-25
@@ -141,14 +141,14 @@ Dispatched when file dialog is closed.
|
||||
/**
|
||||
Dispatched when upload is started.
|
||||
|
||||
@event start
|
||||
@event started
|
||||
@param {plupload.Uploader} uploader Uploader instance sending the event.
|
||||
*/
|
||||
|
||||
/**
|
||||
Dispatched when upload is stopped.
|
||||
|
||||
@event stop
|
||||
@event stopped
|
||||
@param {plupload.Uploader} uploader Uploader instance sending the event.
|
||||
*/
|
||||
|
||||
@@ -416,6 +416,9 @@ $.widget("ui.plupload", {
|
||||
|
||||
uploader = this.uploader = uploaders[id] = new plupload.Uploader($.extend(this.options, options));
|
||||
|
||||
// retrieve full normalized set of options
|
||||
this.options = uploader.getOption();
|
||||
|
||||
if (self.options.views.thumbs) {
|
||||
uploader.settings.required_features.display_media = true;
|
||||
}
|
||||
@@ -589,17 +592,26 @@ $.widget("ui.plupload", {
|
||||
self._trigger('removed', null, { up: up, files: files } );
|
||||
});
|
||||
|
||||
uploader.bind('QueueChanged StateChanged', function() {
|
||||
uploader.bind('QueueChanged', function() {
|
||||
self._handleState();
|
||||
});
|
||||
|
||||
uploader.bind('StateChanged', function(up) {
|
||||
self._handleState();
|
||||
if (plupload.STARTED === up.state) {
|
||||
self._trigger('started', null, { up: this.uploader });
|
||||
} else if (plupload.STOPPED === up.state) {
|
||||
self._trigger('stopped', null, { up: this.uploader });
|
||||
}
|
||||
});
|
||||
|
||||
uploader.bind('UploadFile', function(up, file) {
|
||||
self._handleFileStatus(file);
|
||||
});
|
||||
|
||||
uploader.bind('FileUploaded', function(up, file) {
|
||||
uploader.bind('FileUploaded', function(up, file, result) {
|
||||
self._handleFileStatus(file);
|
||||
self._trigger('uploaded', null, { up: up, file: file } );
|
||||
self._trigger('uploaded', null, { up: up, file: file, result: result } );
|
||||
});
|
||||
|
||||
uploader.bind('UploadProgress', function(up, file) {
|
||||
@@ -642,7 +654,7 @@ $.widget("ui.plupload", {
|
||||
}
|
||||
}
|
||||
|
||||
self.uploader.settings[key] = value;
|
||||
self.uploader.setOption(key, value);
|
||||
},
|
||||
|
||||
|
||||
@@ -653,7 +665,6 @@ $.widget("ui.plupload", {
|
||||
*/
|
||||
start: function() {
|
||||
this.uploader.start();
|
||||
this._trigger('start', null, { up: this.uploader });
|
||||
},
|
||||
|
||||
|
||||
@@ -664,7 +675,6 @@ $.widget("ui.plupload", {
|
||||
*/
|
||||
stop: function() {
|
||||
this.uploader.stop();
|
||||
this._trigger('stop', null, { up: this.uploader });
|
||||
},
|
||||
|
||||
|
||||
@@ -691,7 +701,7 @@ $.widget("ui.plupload", {
|
||||
|
||||
|
||||
/**
|
||||
Retrieve file by it's unique id.
|
||||
Retrieve file by its unique id.
|
||||
|
||||
@method getFile
|
||||
@param {String} id Unique id of the file
|
||||
@@ -723,7 +733,7 @@ $.widget("ui.plupload", {
|
||||
Remove the file from the queue.
|
||||
|
||||
@method removeFile
|
||||
@param {plupload.File|String} file File to remove, might be specified directly or by it's unique id
|
||||
@param {plupload.File|String} file File to remove, might be specified directly or by its unique id
|
||||
*/
|
||||
removeFile: function(file) {
|
||||
if (plupload.typeOf(file) === 'string') {
|
||||
@@ -1017,9 +1027,9 @@ $.widget("ui.plupload", {
|
||||
// calculate index of virst visible thumb
|
||||
var startIdx = Math.floor(self.content.scrollTop() / th) * cols;
|
||||
// get potentially visible thumbs that are not yet visible
|
||||
thumbs = $('.plupload_file', self.filelist)
|
||||
thumbs = $('.plupload_file .plupload_file_thumb', self.filelist)
|
||||
.slice(startIdx, startIdx + num)
|
||||
.filter('.plupload_file_loading')
|
||||
.filter('.plupload_thumb_toload')
|
||||
.get();
|
||||
}
|
||||
|
||||
@@ -1051,22 +1061,32 @@ $.widget("ui.plupload", {
|
||||
var img = new o.Image();
|
||||
|
||||
img.onload = function() {
|
||||
var thumb = $('#' + file.id + ' .plupload_file_thumb', self.filelist).html('');
|
||||
var thumb = $('#' + file.id + ' .plupload_file_thumb', self.filelist);
|
||||
this.embed(thumb[0], {
|
||||
width: self.options.thumb_width,
|
||||
width: self.options.thumb_width,
|
||||
height: self.options.thumb_height,
|
||||
crop: true,
|
||||
preserveHeaders: false,
|
||||
swf_url: o.resolveUrl(self.options.flash_swf_url),
|
||||
xap_url: o.resolveUrl(self.options.silverlight_xap_url)
|
||||
});
|
||||
};
|
||||
|
||||
img.bind("embedded error", function() {
|
||||
$('#' + file.id, self.filelist).removeClass('plupload_file_loading');
|
||||
img.bind("embedded error", function(e) {
|
||||
$('#' + file.id, self.filelist)
|
||||
.find('.plupload_file_thumb')
|
||||
.removeClass('plupload_thumb_loading')
|
||||
.addClass('plupload_thumb_' + e.type)
|
||||
;
|
||||
this.destroy();
|
||||
setTimeout(cb, 1); // detach, otherwise ui might hang (in SilverLight for example)
|
||||
});
|
||||
|
||||
$('#' + file.id, self.filelist)
|
||||
.find('.plupload_file_thumb')
|
||||
.removeClass('plupload_thumb_toload')
|
||||
.addClass('plupload_thumb_loading')
|
||||
;
|
||||
img.load(file.getSource());
|
||||
}
|
||||
|
||||
@@ -1083,7 +1103,7 @@ $.widget("ui.plupload", {
|
||||
|
||||
loading = true;
|
||||
|
||||
preloadThumb(self.getFile($(thumbs.shift()).attr('id')), function() {
|
||||
preloadThumb(self.getFile($(thumbs.shift()).closest('.plupload_file').attr('id')), function() {
|
||||
loading = false;
|
||||
lazyLoad();
|
||||
});
|
||||
@@ -1100,21 +1120,21 @@ $.widget("ui.plupload", {
|
||||
_addFiles: function(files) {
|
||||
var self = this, file_html, html = '';
|
||||
|
||||
file_html = '<li class="plupload_file ui-state-default plupload_file_loading plupload_delete" id="%id%" style="width:%thumb_width%px;">' +
|
||||
'<div class="plupload_file_thumb" style="width:%thumb_width%px;height:%thumb_height%px;">' +
|
||||
'<div class="plupload_file_dummy ui-widget-content" style="line-height:%thumb_height%px;"><span class="ui-state-disabled">%ext% </span></div>' +
|
||||
file_html = '<li class="plupload_file ui-state-default plupload_delete" id="{id}" style="width:{thumb_width}px;">' +
|
||||
'<div class="plupload_file_thumb plupload_thumb_toload" style="width: {thumb_width}px; height: {thumb_height}px;">' +
|
||||
'<div class="plupload_file_dummy ui-widget-content" style="line-height: {thumb_height}px;"><span class="ui-state-disabled">{ext} </span></div>' +
|
||||
'</div>' +
|
||||
'<div class="plupload_file_status">' +
|
||||
'<div class="plupload_file_progress ui-widget-header" style="width: 0%"> </div>' +
|
||||
'<span class="plupload_file_percent">%percent% </span>' +
|
||||
'<span class="plupload_file_percent">{percent} </span>' +
|
||||
'</div>' +
|
||||
'<div class="plupload_file_name" title="%name%">' +
|
||||
'<span class="plupload_file_name_wrapper">%name% </span>' +
|
||||
'<div class="plupload_file_name" title="{name}">' +
|
||||
'<span class="plupload_file_name_wrapper">{name} </span>' +
|
||||
'</div>' +
|
||||
'<div class="plupload_file_action">' +
|
||||
'<div class="plupload_action_icon ui-icon ui-icon-circle-minus"> </div>' +
|
||||
'</div>' +
|
||||
'<div class="plupload_file_size">%size% </div>' +
|
||||
'<div class="plupload_file_size">{size} </div>' +
|
||||
'<div class="plupload_file_fields"> </div>' +
|
||||
'</li>';
|
||||
|
||||
@@ -1125,7 +1145,7 @@ $.widget("ui.plupload", {
|
||||
$.each(files, function(i, file) {
|
||||
var ext = o.Mime.getFileExtension(file.name) || 'none';
|
||||
|
||||
html += file_html.replace(/%(\w+)%/g, function($0, $1) {
|
||||
html += file_html.replace(/\{(\w+)\}/g, function($0, $1) {
|
||||
switch ($1) {
|
||||
case 'thumb_width':
|
||||
case 'thumb_height':
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
;(function(e,t,n,r,i){function o(e){return n.translate(e)||e}function u(e){e.id=e.attr("id"),e.html('<div class="plupload_wrapper"><div class="ui-widget-content plupload_container"><div class="ui-state-default ui-widget-header plupload_header"><div class="plupload_header_content"><div class="plupload_logo"> </div><div class="plupload_header_title">'+o("Select files")+"</div>"+'<div class="plupload_header_text">'+o("Add files to the upload queue and click the start button.")+"</div>"+'<div class="plupload_view_switch">'+'<input type="radio" id="'+e.id+'_view_list" name="view_mode_'+e.id+'" checked="checked" /><label class="plupload_button" for="'+e.id+'_view_list" data-view="list">'+o("List")+"</label>"+'<input type="radio" id="'+e.id+'_view_thumbs" name="view_mode_'+e.id+'" /><label class="plupload_button" for="'+e.id+'_view_thumbs" data-view="thumbs">'+o("Thumbnails")+"</label>"+"</div>"+"</div>"+"</div>"+'<table class="plupload_filelist plupload_filelist_header ui-widget-header">'+"<tr>"+'<td class="plupload_cell plupload_file_name">'+o("Filename")+"</td>"+'<td class="plupload_cell plupload_file_status">'+o("Status")+"</td>"+'<td class="plupload_cell plupload_file_size">'+o("Size")+"</td>"+'<td class="plupload_cell plupload_file_action"> </td>'+"</tr>"+"</table>"+'<div class="plupload_content">'+'<div class="plupload_droptext">'+o("Drag files here.")+"</div>"+'<ul class="plupload_filelist_content"> </ul>'+'<div class="plupload_clearer"> </div>'+"</div>"+'<table class="plupload_filelist plupload_filelist_footer ui-widget-header">'+"<tr>"+'<td class="plupload_cell plupload_file_name">'+'<div class="plupload_buttons"><!-- Visible -->'+'<a class="plupload_button plupload_add">'+o("Add Files")+"</a> "+'<a class="plupload_button plupload_start">'+o("Start Upload")+"</a> "+'<a class="plupload_button plupload_stop plupload_hidden">'+o("Stop Upload")+"</a> "+"</div>"+'<div class="plupload_started plupload_hidden"><!-- Hidden -->'+'<div class="plupload_progress plupload_right">'+'<div class="plupload_progress_container"></div>'+"</div>"+'<div class="plupload_cell plupload_upload_status"></div>'+'<div class="plupload_clearer"> </div>'+"</div>"+"</td>"+'<td class="plupload_file_status"><span class="plupload_total_status">0%</span></td>'+'<td class="plupload_file_size"><span class="plupload_total_file_size">0 kb</span></td>'+'<td class="plupload_file_action"></td>'+"</tr>"+"</table>"+"</div>"+'<input class="plupload_count" value="0" type="hidden">'+"</div>")}var s={};i.widget("ui.plupload",{widgetEventPrefix:"",contents_bak:"",options:{browse_button_hover:"ui-state-hover",browse_button_active:"ui-state-active",filters:{},buttons:{browse:!0,start:!0,stop:!0},views:{list:!0,thumbs:!1,active:"list",remember:!0},thumb_width:100,thumb_height:60,multiple_queues:!0,dragdrop:!0,autostart:!1,sortable:!1,rename:!1},FILE_COUNT_ERROR:-9001,_create:function(){var e=this.element.attr("id");e||(e=n.guid(),this.element.attr("id",e)),this.id=e,this.contents_bak=this.element.html(),u(this.element),this.container=i(".plupload_container",this.element).attr("id",e+"_container"),this.content=i(".plupload_content",this.element),i.fn.resizable&&this.container.resizable({handles:"s",minHeight:300}),this.filelist=i(".plupload_filelist_content",this.container).attr({id:e+"_filelist",unselectable:"on"}),this.browse_button=i(".plupload_add",this.container).attr("id",e+"_browse"),this.start_button=i(".plupload_start",this.container).attr("id",e+"_start"),this.stop_button=i(".plupload_stop",this.container).attr("id",e+"_stop"),this.thumbs_switcher=i("#"+e+"_view_thumbs"),this.list_switcher=i("#"+e+"_view_list"),i.ui.button&&(this.browse_button.button({icons:{primary:"ui-icon-circle-plus"},disabled:!0}),this.start_button.button({icons:{primary:"ui-icon-circle-arrow-e"},disabled:!0}),this.stop_button.button({icons:{primary:"ui-icon-circle-close"}}),this.list_switcher.button({text:!1,icons:{secondary:"ui-icon-grip-dotted-horizontal"}}),this.thumbs_switcher.button({text:!1,icons:{secondary:"ui-icon-image"}})),this.progressbar=i(".plupload_progress_container",this.container),i.ui.progressbar&&this.progressbar.progressbar(),this.counter=i(".plupload_count",this.element).attr({id:e+"_count",name:e+"_count"}),this._initUploader()},_initUploader:function(){var e=this,t=this.id,u,a={container:t+"_buttons",browse_button:t+"_browse"};i(".plupload_buttons",this.element).attr("id",t+"_buttons"),e.options.dragdrop&&(this.filelist.parent().attr("id",this.id+"_dropbox"),a.drop_element=this.id+"_dropbox"),this.filelist.on("click",function(t){i(t.target).hasClass("plupload_action_icon")&&(e.removeFile(i(t.target).closest(".plupload_file").attr("id")),t.preventDefault())}),u=this.uploader=s[t]=new n.Uploader(i.extend(this.options,a)),e.options.views.thumbs&&(u.settings.required_features.display_media=!0),e.options.max_file_count&&n.extend(u.getOption("filters"),{max_file_count:e.options.max_file_count}),n.addFileFilter("max_file_count",Line truncated
|
||||
;(function(e,t,n,r,i){function o(e){return n.translate(e)||e}function u(e){e.id=e.attr("id"),e.html('<div class="plupload_wrapper"><div class="ui-widget-content plupload_container"><div class="ui-state-default ui-widget-header plupload_header"><div class="plupload_header_content"><div class="plupload_logo"> </div><div class="plupload_header_title">'+o("Select files")+"</div>"+'<div class="plupload_header_text">'+o("Add files to the upload queue and click the start button.")+"</div>"+'<div class="plupload_view_switch">'+'<input type="radio" id="'+e.id+'_view_list" name="view_mode_'+e.id+'" checked="checked" /><label class="plupload_button" for="'+e.id+'_view_list" data-view="list">'+o("List")+"</label>"+'<input type="radio" id="'+e.id+'_view_thumbs" name="view_mode_'+e.id+'" /><label class="plupload_button" for="'+e.id+'_view_thumbs" data-view="thumbs">'+o("Thumbnails")+"</label>"+"</div>"+"</div>"+"</div>"+'<table class="plupload_filelist plupload_filelist_header ui-widget-header">'+"<tr>"+'<td class="plupload_cell plupload_file_name">'+o("Filename")+"</td>"+'<td class="plupload_cell plupload_file_status">'+o("Status")+"</td>"+'<td class="plupload_cell plupload_file_size">'+o("Size")+"</td>"+'<td class="plupload_cell plupload_file_action"> </td>'+"</tr>"+"</table>"+'<div class="plupload_content">'+'<div class="plupload_droptext">'+o("Drag files here.")+"</div>"+'<ul class="plupload_filelist_content"> </ul>'+'<div class="plupload_clearer"> </div>'+"</div>"+'<table class="plupload_filelist plupload_filelist_footer ui-widget-header">'+"<tr>"+'<td class="plupload_cell plupload_file_name">'+'<div class="plupload_buttons"><!-- Visible -->'+'<a class="plupload_button plupload_add">'+o("Add Files")+"</a> "+'<a class="plupload_button plupload_start">'+o("Start Upload")+"</a> "+'<a class="plupload_button plupload_stop plupload_hidden">'+o("Stop Upload")+"</a> "+"</div>"+'<div class="plupload_started plupload_hidden"><!-- Hidden -->'+'<div class="plupload_progress plupload_right">'+'<div class="plupload_progress_container"></div>'+"</div>"+'<div class="plupload_cell plupload_upload_status"></div>'+'<div class="plupload_clearer"> </div>'+"</div>"+"</td>"+'<td class="plupload_file_status"><span class="plupload_total_status">0%</span></td>'+'<td class="plupload_file_size"><span class="plupload_total_file_size">0 kb</span></td>'+'<td class="plupload_file_action"></td>'+"</tr>"+"</table>"+"</div>"+'<input class="plupload_count" value="0" type="hidden">'+"</div>")}var s={};i.widget("ui.plupload",{widgetEventPrefix:"",contents_bak:"",options:{browse_button_hover:"ui-state-hover",browse_button_active:"ui-state-active",filters:{},buttons:{browse:!0,start:!0,stop:!0},views:{list:!0,thumbs:!1,active:"list",remember:!0},thumb_width:100,thumb_height:60,multiple_queues:!0,dragdrop:!0,autostart:!1,sortable:!1,rename:!1},FILE_COUNT_ERROR:-9001,_create:function(){var e=this.element.attr("id");e||(e=n.guid(),this.element.attr("id",e)),this.id=e,this.contents_bak=this.element.html(),u(this.element),this.container=i(".plupload_container",this.element).attr("id",e+"_container"),this.content=i(".plupload_content",this.element),i.fn.resizable&&this.container.resizable({handles:"s",minHeight:300}),this.filelist=i(".plupload_filelist_content",this.container).attr({id:e+"_filelist",unselectable:"on"}),this.browse_button=i(".plupload_add",this.container).attr("id",e+"_browse"),this.start_button=i(".plupload_start",this.container).attr("id",e+"_start"),this.stop_button=i(".plupload_stop",this.container).attr("id",e+"_stop"),this.thumbs_switcher=i("#"+e+"_view_thumbs"),this.list_switcher=i("#"+e+"_view_list"),i.ui.button&&(this.browse_button.button({icons:{primary:"ui-icon-circle-plus"},disabled:!0}),this.start_button.button({icons:{primary:"ui-icon-circle-arrow-e"},disabled:!0}),this.stop_button.button({icons:{primary:"ui-icon-circle-close"}}),this.list_switcher.button({text:!1,icons:{secondary:"ui-icon-grip-dotted-horizontal"}}),this.thumbs_switcher.button({text:!1,icons:{secondary:"ui-icon-image"}})),this.progressbar=i(".plupload_progress_container",this.container),i.ui.progressbar&&this.progressbar.progressbar(),this.counter=i(".plupload_count",this.element).attr({id:e+"_count",name:e+"_count"}),this._initUploader()},_initUploader:function(){var e=this,t=this.id,u,a={container:t+"_buttons",browse_button:t+"_browse"};i(".plupload_buttons",this.element).attr("id",t+"_buttons"),e.options.dragdrop&&(this.filelist.parent().attr("id",this.id+"_dropbox"),a.drop_element=this.id+"_dropbox"),this.filelist.on("click",function(t){i(t.target).hasClass("plupload_action_icon")&&(e.removeFile(i(t.target).closest(".plupload_file").attr("id")),t.preventDefault())}),u=this.uploader=s[t]=new n.Uploader(i.extend(this.options,a)),this.options=u.getOption(),e.options.views.thumbs&&(u.settings.required_features.display_media=!0),e.options.max_file_count&&n.extend(u.getOption("filters"),{max_file_count:e.options.max_file_count}),n.addFLine truncated
|
||||
Reference in new issue
Block a user