webdav portal upload added

This commit is contained in:
vfedosevich 2015-02-19 05:21:17 -08:00
parent 51d432fd2e
commit 38bde37b18
105 changed files with 21145 additions and 105 deletions

View file

@ -83,11 +83,12 @@ WspFileBrowser.prototype = {
"ajax": ajaxUrl,
"processing": true,
"serverSide": true,
"searching": false,
"columnDefs": [
{
"render": function(data, type, row) {
return '<img class="table-icon" src="' + row.IconHref + '"/>' +
'<a href="' + row.Url + '" ' + (row.IsTargetBlank ? 'target="_blank"' : '') + ' class="file-link processing-dialog" title="' + row.DisplayName + '">' +
'<a href="' + row.Url + '" ' + (row.IsTargetBlank ? 'target="_blank"' : '') + ' class="file-link ' + (row.IsFolder ? 'processing-dialog':'') + '" title="' + row.DisplayName + '">' +
row.DisplayName +
'</a>';
},
@ -97,12 +98,17 @@ WspFileBrowser.prototype = {
"render": function (data, type, row) {
return row.Type;
},
"orderable": false,
"className": "center",
"width":"10%",
"targets": 1
},
{
"render": function (data, type, row) {
return row.LastModified;
return row.LastModifiedFormated;
},
"width": "20%",
"className": "center",
"targets": 2
}
],
@ -118,6 +124,18 @@ WspFileBrowser.prototype = {
if (this.table != null) {
this.table.fnDraw(false);
}
},
initFileUpload: function (elementId, url) {
$(document).ready(function () {
$(elementId).fileupload({ url: url, autoUpload: true });
$(elementId).fileupload('option', {
disableImagePreview: true,
sequentialUploads: true
});
});
}
};

View file

@ -13,9 +13,7 @@ $(document).on('click', '.processing-dialog', function (e) {
//Toggle file select + Ctrl multiselect
$(document).on('click', '.element-container', function (e) {
if (e.ctrlKey) {
$(this).toggleClass("selected-file");
} else {
wsp.fileBrowser.clearAllSelectedItems();
@ -42,7 +40,12 @@ $(document).on('touchstart', '.element-container', function(e) {
//Double click file open
$(document).on('dblclick', '.element-container', function (e) {
wsp.fileBrowser.openItem(this);
wsp.dialogs.showProcessDialog();
var links = $(item).find('.file-link');
if (links.length != 0 && links[0].hasClass('processing-dialog')) {
wsp.dialogs.showProcessDialog();
}
});