fix(edit-file) show editor when access denied

This commit is contained in:
coderaiser 2017-05-18 16:47:27 +03:00
parent a741795ef3
commit 6be2c41823
4 changed files with 9 additions and 2 deletions

View file

@ -1,5 +1,7 @@
'use strict';
/* global CloudCmd */
const exec = require('execon');
const Key = CloudCmd.Key;

View file

@ -65,7 +65,9 @@ CloudCmd.EditFile = function EditFileProto(callback) {
Images.show.load();
CloudCmd.Edit.show(config);
CloudCmd.Edit
.getEditor()
.setOption('keyMap', 'default');
Info.getData((error, data) => {
const path = Info.path;
@ -81,6 +83,8 @@ CloudCmd.EditFile = function EditFileProto(callback) {
.setValueFirst(path, data)
.setModeForPath(name)
.enableKey();
CloudCmd.Edit.show(config);
});
return CloudCmd.Edit;

View file

@ -58,9 +58,11 @@ CloudCmd.EditNames = function EditNamesProto(callback) {
.getEditor()
.setValueFirst('edit-names', names)
.setMode()
.setOption('keyMap', 'default')
.disableKey();
DOM.Events.addKey(keyListener);
CloudCmd.Edit.show(ConfigView);
};

View file

@ -87,7 +87,6 @@ function EditProto(callback) {
Edit.getEditor()
.setOptions({
keyMap: 'default',
fontSize: 16,
});