Skip to content

Commit b827464

Browse files
author
Vermel, Runn (GE Global Research)
committed
fixed the breadcrumbs so they adhere to specs
1 parent b0dd23d commit b827464

File tree

4 files changed

+26
-10
lines changed

4 files changed

+26
-10
lines changed

HISTORY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
v0.9.1
2+
====================
3+
* fixed the breadcrumbs so they adhere to specs
4+
15
v0.9.0
26
====================
37
* Upgrade to Polymer 1.4.0

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "px-context-browser",
3-
"version": "0.9.0",
3+
"version": "0.9.1",
44
"main": [
55
"px-context-browser.html"
66
],

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "px-context-browser",
33
"author": "General Electric",
44
"description": "A Px component",
5-
"version": "0.9.0",
5+
"version": "0.9.1",
66
"private": true,
77
"extName" : null,
88
"repository" :

px-context-browser.html

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,17 @@ <h1 class="epsilon caps weight--normal u-m0" on-click="toggleColumnBrowser">
7272
<i class="fa fa-caret-down"></i>
7373
</h1>
7474
<ul class="list-inline list-inline--delimited">
75-
<template is="dom-repeat" items="{{openedBreadcrumbs}}">
76-
<li>{{item}}</li>
77-
</template>
75+
<!-- <template is="dom-repeat" items="{{openedBreadcrumbs}}"> -->
76+
<li>{{selectedItemParent}}</li>
77+
<!-- </template> -->
7878
</ul>
7979
</div>
8080
</header>
8181
<div id="ruler" class$="{{isItemHidden(showColumnBrowser)}} flex flex--col">
8282
<div class$="{{isItemHidden(showColumnBrowser)}} flex flex--col">
8383
<ul class="breadcrumbs list-inline list-inline--delimited u-pv-">
8484
<template is="dom-repeat" id="breadcrumbs" items="{{parentNodes}}">
85-
<li class$="{{isItemHidden(item.hideBreadcrumb)}} u-pv--">
85+
<li class$="{{isItemHidden(!item.hideBreadcrumb)}} u-pv--">
8686
<span class="breadcrumb" on-click="handleBreadcrumbClick">{{item.name}}</span>
8787
</li>
8888
</template>
@@ -253,6 +253,16 @@ <h1 class="epsilon caps weight--normal u-m0" on-click="toggleColumnBrowser">
253253
type: Array,
254254
value: function() {return [];}
255255
},
256+
/**
257+
* The parent of the selected Item. used right under the selected item, and shows up when the item is minimized
258+
* @type {String}
259+
* @default ''
260+
* @private {true}
261+
*/
262+
selectedItemParent: {
263+
type: String,
264+
value: ''
265+
},
256266
/**
257267
* This attributes allows you to use the "hasChildren" or "children" properties inside your json, to show the chevron which indicates this item has children.When this attribute is true, it checks for the "hasChildren" or "children" properties inside your json, and if they exist, the chevron - which indicates this item has children - is shown.
258268
* @type {Boolean Optional}
@@ -413,11 +423,13 @@ <h1 class="epsilon caps weight--normal u-m0" on-click="toggleColumnBrowser">
413423
var i,
414424
len=this.parentNodes.length;
415425
this.openedBreadcrumbs = [];
416-
for (i=0; i<len;i++) {
417-
if (this.getItemLabel(this.parentNodes[i])) {
418-
this.push('openedBreadcrumbs', this.getItemLabel(this.parentNodes[i]));
419-
}
426+
for (i=0; i<len;i++) {
427+
if (this.getItemLabel(this.parentNodes[i])) {
428+
this.push('openedBreadcrumbs', this.getItemLabel(this.parentNodes[i]));
420429
}
430+
}
431+
//set the selected item's parent for the sudo breadcrumb right below the selected item.
432+
this.selectedItemParent = this.openedBreadcrumbs[this.openedBreadcrumbs.length-2];
421433
},
422434
/**
423435
* @param {Object} item

0 commit comments

Comments
 (0)