From c4df6154a982c0b54bcf1b7dc65b2def4a25e820 Mon Sep 17 00:00:00 2001 From: Runn Vermel Date: Fri, 29 Jan 2016 13:15:26 -0800 Subject: [PATCH] changed implementation of how the chevron is displayed on page, fixed breadcrumb bug on safari --- HISTORY.md | 2 + README.md | 88 ++++++++++++++++++++---------------- bower.json | 2 +- deepNestedChildren.json | 3 +- deepNestedGrandchildren.json | 3 +- demo.html | 3 +- directContext.json | 3 +- initialContext.json | 6 ++- package.json | 2 +- px-context-browser.html | 45 +++++++++++++----- 10 files changed, 100 insertions(+), 57 deletions(-) create mode 100644 HISTORY.md diff --git a/HISTORY.md b/HISTORY.md new file mode 100644 index 00000000..f7433b58 --- /dev/null +++ b/HISTORY.md @@ -0,0 +1,2 @@ +##release v0.8.0 +-Removed the default reference to the item chevron, since the Predix asset team does not support that. the functionality is still there, but now, you have to pass an attribute (has-children) and set it to true to ensure the chevrons show up. diff --git a/README.md b/README.md index 4614bc4a..e3b49b28 100644 --- a/README.md +++ b/README.md @@ -42,18 +42,6 @@ Finally, use the component in your application: ## Attributes -#### label-field - -*Type:* **String** - (*Optional*) - *Default:* "name" - -Mapping for the field name in the context data that represents the display label for an item. This property allows data of any form/keys to be used as long as it has the notion of a 'display label' in it. - -``` - - -``` #### browser-context *Type:* **String** - (*Required*) - *Default:* "" @@ -68,32 +56,6 @@ The object can have 1 or more levels of assets, each group should be grouped und ``` -#### id-field - -*Type:* **String** - (*Optional*) - *Default:* "id" - -Mapping for the field name in the context data that represents a unique id for an item. This property allows data of any form/keys to be used as long as it has the notion of a 'unique id' in it. - -``` - - -``` - -#### selected-item - -*Type:* **Object** - (*Optional*) - *Default:* null - -The item currently selected - application can detect which item is selected, for example via [ng-bind-polymer](https://github.com/PredixDev/ng-bind-polymer). - -``` - - -``` - #### handlers *Type:* **Object** - (*Optional*) - *Default:* null @@ -121,6 +83,43 @@ colBrowser.handlers = { } }; ``` +####show-chevron +*Type:* **Boolean** - (*Optional*) - *Default:* "false" + +This attributes allows you to use the "hasChildren" or "children" properties inside your json, to show the chevron which indicates this item has children. + +``` + + +``` + +#### id-field + +*Type:* **String** - (*Optional*) - *Default:* "id" + +Mapping for the field name in the context data that represents a unique id for an item. This property allows data of any form/keys to be used as long as it has the notion of a 'unique id' in it. + +``` + + +``` + +#### label-field + +*Type:* **String** - (*Optional*) - *Default:* "name" + +Mapping for the field name in the context data that represents the display label for an item. This property allows data of any form/keys to be used as long as it has the notion of a 'display label' in it. + +``` + + +``` #### opened-item-name @@ -135,6 +134,19 @@ Initial context name to be shown on page which defaults to 'Selected Context'. ``` +#### selected-item + +*Type:* **Object** - (*Optional*) - *Default:* null + +The item currently selected - application can detect which item is selected, for example via [ng-bind-polymer](https://github.com/PredixDev/ng-bind-polymer). + +``` + + +``` + #### show-column-browser *Type:* **Boolean** - (*Optional*) - *Default:* False diff --git a/bower.json b/bower.json index a6009f51..ffd18b69 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "px-context-browser", - "version": "0.7.7", + "version": "0.8.0", "main": [ "px-context-browser.html" ], diff --git a/deepNestedChildren.json b/deepNestedChildren.json index 2d098ca1..115f3bc6 100644 --- a/deepNestedChildren.json +++ b/deepNestedChildren.json @@ -2,7 +2,8 @@ "data": [{ "name": "Nested Child 1", "identifier": "001-2a", - "isOpenable": true + "isOpenable": true, + "hasChildren": true }, { "name": "Nested Child 2", diff --git a/deepNestedGrandchildren.json b/deepNestedGrandchildren.json index 4c61f4c7..a61ee683 100644 --- a/deepNestedGrandchildren.json +++ b/deepNestedGrandchildren.json @@ -3,7 +3,8 @@ { "name": "Nested Grandchild 1", "identifier": "001-2aa", - "isOpenable": true + "isOpenable": true, + "hasChildren": true },{ "name": "Nested Grandchild 2", "identifier": "001-2ab", diff --git a/demo.html b/demo.html index 635079be..e5eb5e0f 100644 --- a/demo.html +++ b/demo.html @@ -45,7 +45,8 @@

Demo

+ browser-context="{{browserContext}}" + show-chevron="true">