Skip to content

Commit

Permalink
Merge 31dc8e0 into 01d935f
Browse files Browse the repository at this point in the history
  • Loading branch information
eamahanna committed Oct 16, 2020
2 parents 01d935f + 31dc8e0 commit f85d494
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 10 deletions.
52 changes: 46 additions & 6 deletions kbase-extension/static/kbase/css/kbaseNarrative.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,52 @@
margin: 2em 4.5em;
}

.text-button {
background: #FFFFFF;
box-sizing: border-box;
border-radius: 4px;
border: 1px solid #FFFFFF;
font-family: Oxygen;
font-style: normal;
font-weight: bold;
font-size: 14px;
line-height: 18px;
outline: none;

text-transform: uppercase;
text-align: center;
color: #4379B1;
height: 34px;
}

.text-button:hover {
color: #36618E;
border: 1px solid #ECF2F7;
background-color: #ECF2F7;
}

.text-button:focus {
color: #36618E;
border: 1px solid #E3EBF3;
background-color: #E3EBF3;
}

.text-button:active {
color: #36618E;
border: 1px solid #D9E4EF;
background-color: #D9E4EF;
}

.text-button:disabled {
color: #929292;
border: 1px solid #FAFAFA;
background-color: #FAFAFA;
}

.clear-all-dropzone {
margin: 6px;
}

#kb-data-staging-table_wrapper{
margin-top: 15px;
}
Expand Down Expand Up @@ -1118,12 +1164,6 @@ p span.notification{
background-image: none;
}

.btn-default {
/** not sure why this is here, but it makes buttons look fuzzy.
commenting out until answers come around. - WJR **/
/*text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);*/
}

#menus {
padding-left: 0px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,12 @@ define([
})
.on('totaluploadprogress', (progress) => {
$($dropzoneElem.find('#total-progress .progress-bar')).css({'width': progress + '%'});
console.log("TOTAL UPLOADING PROGRESS")
})
.on('addedfile', (file) => {
$dropzoneElem.find('#global-info').css({'display': 'inline'});
$dropzoneElem.find('#upload-message').text(this.makeUploadMessage());

})
.on('success', (file, serverResponse) => {
$dropzoneElem.find('#upload-message').text(this.makeUploadMessage());
Expand Down Expand Up @@ -127,9 +129,36 @@ define([
errorText = err.xhr.responseText;
}
$dropzoneElem.find('.error.text-danger').text('Error: ' + errorText);
if (!$dropzoneElem.find('#clear-all-btn').length){
$dropzoneElem.append(this.makeClearAllButton());
} else {
$('#clear-all-btn-container').remove();
$('#clear-all-btn').remove();
$dropzoneElem.append(this.makeClearAllButton());
}
});
},

makeClearAllButton: function() {
var $clearAllBtn = $('<button>')
.text('Clear All')
.addClass('text-button clear-all-dropzone')
.attr('aria-label', 'clear all files from the dropzone')
.attr('id', 'clear-all-btn')
.click(function(){
this.dropzone.removeAllFiles();
$('#clear-all-btn-container').remove();
$('#clear-all-btn').remove();
}.bind(this));

var $buttonContainer = $('<div>')
.attr('id', 'clear-all-btn-container')
.addClass('text-center')
.append($clearAllBtn);

return $buttonContainer;
},

makeUploadMessage: function() {
if (!this.dropzone) {
return 'No files uploading.';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<span class="name" data-dz-name></span>
<strong class="error text-danger" data-dz-errormessage></strong>
</div>
<div class="col-md-1" style="">
<div class="col-md-1">
<span class="size pull-right" data-dz-size></span>
</div>
<div class="col-md-3 text-center">
Expand All @@ -19,4 +19,4 @@
</button>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@
</div>
</div>
<div class="dz-message">Drag and drop files and folders in this box, or <a>select</a> from your computer.</div>
<!-- <div class="text-center">
<button id="clear-all" class="text-button clear-all-dropzone" aria-label="clear all files from the dropzone">Clear All</button>
</div> -->
</form>

4 changes: 2 additions & 2 deletions src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"google_ad_conversion": "kR9OCLas4JgBEOy2pucC"
},
"comm_wait_timeout": 600000,
"config": "narrative-refactor",
"config": "dev",
"data_panel": {
"initial_sort_limit": 10000,
"max_name_length": 33,
Expand Down Expand Up @@ -379,7 +379,7 @@
"upload": {
"timeout": 0,
"parallel_uploads": 10,
"max_file_size": 20480,
"max_file_size": 1,
"globus_upload_url": "https://app.globus.org/file-manager?destination_id=c3c0a65f-5827-4834-b6c9-388b0b19953a"
},
"use_local_widgets": true,
Expand Down

0 comments on commit f85d494

Please sign in to comment.