summaryrefslogtreecommitdiff
path: root/webapps/qooxdoo-0.6.3-sdk/frontend/demo/tool
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@samba.org>2007-01-03 20:17:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:36:09 -0500
commit626bb8efb0c825f332c937ffaaadc9b402079539 (patch)
tree1c95f69d157b24f64edff470143f5f55a09cfca6 /webapps/qooxdoo-0.6.3-sdk/frontend/demo/tool
parenteeddcf8cc8eb655d7c40f1fd5f7fd422529f4f98 (diff)
downloadsamba-626bb8efb0c825f332c937ffaaadc9b402079539.tar.gz
samba-626bb8efb0c825f332c937ffaaadc9b402079539.tar.bz2
samba-626bb8efb0c825f332c937ffaaadc9b402079539.zip
r20517: re-add cleaned-up webapps
(This used to be commit 5a3d6ad0b7cf0ecf8b57b4088b19f7d4291c990b)
Diffstat (limited to 'webapps/qooxdoo-0.6.3-sdk/frontend/demo/tool')
-rw-r--r--webapps/qooxdoo-0.6.3-sdk/frontend/demo/tool/layout.js.in118
-rwxr-xr-xwebapps/qooxdoo-0.6.3-sdk/frontend/demo/tool/layout.sh50
2 files changed, 168 insertions, 0 deletions
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('<div id="demoHead">qooxdoo: <span>The new era of web development</span></div>');
+ document.write('<div id="demoFoot">');
+
+ if( /\/showcase\//.test(window.location.href) ) {
+ document.write('Selected: Showcase | ');
+ document.write('[<a href="../../index.html">Back to overview</a>] &#160;');
+ } else if( /\/example\//.test(window.location.href) ) {
+ document.write('Selected: Example | ');
+ document.write('[<a href="../../index.html">Back to overview</a>] &#160;');
+ } else if( /\/performance\//.test(window.location.href) ) {
+ document.write('Selected: Performance | ');
+ document.write('[<a href="../../index.html">Back to overview</a>] &#160;');
+ } else {
+ document.write('Selected: Test | ');
+ document.write('[<a href="../../index.html">Back to overview</a>] &#160;');
+ };
+
+ document.write('[<a href="javascript:qx.dev.Pollution.consoleInfo(\'window\');">Global Pollution</a>] &#160;');
+ document.write('[<a href="javascript:qx.core.Object.summary();">Object Summary</a>] &#160;');
+
+ document.write('</div>');
+ document.write('<div id="demoDebug"></div>');
+ document.write('<div id="demoFrame">&#160;</div>');
+
+ 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('<select id="demoFiles" onchange="if(this.options[this.selectedIndex].value)window.location.href=this.options[this.selectedIndex].value">');
+ document.writeln('<option value=""></option>');
+ for( var i=1; i<arr.length; i++ ) {
+ document.write('<option value="' + arr[i] + '"');
+ if(p.search(new RegExp( "\/" + arr[i]) )+1) {
+ document.write(' selected="selected"');
+ sel = i;
+ }
+ document.writeln('>' + arr[i].replace(/_/g, " ").replace(/\.html/, "") + '</option>');
+ }
+ document.writeln('</select>');
+
+ if (sel != -1)
+ {
+ document.writeln('<div id="demoJump">');
+
+ if (sel > 1) {
+ document.writeln("<button onclick='window.location.href=\"" + arr[sel-1] + "\"'>&lt;</button>");
+ }
+
+ if (sel < arr.length-1) {
+ document.writeln("<button onclick='window.location.href=\"" + arr[sel+1] + "\"'>&gt;</button>");
+ }
+
+ document.writeln('</div>');
+ };
+ }
+
+ 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('<script type="text/javascript">var a_vars = []; var pagename=""; var phpmyvisitesSite = 5; var phpmyvisitesURL = "http://counter.qooxdoo.org/phpmyvisites.php";</script>');
+ document.write('<script type="text/javascript" src="http://counter.qooxdoo.org/phpmyvisites.js"></script>');
+ document.write('<script type="text/javascript" src="http://www.google-analytics.com/urchin.js"></script>');
+ document.write('<script type="text/javascript">_uacct = "UA-415440-1"; function urchinStart() { urchinTracker() }; if (window.addEventListener)window.addEventListener("load", urchinStart, false); else if(window.attachEvent)window.attachEvent("onload", urchinStart);</script>');
+ }
+//})();
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