Removed container div from uploader, Continued work on upload cancel and upload gui functionality

This commit is contained in:
xevidos 2020-02-12 23:23:07 -05:00
parent eeff5d69db
commit dccd6e210a
2 changed files with 19 additions and 9 deletions

View File

@ -251,7 +251,7 @@
if( files[i].finished === true ) {
div.slideUp();
$( `div.upload-container[data-path="${files[i].path}"]` ).slideUp();
}
});
@ -285,6 +285,9 @@
$( '.drop-overlay' ).on( 'click', _this.upload_overlay_off );
$( ".uploads-container" ).resizable({
handles: "n, e, w, ne, nw",
});
$( "#uploads-button" ).on( 'click' , _this.toggle_uploads );
$( "#uploads-close" ).on( 'click', function() {
@ -1913,15 +1916,24 @@
console.log( progress, uc, upt, upb );
if( file.cancel && _this.uploads.cache.length == 0 ) {
if( file.cancel ) {
/**
* If canceling we must make sure we clear out the cache
* so no leftovers are stored in memory, or screw up a
* future upload.
*/
_this.uploads.cache = [];
_this.upload_cancel( file.path );
clearTimeout( timeout );
upt.css( "color", "red" );
upb.css( "color", "red" );
upt.text( "Canceled" );
uc.find( ".upload-cancel" ).slideUp();
resolve( true );
return;
} else if( ( index == total_blobs || current == total_size ) && _this.uploads.cache.length == 0 ) {

View File

@ -335,14 +335,12 @@ if( defined( "SITE_NAME" ) && ! ( SITE_NAME === "" || SITE_NAME === null ) ) {
<span>||</span>
</div>
</div>
<div>
<div class="uploads-container">
<div class="project-list-title" style="">
<h2><?php i18n( "Uploads" );?></h2>
<a id="uploads-close" class="icon-down-dir icon" alt="Collapse"></a>
</div>
<div class="uploads-content"></div>
<div class="uploads-container">
<div class="project-list-title" style="">
<h2><?php i18n( "Uploads" );?></h2>
<a id="uploads-close" class="icon-down-dir icon" alt="Collapse"></a>
</div>
<div class="uploads-content"></div>
</div>
<div id="uploads-button"><?php i18n("Uploads");?></div>
<div id="cursor-position">