diff options
Diffstat (limited to 'webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/Transport_3.html')
-rw-r--r-- | webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/Transport_3.html | 114 |
1 files changed, 0 insertions, 114 deletions
diff --git a/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/Transport_3.html b/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/Transport_3.html deleted file mode 100644 index b59fc914e6..0000000000 --- a/webapps/qooxdoo-0.6.5-sdk/frontend/application/sample/source/html/test/Transport_3.html +++ /dev/null @@ -1,114 +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>Testing multiple parallel requests of files with different sizes.</p> - </div> - - <script type="text/javascript"> - qx.core.Init.getInstance().defineMain(function() - { - var lab1 = new qx.ui.basic.Label("40KB"); - var lab2 = new qx.ui.basic.Label("400KB"); - - var spin1 = new qx.ui.form.Spinner(0, 3, 50); - var spin2 = new qx.ui.form.Spinner(0, 3, 20); - - - - - var grid = new qx.ui.layout.GridLayout; - - grid.setLocation(20, 48); - grid.setDimension("auto", "auto"); - grid.setHorizontalSpacing(10); - grid.setVerticalSpacing(4); - grid.setBorder(qx.renderer.border.BorderPresets.getInstance().thinOutset); - grid.setBackgroundColor("white"); - grid.setPadding(10); - - grid.setColumnCount(2); - grid.setRowCount(2); - - grid.setColumnWidth(0, 50); - grid.setColumnWidth(1, 50); - - grid.setRowHeight(0, 18); - grid.setRowHeight(1, 22); - - qx.ui.core.ClientDocument.getInstance().add(grid); - - grid.add(lab1, 0, 0); - grid.add(lab2, 1, 0); - - grid.add(spin1, 0, 1); - grid.add(spin2, 1, 1); - - - - var btn = new qx.ui.form.Button("Send", "icon/16/actions/dialog-ok.png"); - btn.setLocation(20, 120); - qx.ui.core.ClientDocument.getInstance().add(btn); - - - - var area = new qx.ui.form.TextArea(""); - area.setLocation(20, 154); - area.setDimension(192, 400); - qx.ui.core.ClientDocument.getInstance().add(area); - - - - btn.addEventListener("execute", function(e) - { - var s1 = parseInt(spin1.getValue()); - var s2 = parseInt(spin2.getValue()); - - while ((s1+s2) > 0) - { - if (s1 > 0) - { - makeRequest(40); - s1--; - }; - - if (s2 > 0) - { - makeRequest(400); - s2--; - }; - }; - }); - - function makeRequest(size) - { - var req = new qx.io.remote.Request("data/filesize/" + size + "kb.xml", "GET", qx.util.Mime.XML); - - req.addEventListener("completed", function(e) { - area.setValue(area.getValue() + "Request " + size + "kb: completed\n"); - }); - - req.addEventListener("failed", function(e) { - area.setValue(area.getValue() + "Request " + size + "kb: failed\n"); - }); - - req.addEventListener("timeout", function(e) { - area.setValue(area.getValue() + "Request " + size + "kb: timeout\n"); - }); - - req.send(); - }; - }); - </script> -</body> -</html>
\ No newline at end of file |