Refactorization
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Thu, 1 Aug 2013 10:45:37 +0000 (12:45 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Mon, 5 Aug 2013 10:20:07 +0000 (12:20 +0200)
modules/documentCanvas/canvas/documentElement.js

index d923787..2b42a22 100644 (file)
@@ -123,9 +123,13 @@ var getDisplayStyle = function(tag, klass) {
 
 $.extend(DocumentNodeElement, {
     createDOM: function(params) {
-        var dom = $('<div document-node-element>'),
-            widgetsContainer = $('<div class="canvas-widgets" contenteditable="false">'),
-            container = $('<div document-element-content>');
+        var dom = $('<div>')
+                .attr('document-node-element', ''),
+            widgetsContainer = $('<div>')
+                .addClass('canvas-widgets')
+                .attr('contenteditable', false),
+            container = $('<div>')
+                .attr('document-element-content', '');
         
         dom.append(widgetsContainer, container);
         // Make sure widgets aren't navigable with arrow keys