From 9692d9e3014b32a2e159ad6f95acb7fc387a83e2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Tue, 1 Apr 2014 23:16:28 +0200 Subject: [PATCH 1/1] wlxml: lists - list.extractAllItems --- src/wlxml/extensions/list/list.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/wlxml/extensions/list/list.js b/src/wlxml/extensions/list/list.js index 1404259..2487107 100644 --- a/src/wlxml/extensions/list/list.js +++ b/src/wlxml/extensions/list/list.js @@ -22,6 +22,13 @@ extension.wlxmlClass.list.methods = { } }; +extension.wlxmlClass.list.transformations = { + extractAllItems: function() { + var contents = this.contents(); + return this.document.extractItems({item1: contents[0], item2: _.last(contents)}); + } +}; + extension.document.methods = { areItemsOfSameList: function(params) { return params.node1.parent().sameNode(params.node2.parent()) && params.node2.parent().is('list'); -- 2.20.1