From e7b47629c1ff6262df6febe514b9d29196dbc062 Mon Sep 17 00:00:00 2001 From: Scott Miles Date: Fri, 12 Oct 2012 18:23:06 -0700 Subject: [PATCH 1/3] g-selection component and workbench file (our first API only module: component-as-module-pattern) --- src/g-selection.html | 62 ++++++++++++++++++++++++++++++++++++++++ workbench/selection.html | 26 +++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 src/g-selection.html create mode 100644 workbench/selection.html diff --git a/src/g-selection.html b/src/g-selection.html new file mode 100644 index 00000000..31ffe7eb --- /dev/null +++ b/src/g-selection.html @@ -0,0 +1,62 @@ + + + + + + diff --git a/workbench/selection.html b/workbench/selection.html new file mode 100644 index 00000000..011c50dd --- /dev/null +++ b/workbench/selection.html @@ -0,0 +1,26 @@ + + + + + Selection + + + + + + + + From 680c5f0f1ee57489b96d8fdddcb7d747188aacba Mon Sep 17 00:00:00 2001 From: Scott Miles Date: Fri, 12 Oct 2012 18:25:34 -0700 Subject: [PATCH 2/3] component node references must come from the LOCAL tree, not the COMPOSED tree --- src/g-component.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/g-component.html b/src/g-component.html index a3832f82..85e8457b 100644 --- a/src/g-component.html +++ b/src/g-component.html @@ -66,7 +66,8 @@ license that can be found in the LICENSE file. var establishNodeReferences = function(inRoot) { this.$ = this.$ || {}; - var nodes = inRoot.querySelectorAll("[id]"); + // search the LOCAL tree + var nodes = ShadowDom.localQueryAll(inRoot, "[id]"); Array.prototype.forEach.call(nodes, function(n) { this.$[n.id] = deref(n); }, this); From c58db7ee9c9289b89644df49a1cb848690906135 Mon Sep 17 00:00:00 2001 From: Scott Miles Date: Fri, 12 Oct 2012 18:25:56 -0700 Subject: [PATCH 3/3] g-selector component and workbench file --- src/g-selector.html | 72 +++++++++++++++++++++++++++++++++++++++++ workbench/selector.html | 42 ++++++++++++++++++++++++ 2 files changed, 114 insertions(+) create mode 100644 src/g-selector.html create mode 100644 workbench/selector.html diff --git a/src/g-selector.html b/src/g-selector.html new file mode 100644 index 00000000..6ffbfa60 --- /dev/null +++ b/src/g-selector.html @@ -0,0 +1,72 @@ + + + + + + + diff --git a/workbench/selector.html b/workbench/selector.html new file mode 100644 index 00000000..0974cf6b --- /dev/null +++ b/workbench/selector.html @@ -0,0 +1,42 @@ + + + + Selector + + + + + +

Single-select

+ +
Item 1
+
Item 2
+
Item 3
+
Item 4
+
Item 5
+
+

Multi-select

+ +
Item 1
+
Item 2
+
Item 3
+
Item 4
+
Item 5
+
+ +