diff options
Diffstat (limited to 'afm-client/app/Frontend/widgets')
-rw-r--r-- | afm-client/app/Frontend/widgets/ActionButtons/ActionButtons.scss | 2 | ||||
-rw-r--r-- | afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js | 32 |
2 files changed, 18 insertions, 16 deletions
diff --git a/afm-client/app/Frontend/widgets/ActionButtons/ActionButtons.scss b/afm-client/app/Frontend/widgets/ActionButtons/ActionButtons.scss index 6daba6a..6cb8338 100644 --- a/afm-client/app/Frontend/widgets/ActionButtons/ActionButtons.scss +++ b/afm-client/app/Frontend/widgets/ActionButtons/ActionButtons.scss @@ -33,7 +33,7 @@ appli-button { } } -#appliActionMenu { +.appli-menu-start { .start-start, .stop-stop { i {color: grey;} } diff --git a/afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js b/afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js index b7acb6b..f2d2056 100644 --- a/afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js +++ b/afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js @@ -30,7 +30,7 @@ '<b class="close-button" ng-click="close()">×</b>' + '<img ng-src="{{icon}}">' + '<span class="modal-text">Application <b>{{label}}</b></span>' + - '<ul class="vertical icon-left primary menu-bar">' + + '<ul class="vertical icon-left primary menu-bar appli-menu-start">' + '<li class=start-{{runstatus}}><a ng-click=action("start")><i class="fi-check"> Start</i></a></li>' + '<li class=stop-{{runstatus}}><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>' + @@ -42,7 +42,7 @@ '<b class="close-button" ng-click="close()">×</b>' + '<img ng-src="{{icon}}">' + '<span class="modal-text">Application <b>{{label}}</b></span>' + - '<ul class="vertical icon-left">' + + '<ul class="vertical icon-left appli-menu-info">' + '<li><i class="fi-paperclip"> Name : {{detail.name}} </i></li>' + '<li><i class="fi-info"> Description {{detail.description}}</i></li>' + '<li><i class="fi-torso"> Author : {{detail.author}}</i></li>' + @@ -70,10 +70,14 @@ scope.callback (scope.appID, action, response); }; - var closeModal = function() { - console.log ("Modal Closing"); - scope.modal.deactivate(); - $timeout (function() {scope.modal.destroy();}, 1000); + var closeModApp = function() { + scope.modApp.deactivate(); + $timeout (function() {scope.modApp.destroy();}, 1000); + }; + + var closeModInfo = function() { + scope.modInfo.deactivate(); + $timeout (function() {scope.modInfo.destroy();}, 1000); }; var actionModal = function(action) { @@ -123,18 +127,17 @@ // reference http://foundation.zurb.com/apps/docs/#!/angular-modules var config = { - id: 'appliInfoMenu', animationIn: 'slideInFromTop', contentScope: { - close : closeModal, + close : closeModInfo, icon : scope.icon, label : scope.appID, detail : response.data.response }, template : tmplDetail }; // Popup Modal to render application data - scope.modal = new ModalFactory(config); - scope.modal.activate (); + scope.modInfo = new ModalFactory(config); + scope.modInfo.activate (); }); break; @@ -156,24 +159,23 @@ break; } - closeModal(); + closeModApp(); }; // reference http://foundation.zurb.com/apps/docs/#!/angular-modules var config = { - id: 'appliActionMenu', animationIn: 'slideInFromTop', contentScope: { action : actionModal, runstatus: scope.runstatus, - close : closeModal, + close : closeModApp, icon : scope.icon, label : scope.label }, template : tmplModal }; // Popup Modal to render application data - scope.modal = new ModalFactory(config); - scope.modal.activate (); + scope.modApp = new ModalFactory(config); + scope.modApp.activate (); }; // extract application information from AppID+Store |