Commit 4ab390f2 by Samuel Padgett

Only use window history back when no cancel callback

parent fd5caed1
......@@ -87,7 +87,6 @@ hawtioPluginLoader.addModule('openshiftCommonUI');
" <button\n" +
" class=\"btn btn-default btn-lg\"\n" +
" ng-class=\"{'dialog-btn': isDialog}\"\n" +
" back\n" +
" ng-click=\"cancelCreateProject()\">\n" +
" Cancel\n" +
" </button>\n" +
......@@ -191,7 +190,6 @@ hawtioPluginLoader.addModule('openshiftCommonUI');
" <button\n" +
" class=\"btn btn-default btn-lg\"\n" +
" ng-class=\"{'dialog-btn': isDialog}\"\n" +
" back\n" +
" ng-click=\"cancelEditProject()\">\n" +
" Cancel\n" +
" </button>\n" +
......@@ -233,7 +231,7 @@ hawtioPluginLoader.addModule('openshiftCommonUI');
angular.module("openshiftCommonUI")
.directive("createProject", function() {
.directive("createProject", function($window) {
return {
restrict: 'E',
scope: {
......@@ -291,6 +289,8 @@ angular.module("openshiftCommonUI")
if (cb) {
cb();
}
} else {
$window.history.back();
}
};
},
......@@ -434,7 +434,7 @@ angular.module('openshiftCommonUI')
angular.module("openshiftCommonUI")
.directive("editProject", function() {
.directive("editProject", function($window) {
return {
restrict: 'E',
scope: {
......@@ -517,6 +517,8 @@ angular.module("openshiftCommonUI")
var cb = $scope.onCancel();
if (cb) {
cb();
} else {
$window.history.back();
}
};
},
......
......@@ -257,7 +257,6 @@ hawtioPluginLoader.addModule('openshiftCommonUI');
" <button\n" +
" class=\"btn btn-default btn-lg\"\n" +
" ng-class=\"{'dialog-btn': isDialog}\"\n" +
" back\n" +
" ng-click=\"cancelCreateProject()\">\n" +
" Cancel\n" +
" </button>\n" +
......@@ -361,7 +360,6 @@ hawtioPluginLoader.addModule('openshiftCommonUI');
" <button\n" +
" class=\"btn btn-default btn-lg\"\n" +
" ng-class=\"{'dialog-btn': isDialog}\"\n" +
" back\n" +
" ng-click=\"cancelEditProject()\">\n" +
" Cancel\n" +
" </button>\n" +
......@@ -403,7 +401,7 @@ hawtioPluginLoader.addModule('openshiftCommonUI');
angular.module("openshiftCommonUI")
.directive("createProject", function() {
.directive("createProject", ["$window", function($window) {
return {
restrict: 'E',
scope: {
......@@ -461,11 +459,13 @@ angular.module("openshiftCommonUI")
if (cb) {
cb();
}
} else {
$window.history.back();
}
};
}],
};
});
}]);
;'use strict';
angular.module("openshiftCommonUI")
......@@ -604,7 +604,7 @@ angular.module('openshiftCommonUI')
angular.module("openshiftCommonUI")
.directive("editProject", function() {
.directive("editProject", ["$window", function($window) {
return {
restrict: 'E',
scope: {
......@@ -687,11 +687,13 @@ angular.module("openshiftCommonUI")
var cb = $scope.onCancel();
if (cb) {
cb();
} else {
$window.history.back();
}
};
}],
};
});
}]);
;'use strict';
angular.module('openshiftCommonUI')
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -77,7 +77,6 @@ angular.module('openshiftCommonUI').run(['$templateCache', function($templateCac
" <button\n" +
" class=\"btn btn-default btn-lg\"\n" +
" ng-class=\"{'dialog-btn': isDialog}\"\n" +
" back\n" +
" ng-click=\"cancelCreateProject()\">\n" +
" Cancel\n" +
" </button>\n" +
......@@ -181,7 +180,6 @@ angular.module('openshiftCommonUI').run(['$templateCache', function($templateCac
" <button\n" +
" class=\"btn btn-default btn-lg\"\n" +
" ng-class=\"{'dialog-btn': isDialog}\"\n" +
" back\n" +
" ng-click=\"cancelEditProject()\">\n" +
" Cancel\n" +
" </button>\n" +
......
......@@ -73,7 +73,6 @@
<button
class="btn btn-default btn-lg"
ng-class="{'dialog-btn': isDialog}"
back
ng-click="cancelCreateProject()">
Cancel
</button>
......
......@@ -2,7 +2,7 @@
angular.module("openshiftCommonUI")
.directive("createProject", function() {
.directive("createProject", function($window) {
return {
restrict: 'E',
scope: {
......@@ -60,6 +60,8 @@ angular.module("openshiftCommonUI")
if (cb) {
cb();
}
} else {
$window.history.back();
}
};
},
......
......@@ -29,7 +29,6 @@
<button
class="btn btn-default btn-lg"
ng-class="{'dialog-btn': isDialog}"
back
ng-click="cancelEditProject()">
Cancel
</button>
......
......@@ -2,7 +2,7 @@
angular.module("openshiftCommonUI")
.directive("editProject", function() {
.directive("editProject", function($window) {
return {
restrict: 'E',
scope: {
......@@ -85,6 +85,8 @@ angular.module("openshiftCommonUI")
var cb = $scope.onCancel();
if (cb) {
cb();
} else {
$window.history.back();
}
};
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment