diff options
Diffstat (limited to 'webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/Table_1.html')
-rw-r--r-- | webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/Table_1.html | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/Table_1.html b/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/Table_1.html deleted file mode 100644 index 3accffc630..0000000000 --- a/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/example/Table_1.html +++ /dev/null @@ -1,107 +0,0 @@ -<html> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>qooxdoo » Demo » Sample</title> - <link type="text/css" rel="stylesheet" href="../../css/layout.css"/> - <!--[if IE]> - <link type="text/css" rel="stylesheet" href="../../css/layout_ie.css"/> - <![endif]--> - <script type="text/javascript" src="../../script/sample.js"></script> -</head> -<body> - <script type="text/javascript" src="../../script/layout.js"></script> - - <div id="demoDescription"> - <p>A table with virtual scrolling, model-view-controller, renderers, - editing, sorting, column resizing, column reordering, - column hiding.</p> - </div> - - <script type="text/javascript"> - qx.core.Init.getInstance().defineMain(function() - { - var d = qx.ui.core.ClientDocument.getInstance(); - - var main = new qx.ui.layout.VerticalBoxLayout(); - main.set({ left:10, top:30, right:300, bottom:30, spacing:5 }); - - var nextId = 0; - var createRandomRows = function(rowCount) { - var rowData = []; - var now = new Date().getTime(); - var dateRange = 400 * 24 * 60 * 60 * 1000; // 400 days - for (var row = 0; row < rowCount; row++) { - var date = new Date(now + Math.random() * dateRange - dateRange / 2); - rowData.push([ nextId++, Math.random() * 10000, date, (Math.random() > 0.5) ]); - } - return rowData; - }; - - // Create the initial data - var rowData = createRandomRows(50); - - // Add some encoding relevant stuff - rowData[15][1] = "<b>A html & entities escaping test</b>"; - - // table model - var tableModel = new qx.ui.table.SimpleTableModel(); - tableModel.setColumns([ "ID", "A number", "A date", "Boolean test" ]); - tableModel.setData(rowData); - tableModel.setColumnEditable(1, true); - tableModel.setColumnEditable(2, true); - - // table - var table = new qx.ui.table.Table(tableModel); - with (table) { - set({ width:"100%", height:"1*", border:qx.renderer.border.BorderPresets.getInstance().thinInset }); - getSelectionModel().setSelectionMode(qx.ui.table.SelectionModel.MULTIPLE_INTERVAL_SELECTION); - getTableColumnModel().setDataCellRenderer(3, new qx.ui.table.BooleanDataCellRenderer()); - setColumnWidth(0, 80); - setColumnWidth(1, 200); - setColumnWidth(2, 150); - }; - main.add(table); - - var buttonBar = new qx.ui.layout.HorizontalBoxLayout(); - buttonBar.set({ width:"100%", height:"auto", spacing:5 }); - main.add(buttonBar); - - var button = new qx.ui.form.Button("Change row with ID 10"); - button.addEventListener("execute", function(evt) { - var rowData = createRandomRows(1); - for (var i = 1; i < tableModel.getColumnCount(); i++) { - tableModel.setValue(i, 10, rowData[0][i]); - } - this.info("Row 10 changed"); - }); - buttonBar.add(button); - - var button = new qx.ui.form.Button("Add 10 rows"); - button.addEventListener("execute", function(evt) { - var rowData = createRandomRows(10); - tableModel.addRows(rowData); - this.info("10 rows added"); - }); - buttonBar.add(button); - - var button = new qx.ui.form.Button("Remove 5 rows"); - button.addEventListener("execute", function(evt) { - var rowCount = tableModel.getRowCount(); - tableModel.removeRows(rowCount-5, 5); - this.info("5 rows removed"); - }); - buttonBar.add(button); - - var checkBox = new qx.ui.form.CheckBox("keepFirstVisibleRowComplete", null, null, table.getKeepFirstVisibleRowComplete()); - checkBox.setToolTip(new qx.ui.popup.ToolTip("Whether the the first visible row should be rendered completely when scrolling.")); - checkBox.addEventListener("changeChecked", function(evt) { - table.setKeepFirstVisibleRowComplete(checkBox.getChecked()); - this.info("Set keepFirstVisibleRowComplete to: " + checkBox.getChecked()); - }); - buttonBar.add(checkBox); - - d.add(main); - }); - </script> -</body> -</html>
\ No newline at end of file |