summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesús Macias <jmacias@solidgear.es>2015-11-24 08:52:02 +0100
committerJesús Macias <jmacias@solidgear.es>2015-11-24 08:52:02 +0100
commit674bc8e9cb340b2be1b27d4c8e3a539f550acb14 (patch)
tree1542c48c0480ccb75be563bbb52e4310ead22542
parente4a2da6c3dbe5ac0f36c128b33632097a86a023c (diff)
downloadnextcloud-server-674bc8e9cb340b2be1b27d4c8e3a539f550acb14.tar.gz
nextcloud-server-674bc8e9cb340b2be1b27d4c8e3a539f550acb14.zip
Add css to manage row status color
-rw-r--r--apps/files_external/css/external.css8
-rw-r--r--apps/files_external/js/statusmanager.js7
-rw-r--r--apps/files_external/list.php1
3 files changed, 12 insertions, 4 deletions
diff --git a/apps/files_external/css/external.css b/apps/files_external/css/external.css
new file mode 100644
index 00000000000..b0b0634fc58
--- /dev/null
+++ b/apps/files_external/css/external.css
@@ -0,0 +1,8 @@
+.externalDisabledRow {
+ background-color: #CCC ! important;;
+}
+
+
+.externalErroredRow {
+ background-color: #F2DEDE ! important;;
+}
diff --git a/apps/files_external/js/statusmanager.js b/apps/files_external/js/statusmanager.js
index 0aedeb99226..5e7cb4e109e 100644
--- a/apps/files_external/js/statusmanager.js
+++ b/apps/files_external/js/statusmanager.js
@@ -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);
diff --git a/apps/files_external/list.php b/apps/files_external/list.php
index 0a994e147f5..4bbe5588c26 100644
--- a/apps/files_external/list.php
+++ b/apps/files_external/list.php
@@ -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');