fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
integration wip
[fnpeditor.git]
/
modules
/
documentCanvas
/
canvas
/
documentElement.js
diff --git
a/modules/documentCanvas/canvas/documentElement.js
b/modules/documentCanvas/canvas/documentElement.js
index
d82f8e4
..
da9b148
100644
(file)
--- a/
modules/documentCanvas/canvas/documentElement.js
+++ b/
modules/documentCanvas/canvas/documentElement.js
@@
-1,6
+1,7
@@
define([
define([
-'libs/jquery-1.9.1.min'
-], function($) {
+'libs/jquery-1.9.1.min',
+'libs/underscore-min'
+], function($, _) {
'use strict';
'use strict';
@@
-49,7
+50,7
@@
$.extend(DocumentElement.prototype, {
},
wrapWithNodeElement: function(wlxmlNode) {
},
wrapWithNodeElement: function(wlxmlNode) {
- this.$element.wrap($('<' + wlxmlNode.tag + ' class="' + wlxmlNode.klass
+ '"
">')[0]);
+ this.$element.wrap($('<' + wlxmlNode.tag + ' class="' + wlxmlNode.klass
.replace('.', '-') + '
">')[0]);
return documentElementFromHTMLElement(this.$element.parent().get(0), this.canvas);
},
return documentElementFromHTMLElement(this.$element.parent().get(0), this.canvas);
},
@@
-104,6
+105,14
@@
$.extend(DocumentNodeElement.prototype, {
},
after: function(params) {
manipulate(this, params, 'after');
},
after: function(params) {
manipulate(this, params, 'after');
+ },
+ setWlxmlClass: function(klass) {
+ this.$element.attr('class', klass);
+ },
+ is: function(what) {
+ if(what === 'list' && _.contains(['list-items', 'list-items-enum'], this.$element.attr('class')))
+ return true;
+ return false;
}
});
}
});