mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-19 06:50:07 +03:00
feature #3194: delete old unused code
This commit is contained in:
parent
9733bcaa42
commit
bd06ac98af
@ -685,75 +685,6 @@ function setupCreateFileDialog(){
|
||||
}
|
||||
});
|
||||
});
|
||||
/*
|
||||
// Upload is handled by FileUploader vendor plugin
|
||||
var uploader = new qq.FileUploaderBasic({
|
||||
button: $('#files_file-uploader',$create_file_dialog)[0],
|
||||
action: 'upload',
|
||||
multiple: false,
|
||||
params: {},
|
||||
sizeLimit: 0,
|
||||
showMessage: function(message){
|
||||
//notifyMessage(message);
|
||||
},
|
||||
onSubmit: function(id, fileName){
|
||||
//set url params
|
||||
//since the body is the upload, we need the pass
|
||||
//the file info here
|
||||
uploader.setParams({
|
||||
csrftoken: csrftoken,
|
||||
img : JSON.stringify(file_obj),
|
||||
file: fileName
|
||||
});
|
||||
//we pop up an upload progress dialog
|
||||
var pos_top = $(window).height() - 120;
|
||||
var pos_left = 220;
|
||||
|
||||
$('#files_upload_progress_bars').append('<div id="files'+id+'progressBar" class="row" style="margin-bottom:10px">\
|
||||
<div class="large-2 columns dataTables_info">\
|
||||
'+tr("Uploading...")+'\
|
||||
</div>\
|
||||
<div class="large-10 columns">\
|
||||
<div id="upload_progress_container" class="progress nine radius" style="height:25px !important">\
|
||||
<span class="meter" style="width:0%"></span>\
|
||||
</div>\
|
||||
<div class="progress-text" style="margin-left:15px">'+id+' '+fileName+'</div>\
|
||||
</div>\
|
||||
</div>');
|
||||
|
||||
$('#files'+id+'cancel_upload').click(function(){
|
||||
uploader.cancel();
|
||||
})
|
||||
},
|
||||
onProgress: function(id, fileName, loaded, total){
|
||||
//update upload dialog with current progress
|
||||
$('span.meter', $('#files'+id+'progressBar')).css('width', Math.floor(loaded*100/total)+'%')
|
||||
},
|
||||
onComplete: function(id, fileName, responseJSON){
|
||||
|
||||
if (uploader._handler._xhrs[id] &&
|
||||
uploader._handler._xhrs[id].status == 500) {
|
||||
|
||||
onError({}, JSON.parse(uploader._handler._xhrs[id].response) )
|
||||
$('#files'+id+'progressBar').remove();
|
||||
} else {
|
||||
notifyMessage("File uploaded correctly");
|
||||
Sunstone.runAction("File.refresh");
|
||||
$('#files'+id+'progressBar').remove();
|
||||
}
|
||||
|
||||
//Inform complete upload, destroy upload dialog, refresh file list
|
||||
|
||||
$('div#pb_dialog').foundation('reveal', 'close')
|
||||
return false;
|
||||
},
|
||||
onCancel: function(id, fileName){
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
$('#create_file_form_easy',dialog).submit(function(){
|
||||
var upload = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user