1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 06:38:00 +02:00

Plupload upgraded to the latest and greatest

This commit is contained in:
SecretR
2014-11-04 16:08:27 +02:00
parent fe0524b2f9
commit 1408a3eb6b
11 changed files with 598 additions and 333 deletions

View File

@@ -1,177 +1,185 @@
/* /*
Plupload Plupload
------------------------------------------------------------------- */ ------------------------------------------------------------------- */
.plupload_button { .plupload_wrapper * {
display: -moz-inline-box; /* FF < 3*/ box-sizing: content-box;
display: inline-block; }
font: normal 12px sans-serif;
text-decoration: none; .plupload_button {
color: #42454a; display: -moz-inline-box; /* FF < 3*/
border: 1px solid #bababa; display: inline-block;
padding: 2px 8px 3px 20px; font: normal 12px sans-serif;
margin-right: 4px; text-decoration: none;
background: #f3f3f3 url('../img/buttons.png') no-repeat 0 center; color: #42454a;
outline: 0; border: 1px solid #bababa;
padding: 2px 8px 3px 20px;
/* Optional rounded corners for browsers that support it */ margin-right: 4px;
-moz-border-radius: 3px; background: #f3f3f3 url('../img/buttons.png') no-repeat 0 center;
-khtml-border-radius: 3px; outline: 0;
-webkit-border-radius: 3px;
border-radius: 3px; /* Optional rounded corners for browsers that support it */
} -moz-border-radius: 3px;
-khtml-border-radius: 3px;
.plupload_button:hover { -webkit-border-radius: 3px;
color: #000; border-radius: 3px;
text-decoration: none; }
}
.plupload_button:hover {
.plupload_disabled, a.plupload_disabled:hover { color: #000;
color: #737373; text-decoration: none;
border-color: #c5c5c5; }
background: #ededed url('../img/buttons-disabled.png') no-repeat 0 center;
cursor: default; .plupload_disabled, a.plupload_disabled:hover {
} color: #737373;
border-color: #c5c5c5;
.plupload_add { background: #ededed url('../img/buttons-disabled.png') no-repeat 0 center;
background-position: -181px center; cursor: default;
} }
.plupload_wrapper { .plupload_add {
font: normal 11px Verdana,sans-serif; background-position: -181px center;
width: 100%; }
}
.plupload_wrapper {
.plupload_container { font: normal 11px Verdana,sans-serif;
padding: 8px; width: 100%;
background: url('../img/transp50.png'); }
/*-moz-border-radius: 5px;*/
} .plupload_container {
padding: 8px;
.plupload_container input { background: url('../img/transp50.png');
border: 1px solid #DDD; /*-moz-border-radius: 5px;*/
font: normal 11px Verdana,sans-serif; }
width: 98%;
} .plupload_container input {
border: 1px solid #DDD;
.plupload_header {background: #2A2C2E url('../img/backgrounds.gif') repeat-x;} font: normal 11px Verdana,sans-serif;
.plupload_header_content { width: 98%;
background: url('../img/backgrounds.gif') no-repeat 0 -317px; }
min-height: 56px;
padding-left: 60px; .plupload_header {background: #2A2C2E url('../img/backgrounds.gif') repeat-x;}
color: #FFF; .plupload_header_content {
} background: url('../img/backgrounds.gif') no-repeat 0 -317px;
.plupload_header_title { min-height: 56px;
font: normal 18px sans-serif; padding-left: 60px;
padding: 6px 0 3px; color: #FFF;
} }
.plupload_header_text { .plupload_header_title {
font: normal 12px sans-serif; font: normal 18px sans-serif;
} padding: 6px 0 3px;
}
.plupload_filelist { .plupload_header_text {
margin: 0; font: normal 12px sans-serif;
padding: 0; }
list-style: none;
} .plupload_filelist {
margin: 0;
.plupload_scroll .plupload_filelist { padding: 0;
height: 185px; list-style: none;
background: #F5F5F5; }
overflow-y: scroll;
} .plupload_scroll .plupload_filelist {
height: 185px;
.plupload_filelist li { background: #F5F5F5;
padding: 10px 8px; overflow-y: scroll;
background: #F5F5F5 url('../img/backgrounds.gif') repeat-x 0 -156px; }
border-bottom: 1px solid #DDD;
} .plupload_filelist li {
padding: 10px 8px;
.plupload_filelist_header, .plupload_filelist_footer { background: #F5F5F5 url('../img/backgrounds.gif') repeat-x 0 -156px;
background: #DFDFDF; border-bottom: 1px solid #DDD;
padding: 8px 8px; }
color: #42454A;
} .plupload_filelist_header, .plupload_filelist_footer {
.plupload_filelist_header { background: #DFDFDF;
border-top: 1px solid #EEE; padding: 8px 8px;
border-bottom: 1px solid #CDCDCD; color: #42454A;
} }
.plupload_filelist_header {
.plupload_filelist_footer {border-top: 1px solid #FFF; height: 22px; line-height: 20px; vertical-align: middle;} border-top: 1px solid #EEE;
.plupload_file_name {float: left; overflow: hidden} border-bottom: 1px solid #CDCDCD;
.plupload_file_status {color: #777;} }
.plupload_file_status span {color: #42454A;}
.plupload_file_size, .plupload_file_status, .plupload_progress { .plupload_filelist_footer {border-top: 1px solid #FFF; height: 22px; line-height: 20px; vertical-align: middle;}
float: right; .plupload_file_name {float: left; overflow: hidden}
width: 80px; .plupload_file_status {color: #777;}
} .plupload_file_status span {color: #42454A;}
.plupload_file_size, .plupload_file_status, .plupload_file_action {text-align: right;} .plupload_file_size, .plupload_file_status, .plupload_progress {
float: right;
.plupload_filelist .plupload_file_name {width: 205px} width: 80px;
}
.plupload_file_action { .plupload_file_size, .plupload_file_status, .plupload_file_action {text-align: right;}
float: right;
width: 16px; .plupload_filelist .plupload_file_name {
height: 16px; width: 205px;
margin-left: 15px; white-space: nowrap;
} text-overflow: ellipsis;
}
.plupload_file_action * {
display: none; .plupload_file_action {
width: 16px; float: right;
height: 16px; width: 16px;
} height: 16px;
margin-left: 15px;
li.plupload_uploading {background: #ECF3DC url('../img/backgrounds.gif') repeat-x 0 -238px;} }
li.plupload_done {color:#AAA}
.plupload_file_action * {
li.plupload_delete a { display: none;
background: url('../img/delete.gif'); width: 16px;
} height: 16px;
}
li.plupload_failed a {
background: url('../img/error.gif'); li.plupload_uploading {background: #ECF3DC url('../img/backgrounds.gif') repeat-x 0 -238px;}
cursor: default; li.plupload_done {color:#AAA}
}
li.plupload_delete a {
li.plupload_done a { background: url('../img/delete.gif');
background: url('../img/done.gif'); }
cursor: default;
} li.plupload_failed a {
background: url('../img/error.gif');
.plupload_progress, .plupload_upload_status { cursor: default;
display: none; }
}
li.plupload_done a {
.plupload_progress_container { background: url('../img/done.gif');
margin-top: 3px; cursor: default;
border: 1px solid #CCC; }
background: #FFF;
padding: 1px; .plupload_progress, .plupload_upload_status {
} display: none;
.plupload_progress_bar { }
width: 0px;
height: 7px; .plupload_progress_container {
background: #CDEB8B; margin-top: 3px;
} border: 1px solid #CCC;
background: #FFF;
.plupload_scroll .plupload_filelist_header .plupload_file_action, .plupload_scroll .plupload_filelist_footer .plupload_file_action { padding: 1px;
margin-right: 17px; }
} .plupload_progress_bar {
width: 0px;
/* Floats */ height: 7px;
background: #CDEB8B;
.plupload_clear,.plupload_clearer {clear: both;} }
.plupload_clearer, .plupload_progress_bar {
display: block; .plupload_scroll .plupload_filelist_header .plupload_file_action, .plupload_scroll .plupload_filelist_footer .plupload_file_action {
font-size: 0; margin-right: 17px;
line-height: 0; }
}
/* Floats */
li.plupload_droptext {
background: transparent; .plupload_clear,.plupload_clearer {clear: both;}
text-align: center; .plupload_clearer, .plupload_progress_bar {
vertical-align: middle; display: block;
border: 0; font-size: 0;
line-height: 165px; line-height: 0;
} }
li.plupload_droptext {
background: transparent;
text-align: center;
vertical-align: middle;
border: 0;
line-height: 165px;
}

File diff suppressed because one or more lines are too long

View File

@@ -1,147 +1,370 @@
/* /*
Plupload Plupload
------------------------------------------------------------------- */ ------------------------------------------------------------------- */
.plupload_button {cursor: pointer;} .plupload_wrapper * {
box-sizing: content-box;
.plupload_wrapper { }
font: normal 11px Verdana,sans-serif;
width: 100%; .plupload_button {
} cursor: pointer;
outline: none;
.plupload .plupload_container input {width: 98%;} }
.plupload .plupload_filelist_footer {border-width: 1px 0 0 0}
.plupload .plupload_filelist_header {border-width: 0 0 1px 0} .plupload_wrapper {
div.plupload .plupload_file {border-width: 0 0 1px 0} font: normal 11px Verdana,sans-serif;
div.plupload div.plupload_header {border-width: 0 0 1px 0; position: relative;} width: 100%;
min-width: 520px;
.plupload_file .ui-icon { line-height: 12px;
cursor:pointer; }
}
.plupload_container {
.plupload_header_content { _height: 300px;
background-image: url('../img/plupload.png'); min-height: 300px;
background-repeat: no-repeat; position: relative;
background-position: 8px center; }
min-height: 56px;
padding-left: 60px; .plupload_filelist_footer {border-width: 1px 0 0 0}
position:relative; .plupload_file {border-width: 0 0 1px 0}
} .plupload_container .plupload_header {border-width: 0 0 1px 0; position: relative;}
.plupload_header_content_bw {background-image: url('../img/plupload-bw.png');}
.plupload_header_title { .plupload_delete .ui-icon,
font: normal 18px sans-serif; .plupload_done .ui-icon,
padding: 6px 0 3px; .plupload_failed .ui-icon {
} cursor:pointer;
.plupload_header_text {font: normal 12px sans-serif;} }
.plupload_filelist, .plupload_header_content {
.plupload_filelist_content { height: 56px;
border-collapse: collapse; padding: 0 160px 0 60px;
margin: 0; position: relative;
padding: 0; }
width: 100%;
-moz-user-select:none; .plupload_logo {
-webkit-user-select:none; width: 40px;
user-select:none; height: 40px;
} background: url('../img/plupload.png') no-repeat 0 0;
position: absolute;
.plupload_cell {padding: 8px 6px;} top: 8px;
left: 8px;
.plupload_file { }
border-left: none;
border-right: none; .plupload_header_content_bw .plupload_logo {
} background-position: -40px 0;
}
.plupload .ui-sortable-helper,
.plupload .ui-sortable .plupload_file { .plupload_header_title {
cursor:move; font: normal 18px sans-serif;
} line-height: 19px;
padding: 6px 0 3px;
.plupload_scroll { }
max-height: 180px;
min-height: 168px; .plupload_header_text {
_height: 168px; font: normal 12px sans-serif;
overflow-y: auto; }
}
.plupload_view_switch {
.plupload_file_size, .plupload_file_status {text-align: right;} position: absolute;
.plupload_file_size, .plupload_file_status {width: 52px;} right: 16px;
.plupload_file_action {width: 16px;} bottom: 8px;
.plupload_file_name { margin: 0;
overflow: hidden; display: none;
padding-left: 10px; }
}
.plupload_view_switch .ui-button {
.plupload_file_rename { margin-right: -0.31em;
width:95%; }
}
.plupload_content {
.plupload_progress {width: 60px;} position: absolute;
.plupload_progress_container {padding: 1px;} top: 86px;
bottom: 44px;
left: 0;
/* Floats */ right: 0;
overflow-y: auto;
.plupload_right {float: right;} width: 100%;
.plupload_left {float: left;} }
.plupload_clear,.plupload_clearer {clear: both;}
.plupload_clearer, .plupload_progress_bar { .plupload_filelist {
display: block; border-collapse: collapse;
font-size: 0; border-left: none;
line-height: 0; border-right: none;
} margin: 0;
.plupload_clearer {height: 0;} padding: 0;
width: 100%;
/* Misc */ -moz-user-select: none;
.plupload_hidden {display: none;} -webkit-user-select: none;
.plupload_droptext { user-select: none;
background: transparent; }
text-align: center;
vertical-align: middle; .plupload_filelist_content {
border: 0; padding: 0;
line-height: 165px; margin: 0;
} }
.plupload_buttons, .plupload_upload_status {float: left} .plupload_cell {padding: 8px 6px;}
.plupload_message { .plupload_file {
position: absolute; list-style: none;
top: 0px; display: block;
left: 0px; position: relative;
height: 100%; overflow: hidden;
width: 100%; line-height: 12px;
} }
.plupload_message p { .plupload_file_thumb {
padding:0.7em; position: relative;
margin:0; background-image: none;
} background-color: #eee;
}
.plupload_message strong {
font-weight: bold; .plupload_file_loading .plupload_file_thumb {
} background: #eee url(../img/loading.gif) center no-repeat;
}
plupload_message i {
font-style: italic; .plupload_file_name {
} overflow: hidden;
text-overflow: ellipsis;
.plupload_message p span.ui-icon { white-space: nowrap;
float: left; }
margin-right: 0.3em;
} .plupload_filelist_header {
border-top: none;
.plupload_header_content .ui-state-error, }
.plupload_header_content .ui-state-highlight {
border:none; .plupload_filelist_footer {
} position: absolute;
bottom: 0;
.plupload_message_close { left: 0;
position:absolute; right: 0;
top:5px; }
right:5px;
cursor:pointer; .plupload_buttons {
} position: relative;
}
.plupload .ui-sortable-placeholder {
height:35px; /* list view */
} .plupload_view_list .plupload_file {
border-left: none;
border-right: none;
border-top: none;
height: 29px;
width: 100% !important;
/* fix IE6 vertical white-space bug */
_float: left;
_clear: left;
}
.plupload_view_list div.plupload_file_size,
.plupload_view_list div.plupload_file_status,
.plupload_view_list div.plupload_file_action {
padding: 8px 6px;
position: absolute;
top: 0;
right: 0;
}
.plupload_view_list div.plupload_file_name {
margin-right: 156px;
padding: 8px 6px;
_width: 75%;
}
.plupload_view_list div.plupload_file_size {
right: 28px;
}
.plupload_view_list div.plupload_file_status {
right: 82px;
}
.plupload_view_list .plupload_file_rename {
margin-left: -2px;
}
.plupload_view_list .plupload_file_size,
.plupload_view_list .plupload_file_status,
.plupload_filelist_footer .plupload_file_size,
.plupload_filelist_footer .plupload_file_status {
text-align: right;
width: 52px;
}
.plupload_view_list .plupload_file_thumb {
position: absolute;
top: -999px;
}
.plupload_view_list .plupload_file_progress {
display: none;
}
/* thumbs view */
.plupload_view_thumbs .plupload_content {
top: 57px;
}
.plupload_view_thumbs .plupload_filelist_header {
display: none;
}
.plupload_view_thumbs .plupload_file {
padding: 6px;
margin: 10px;
border: 1px solid #fff;
float: left;
}
.plupload_view_thumbs .plupload_file_thumb,
.plupload_view_thumbs .plupload_file_dummy {
text-align: center;
overflow: hidden;
}
.plupload_view_thumbs .plupload_file_dummy {
font-size: 21px;
font-weight: bold;
text-transform: lowercase;
overflow: hidden;
border: none;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.plupload_view_thumbs div.plupload_file_action {
position: absolute;
top: 0;
right: 0;
}
.plupload_view_thumbs div.plupload_file_name {
padding: 0;
font-weight: bold;
}
.plupload_view_thumbs .plupload_file_rename {
padding: 1px 0;
width: 100% !important;
}
.plupload_view_thumbs div.plupload_file_size {
font-size: 0.8em;
font-weight: normal;
}
.plupload_view_thumbs div.plupload_file_status {
position: relative;
height: 3px;
overflow: hidden;
text-indent: -999px;
margin-bottom: 3px;
}
.plupload_view_thumbs div.plupload_file_progress {
border: none;
height: 100%;
}
.plupload .ui-sortable-helper,
.plupload .ui-sortable .plupload_file {
cursor:move;
}
.plupload_file_action {width: 16px;}
.plupload_file_name {
overflow: hidden;
padding-left: 10px;
}
.plupload_file_rename {
border: none;
font: normal 11px Verdana, sans-serif;
padding: 1px 2px;
line-height: 11px;
height: 11px;
}
.plupload_progress {width: 60px;}
.plupload_progress_container {padding: 1px;}
/* Floats */
.plupload_right {float: right;}
.plupload_left {float: left;}
.plupload_clear,.plupload_clearer {clear: both;}
.plupload_clearer, .plupload_progress_bar {
display: block;
font-size: 0;
line-height: 0;
}
.plupload_clearer {height: 0;}
/* Misc */
.plupload_hidden {display: none !important;}
.plupload_droptext {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: transparent;
text-align: center;
vertical-align: middle;
border: 0;
line-height: 160px;
display: none;
}
.plupload_dropbox .plupload_droptext {
display: block;
}
.plupload_buttons, .plupload_upload_status {float: left}
.plupload_message {
position: absolute;
top: -1px;
left: -1px;
height: 100%;
width: 100%;
}
.plupload_message p {
padding:0.7em;
margin:0;
}
.plupload_message strong {
font-weight: bold;
}
plupload_message i {
font-style: italic;
}
.plupload_message p span.ui-icon {
float: left;
margin-right: 0.3em;
}
.plupload_header_content .ui-state-error,
.plupload_header_content .ui-state-highlight {
border:none;
}
.plupload_message_close {
position:absolute;
top:5px;
right:5px;
cursor:pointer;
}
.plupload .ui-sortable-placeholder {
height:35px;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
(function(d,a,b,c){function e(f){return a.getElementById(f)}b.runtimes.Html4=b.addRuntime("html4",{getFeatures:function(){return{multipart:true,triggerDialog:(b.ua.gecko&&d.FormData||b.ua.webkit)}},init:function(f,g){f.bind("Init",function(p){var j=a.body,n,h="javascript",k,x,q,z=[],r=/MSIE/.test(navigator.userAgent),t=[],m=p.settings.filters,o,l,s,w;no_type_restriction:for(o=0;o<m.length;o++){l=m[o].extensions.split(/,/);for(w=0;w<l.length;w++){if(l[w]==="*"){t=[];break no_type_restriction}s=b.mimeTypes[l[w]];if(s&&b.inArray(s,t)===-1){t.push(s)}}}t=t.join(",");function v(){var B,y,i,A;q=b.guid();z.push(q);B=a.createElement("form");B.setAttribute("id","form_"+q);B.setAttribute("method","post");B.setAttribute("enctype","multipart/form-data");B.setAttribute("encoding","multipart/form-data");B.setAttribute("target",p.id+"_iframe");B.style.position="absolute";y=a.createElement("input");y.setAttribute("id","input_"+q);y.setAttribute("type","file");y.setAttribute("accept",t);y.setAttribute("size",1);A=e(p.settings.browse_button);if(p.features.triggerDialog&&A){b.addEvent(e(p.settings.browse_button),"click",function(C){if(!y.disabled){y.click()}C.preventDefault()},p.id)}b.extend(y.style,{width:"100%",height:"100%",opacity:0,fontSize:"99px",cursor:"pointer"});b.extend(B.style,{overflow:"hidden"});i=p.settings.shim_bgcolor;if(i){B.style.background=i}if(r){b.extend(y.style,{filter:"alpha(opacity=0)"})}b.addEvent(y,"change",function(F){var D=F.target,C,E=[],G;if(D.value){e("form_"+q).style.top=-1048575+"px";C=D.value.replace(/\\/g,"/");C=C.substring(C.length,C.lastIndexOf("/")+1);E.push(new b.File(q,C));if(!p.features.triggerDialog){b.removeAllEvents(B,p.id)}else{b.removeEvent(A,"click",p.id)}b.removeEvent(y,"change",p.id);v();if(E.length){f.trigger("FilesAdded",E)}}},p.id);B.appendChild(y);j.appendChild(B);p.refresh()}function u(){var i=a.createElement("div");i.innerHTML='<iframe id="'+p.id+'_iframe" name="'+p.id+'_iframe" src="'+h+':&quot;&quot;" style="display:none"></iframe>';n=i.firstChild;j.appendChild(n);b.addEvent(n,"load",function(C){var D=C.target,B,y;if(!k){return}try{B=D.contentWindow.document||D.contentDocument||d.frames[D.id].document}catch(A){p.trigger("Error",{code:b.SECURITY_ERROR,message:b.translate("Security error."),file:k});return}y=B.body.innerHTML;if(y){k.status=b.DONE;k.loaded=1025;k.percent=100;p.trigger("UploadProgress",k);p.trigger("FileUploaded",k,{response:y})}},p.id)}if(p.settings.container){j=e(p.settings.container);if(b.getStyle(j,"position")==="static"){j.style.position="relative"}}p.bind("UploadFile",function(i,A){var B,y;if(A.status==b.DONE||A.status==b.FAILED||i.state==b.STOPPED){return}B=e("form_"+A.id);y=e("input_"+A.id);y.setAttribute("name",i.settings.file_data_name);B.setAttribute("action",i.settings.url);b.each(b.extend({name:A.target_name||A.name},i.settings.multipart_params),function(E,C){var D=a.createElement("input");b.extend(D,{type:"hidden",name:C,value:E});B.insertBefore(D,B.firstChild)});k=A;e("form_"+q).style.top=-1048575+"px";B.submit()});p.bind("FileUploaded",function(i){i.refresh()});p.bind("StateChanged",function(i){if(i.state==b.STARTED){u()}else{if(i.state==b.STOPPED){d.setTimeout(function(){b.removeEvent(n,"load",i.id);if(n.parentNode){n.parentNode.removeChild(n)}},0)}}b.each(i.files,function(A,y){if(A.status===b.DONE||A.status===b.FAILED){var B=e("form_"+A.id);if(B){B.parentNode.removeChild(B)}}})});p.bind("Refresh",function(y){var F,A,B,C,i,G,H,E,D;F=e(y.settings.browse_button);if(F){i=b.getPos(F,e(y.settings.container));G=b.getSize(F);H=e("form_"+q);E=e("input_"+q);b.extend(H.style,{top:i.y+"px",left:i.x+"px",width:G.w+"px",height:G.h+"px"});if(y.features.triggerDialog){if(b.getStyle(F,"position")==="static"){b.extend(F.style,{position:"relative"})}D=parseInt(F.style.zIndex,10);if(isNaN(D)){D=0}b.extend(F.style,{zIndex:D});b.extend(H.style,{zIndex:D-1})}B=y.settings.browse_button_hover;C=y.settings.browse_button_active;A=y.features.triggerDialog?F:H;if(B){b.addEvent(A,"mouseover",function(){b.addClass(F,B)},y.id);b.addEvent(A,"mouseout",function(){b.removeClass(F,B)},y.id)}if(C){b.addEvent(A,"mousedown",function(){b.addClass(F,C)},y.id);b.addEvent(a.body,"mouseup",function(){b.removeClass(F,C)},y.id)}}});f.bind("FilesRemoved",function(y,B){var A,C;for(A=0;A<B.length;A++){C=e("form_"+B[A].id);if(C){C.parentNode.removeChild(C)}}});f.bind("DisableBrowse",function(i,A){var y=a.getElementById("input_"+q);if(y){y.disabled=A}});f.bind("Destroy",function(i){var y,A,B,C={inputContainer:"form_"+q,inputFile:"input_"+q,browseButton:i.settings.browse_button};for(y in C){A=e(C[y]);if(A){b.removeAllEvents(A,i.id)}}b.removeAllEvents(a.body,i.id);b.each(z,function(E,D){B=e("form_"+E);if(B){j.removeChild(B)}})});v()});g({success:true})}})})(window,document,plupload);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long