Add css to manage row status color

This commit is contained in:
Jesús Macias 2015-11-24 08:52:02 +01:00
parent e4a2da6c3d
commit 674bc8e9cb
3 changed files with 12 additions and 4 deletions

View File

@ -0,0 +1,8 @@
.externalDisabledRow {
background-color: #CCC ! important;;
}
.externalErroredRow {
background-color: #F2DEDE ! important;;
}

View File

@ -237,7 +237,7 @@ OCA.External.StatusManager = {
// Save default view
OCA.External.StatusManager.Utils.storeDefaultFolderIconAndBgcolor(elementList);
// Disable row until check status
elementList.css('background-color', '#CCC');
elementList.addClass('externalDisabledRow');
OCA.External.StatusManager.Utils.toggleLink(elementList.find('a.name'), false, false);
}
}
@ -361,12 +361,11 @@ OCA.External.StatusManager = {
OCA.External.StatusManager.Utils = {
showIconError: function(folder, clickAction, errorImageUrl) {
var bgColor = '#F2DEDE';
var imageUrl = "url(" + errorImageUrl + ")";
var trFolder = $('#fileList tr[data-file=\"' + OCA.External.StatusManager.Utils.jqSelEscape(folder) + '\"]'); //FileList.findFileEl(OCA.External.StatusManager.Utils.jqSelEscape(folder));
this.changeFolderIcon(folder, imageUrl);
this.toggleLink(folder, false, clickAction);
trFolder.css('background-color', bgColor);
trFolder.addClass('externalErroredRow');
},
/**
@ -406,7 +405,7 @@ OCA.External.StatusManager.Utils = {
// cant use here FileList.findFileEl(OCA.External.StatusManager.Utils.jqSelEscape(folder)); return incorrect instance of filelist
trFolder = $('#fileList tr[data-file=\"' + OCA.External.StatusManager.Utils.jqSelEscape(folder) + '\"]');
}
trFolder.css('background-color', '');
trFolder.removeClass('externalErroredRow').removeClass('externalDisabledRow');
tdChilds = trFolder.find("td:first-child div.thumbnail");
tdChilds.each(function(){
var thisElement = $(this);

View File

@ -24,6 +24,7 @@ OCP\User::checkLoggedIn();
$tmpl = new OCP\Template('files_external', 'list', '');
/* Load Status Manager */
\OCP\Util::addStyle('files_external', 'external');
\OCP\Util::addScript('files_external', 'statusmanager');
\OCP\Util::addScript('files_external', 'rollingqueue');