Sha256: b94922e46ef02ad787e1cc08deaeacbc7502224cd6d222a7d20d0b1eec3d124f

Contents?: true

Size: 793 Bytes

Versions: 8

Compression:

Stored size: 793 Bytes

Contents

//
// AJAX Table helpers
//
Rad.Table = new Class({
  initialize: function(tableQ){    
    this.table = tableQ.toElement(true);
    if(!this.table) throw("no table '" + tableQ + "'!");
    this.tbody = this.table.getChild('tbody');
  },
  anew: function(form){rad.dialog().show(form);},  
  create: function(lineQ){lineQ.toElement(true).inject(this.tbody);},
  edit: function(form){rad.dialog().show(form);},
  line: function(lineQ){return new Rad.Table.Line(this, lineQ);}
});

Rad.Table.Line = new Class({
  initialize: function(table, lineQ){
    this.table = table;
    this.tr = table.tbody.getChild(lineQ);
    if(!this.tr) throw("no table row with '" + lineQ + "'!");
  },
  destroy: function(){this.tr.destroy();},
  update: function(line){line.toElement(true).replaces(this.tr);}
});

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rad_common_interface-0.0.14 app/static/face/table.js
rad_common_interface-0.0.13 app/static/face/table.js
rad_common_interface-0.0.12 app/static/face/table.js
rad_common_interface-0.0.11 app/static/face/table.js
rad_common_interface-0.0.10 app/static/face/table.js
rad_common_interface-0.0.9 app/static/face/table.js
rad_common_interface-0.0.8 app/static/face/table.js
rad_common_interface-0.0.7 app/static/face/table.js