Fixing list removal
authorAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Thu, 27 Jun 2013 11:39:56 +0000 (13:39 +0200)
committerAleksander Łukasz <aleksander.lukasz@nowoczesnapolska.org.pl>
Thu, 27 Jun 2013 11:39:56 +0000 (13:39 +0200)
modules/documentCanvas/canvas.js

index d0629d3..baa2f3c 100644 (file)
@@ -172,7 +172,7 @@ Canvas.prototype.listCreate = function(options) {
 Canvas.prototype.listRemove = function(options) {\r
     var pointerElement = $(this.content.find('#' + options.pointer.getId()));\r
     var listElement = options.pointer.getClass() === 'list-items' ? pointerElement : \r
 Canvas.prototype.listRemove = function(options) {\r
     var pointerElement = $(this.content.find('#' + options.pointer.getId()));\r
     var listElement = options.pointer.getClass() === 'list-items' ? pointerElement : \r
-        pointerElement.parent('[wlxml-class="list-items"][wlxml-tag]');\r
+        pointerElement.parents('[wlxml-class|="list-items"][wlxml-tag]');\r
     \r
     listElement.find('[wlxml-class=item]').each(function() {\r
         $(this).removeAttr('wlxml-class');\r
     \r
     listElement.find('[wlxml-class=item]').each(function() {\r
         $(this).removeAttr('wlxml-class');\r