primo commit
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,200 @@
|
||||
/*
|
||||
Plupload
|
||||
------------------------------------------------------------------- */
|
||||
|
||||
.plupload_button {
|
||||
/* display: -moz-inline-box; /* FF < 3*//*
|
||||
display: inline-block;
|
||||
font: normal 12px sans-serif;
|
||||
text-decoration: none;
|
||||
color: #42454a;
|
||||
border: 1px solid #bababa;
|
||||
padding: 2px 8px 3px 20px;
|
||||
margin-right: 4px;
|
||||
background: #f3f3f3 url('../img/buttons.png') no-repeat 0 center;
|
||||
outline: 0;
|
||||
|
||||
/* Optional rounded corners for browsers that support it *//*
|
||||
-moz-border-radius: 3px;
|
||||
-khtml-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;*/
|
||||
margin: 5px;
|
||||
}
|
||||
.plupload_button i {
|
||||
margin-left: -5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
/*
|
||||
.plupload_button:hover {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
}*/
|
||||
|
||||
.plupload_disabled, a.plupload_disabled:hover {
|
||||
/*color: #737373;
|
||||
border-color: #c5c5c5;
|
||||
background: #ededed url('../img/buttons-disabled.png') no-repeat 0 center;*/
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.plupload_add {
|
||||
/*background-position: -181px center;*/
|
||||
}
|
||||
|
||||
.plupload_wrapper {
|
||||
/*font: normal 11px Verdana,sans-serif;*/
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.plupload_container {
|
||||
padding: 8px;
|
||||
/*background: url('../img/transp50.png');*/
|
||||
/*-moz-border-radius: 5px;*/
|
||||
}
|
||||
|
||||
.plupload_container input {
|
||||
/*border: 1px solid #DDD;*/
|
||||
/*font: normal 11px Verdana,sans-serif;*/
|
||||
width: 98%;
|
||||
}
|
||||
|
||||
.plupload_header {/*background: #2A2C2E url('../img/backgrounds.gif') repeat-x;*/}
|
||||
.plupload_header_content {
|
||||
/*background: url('../img/backgrounds.gif') no-repeat 0 -317px;
|
||||
min-height: 56px;
|
||||
padding-left: 60px;
|
||||
color: #FFF;*/
|
||||
}
|
||||
.plupload_header_title {
|
||||
/*font: normal 18px sans-serif;
|
||||
padding: 6px 0 3px;*/
|
||||
}
|
||||
.plupload_header_text {
|
||||
/*font: normal 12px sans-serif;*/
|
||||
}
|
||||
|
||||
.plupload_filelist {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
border: 1px solid #dddddd;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.plupload_scroll .plupload_filelist {
|
||||
height: 185px;
|
||||
/*background: #f9f9f9;*/
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.plupload_filelist li {
|
||||
padding: 5px 8px 0px 8px;
|
||||
background: #f9f9f9;
|
||||
/*padding: 10px 8px;
|
||||
background: #f9f9f9 url('../img/backgrounds.gif') repeat-x 0 -156px;*/
|
||||
border-bottom: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.plupload_filelist_header, .plupload_filelist_footer {
|
||||
/*background: #DFDFDF;
|
||||
padding: 8px 8px;
|
||||
color: #42454A;*/
|
||||
}
|
||||
.plupload_filelist_header {
|
||||
/*border-top: 1px solid #EEE;*/
|
||||
padding: 3px 10px;
|
||||
}
|
||||
|
||||
.plupload_filelist_footer {border-top: 1px solid #FFF; height: 22px; line-height: 20px; vertical-align: middle;}
|
||||
.plupload_file_name {float: left; overflow: hidden}
|
||||
.plupload_file_status {color: #777;}
|
||||
.plupload_file_status span {color: #42454A;}
|
||||
|
||||
.plupload_file_statusbar,
|
||||
.plupload_file_size, .plupload_file_status, .plupload_progress, .plupload_progress_box {
|
||||
float: right;
|
||||
width: 80px;
|
||||
|
||||
}
|
||||
.plupload_file_action_bottom {
|
||||
padding-right:8px;
|
||||
}
|
||||
.plupload_file_size, .plupload_file_status, .plupload_file_action {text-align: right;}
|
||||
|
||||
.plupload_filelist .plupload_file_name {width: 205px; width: auto;}
|
||||
|
||||
.plupload_file_action {
|
||||
float: right;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.plupload_file_action * {
|
||||
display: none;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
li.plupload_uploading {background: #ECF3DC url('../img/backgrounds.gif') repeat-x 0 -238px;}
|
||||
li.plupload_done {color:#AAA}
|
||||
|
||||
li.plupload_delete a {
|
||||
background: url('../img/delete.gif');
|
||||
}
|
||||
|
||||
li.plupload_failed a {
|
||||
background: url('../img/error.gif');
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
li.plupload_done a {
|
||||
background: url('../img/done.gif');
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.plupload_progress, .plupload_upload_status {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.plupload_progress_container {
|
||||
margin-top: 3px;
|
||||
background: #FFF;
|
||||
padding: 1px;
|
||||
}
|
||||
.plupload_progress_bar {
|
||||
width: 0px;
|
||||
height: 7px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.plupload_progress_bar.bar,
|
||||
.progress.plupload_file_statusbar .bar {
|
||||
background: green;
|
||||
}
|
||||
|
||||
.plupload_scroll .plupload_filelist_header .plupload_file_action, .plupload_scroll .plupload_filelist_footer .plupload_file_action {
|
||||
margin-right: 17px;
|
||||
}
|
||||
|
||||
/* Floats */
|
||||
|
||||
.plupload_clear,.plupload_clearer {clear: both;}
|
||||
.plupload_clearer, .plupload_progress_bar, .plupload_progress_box {
|
||||
display: block;
|
||||
font-size: 0;
|
||||
line-height: 0;
|
||||
}
|
||||
.plupload_progress_box {
|
||||
margin-top: -3px;
|
||||
}
|
||||
|
||||
li.plupload_droptext {
|
||||
background: transparent;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
border: 0;
|
||||
line-height: 165px;
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 180 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 994 B |
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 399 B |
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
||||
@ -0,0 +1,347 @@
|
||||
/**
|
||||
* jquery.plupload.queue.js
|
||||
*
|
||||
* Copyright 2009, Moxiecode Systems AB
|
||||
* Released under GPL License.
|
||||
*
|
||||
* License: http://www.plupload.com/license
|
||||
* Contributing: http://www.plupload.com/contributing
|
||||
*/
|
||||
|
||||
// JSLint defined globals
|
||||
/*global plupload:false, jQuery:false, alert:false */
|
||||
|
||||
(function($) {
|
||||
var uploaders = {};
|
||||
|
||||
function _(str) {
|
||||
return plupload.translate(str) || str;
|
||||
}
|
||||
|
||||
function renderUI(id, target) {
|
||||
// Remove all existing non plupload items
|
||||
target.contents().each(function(i, node) {
|
||||
node = $(node);
|
||||
|
||||
if (!node.is('.plupload')) {
|
||||
node.remove();
|
||||
}
|
||||
});
|
||||
|
||||
target.prepend(
|
||||
'<div class="plupload_wrapper plupload_scroll">' +
|
||||
'<div id="' + id + '_container" class="plupload_container">' +
|
||||
'<div class="plupload">' +
|
||||
'<div class="plupload_header">' +
|
||||
'<div class="plupload_header_content">' + /*
|
||||
'<div class="plupload_header_title">' + _('Select files') + '</div>' +
|
||||
'<div class="plupload_header_text">' + _('Add files to the upload queue and click the start button.') + '</div>' + */
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
|
||||
'<div class="plupload_content">' +
|
||||
'<div class="plupload_filelist_header">' +
|
||||
'<div class="plupload_file_name">' + _('Filename') + '</div>' +
|
||||
'<div class="plupload_file_action"> </div>' +
|
||||
'<div class="plupload_file_size">'+ _("Size")+'</div>' +
|
||||
'<div class="plupload_file_status"><span>' + _('Status') + '</span></div>' +
|
||||
'<div class="plupload_file_statusbar"><span> </span></div>' + /*
|
||||
'<div class="plupload_file_size">' + _('Size') + '</div>' + */
|
||||
'<div class="plupload_clearer"> </div>' +
|
||||
'</div>' +
|
||||
|
||||
'<ul id="' + id + '_filelist" class="plupload_filelist"></ul>' +
|
||||
|
||||
'<div class="plupload_filelist_footer">' +
|
||||
'<div class="plupload_file_name">' +
|
||||
'<div class="plupload_buttons">' +
|
||||
'<a href="#" class="plupload_button plupload_add btn btn-success fileinput-button"><i class="icon-plus icon-white"></i>' + _('Add Files') + '</a>' +
|
||||
'<a href="#" class="plupload_button plupload_start btn btn-primary start"><i class="icon-upload icon-white"></i>' + _('Start Upload') + '</a>' +
|
||||
'</div>' +
|
||||
'<span class="plupload_upload_status"></span>' +
|
||||
'</div>' +
|
||||
'<div class="plupload_file_action plupload_file_action_bottom"></div>' +
|
||||
'<div class="plupload_file_size"><span class="plupload_total_file_size">0 b</span></div>' +
|
||||
'<div class="plupload_file_status"><span class="plupload_total_status">0%</span></div>' +
|
||||
'<div class="plupload_file_statusbar"><span></span></div>' +
|
||||
'<div class="plupload_progress">' +
|
||||
'<div class="plupload_progress_container">' +
|
||||
'<div class="progress plupload_progress_box">' +
|
||||
'<div class="plupload_progress_bar bar"></div>' +
|
||||
'</div>' +
|
||||
'<div/>' +
|
||||
'</div>' +
|
||||
'<div class="plupload_clearer"> </div>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'<input type="hidden" id="' + id + '_count" name="' + id + '_count" value="0" />' +
|
||||
'</div>'
|
||||
);
|
||||
}
|
||||
|
||||
$.fn.pluploadQueue = function(settings) {
|
||||
if (settings) {
|
||||
this.each(function() {
|
||||
var uploader, target, id;
|
||||
|
||||
target = $(this);
|
||||
id = target.attr('id');
|
||||
|
||||
if (!id) {
|
||||
id = plupload.guid();
|
||||
target.attr('id', id);
|
||||
}
|
||||
|
||||
uploader = new plupload.Uploader($.extend({
|
||||
dragdrop : true,
|
||||
container : id
|
||||
}, settings));
|
||||
|
||||
uploaders[id] = uploader;
|
||||
|
||||
function handleStatus(file) {
|
||||
var actionClass;
|
||||
|
||||
if (file.status == plupload.DONE) {
|
||||
actionClass = 'plupload_done';
|
||||
}
|
||||
|
||||
if (file.status == plupload.FAILED) {
|
||||
actionClass = 'plupload_failed';
|
||||
}
|
||||
|
||||
if (file.status == plupload.QUEUED) {
|
||||
actionClass = 'plupload_delete';
|
||||
}
|
||||
|
||||
if (file.status == plupload.UPLOADING) {
|
||||
actionClass = 'plupload_uploading';
|
||||
}
|
||||
|
||||
var icon = $('#' + file.id).attr('class', actionClass).find('a').css('display', 'block');
|
||||
if (file.hint) {
|
||||
icon.attr('title', file.hint);
|
||||
}
|
||||
}
|
||||
|
||||
function updateTotalProgress() {
|
||||
$('span.plupload_total_status', target).html(uploader.total.percent + '%');
|
||||
$('div.plupload_progress_bar', target).css('width', uploader.total.percent + '%');
|
||||
$('span.plupload_upload_status', target).html(
|
||||
_('Uploaded %d/%d files').replace(/%d\/%d/, uploader.total.uploaded+'/'+uploader.files.length)
|
||||
);
|
||||
}
|
||||
|
||||
function updateList() {
|
||||
var fileList = $('ul.plupload_filelist', target).html(''), inputCount = 0, inputHTML;
|
||||
|
||||
$.each(uploader.files, function(i, file) {
|
||||
inputHTML = '';
|
||||
|
||||
if (file.status == plupload.DONE) {
|
||||
if (file.target_name) {
|
||||
inputHTML += '<input type="hidden" name="' + id + '_' + inputCount + '_tmpname" value="' + plupload.xmlEncode(file.target_name) + '" />';
|
||||
}
|
||||
|
||||
inputHTML += '<input type="hidden" name="' + id + '_' + inputCount + '_name" value="' + plupload.xmlEncode(file.name) + '" />';
|
||||
inputHTML += '<input type="hidden" name="' + id + '_' + inputCount + '_status" value="' + (file.status == plupload.DONE ? 'done' : 'failed') + '" />';
|
||||
|
||||
inputCount++;
|
||||
|
||||
$('#' + id + '_count').val(inputCount);
|
||||
}
|
||||
|
||||
fileList.append(
|
||||
'<li id="' + file.id + '">' +
|
||||
'<div class="plupload_file_name"><span>' + file.name + '</span></div>' +
|
||||
'<div class="plupload_file_action"><a href="#"></a></div>' +
|
||||
'<div class="plupload_file_size">' + plupload.formatSize(file.size) + '</div>' +
|
||||
'<div class="plupload_file_status">' + file.percent + '%</div>' +
|
||||
'<div class="progress plupload_file_statusbar"></div>' +
|
||||
'<div class="plupload_clearer"> </div>' +
|
||||
inputHTML +
|
||||
'</li>'
|
||||
);
|
||||
|
||||
handleStatus(file);
|
||||
|
||||
$('#' + file.id + '.plupload_delete a').click(function(e) {
|
||||
$('#' + file.id).remove();
|
||||
uploader.removeFile(file);
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
||||
|
||||
$('span.plupload_total_file_size', target).html(plupload.formatSize(uploader.total.size));
|
||||
|
||||
if (uploader.total.queued === 0) {
|
||||
$('span.plupload_add_text', target).html(_('Add Files'));
|
||||
} else {
|
||||
$('span.plupload_add_text', target).html(_('%d files queued').replace(/%d/, uploader.total.queued));
|
||||
}
|
||||
|
||||
$('a.plupload_start', target).toggleClass('plupload_disabled', uploader.files.length == (uploader.total.uploaded + uploader.total.failed));
|
||||
|
||||
// Scroll to end of file list
|
||||
fileList[0].scrollTop = fileList[0].scrollHeight;
|
||||
|
||||
updateTotalProgress();
|
||||
|
||||
// Re-add drag message if there is no files
|
||||
if (!uploader.files.length && uploader.features.dragdrop && uploader.settings.dragdrop) {
|
||||
$('#' + id + '_filelist').append('<li class="plupload_droptext">' + _("Drag files here.") + '</li>');
|
||||
}
|
||||
}
|
||||
|
||||
uploader.bind("UploadFile", function(up, file) {
|
||||
$('#' + file.id).addClass('plupload_current_file');
|
||||
});
|
||||
|
||||
uploader.bind('Init', function(up, res) {
|
||||
renderUI(id, target);
|
||||
|
||||
// Enable rename support
|
||||
if (!settings.unique_names && settings.rename) {
|
||||
target.on('click', '#' + id + '_filelist div.plupload_file_name span', function(e) {
|
||||
var targetSpan = $(e.target), file, parts, name, ext = "";
|
||||
|
||||
// Get file name and split out name and extension
|
||||
file = up.getFile(targetSpan.parents('li')[0].id);
|
||||
name = file.name;
|
||||
parts = /^(.+)(\.[^.]+)$/.exec(name);
|
||||
if (parts) {
|
||||
name = parts[1];
|
||||
ext = parts[2];
|
||||
}
|
||||
|
||||
// Display input element
|
||||
targetSpan.hide().after('<input type="text" />');
|
||||
targetSpan.next().val(name).focus().blur(function() {
|
||||
targetSpan.show().next().remove();
|
||||
}).keydown(function(e) {
|
||||
var targetInput = $(this);
|
||||
|
||||
if (e.keyCode == 13) {
|
||||
e.preventDefault();
|
||||
|
||||
// Rename file and glue extension back on
|
||||
file.name = targetInput.val() + ext;
|
||||
targetSpan.html(file.name);
|
||||
targetInput.blur();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$('a.plupload_add', target).attr('id', id + '_browse');
|
||||
|
||||
up.settings.browse_button = id + '_browse';
|
||||
|
||||
// Enable drag/drop (see PostInit handler as well)
|
||||
if (up.settings.dragdrop) {
|
||||
up.settings.drop_element = id + '_filelist';
|
||||
}
|
||||
|
||||
$('#' + id + '_container').attr('title', 'Using runtime: ' + res.runtime);
|
||||
|
||||
$('a.plupload_start', target).click(function(e) {
|
||||
if (!$(this).hasClass('plupload_disabled')) {
|
||||
uploader.start();
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$('a.plupload_stop', target).click(function(e) {
|
||||
e.preventDefault();
|
||||
uploader.stop();
|
||||
});
|
||||
|
||||
$('a.plupload_start', target).addClass('plupload_disabled');
|
||||
});
|
||||
|
||||
uploader.bind("PostInit", function(up) {
|
||||
// features are populated only after input components are fully instantiated
|
||||
if (up.settings.dragdrop && up.features.dragdrop) {
|
||||
$('#' + id + '_filelist').append('<li class="plupload_droptext">' + _("Drag files here.") + '</li>');
|
||||
}
|
||||
});
|
||||
|
||||
uploader.init();
|
||||
|
||||
uploader.bind("Error", function(up, err) {
|
||||
var file = err.file, message;
|
||||
|
||||
if (file) {
|
||||
message = err.message;
|
||||
|
||||
if (err.details) {
|
||||
message += " (" + err.details + ")";
|
||||
}
|
||||
|
||||
if (err.code == plupload.FILE_SIZE_ERROR) {
|
||||
alert(_("Error: File too large:") + " " + file.name);
|
||||
}
|
||||
|
||||
if (err.code == plupload.FILE_EXTENSION_ERROR) {
|
||||
alert(_("Error: Invalid file extension:") + " " + file.name);
|
||||
}
|
||||
|
||||
file.hint = message;
|
||||
$('#' + file.id).attr('class', 'plupload_failed').find('a').css('display', 'block').attr('title', message);
|
||||
}
|
||||
});
|
||||
|
||||
uploader.bind('StateChanged', function() {
|
||||
if (uploader.state === plupload.STARTED) {
|
||||
$('li.plupload_delete a,div.plupload_buttons', target).hide();
|
||||
$('span.plupload_upload_status,div.plupload_progress,a.plupload_stop', target).css('display', 'block');
|
||||
$('span.plupload_upload_status', target).html('Uploaded ' + uploader.total.uploaded + '/' + uploader.files.length + ' files');
|
||||
|
||||
if (settings.multiple_queues) {
|
||||
$('span.plupload_total_status,span.plupload_total_file_size', target).show();
|
||||
}
|
||||
} else {
|
||||
updateList();
|
||||
$('a.plupload_stop,div.plupload_progress', target).hide();
|
||||
$('a.plupload_delete', target).css('display', 'block');
|
||||
}
|
||||
});
|
||||
|
||||
uploader.bind('QueueChanged', updateList);
|
||||
|
||||
uploader.bind('FileUploaded', function(up, file) {
|
||||
handleStatus(file);
|
||||
});
|
||||
|
||||
uploader.bind("UploadProgress", function(up, file) {
|
||||
// Set file specific progress
|
||||
$('#' + file.id + ' div.plupload_file_status', target).html(file.percent + '%');
|
||||
$('#' + file.id + ' div.plupload_file_statusbar', target).html('<div class="bar" style="width: '+ file.percent + '%;"></div>');
|
||||
|
||||
handleStatus(file);
|
||||
updateTotalProgress();
|
||||
|
||||
if (settings.multiple_queues && uploader.total.uploaded + uploader.total.failed == uploader.files.length) {
|
||||
$(".plupload_buttons,.plupload_upload_status", target).css("display", "inline");
|
||||
$(".plupload_start", target).addClass("plupload_disabled");
|
||||
$('span.plupload_total_status,span.plupload_total_file_size', target).hide();
|
||||
}
|
||||
});
|
||||
|
||||
// Call setup function
|
||||
if (settings.setup) {
|
||||
settings.setup(uploader);
|
||||
}
|
||||
});
|
||||
|
||||
return this;
|
||||
} else {
|
||||
// Get uploader instance for specified element
|
||||
return uploaders[$(this[0]).attr('id')];
|
||||
}
|
||||
};
|
||||
})(jQuery);
|
||||