Sha256: d9178a8b151b29f27c8ecf4e6982767249351977a6679fd9341f17acd3649fb5

Contents?: true

Size: 779 Bytes

Versions: 1

Compression:

Stored size: 779 Bytes

Contents

include('../list/render.js');

uki.view.table.Render = uki.newClass(uki.view.list.Render, new function() {
    
    var proto = this;
    
    proto.init = function(table) {
        this._table = table;
    };
    
    proto.render = function(row, rect, i) {
        if (!this._template) this._template = this._buildTemplate(rect);
        var table = this._table,
            columns = table.columns();
        this._template[1] = uki.map(columns, function(val, j) {
            return columns[j].render(row, rect, i);
        }).join('');
        return this._template.join('');
    };
    
    proto._buildTemplate = function(rect) {
        var tagOpening = ['<div style="position:relwidth:100%;height:', rect.height, 'px">'].join(',');
        return ['', '', '']
    };
});

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
uki-1.0.0 frameworks/uki/src/uki-view/view/table/render.js