fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Canvas list API fix: removing unnecessary lists if all items extracted
[fnpeditor.git]
/
modules
/
documentCanvas
/
canvas
/
documentElement.js
diff --git
a/modules/documentCanvas/canvas/documentElement.js
b/modules/documentCanvas/canvas/documentElement.js
index
e18f856
..
88287b8
100644
(file)
--- a/
modules/documentCanvas/canvas/documentElement.js
+++ b/
modules/documentCanvas/canvas/documentElement.js
@@
-112,10
+112,16
@@
$.extend(DocumentNodeElement.prototype, {
this.$element.attr('wlxml-tag', tag);
},
getWlxmlClass: function() {
this.$element.attr('wlxml-tag', tag);
},
getWlxmlClass: function() {
- return this.$element.attr('wlxml-class').replace('-', '.');
+ var klass = this.$element.attr('wlxml-class');
+ if(klass)
+ return klass.replace('-', '.');
+ return undefined;
},
setWlxmlClass: function(klass) {
},
setWlxmlClass: function(klass) {
- this.$element.attr('wlxml-class', klass);
+ if(klass)
+ this.$element.attr('wlxml-class', klass);
+ else
+ this.$element.removeAttr('wlxml-class');
},
is: function(what) {
if(what === 'list' && _.contains(['list-items', 'list-items-enum'], this.$element.attr('wlxml-class')))
},
is: function(what) {
if(what === 'list' && _.contains(['list-items', 'list-items-enum'], this.$element.attr('wlxml-class')))