Code Review
/
src
/
app-framework-demo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
appli: integrates mode local/remote
[src/app-framework-demo.git]
/
afm-client
/
app
/
Frontend
/
widgets
/
ActionButtons
/
AppliButton.js
diff --git
a/afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js
b/afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js
index
69e61b6
..
7a32873
100644
(file)
--- a/
afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js
+++ b/
afm-client/app/Frontend/widgets/ActionButtons/AppliButton.js
@@
-50,10
+50,10
@@
'';
angular.module('AppliButton', [])
'';
angular.module('AppliButton', [])
- .directive('appliButton', function (AppConfig, AppCall, ModalFactory, Notification, $timeout) {
+ .directive('appliButton', function (AppConfig, AppCall, ModalFactory, Notification, $timeout
, $window, $location
) {
function mymethods(scope, elem, attrs) {
function mymethods(scope, elem, attrs) {
- scope.runstatus = "stop"
+ scope.runstatus = "stop"
;
scope.clicked = function () {
var notifyError = function(api, response) {
scope.clicked = function () {
var notifyError = function(api, response) {
@@
-81,13
+81,15
@@
case "start":
if (scope.runstatus !== "stop") return;
case "start":
if (scope.runstatus !== "stop") return;
- AppCall.get ("afm-main", "start", {id: scope.appID}, function(response) {
+ AppCall.get ("afm-main", "start", {id: scope.appID
, mode: "remote"
}, function(response) {
if (response.status !== 200 || response.data.jtype !== "AJB_reply") {
notifyError ("start", response);
return;
}
scope.runstatus="start";
notifySuccess ("start", response);
if (response.status !== 200 || response.data.jtype !== "AJB_reply") {
notifyError ("start", response);
return;
}
scope.runstatus="start";
notifySuccess ("start", response);
+ if(response.data.response.uri)
+ $window.open(response.data.response.uri.replace("%h", $location.host()));
});
break;
});
break;