fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
editor: Hide comment header if there is nothing to show in it
[fnpeditor.git]
/
src
/
editor
/
modules
/
data
/
document.js
diff --git
a/src/editor/modules/data/document.js
b/src/editor/modules/data/document.js
index
23aa000
..
b0f7c25
100644
(file)
--- a/
src/editor/modules/data/document.js
+++ b/
src/editor/modules/data/document.js
@@
-14,6
+14,7
@@
var logger = logging.getLogger('document');
var Document = function() {
wlxml.WLXMLDocument.apply(this, Array.prototype.slice.call(arguments, 0));
var Document = function() {
wlxml.WLXMLDocument.apply(this, Array.prototype.slice.call(arguments, 0));
+ this.properties = {};
};
Document.prototype = Object.create(wlxml.WLXMLDocument.prototype);
};
Document.prototype = Object.create(wlxml.WLXMLDocument.prototype);
@@
-53,6
+54,12
@@
_.extend(Document.prototype, {
return 'file://' + _.last(url.split('/'));
}
return url;
return 'file://' + _.last(url.split('/'));
}
return url;
+ },
+ setProperty: function(propName, propValue) {
+ if(this.properties[propName] !== propValue) {
+ this.properties[propName] = propValue;
+ this.trigger('propertyChanged', propName, propValue);
+ }
}
});
}
});