From 5a6b71047a0cb6176645b480729d736a6a51a857 Mon Sep 17 00:00:00 2001 From: Manolo Carrasco Date: Wed, 1 Jun 2016 21:13:04 +0300 Subject: Remove polymer integration because redundant --- demo/polymer.html | 201 ------------------------------------------------------ 1 file changed, 201 deletions(-) delete mode 100644 demo/polymer.html diff --git a/demo/polymer.html b/demo/polymer.html deleted file mode 100644 index 41e1e2c..0000000 --- a/demo/polymer.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - vaadin-core-elements Code Examples - Polymer Integration - - - - - - - - -
-

vaadin-core-elements

- -
- -
-

Polymer Integration (Light DOM data source)

-

Static data can be easily bound to vaadin-grid light DOM cells with the template repeater.

-

Note: IE/Edge doesn't support template-repeating inside a table element.

- - - -
- -
-

Polymer Integration (Function data source)

-

In case the data is loaded lazily or it changes dynamically a - function datasource is a better option. Click a row to see an enlarged user image.

- -
- -
- - // code - var template = template || document.querySelector('template.my-grid-with-ds'); - - template.addEventListener('dom-change', function() { - var grid = document.querySelector('#my-grid-with-ds'); - - grid.columns[0].renderer = function(cell) { - cell.element.innerHTML = '<img style="width: 30px" src="' + cell.data + '" />'; - }; - - template.onSelect = function() { - if (grid.selection.selected().length === 0) { - template.selected = null; - } else { - grid.getItem([grid.selection.selected()], function(err, item) { - template.selected = item; - }); - } - }; - - template.size = 100; - template.items = function(params, callback) { - var url = 'https://randomuser.me/api?index=' + params.index + '&results=' + params.count; - getJSON(url, function(data) { - callback(data.results); - }); - }; - - }); - - // end-code - - if (template.render) { - // This is needed to make the template render on Chrome in vaadin-doc portlet - template.render(); - } - - -
-
- - - -- cgit v1.2.3