diff options
author | Fulup Ar Foll <fulup@iot.bzh> | 2016-02-17 17:45:03 +0100 |
---|---|---|
committer | Fulup Ar Foll <fulup@iot.bzh> | 2016-02-17 17:45:03 +0100 |
commit | f1c4499d7fd55c0f467870f98aa0f055066b338d (patch) | |
tree | acab1dd6f55e57e7bb21468671feaaf6bed164ce /afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js | |
parent | d47fd84a6a16b1c9c4b4ce5a3279b9ecaea54c1b (diff) |
Fix Modal Info Popup
Diffstat (limited to 'afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js')
-rw-r--r-- | afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js | 32 |
1 files changed, 17 insertions, 15 deletions
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 |