summaryrefslogtreecommitdiffstats
path: root/afm-client/app/Frontend/widgets/ActionButtons
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2016-01-25 22:27:29 +0100
committerFulup Ar Foll <fulup@iot.bzh>2016-01-25 22:27:29 +0100
commit33940e952258bf1026a5f2c0687e4da01bc66004 (patch)
tree44d95bee97e670c05996a547d655d4d710463ee3 /afm-client/app/Frontend/widgets/ActionButtons
parent3ebdce373e134b70b129154d8033c1c628847a6c (diff)
Cosmetic fixes
Diffstat (limited to 'afm-client/app/Frontend/widgets/ActionButtons')
-rw-r--r--afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js21
1 files changed, 12 insertions, 9 deletions
diff --git a/afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js b/afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js
index 387212e..50220dd 100644
--- a/afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js
+++ b/afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js
@@ -22,18 +22,18 @@
'use strict';
var tmplAppli = '<div ng-click="clicked()">' +
- '<img ng-src={{icon}}-ico.png>' +
+ '<img ng-src="{{icon}}">' +
'<span>{{label}}</span>' +
'</div>';
var tmplModal =
'<b class="close-button" ng-click="close()">×</b>' +
- '<img ng-src="{{appicon}}-ico.png">' +
- '<span class="modal-text">Application <b>{{appname}}</b></span>' +
+ '<img ng-src="{{icon}}">' +
+ '<span class="modal-text">Application <b>{{name}}</b></span>' +
'<ul class="vertical icon-left primary menu-bar">' +
'<li><a ng-click=action("start")><i class="fi-check"> Start</i></a></li>' +
- '<li><a href="#"><i class="fi-x"> Stop</i></a></li>' +
- '<li><a href="#"><i class="fi-info"> Info</i></a></li>' +
+ '<li><a ng-click=action("stop")><i class="fi-x"> Stop</i></a></li>' +
+ '<li><a ng-click=action("info")><i class="fi-info"> Info</i></a></li>' +
'</ul>' +
'';
@@ -72,7 +72,10 @@
return;
}
- // Application was stated
+ // Application was started
+ elem.addClass ("success");
+ elem.removeClass ("fail");
+ scope.runID = response.data.response.runid;
scope.callback (scope.appliID, "/api/afm-main/start", response);
});
break;
@@ -94,8 +97,8 @@
contentScope: {
action : actionModal,
close : closeModal,
- appicon : scope.icon,
- appname : scope.label,
+ icon : scope.icon,
+ label : scope.label
}, template : tmplModal
};
// Popup Modal to render application data
@@ -105,7 +108,7 @@
// extract application information from AppID+Store
if (attrs.handle && scope.store [attrs.handle].name) {
- scope.icon = AppConfig.paths.icons + scope.store [attrs.handle].name.toLowerCase();
+ scope.icon = AppConfig.paths.icons + scope.store [attrs.handle].name.toLowerCase() + '-ico.png';
scope.label = scope.store [attrs.handle].name;
scope.appliID= attrs.handle;
} else {