1 var Comms =
function(table){
6 Comms.prototype.getConnections =
function(selectors){
11 connection = Tabulator.prototype.comms.lookupTable(selectors);
13 connection.forEach(
function(con){
14 if(
self.table !== con){
15 connections.push(con);
22 Comms.prototype.send =
function(selectors, module, action, data){
24 connections = this.getConnections(selectors);
26 connections.forEach(
function(connection){
27 connection.tableComms(
self.table.element, module, action, data);
30 if(!connections.length && selectors){
31 console.warn(
"Table Connection Error - No tables matching selector found", selectors);
36 Comms.prototype.receive =
function(table, module, action, data){
37 if(this.table.modExists(module)){
38 return this.table.modules[module].commsReceived(table, action, data);
40 console.warn(
"Inter-table Comms Error - no such module:", module);
45 Tabulator.prototype.registerModule(
"comms", Comms);