mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-26 15:54: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,
|
Extends:mindplot.model.FeatureModel,
|
||||||
initialize:function (attributes) {
|
initialize:function (attributes) {
|
||||||
this.parent(mindplot.model.NoteModel.FEATURE_TYPE);
|
this.parent(mindplot.model.NoteModel.FEATURE_TYPE);
|
||||||
|
if (attributes.text)
|
||||||
this.setText(attributes.text);
|
this.setText(attributes.text);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ mindplot.persistence.XMLSerializer_Pela = new Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_noteTextToXML:function (document, elem, text) {
|
_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);
|
elem.setAttribute('text', text);
|
||||||
} else {
|
} else {
|
||||||
var textDom = document.createElement("text");
|
var textDom = document.createElement("text");
|
||||||
@ -256,7 +256,7 @@ mindplot.persistence.XMLSerializer_Pela = new Class({
|
|||||||
|
|
||||||
var topic = mindmap.createNode(type, id);
|
var topic = mindmap.createNode(type, id);
|
||||||
var text = domElem.getAttribute('text');
|
var text = domElem.getAttribute('text');
|
||||||
if ($defined(text)) {
|
if ($defined(text) && text) {
|
||||||
topic.setText(text);
|
topic.setText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,8 +77,7 @@ mindplot.widget.NoteEditor = new Class({
|
|||||||
|
|
||||||
textArea.setStyles({
|
textArea.setStyles({
|
||||||
'width':'100%',
|
'width':'100%',
|
||||||
'height':80
|
'height':80, resize:'none'
|
||||||
,resize: 'none'
|
|
||||||
});
|
});
|
||||||
textArea.inject(form);
|
textArea.inject(form);
|
||||||
|
|
||||||
@ -86,8 +85,9 @@ mindplot.widget.NoteEditor = new Class({
|
|||||||
form.addEvent('submit', function (event) {
|
form.addEvent('submit', function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
if (textArea.value ) {
|
||||||
model.setValue(textArea.value);
|
model.setValue(textArea.value);
|
||||||
|
}
|
||||||
this.close();
|
this.close();
|
||||||
|
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
Loading…
Reference in New Issue
Block a user