mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 22:27:55 +01:00
Bug message: uncaught exception: text can not be null, line:0, : fixed.
This commit is contained in:
parent
00829bfcc4
commit
c4f4756e4a
@ -20,6 +20,7 @@ mindplot.model.NoteModel = new Class({
|
||||
Extends:mindplot.model.FeatureModel,
|
||||
initialize:function (attributes) {
|
||||
this.parent(mindplot.model.NoteModel.FEATURE_TYPE);
|
||||
if (attributes.text)
|
||||
this.setText(attributes.text);
|
||||
},
|
||||
|
||||
|
@ -170,7 +170,7 @@ mindplot.persistence.XMLSerializer_Pela = new Class({
|
||||
},
|
||||
|
||||
_noteTextToXML:function (document, elem, text) {
|
||||
if (text.indexOf('\n') == -1) {
|
||||
if (text.indexOf('\n') == -1 && text.indexOf("&") == -1 && text.indexOf("<") == -1 && text.indexOf("\"") == -1) {
|
||||
elem.setAttribute('text', text);
|
||||
} else {
|
||||
var textDom = document.createElement("text");
|
||||
@ -256,7 +256,7 @@ mindplot.persistence.XMLSerializer_Pela = new Class({
|
||||
|
||||
var topic = mindmap.createNode(type, id);
|
||||
var text = domElem.getAttribute('text');
|
||||
if ($defined(text)) {
|
||||
if ($defined(text) && text) {
|
||||
topic.setText(text);
|
||||
}
|
||||
|
||||
|
@ -77,8 +77,7 @@ mindplot.widget.NoteEditor = new Class({
|
||||
|
||||
textArea.setStyles({
|
||||
'width':'100%',
|
||||
'height':80
|
||||
,resize: 'none'
|
||||
'height':80, resize:'none'
|
||||
});
|
||||
textArea.inject(form);
|
||||
|
||||
@ -86,8 +85,9 @@ mindplot.widget.NoteEditor = new Class({
|
||||
form.addEvent('submit', function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
if (textArea.value ) {
|
||||
model.setValue(textArea.value);
|
||||
}
|
||||
this.close();
|
||||
|
||||
}.bind(this));
|
||||
|
Loading…
Reference in New Issue
Block a user