* More WIP on FSE
* Fix issue with events captured in VC when setFocus() toggle
This commit is contained in:
27
mods/fse.js
27
mods/fse.js
@@ -237,7 +237,7 @@ function FullScreenEditorModule(options) {
|
||||
}
|
||||
],
|
||||
function complete(err) {
|
||||
var bodyView = self.getBodyView();
|
||||
var bodyView = self.viewControllers.body.getView(1);
|
||||
self.updateTextEditMode(bodyView.getTextEditMode());
|
||||
self.updateEditModePosition(bodyView.getEditPosition());
|
||||
|
||||
@@ -247,10 +247,6 @@ function FullScreenEditorModule(options) {
|
||||
);
|
||||
};
|
||||
|
||||
this.getBodyView = function() {
|
||||
return self.viewControllers.body.getView(1);
|
||||
};
|
||||
|
||||
this.updateEditModePosition = function(pos) {
|
||||
if('edit' === this.editorMode) {
|
||||
var posView = self.viewControllers.footerEdit.getView(1);
|
||||
@@ -273,6 +269,7 @@ function FullScreenEditorModule(options) {
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
this.displayHelp = function() {
|
||||
//
|
||||
// Replace body area with a temporary read-only MultiLineEditText
|
||||
@@ -305,12 +302,13 @@ function FullScreenEditorModule(options) {
|
||||
|
||||
self.viewControllers.help.redrawAll();
|
||||
};
|
||||
*/
|
||||
|
||||
this.displayHelp2 = function() {
|
||||
this.displayHelp = function() {
|
||||
self.client.term.rawWrite(ansi.resetScreen());
|
||||
|
||||
theme.displayThemeArt( { name : self.menuConfig.config.art.help, client : self.client },
|
||||
function artDisplayed(err, artData) {
|
||||
function helpDisplayed(err, artData) {
|
||||
self.client.waitForKeyPress(function keyPress(ch, key) {
|
||||
self.redrawScreen();
|
||||
self.viewControllers.footerEditMenu.setFocus(true);
|
||||
@@ -320,7 +318,7 @@ function FullScreenEditorModule(options) {
|
||||
};
|
||||
|
||||
this.observeEditEvents = function() {
|
||||
var bodyView = self.getBodyView();
|
||||
var bodyView = self.viewControllers.body.getView(1);
|
||||
|
||||
bodyView.on('edit position', function cursorPosUpdate(pos) {
|
||||
self.updateEditModePosition(pos);
|
||||
@@ -367,14 +365,17 @@ function FullScreenEditorModule(options) {
|
||||
}
|
||||
});
|
||||
},
|
||||
editModeMenuSave : function(formData, extraArgs) {
|
||||
|
||||
},
|
||||
editModeMenuHelp : function(formData, extraArgs) {
|
||||
self.viewControllers.footerEditMenu.setFocus(false);
|
||||
self.displayHelp();
|
||||
},
|
||||
editModeMenu : function(formData, extraArgs) {
|
||||
console.log('menu ' + formData.value['1'])
|
||||
|
||||
if(3 == formData.value['1']) {
|
||||
console.log('Display help...')
|
||||
self.viewControllers.footerEditMenu.setFocus(false);
|
||||
self.displayHelp2();
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -587,7 +587,7 @@
|
||||
},
|
||||
{
|
||||
"value" : { "1" : 1 },
|
||||
"action" : "@method:editModeMenu"
|
||||
"action" : "@menu:demoMain"
|
||||
},
|
||||
{
|
||||
"value" : { "1" : 2 },
|
||||
@@ -595,7 +595,7 @@
|
||||
},
|
||||
{
|
||||
"value" : { "1" : 3 },
|
||||
"action" : "@method:editModeMenu"
|
||||
"action" : "@method:editModeMenuHelp"
|
||||
},
|
||||
{
|
||||
"value" : 1,
|
||||
@@ -617,17 +617,6 @@
|
||||
}
|
||||
*/
|
||||
}
|
||||
},
|
||||
"5" : {
|
||||
"ML1" : {
|
||||
"mci" : {
|
||||
"ML1" : {
|
||||
"width" : 79,
|
||||
"height" : 17,
|
||||
"text" : "" // :TODO: fixme
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user