* Fix issue with submit matching when argName used
This commit is contained in:
parent
9f86bdd856
commit
316a9c8b7f
|
@ -9,6 +9,7 @@
|
||||||
// * http://www.bbsdocumentary.com/library/PROGRAMS/GRAPHICS/ANSI/ansisys.txt
|
// * http://www.bbsdocumentary.com/library/PROGRAMS/GRAPHICS/ANSI/ansisys.txt
|
||||||
// * http://en.wikipedia.org/wiki/ANSI_escape_code
|
// * http://en.wikipedia.org/wiki/ANSI_escape_code
|
||||||
// * https://github.com/chjj/term.js/blob/master/src/term.js
|
// * https://github.com/chjj/term.js/blob/master/src/term.js
|
||||||
|
// * http://www.inwap.com/pdp10/ansicode.txt
|
||||||
//
|
//
|
||||||
|
|
||||||
var assert = require('assert');
|
var assert = require('assert');
|
||||||
|
|
|
@ -32,14 +32,18 @@ var _ = require('lodash');
|
||||||
//
|
//
|
||||||
// Editors - BBS
|
// Editors - BBS
|
||||||
// * https://github.com/M-griffin/Enthral/blob/master/src/msg_fse.cpp
|
// * https://github.com/M-griffin/Enthral/blob/master/src/msg_fse.cpp
|
||||||
|
//
|
||||||
//
|
//
|
||||||
// Editors - Other
|
// Editors - Other
|
||||||
// * http://joe-editor.sourceforge.net/
|
// * http://joe-editor.sourceforge.net/
|
||||||
// * http://www.jbox.dk/downloads/edit.c
|
// * http://www.jbox.dk/downloads/edit.c
|
||||||
|
// * https://github.com/dominictarr/hipster
|
||||||
|
//
|
||||||
|
// Implementations - Word Wrap
|
||||||
|
// * https://github.com/protomouse/synchronet/blob/93b01c55b3102ebc3c4f4793c3a45b8c13d0dc2a/src/sbbs3/wordwrap.c
|
||||||
//
|
//
|
||||||
|
|
||||||
// Misc notes
|
// Misc notes
|
||||||
// * See https://github.com/dominictarr/hipster/issues/15 about insert/delete lines
|
// * https://github.com/dominictarr/hipster/issues/15 (Deleting lines/etc.)
|
||||||
//
|
//
|
||||||
// Blessed
|
// Blessed
|
||||||
// insertLine: CSR(top, bottom) + CUP(y, 0) + IL(1) + CSR(0, height)
|
// insertLine: CSR(top, bottom) + CUP(y, 0) + IL(1) + CSR(0, height)
|
||||||
|
@ -1033,7 +1037,7 @@ MultiLineEditTextView.prototype.setFocus = function(focused) {
|
||||||
};
|
};
|
||||||
|
|
||||||
MultiLineEditTextView.prototype.setText = function(text) {
|
MultiLineEditTextView.prototype.setText = function(text) {
|
||||||
text = require('fs').readFileSync('/home/nuskooler/Downloads/test_text.txt', { encoding : 'utf-8'});
|
text = require('fs').readFileSync('/home/bashby/Downloads/test_text.txt', { encoding : 'utf-8'});
|
||||||
|
|
||||||
this.insertRawText(text);
|
this.insertRawText(text);
|
||||||
this.cursorEndOfDocument();
|
this.cursorEndOfDocument();
|
||||||
|
@ -1044,10 +1048,6 @@ MultiLineEditTextView.prototype.getData = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
MultiLineEditTextView.prototype.setPropertyValue = function(propName, value) {
|
MultiLineEditTextView.prototype.setPropertyValue = function(propName, value) {
|
||||||
/* switch(propName) {
|
|
||||||
case 'text' : this.setText(value); break;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
MultiLineEditTextView.super_.prototype.setPropertyValue.call(this, propName, value);
|
MultiLineEditTextView.super_.prototype.setPropertyValue.call(this, propName, value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -214,7 +214,7 @@ View.prototype.setPropertyValue = function(propName, value) {
|
||||||
*/
|
*/
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'submitArgName' : this.submitArgName = value; break;
|
case 'argName' : this.submitArgName = value; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(/styleSGR[0-9]{1,2}/.test(propName)) {
|
if(/styleSGR[0-9]{1,2}/.test(propName)) {
|
||||||
|
|
|
@ -411,12 +411,14 @@ ViewController.prototype.loadFromMenuConfig = function(options, cb) {
|
||||||
//
|
//
|
||||||
// * actionValue is a Object:
|
// * actionValue is a Object:
|
||||||
// a) All key/values must exactly match
|
// a) All key/values must exactly match
|
||||||
// b) value is null; The key (view ID) must be present
|
// b) value is null; The key (view ID or "argName") must be present
|
||||||
// in formValue. This is a wildcard/any match.
|
// in formValue. This is a wildcard/any match.
|
||||||
// * actionValue is a Number: This represents a view ID that
|
// * actionValue is a Number: This represents a view ID that
|
||||||
// must be present in formValue.
|
// must be present in formValue.
|
||||||
|
// * actionValue is a string: This represents a view with
|
||||||
|
// "argName" set that must be present in formValue.
|
||||||
//
|
//
|
||||||
if(_.isNumber(actionValue)) {
|
if(_.isNumber(actionValue) || _.isString(actionValue)) {
|
||||||
if(_.isUndefined(formValue[actionValue])) {
|
if(_.isUndefined(formValue[actionValue])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -531,7 +531,7 @@
|
||||||
"submit" : {
|
"submit" : {
|
||||||
"3" : [
|
"3" : [
|
||||||
{
|
{
|
||||||
"value" : { "3" : null },
|
"value" : { "subject" : null },
|
||||||
"action" : "@method:headerSubmit"
|
"action" : "@method:headerSubmit"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -551,7 +551,7 @@
|
||||||
"submit" : {
|
"submit" : {
|
||||||
"*" : [
|
"*" : [
|
||||||
{
|
{
|
||||||
"value" : 1,
|
"value" : "message",
|
||||||
"action" : "@method:editModeEscPressed"
|
"action" : "@method:editModeEscPressed"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue