Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix u4-7534 #949

Merged
merged 1 commit into from
Feb 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function contentEditingHelper(fileManager, $q, $location, $routeParams, notifica

var deferred = $q.defer();

if (!args.scope.busy && formHelper.submitForm({ scope: args.scope, statusMessage: args.statusMessage })) {
if (!args.scope.busy && formHelper.submitForm({ scope: args.scope, statusMessage: args.statusMessage, action: args.action })) {

args.scope.busy = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function formHelper(angularHelper, serverValidationManager, $timeout, notificati
}

//the first thing any form must do is broadcast the formSubmitting event
args.scope.$broadcast("formSubmitting", { scope: args.scope });
args.scope.$broadcast("formSubmitting", { scope: args.scope, action: args.action });

//then check if the form is valid
if (!args.skipValidation) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ function ContentEditController($scope, $rootScope, $routeParams, $q, $timeout, $
statusMessage: args.statusMessage,
saveMethod: args.saveMethod,
scope: $scope,
content: $scope.content
content: $scope.content,
action: args.action
}).then(function (data) {
//success
init($scope.content);
Expand Down Expand Up @@ -166,15 +167,15 @@ function ContentEditController($scope, $rootScope, $routeParams, $q, $timeout, $
};

$scope.sendToPublish = function () {
return performSave({ saveMethod: contentResource.sendToPublish, statusMessage: "Sending..." });
return performSave({ saveMethod: contentResource.sendToPublish, statusMessage: "Sending...", action: "sendToPublish" });
};

$scope.saveAndPublish = function () {
return performSave({ saveMethod: contentResource.publish, statusMessage: "Publishing..." });
return performSave({ saveMethod: contentResource.publish, statusMessage: "Publishing...", action: "publish" });
};

$scope.save = function () {
return performSave({ saveMethod: contentResource.save, statusMessage: "Saving..." });
return performSave({ saveMethod: contentResource.save, statusMessage: "Saving...", action: "save" });
};

$scope.preview = function (content) {
Expand Down