From 2a3f10ff59b53f0cb4747c7ae3359a2fd93343b7 Mon Sep 17 00:00:00 2001 From: Kersten Burkhardt Date: Tue, 8 Dec 2015 20:04:13 +0100 Subject: [PATCH 1/2] Switched from EcmaScript 6 to EcmaScript 5 --- paper-datatable-card.html | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/paper-datatable-card.html b/paper-datatable-card.html index f85e36d..2f4b894 100644 --- a/paper-datatable-card.html +++ b/paper-datatable-card.html @@ -433,12 +433,18 @@ var done = function(){ i++; if(i == 2){ - var sortedItems = ids.map((id) => items.find((item) => item[this.idProperty] == id)); + var sortedItems = ids.map(function (id) { + return items.find(function (item) { + return item[undefined.idProperty] == id; + }); + }); processItems(sortedItems); } }.bind(this); - var idsInCache = ids.filter((id) => this._cache.has(id)); + var idsInCache = ids.filter(function (id) { + return undefined._cache.has(id); + }); if(idsInCache.length){ var cacheItems = []; idsInCache.forEach(function(id){ @@ -450,7 +456,9 @@ done(); } - var idsNotInCache = ids.filter((id) => !this._cache.has(id)); + var idsNotInCache = ids.filter(function (id) { + return !undefined._cache.has(id); + }); if(idsNotInCache.length){ this.dataSource.getByIds(idsNotInCache).then(function(newItems){ items = items.concat(newItems); From 5096a66e961b449ec049b20c9d71f1c162accb25 Mon Sep 17 00:00:00 2001 From: Kersten Burkhardt Date: Tue, 8 Dec 2015 20:04:46 +0100 Subject: [PATCH 2/2] Changed from EcmaScript6 to EcmaScipt5 --- paper-datatable.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/paper-datatable.html b/paper-datatable.html index 27caf54..d8778d3 100644 --- a/paper-datatable.html +++ b/paper-datatable.html @@ -1021,13 +1021,13 @@ // see: console.log(this._columns.length); var ths = Polymer.dom(this.root).querySelectorAll('th'); - ths.forEach((th) => { - if(th.dataColumn){ + ths.forEach(function (th) { + if (th.dataColumn) { console.dir(th); var column = th.dataColumn; - if(th.scrollWidth > th.offsetWidth){ + if (th.scrollWidth > th.offsetWidth) { column.set('tooltip', column.header); - }else{ + } else { column.set('tooltip', ''); } }