handsontable updated to read the new defition content provided by the all-in-one-file

parent 898ab73d
...@@ -5,12 +5,18 @@ ...@@ -5,12 +5,18 @@
rJS(window) rJS(window)
.declareMethod('render', function (content, options) { .declareMethod('render', function (content, options) {
var data = JSON.parse(content); var data = JSON.parse(content),
i, def = [];
for (i = 0; i <= data.length-1; i += 1) {
def.push(data[i].name);
}
def = [def];
return this.getElement() return this.getElement()
.push(function (element) { .push(function (element) {
$(element).find('.table-container') $(element).find('.table-container')
.handsontable($.extend({ .handsontable($.extend({
data: data, data: def,
stretchH: 'all' stretchH: 'all'
}, options || {})); }, options || {}));
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment