From 626bb8efb0c825f332c937ffaaadc9b402079539 Mon Sep 17 00:00:00 2001 From: Derrell Lipman Date: Wed, 3 Jan 2007 20:17:37 +0000 Subject: r20517: re-add cleaned-up webapps (This used to be commit 5a3d6ad0b7cf0ecf8b57b4088b19f7d4291c990b) --- .../frontend/demo/tool/layout.js.in | 118 +++++++++++++++++++++ .../qooxdoo-0.6.3-sdk/frontend/demo/tool/layout.sh | 50 +++++++++ 2 files changed, 168 insertions(+) create mode 100644 webapps/qooxdoo-0.6.3-sdk/frontend/demo/tool/layout.js.in create mode 100755 webapps/qooxdoo-0.6.3-sdk/frontend/demo/tool/layout.sh (limited to 'webapps/qooxdoo-0.6.3-sdk/frontend/demo/tool') diff --git a/webapps/qooxdoo-0.6.3-sdk/frontend/demo/tool/layout.js.in b/webapps/qooxdoo-0.6.3-sdk/frontend/demo/tool/layout.js.in new file mode 100644 index 0000000000..dcd32b5b28 --- /dev/null +++ b/webapps/qooxdoo-0.6.3-sdk/frontend/demo/tool/layout.js.in @@ -0,0 +1,118 @@ +(function() +{ + var pos = Number(window.location.href.substring(window.location.href.lastIndexOf("/")+1, window.location.href.length-5)); + var tnpos = pos + 1; + var tppos = pos - 1; + + if (tnpos < 10) + tnpos = String("000" + tnpos) + else if (tnpos < 100) + tnpos = String("00" + tnpos) + else if (tnpos < 1000) + tnpos = String("0" + tnpos) + else + tnpos = String(tnpos) + + if (tppos < 10) + tppos = String("000" + tppos) + else if (tppos < 100) + tppos = String("00" + tppos) + else if (tppos < 1000) + tppos = String("0" + tppos) + else + tppos = String(tppos) + + + document.write('
qooxdoo: The new era of web development
'); + document.write('
'); + + if( /\/showcase\//.test(window.location.href) ) { + document.write('Selected: Showcase | '); + document.write('[Back to overview]  '); + } else if( /\/example\//.test(window.location.href) ) { + document.write('Selected: Example | '); + document.write('[Back to overview]  '); + } else if( /\/performance\//.test(window.location.href) ) { + document.write('Selected: Performance | '); + document.write('[Back to overview]  '); + } else { + document.write('Selected: Test | '); + document.write('[Back to overview]  '); + }; + + document.write('[Global Pollution]  '); + document.write('[Object Summary]  '); + + document.write('
'); + document.write('
'); + document.write('
 
'); + + qx.dev.log.Logger.ROOT_LOGGER.removeAllAppenders(); + qx.dev.log.Logger.ROOT_LOGGER.addAppender(new qx.dev.log.DivAppender("demoDebug")); + + function showTestFiles() + { + var str = ""; + if( window.location.href.search(/\/showcase\//)+1 ) { + str = showstr; + } + else if( window.location.href.search(/\/example\//)+1 ) { + str = exastr; + } + else if( window.location.href.search(/\/performance\//)+1 ) { + str = perfstr; + } + else if( window.location.href.search(/\/test\//)+1 ) { + str = teststr; + } + + var arr = str.split(" "); + var p = window.location.pathname.replace(/\\/g, "/"); + var sel = -1; + + document.writeln(''); + + if (sel != -1) + { + document.writeln('
'); + + if (sel > 1) { + document.writeln(""); + } + + if (sel < arr.length-1) { + document.writeln(""); + } + + document.writeln('
'); + }; + } + + var url = location.href; + var pos = url.indexOf("/html/")+6; + var split = url.substring(pos).split("/"); + var category = split[0]; + category = category.charAt(0).toUpperCase() + category.substring(1); + var pagename = split[1].replace(".html", "").replace(/_/g, " "); + pagename = pagename.charAt(0).toUpperCase() + pagename.substring(1); + + document.title = "qooxdoo » Demo » " + category + " » " + pagename; + + if (window.location.href.indexOf("demo.qooxdoo.org") != -1) + { + document.write(''); + document.write(''); + document.write(''); + document.write(''); + } +//})(); diff --git a/webapps/qooxdoo-0.6.3-sdk/frontend/demo/tool/layout.sh b/webapps/qooxdoo-0.6.3-sdk/frontend/demo/tool/layout.sh new file mode 100755 index 0000000000..b30d283b65 --- /dev/null +++ b/webapps/qooxdoo-0.6.3-sdk/frontend/demo/tool/layout.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash + +BASE="tool/layout.js.in" +DIST="$1" +SCAN="$2" +TITLE="$3" + +mkdir -p `dirname $DIST` + +cat $BASE > $DIST + +showstr="" +for file in $SCAN/showcase/*.html ; +do + if [ `basename $file` != "index.html" ]; then + showstr="$showstr `basename $file`"; + fi +done +echo "var showstr = \"$showstr\";" >> $DIST + +exastr="" +for file in $SCAN/example/*.html ; +do + if [ `basename $file` != "index.html" ]; then + exastr="$exastr `basename $file`"; + fi +done +echo "var exastr = \"$exastr\";" >> $DIST + +perfstr="" +for file in $SCAN/performance/*.html ; +do + if [ `basename $file` != "index.html" ]; then + perfstr="$perfstr `basename $file`"; + fi +done +echo "var perfstr = \"$perfstr\";" >> $DIST + +teststr="" +for file in $SCAN/test/*.html ; +do + if [ `basename $file` != "index.html" ]; then + teststr="$teststr `basename $file`"; + fi +done +echo "var teststr = \"$teststr\";" >> $DIST + +echo "showTestFiles();" >> $DIST + +echo "})();" >> $DIST -- cgit