Data type: change button to umb-button

This commit is contained in:
Mads Rasmussen
2015-09-09 10:03:54 +02:00
parent f2b3ae01a9
commit 0a6398ec60
2 changed files with 14 additions and 5 deletions

View File

@@ -130,6 +130,8 @@ function DataTypeEditController($scope, $routeParams, $location, appState, navig
$scope.save = function() {
$scope.page.saveButtonState = "busy";
if (formHelper.submitForm({ scope: $scope, statusMessage: "Saving..." })) {
dataTypeResource.save($scope.content, $scope.preValues, $routeParams.create)
@@ -154,6 +156,8 @@ function DataTypeEditController($scope, $routeParams, $location, appState, navig
$scope.page.menu.currentNode = syncArgs.node;
});
$scope.page.saveButtonState = "success";
}, function(err) {
//NOTE: in the case of data type values we are setting the orig/new props
@@ -163,6 +167,8 @@ function DataTypeEditController($scope, $routeParams, $location, appState, navig
err: err
});
$scope.page.saveButtonState = "error";
//share state
editorState.set($scope.content);
});

View File

@@ -49,11 +49,14 @@
<umb-editor-footer-content-right>
<div class="btn-group">
<button type="submit" data-hotkey="ctrl+s" class="btn btn-success">
<localize key="buttons_save">Save</localize>
</button>
</div>
<umb-button
type="submit"
button-style="success"
state="page.saveButtonState"
shortcut="ctrl+s"
label="Save"
label-key="buttons_save">
</umb-button>
</umb-editor-footer-content-right>