* Progress on FSE class/integration
* Use "proxy" for submit * More key support... probably just missed it from other box, will merge later
This commit is contained in:
@@ -299,7 +299,7 @@
|
||||
"width" : 19,
|
||||
"textOverflow" : "..."
|
||||
}
|
||||
}/*
|
||||
},
|
||||
"submit" : {
|
||||
"3" : [
|
||||
{
|
||||
@@ -307,7 +307,7 @@
|
||||
"action" : "@method:fseSubmitProxy"
|
||||
}
|
||||
]
|
||||
}*/
|
||||
}
|
||||
}
|
||||
},
|
||||
"1" : {
|
||||
@@ -316,19 +316,17 @@
|
||||
"MT1" : {
|
||||
"width" : 79,
|
||||
"height" : 17,
|
||||
//"text" : "", // :TODO: should not be req.
|
||||
"argName" : "message"
|
||||
}
|
||||
},/*,
|
||||
},
|
||||
"submit" : {
|
||||
"*" : [
|
||||
{
|
||||
"value" : "message",
|
||||
"action" : "@method:editModeEscPressed"
|
||||
"action" : "@method:fseSubmitProxy"
|
||||
}
|
||||
]
|
||||
},
|
||||
*/
|
||||
"actionKeys" : [
|
||||
{
|
||||
"keys" : [ "escape" ],
|
||||
@@ -336,6 +334,65 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"2" : {
|
||||
"TLTL" : {
|
||||
"mci" : {
|
||||
"TL1" : {
|
||||
"width" : 5
|
||||
},
|
||||
"TL2" : {
|
||||
"width" : 4
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"3" : {
|
||||
"HM" : {
|
||||
"mci" : {
|
||||
"HM1" : {
|
||||
// :TODO: Continue, Save, Discard, Clear, Quote, Help
|
||||
"items" : [ "Save", "Discard", "Quote", "Help" ]
|
||||
}
|
||||
},
|
||||
"submit" : {
|
||||
"*" : [
|
||||
{
|
||||
"value" : { "1" : 0 },
|
||||
"action" : "@method:fseSubmitProxy"
|
||||
},
|
||||
{
|
||||
"value" : { "1" : 1 },
|
||||
"action" : "@menu:messageArea"
|
||||
},
|
||||
{
|
||||
"value" : { "1" : 2 },
|
||||
"action" : "@method:fseSubmitProxy"
|
||||
},
|
||||
{
|
||||
"value" : { "1" : 3 },
|
||||
"action" : "@method:fseSubmitProxy"
|
||||
},
|
||||
{
|
||||
"value" : 1,
|
||||
"action" : "@method:fseSubmitProxy"
|
||||
}
|
||||
]
|
||||
},
|
||||
"actionKeys" : [ // :TODO: Need better name
|
||||
{
|
||||
"keys" : [ "escape" ],
|
||||
"action" : "@method:fseSubmitProxy"
|
||||
}
|
||||
]
|
||||
// :TODO: something like the following for overriding keymap
|
||||
// this should only override specified entries. others will default
|
||||
/*
|
||||
"keyMap" : {
|
||||
"accept" : [ "return" ]
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -24,24 +24,27 @@ function MessageAreaPostModule(options) {
|
||||
|
||||
|
||||
this.initSequence = function() {
|
||||
var fse = new FullScreenEditor( {
|
||||
self.fse = new FullScreenEditor( {
|
||||
callingMenu : this,
|
||||
client : this.client,
|
||||
// :TODO: should pass in full config? want access to keymap/etc. as well
|
||||
art : this.menuConfig.config.fseArt,
|
||||
font : this.menuConfig.font,
|
||||
editorType : 'area',
|
||||
editorMode : 'edit',
|
||||
});
|
||||
|
||||
fse.on('error', function fseError(err) {
|
||||
|
||||
self.fse.on('error', function fseError(err) {
|
||||
console.log('fse error: ' + err)
|
||||
});
|
||||
|
||||
fse.enter();
|
||||
self.fse.enter();
|
||||
};
|
||||
|
||||
this.menuMethods = {
|
||||
// :TODO: is there a cleaner way to achieve this?
|
||||
fseSubmitProxy : function(formData, extraArgs) {
|
||||
console.log(formData)
|
||||
self.fse.submitHandler(formData, extraArgs);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user