summaryrefslogtreecommitdiffstats
path: root/src/js
diff options
context:
space:
mode:
authorHumberto Alfonso Díaz <humberto.alfonso@asvito.es>2019-07-01 12:25:40 +0200
committerHumberto Alfonso Díaz <humberto.alfonso@asvito.es>2019-07-01 12:25:40 +0200
commitc5ca28a5850864cdc5ccc6d58497b9975f6954d9 (patch)
tree3e54fe341b0227a374327d384009ca82006784d3 /src/js
parente5b45e034eb954c10bc545f72e7e0c986c1e3fd1 (diff)
FUNCT Change icon when click on item
Diffstat (limited to 'src/js')
-rw-r--r--src/js/app.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/js/app.js b/src/js/app.js
index ee64692..90fde53 100644
--- a/src/js/app.js
+++ b/src/js/app.js
@@ -17,11 +17,13 @@ function show_app(app) {
function display_icon(app) {
return new Promise(function(resolve, reject) {
- var iconURL = '/images/icons/'+app.name.toLowerCase()+'_inactive.svg';
+ var iconInactiveURL = '/images/icons/'+app.name.toLowerCase()+'_inactive.svg';
+ var iconActiveURL = '/images/icons/'+app.name.toLowerCase()+'_active.svg';
var image = new Image();
image.onload = function() {
- document.getElementById("icon-"+app.id).src = iconURL;
+ document.getElementById("icon-inactive-"+app.id).src = iconInactiveURL;
+ document.getElementById("icon-enabled-"+app.id).src = iconActiveURL;
resolve();
}
@@ -29,7 +31,7 @@ function display_icon(app) {
resolve();
}
- image.src = iconURL;
+ image.src = iconInactiveURL;
});
}