Data type: change button to umb-button
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user