diff options
author | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-14 15:39:19 +0000 |
---|---|---|
committer | mensonge <mensonge@b3834d28-1941-0410-a4f8-b48e95affb8f> | 2008-11-14 15:39:19 +0000 |
commit | 1c5685d68f1b73270fb814fe04cbb490eb90ba5f (patch) | |
tree | 3d3ada08a934b96fc31531f1327690d7edc6f766 /includes/js/dojox/wire/demos/TableContainer.js | |
parent | 104d59099e048688c4dbac37d72137006e396558 (diff) | |
download | semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.gz semanticscuttle-1c5685d68f1b73270fb814fe04cbb490eb90ba5f.tar.bz2 |
Minor fix: Remove DOJO library (60Mo) replaced by link to Google CDN (online DOJO library)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@159 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'includes/js/dojox/wire/demos/TableContainer.js')
-rw-r--r-- | includes/js/dojox/wire/demos/TableContainer.js | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/includes/js/dojox/wire/demos/TableContainer.js b/includes/js/dojox/wire/demos/TableContainer.js deleted file mode 100644 index fd4ad73..0000000 --- a/includes/js/dojox/wire/demos/TableContainer.js +++ /dev/null @@ -1,68 +0,0 @@ -if(!dojo._hasResource["dojox.wire.demos.TableContainer"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. -dojo._hasResource["dojox.wire.demos.TableContainer"] = true; -dojo.provide("dojox.wire.demos.TableContainer"); - -dojo.require("dojo.parser"); -dojo.require("dijit._Widget"); -dojo.require("dijit._Templated"); - -dojo.declare("dojox.wire.demos.TableContainer", [ dijit._Widget, dijit._Templated, dijit._Container ], { - // summary: - // Extremely simple 'widget' that is a table generator with an addRow function that takes an array - // as the row to add, where each entry is a cell in the row. This demo widget is for use with the - // wire demos. - - templateString: "<table class='tablecontainer'><tbody dojoAttachPoint='tableContainer'></tbody></table>", - rowCount: 0, - headers: "", - addRow: function(array){ - // summary: - // Function to add in a new row from the elements in the array map to cells in the row. - // array: - // Array of row values to add. - try{ - var row = document.createElement("tr"); - if((this.rowCount%2) === 0){ - dojo.addClass(row, "alternate"); - } - this.rowCount++; - for(var i in array){ - var cell = document.createElement("td"); - var text = document.createTextNode(array[i]); - cell.appendChild(text); - row.appendChild(cell); - - } - this.tableContainer.appendChild(row); - }catch(e){ console.debug(e); } - }, - - clearTable: function(){ - // summary: - // Function to clear all the current rows in the table, except for the header. - - //Always leave the first row, which is the table header. - while(this.tableContainer.firstChild.nextSibling){ - this.tableContainer.removeChild(this.tableContainer.firstChild.nextSibling); - } - this.rowCount = 0; - }, - - postCreate: function(){ - // summary: - // Widget lifecycle function to handle generation of the header elements in the table. - var headers = this.headers.split(","); - var tr = document.createElement("tr"); - for(i in headers){ - - var header = headers[i]; - var th = document.createElement("th"); - var text = document.createTextNode(header); - th.appendChild(text); - tr.appendChild(th); - } - this.tableContainer.appendChild(tr); - } -}); - -} |