Only provide save for filemanager editor
This commit is contained in:
@@ -262,9 +262,8 @@
|
||||
<div ng-show="view === 'textEditor'" class="text-editor">
|
||||
<div>
|
||||
<div class="toolbar">
|
||||
<button type="button" class="btn btn-success" ng-click="textEditor.saveAndClose()" ng-disabled="textEditor.busy">Save and Close</button>
|
||||
<button type="button" class="btn btn-primary" ng-click="textEditor.save()" ng-disabled="textEditor.busy">Save</button>
|
||||
<div><span><i class="fa fa-circle-notch fa-spin" ng-show="textEditor.busy"></i> {{ textEditor.entry.fileName }}</span></div>
|
||||
<button type="button" class="btn btn-success" ng-click="textEditor.save()" ng-disabled="textEditor.busy"><i class="fa fa-circle-notch fa-spin" ng-show="textEditor.busy"></i> Save</button>
|
||||
<div><span>{{ textEditor.entry.fileName }}</span></div>
|
||||
<button type="button" class="btn btn-primary" ng-click="textEditor.close()">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+1
-10
@@ -467,7 +467,7 @@ app.controller('FileManagerController', ['$scope', '$timeout', 'Client', functio
|
||||
});
|
||||
},
|
||||
|
||||
save: function (callback) {
|
||||
save: function () {
|
||||
$scope.textEditor.busy = true;
|
||||
|
||||
var newContent = $scope.textEditor.editor.getValue();
|
||||
@@ -476,16 +476,7 @@ app.controller('FileManagerController', ['$scope', '$timeout', 'Client', functio
|
||||
|
||||
Client.filesUpload($scope.appId, filePath, file, function () {}, function (error) {
|
||||
$scope.textEditor.busy = false;
|
||||
|
||||
if (error) return Client.error(error);
|
||||
|
||||
if (callback) callback();
|
||||
});
|
||||
},
|
||||
|
||||
saveAndClose: function () {
|
||||
$scope.textEditor.save(function () {
|
||||
$scope.textEditor.close();
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user