Skip to content

Commit

Permalink
Merge c05d31d into 2a619e8
Browse files Browse the repository at this point in the history
  • Loading branch information
briehl committed Oct 8, 2020
2 parents 2a619e8 + c05d31d commit b5e973f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
14 changes: 14 additions & 0 deletions kbase-extension/static/kbase/css/kbaseNarrative.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,26 @@
font-weight: bold;
}

.kb-data-staging-decompress {
border: 1px solid #cccccc;
border-radius : 1px;
}

.kb-data-staging-table-name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.kb-data-staging-folder:hover {
cursor: pointer;
text-decoration: underline;
}

.kb-pointer {
cursor: pointer;
}

.kb-data-staging-footer {
font-family : Oxygen, Arial, sans-serif;
font-weight: bold;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ define([
if (isFolder) {
disp = '<button data-name="' + full[1] + '" class="btn btn-xs btn-default">' + disp + '</button>';
} else {
disp = "<i class='fa fa-caret-right' data-caret='" + full[1] + "' style='cursor : pointer'></i> " + disp;
disp = '<i class="fa fa-caret-right kb-pointer" data-caret="' + full[1] + '"></i> ' + disp;
}
return disp;
} else {
Expand All @@ -284,11 +284,14 @@ define([
sClass: 'staging-name',
mRender: function (data, type, full) {
if (type === 'display') {

var decompressButton = '';
let decompressButton = '';

if (data.match(/\.(zip|tar\.gz|tgz|tar\.bz|tar\.bz2|tar|gz|bz2)$/)) {
decompressButton = "<button class='btn btn-default btn-xs' style='border : 1px solid #cccccc; border-radius : 1px' data-decompress='" + data + "'><i class='fa fa-expand'></i></button> ";
decompressButton = '<button class="btn btn-default btn-xs kb-data-staging-decompress" data-decompress="' + data + '><i class="fa fa-expand"></i></button> ';
}

if (full[0] === 'true') {
data = '<span class="kb-data-staging-folder" data-name="' + data + '">' + data + '</span>';
}

return '<div class="kb-data-staging-table-name">' + decompressButton +
Expand Down Expand Up @@ -333,6 +336,10 @@ define([
hide: Config.get('tooltip').hideDelay
}
});
$('td:eq(1)', nRow).find('span.kb-data-staging-folder').off('click').on('click', e => {
$(e.currentTarget).off('click');
this.updatePathFn(this.path += '/' + $(e.currentTarget).data().name);
});
$('td:eq(4)', nRow).find('select').select2({
placeholder: 'Select format'
});
Expand Down Expand Up @@ -367,6 +374,7 @@ define([


$('td:eq(0)', nRow).find('button[data-name]').off('click').on('click', e => {
$(e.currentTarget).off('click');
this.updatePathFn(this.path += '/' + $(e.currentTarget).data().name);
});

Expand Down

0 comments on commit b5e973f

Please sign in to comment.