Skip to content

Commit

Permalink
Merge pull request #7658 from nextcloud/update-external-storages-to-c…
Browse files Browse the repository at this point in the history
…urrent-file-list-layout

Update "External storages" to current file list layout
  • Loading branch information
MorrisJobke authored Jan 2, 2018
2 parents 9d43724 + 1112516 commit 7be9b38
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion apps/files_external/js/mountsfilelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
/** @lends OCA.External.FileList.prototype */ {
appName: 'External storages',

_allowSelection: false,

/**
* @private
*/
Expand All @@ -56,7 +58,6 @@
$scopeColumn.find('span').text(scopeText);
$backendColumn.text(fileData.backend);
$tr.find('td.filename').after($scopeColumn).after($backendColumn);
$tr.find('td.filename input:checkbox').remove();
return $tr;
},

Expand Down
10 changes: 5 additions & 5 deletions apps/files_external/js/statusmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ OCA.External.StatusManager.Utils = {
}
});

var icon = trFolder.find('td:first-child div.thumbnail');
var icon = trFolder.find('td.filename div.thumbnail');
icon.each(function () {
var thisElement = $(this);
if (thisElement.data('oldImage') === undefined) {
Expand All @@ -510,7 +510,7 @@ OCA.External.StatusManager.Utils = {
trFolder = $('#fileList tr[data-file=\"' + OCA.External.StatusManager.Utils.jqSelEscape(folder) + '\"]');
}
trFolder.removeClass('externalErroredRow').removeClass('externalDisabledRow');
var tdChilds = trFolder.find("td:first-child div.thumbnail");
var tdChilds = trFolder.find("td.filename div.thumbnail");
tdChilds.each(function () {
var thisElement = $(this);
thisElement.css('background-image', thisElement.data('oldImage'));
Expand All @@ -529,10 +529,10 @@ OCA.External.StatusManager.Utils = {
$.each(filename, function (index) {
route = OCA.External.StatusManager.Utils.getIconRoute($(this));
$(this).attr("data-icon", route);
$(this).find('td:first-child div.thumbnail').css('background-image', "url(" + route + ")").css('display', 'none').css('display', 'inline');
$(this).find('td.filename div.thumbnail').css('background-image', "url(" + route + ")").css('display', 'none').css('display', 'inline');
});
} else {
file = $("#fileList tr[data-file=\"" + this.jqSelEscape(filename) + "\"] > td:first-child div.thumbnail");
file = $("#fileList tr[data-file=\"" + this.jqSelEscape(filename) + "\"] > td.filename div.thumbnail");
var parentTr = file.parents('tr:first');
route = OCA.External.StatusManager.Utils.getIconRoute(parentTr);
parentTr.attr("data-icon", route);
Expand Down Expand Up @@ -573,7 +573,7 @@ OCA.External.StatusManager.Utils = {
if (filename instanceof $) {
link = filename;
} else {
link = $("#fileList tr[data-file=\"" + this.jqSelEscape(filename) + "\"] > td:first-child a.name");
link = $("#fileList tr[data-file=\"" + this.jqSelEscape(filename) + "\"] > td.filename a.name");
}
if (active) {
link.off('click.connectivity');
Expand Down

0 comments on commit 7be9b38

Please sign in to comment.