From 2d73791e1d6fe81a262df6ffcc06875462d585b7 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Mon, 13 Jun 2011 07:57:39 +0000 Subject: Add the ability to configure page headers and footers. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1135049 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/.gitignore | 2 +- .../trunk/modules/edit/htdocs/account/index.html | 20 ++++--- .../modules/edit/htdocs/app/cache-manifest.cmf.off | 4 +- sca-cpp/trunk/modules/edit/htdocs/app/frame.html | 31 +++++++++++ sca-cpp/trunk/modules/edit/htdocs/app/index.html | 49 ++++++++-------- .../trunk/modules/edit/htdocs/cache-manifest.cmf | 6 +- sca-cpp/trunk/modules/edit/htdocs/clone/index.html | 20 ++++--- .../trunk/modules/edit/htdocs/create/index.html | 20 ++++--- sca-cpp/trunk/modules/edit/htdocs/data/index.html | 11 ++-- sca-cpp/trunk/modules/edit/htdocs/graph/graph.js | 8 +-- sca-cpp/trunk/modules/edit/htdocs/graph/index.html | 28 ++++++---- sca-cpp/trunk/modules/edit/htdocs/index.html | 20 ++++--- sca-cpp/trunk/modules/edit/htdocs/login/index.html | 10 +--- .../trunk/modules/edit/htdocs/logout/index.html | 10 +--- sca-cpp/trunk/modules/edit/htdocs/page/index.html | 41 +++++++++----- .../trunk/modules/edit/htdocs/public/notauth.html | 18 +++--- .../trunk/modules/edit/htdocs/public/notfound.html | 18 +++--- .../trunk/modules/edit/htdocs/public/notyet.html | 17 +++--- sca-cpp/trunk/modules/edit/htdocs/public/oops.html | 18 +++--- sca-cpp/trunk/modules/edit/htdocs/stats/index.html | 20 ++++--- sca-cpp/trunk/modules/edit/htdocs/store/index.html | 20 ++++--- sca-cpp/trunk/modules/edit/ssl-start | 8 ++- sca-cpp/trunk/modules/edit/start | 8 ++- sca-cpp/trunk/modules/http/httpd-conf | 9 +-- sca-cpp/trunk/modules/js/htdocs/all-min.js | 9 +-- sca-cpp/trunk/modules/js/htdocs/ui-min.css | 24 +------- sca-cpp/trunk/modules/js/htdocs/ui.css | 26 ++++----- sca-cpp/trunk/modules/js/htdocs/ui.js | 65 ++++++---------------- sca-cpp/trunk/modules/js/htdocs/util.js | 2 +- 29 files changed, 273 insertions(+), 269 deletions(-) create mode 100644 sca-cpp/trunk/modules/edit/htdocs/app/frame.html (limited to 'sca-cpp') diff --git a/sca-cpp/trunk/.gitignore b/sca-cpp/trunk/.gitignore index 5f4c10c77b..fc9d3bd147 100644 --- a/sca-cpp/trunk/.gitignore +++ b/sca-cpp/trunk/.gitignore @@ -55,7 +55,7 @@ m4/ config.guess config.sub config.status -config.js +*config.js all.js intro*.png depcomp diff --git a/sca-cpp/trunk/modules/edit/htdocs/account/index.html b/sca-cpp/trunk/modules/edit/htdocs/account/index.html index 8f23b8c59c..d83ca4562b 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/account/index.html +++ b/sca-cpp/trunk/modules/edit/htdocs/account/index.html @@ -25,13 +25,16 @@ - - +
+
+ +
+ @@ -47,7 +50,7 @@
-
+ @@ -93,8 +96,6 @@
Photo:
-
- +
+ +
+ + diff --git a/sca-cpp/trunk/modules/edit/htdocs/app/cache-manifest.cmf.off b/sca-cpp/trunk/modules/edit/htdocs/app/cache-manifest.cmf.off index bd44d87aa1..58371aa6b5 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/app/cache-manifest.cmf.off +++ b/sca-cpp/trunk/modules/edit/htdocs/app/cache-manifest.cmf.off @@ -2,7 +2,6 @@ CACHE MANIFEST # Common resources /all-min.js -/config.js /ui-min.css # App resources @@ -10,6 +9,9 @@ CACHE MANIFEST /app.html /data/index.html /favicon.ico +/footconfig.js +/frame.html +/headconfig.js /public/app.png /public/iframe.html /public/img.png diff --git a/sca-cpp/trunk/modules/edit/htdocs/app/frame.html b/sca-cpp/trunk/modules/edit/htdocs/app/frame.html new file mode 100644 index 0000000000..7e313d2138 --- /dev/null +++ b/sca-cpp/trunk/modules/edit/htdocs/app/frame.html @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + diff --git a/sca-cpp/trunk/modules/edit/htdocs/app/index.html b/sca-cpp/trunk/modules/edit/htdocs/app/index.html index 570d1e00f1..8d0a3f7153 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/app/index.html +++ b/sca-cpp/trunk/modules/edit/htdocs/app/index.html @@ -19,7 +19,7 @@ --> -App + @@ -28,26 +28,29 @@ document.title = window.location.hostname.split('.')[0]; - - - +
-
+
+ +
- - +
+ +
+ + +
+ +
+ +
diff --git a/sca-cpp/trunk/modules/edit/htdocs/cache-manifest.cmf b/sca-cpp/trunk/modules/edit/htdocs/cache-manifest.cmf index 3f331a4e5d..8e6e666844 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/cache-manifest.cmf +++ b/sca-cpp/trunk/modules/edit/htdocs/cache-manifest.cmf @@ -1,8 +1,9 @@ CACHE MANIFEST +# Version 2 + # Common resources /all-min.js -/config.js /ui-min.css # App resources @@ -12,10 +13,11 @@ CACHE MANIFEST /clone/ /data/ /create/ -/data/ /favicon.ico +/footconfig.js /graph/graph.js /graph/ +/headconfig.js /home.png /menu.js /page/ diff --git a/sca-cpp/trunk/modules/edit/htdocs/clone/index.html b/sca-cpp/trunk/modules/edit/htdocs/clone/index.html index 8613992806..5e3922a28e 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/clone/index.html +++ b/sca-cpp/trunk/modules/edit/htdocs/clone/index.html @@ -25,13 +25,16 @@ - - +
+
+ +
+ @@ -46,7 +49,7 @@
-
+ @@ -65,8 +68,6 @@
New App Name:
 
-
- +
+ +
+ + diff --git a/sca-cpp/trunk/modules/edit/htdocs/create/index.html b/sca-cpp/trunk/modules/edit/htdocs/create/index.html index 0195473ca5..8db9d04892 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/create/index.html +++ b/sca-cpp/trunk/modules/edit/htdocs/create/index.html @@ -25,13 +25,16 @@ - - +
+
+ +
+ @@ -44,7 +47,7 @@
-
+ @@ -63,8 +66,6 @@
App Name:
 
-
- +
+ +
+ + diff --git a/sca-cpp/trunk/modules/edit/htdocs/data/index.html b/sca-cpp/trunk/modules/edit/htdocs/data/index.html index 6a9ee416c2..1f583adc3b 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/data/index.html +++ b/sca-cpp/trunk/modules/edit/htdocs/data/index.html @@ -29,10 +29,9 @@ document.title = 'View - ' + window.location.hostname.split('.')[0] + '/' + cn; - - +
@@ -40,7 +39,6 @@ document.title = 'View - ' + window.location.hostname.split('.')[0] + '/' + cn;
+ +
+ +
diff --git a/sca-cpp/trunk/modules/edit/htdocs/graph/graph.js b/sca-cpp/trunk/modules/edit/htdocs/graph/graph.js index 139d4600f9..9d38fe6c6d 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/graph/graph.js +++ b/sca-cpp/trunk/modules/edit/htdocs/graph/graph.js @@ -112,16 +112,16 @@ graph.svgns='http://www.w3.org/2000/svg'; /** * Make an SVG graph. */ -graph.mkgraph = function(pos, cvalue, cadd, cdelete) { +graph.mkgraph = function(cdiv, pos, cvalue, cadd, cdelete) { // Create a div element to host the graph var div = document.createElement('div'); div.id = 'svgdiv'; div.style.position = 'absolute'; - div.style.left = ui.pixpos(pos.xpos()); - div.style.top = ui.pixpos(pos.ypos()); + div.style.left = ui.pixpos(pos.xpos() + cdiv.offsetLeft); + div.style.top = ui.pixpos(pos.ypos() + cdiv.offsetTop); div.style.overflow = 'hidden'; - document.body.appendChild(div); + cdiv.appendChild(div); // Create SVG element var svg = document.createElementNS(graph.svgns, 'svg'); diff --git a/sca-cpp/trunk/modules/edit/htdocs/graph/index.html b/sca-cpp/trunk/modules/edit/htdocs/graph/index.html index b8370ec75a..aea21acf1e 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/graph/index.html +++ b/sca-cpp/trunk/modules/edit/htdocs/graph/index.html @@ -25,14 +25,17 @@ - - +
+
+ +
+ @@ -58,13 +61,12 @@
- diff --git a/sca-cpp/trunk/modules/edit/htdocs/index.html b/sca-cpp/trunk/modules/edit/htdocs/index.html index 612dd5868c..20ccc8f416 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/index.html +++ b/sca-cpp/trunk/modules/edit/htdocs/index.html @@ -25,17 +25,20 @@ - - +
+
+ +
+ - +

@@ -52,8 +55,6 @@
-
- +
+ +
+ +
diff --git a/sca-cpp/trunk/modules/edit/htdocs/login/index.html b/sca-cpp/trunk/modules/edit/htdocs/login/index.html index 22df9ce7ef..4c7c90cea1 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/login/index.html +++ b/sca-cpp/trunk/modules/edit/htdocs/login/index.html @@ -27,7 +27,7 @@ - +

Sign in

@@ -43,13 +43,7 @@ -
- + diff --git a/sca-cpp/trunk/modules/edit/htdocs/logout/index.html b/sca-cpp/trunk/modules/edit/htdocs/logout/index.html index ee07c9bf15..1d6079354b 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/logout/index.html +++ b/sca-cpp/trunk/modules/edit/htdocs/logout/index.html @@ -27,7 +27,7 @@ - +

Sign out

@@ -36,21 +36,15 @@ -
- + diff --git a/sca-cpp/trunk/modules/edit/htdocs/page/index.html b/sca-cpp/trunk/modules/edit/htdocs/page/index.html index 678491f220..0102f4edac 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/page/index.html +++ b/sca-cpp/trunk/modules/edit/htdocs/page/index.html @@ -25,14 +25,17 @@ - - +
+
+ +
+ @@ -58,9 +61,10 @@
-
+
+
-
+
@@ -84,17 +88,15 @@ text frame ... -
- - - - +
- + +
+ +
+ +
diff --git a/sca-cpp/trunk/modules/edit/htdocs/public/notauth.html b/sca-cpp/trunk/modules/edit/htdocs/public/notauth.html index c4db51cfd3..f6daa1b8be 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/public/notauth.html +++ b/sca-cpp/trunk/modules/edit/htdocs/public/notauth.html @@ -24,26 +24,26 @@ - - +
+
+ +
+

-
Sorry, you're not authorized to view this page.
-
-
@@ -55,9 +55,6 @@ $('h1').innerHTML = hometitle(window.location.hostname); if (!issubdomain(window.location.hostname)) displaymenu(); -// Show the page -ui.showbody(); - // Sign out if (window.top.location.pathname != '/public/notauth.html') { function submitSignout() { @@ -71,5 +68,10 @@ if (window.top.location.pathname != '/public/notauth.html') { } +
+ +
+ +
diff --git a/sca-cpp/trunk/modules/edit/htdocs/public/notfound.html b/sca-cpp/trunk/modules/edit/htdocs/public/notfound.html index 9721804eb2..ce9fd94e6e 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/public/notfound.html +++ b/sca-cpp/trunk/modules/edit/htdocs/public/notfound.html @@ -24,27 +24,27 @@ - - +
+
+ +
+

-
Sorry, that page was not found.
You may have clicked an expired link or mistyped the address.
-
- +
+ +
+ + diff --git a/sca-cpp/trunk/modules/edit/htdocs/public/notyet.html b/sca-cpp/trunk/modules/edit/htdocs/public/notyet.html index bec4731415..f6b8db1912 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/public/notyet.html +++ b/sca-cpp/trunk/modules/edit/htdocs/public/notyet.html @@ -24,27 +24,26 @@ - - +
+
+ +

-
Sorry, that page is still under construction.
Please check back later.
-
- +
+ +
+ + diff --git a/sca-cpp/trunk/modules/edit/htdocs/public/oops.html b/sca-cpp/trunk/modules/edit/htdocs/public/oops.html index 305e2c66e1..f8d7bb6747 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/public/oops.html +++ b/sca-cpp/trunk/modules/edit/htdocs/public/oops.html @@ -24,26 +24,26 @@ - - +
+
+ +
+

-
Oops, something went wrong...
-
- +
+ +
+ + diff --git a/sca-cpp/trunk/modules/edit/htdocs/stats/index.html b/sca-cpp/trunk/modules/edit/htdocs/stats/index.html index b676b4b38c..a40f8b7a32 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/stats/index.html +++ b/sca-cpp/trunk/modules/edit/htdocs/stats/index.html @@ -25,13 +25,16 @@ - - +
+
+ +
+ @@ -51,7 +54,7 @@
-
+ @@ -66,8 +69,6 @@
App Icon:
-
- +
+ +
+ + diff --git a/sca-cpp/trunk/modules/edit/htdocs/store/index.html b/sca-cpp/trunk/modules/edit/htdocs/store/index.html index 601a5905b9..ce8b9d1251 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/store/index.html +++ b/sca-cpp/trunk/modules/edit/htdocs/store/index.html @@ -25,25 +25,26 @@ - - +
+
+ +
+ - +

-
- +
+ +
+ + diff --git a/sca-cpp/trunk/modules/edit/ssl-start b/sca-cpp/trunk/modules/edit/ssl-start index 5b982f45ff..c400c8a54a 100755 --- a/sca-cpp/trunk/modules/edit/ssl-start +++ b/sca-cpp/trunk/modules/edit/ssl-start @@ -113,13 +113,15 @@ cat >>tmp/conf/dvhost-ssl.conf <>tmp/conf/dvhost.conf < -# Enable compression +# Configure output filters to enable compression and rate limiting -SetOutputFilter DEFLATE +SetOutputFilter RATE_LIMIT;DEFLATE + BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary Header append Vary User-Agent env=!dont-vary - -# Enable per client bandwidth rate limt - -SetOutputFilter RATE_LIMIT SetEnv rate-limit 400 diff --git a/sca-cpp/trunk/modules/js/htdocs/all-min.js b/sca-cpp/trunk/modules/js/htdocs/all-min.js index b73c9ad5ea..05ae9ce35b 100644 --- a/sca-cpp/trunk/modules/js/htdocs/all-min.js +++ b/sca-cpp/trunk/modules/js/htdocs/all-min.js @@ -46,8 +46,7 @@ function debug(o){try{for(f in o){try{log('debug '+f+'='+o[f]);}catch(e){}}}catc return true;} function isIE(){if(typeof isIE.detected!='undefined') return isIE.detected;isIE.detected=navigator.appName=='Microsoft Internet Explorer';return isIE.detected;};var config;if(isNil(config)) -config={} -function AssertException(){} +config={};function AssertException(){} AssertException.prototype.toString=function(){return'AssertException';};function assert(exp){if(!exp) throw new AssertException();} function writeStrings(l){if(isNil(l)) @@ -277,10 +276,8 @@ return null;};function $(id){if(id==document){if(!isNil(document.widget)) return document.widget;return document;} return ui.elementByID($(document),id);};ui.queryParams=function(){var qp=new Array();var qs=window.location.search.substring(1).split('&');for(var i=0;i0) qp[qs[i].substring(0,e)]=unescape(qs[i].substring(e+1));} -return qp;} -ui.widgets={};ui.onload={};ui.loadwidget=function(el,doc,cb){var f=el+'Frame';window.ui.widgets[f]=el;window.ui.onload[f]=cb;var div=document.createElement('div');div.id=f+'Div';div.innerHTML='';document.body.appendChild(div);return f;};ui.showbody=function(){document.body.style.visibility='visible';};ui.reload=function(){window.open(window.location,'_self');return true;};ui.installwidget=function(){if(isNil(window.parent)||isNil(window.parent.ui)||isNil(window.parent.ui.widgets)) -return true;var pdoc=ui.content(window.parent);for(w in window.parent.ui.widgets){var ww=ui.elementByID(pdoc,w).contentWindow;if(ww==window){document.widget=ui.elementByID(pdoc,window.parent.ui.widgets[w]);document.widget.innerHTML=document.body.innerHTML;return true;}} -return true;};ui.loadiframe=function(el,doc){var f=el+'Frame';$(el).innerHTML='';return f;};ui.numpos=function(p){if(p=='') +return qp;};ui.isMobile=function(){var ua=navigator.userAgent;if(ua.match(/iPhone/i)||ua.match(/iPad/i)||ua.match(/Android/i)||ua.match(/Blackberry/i)||ua.match(/WebOs/i)) +return true;return false;};ui.onload=function(){document.body.style.visibility='visible';document.body.onorientationchange=function(){window.open(window.location,'_self');return true;};return true;};ui.numpos=function(p){if(p=='') return 0;return Number(p.substr(0,p.length-2));};ui.pixpos=function(p){return p+'px';};ui.datatable=function(l){function indent(i){if(i==0) return'';return'  '+indent(i-1);} function rows(l,i){if(isNil(l)) diff --git a/sca-cpp/trunk/modules/js/htdocs/ui-min.css b/sca-cpp/trunk/modules/js/htdocs/ui-min.css index 40301e8e00..c4cdc288a1 100644 --- a/sca-cpp/trunk/modules/js/htdocs/ui-min.css +++ b/sca-cpp/trunk/modules/js/htdocs/ui-min.css @@ -1,21 +1,3 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ body{margin:2px;font-family:"Helvetica Neue", Helvetica;font-style:normal;font-variant:normal;font-size:13px;-webkit-text-size-adjust:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;} .delayed{visibility:hidden;} .devicewidth{position:absolute;top:0px;left:0px;right:0px;height:5000px;overflow:hidden;} @@ -23,6 +5,8 @@ table{border:0px;border-collapse:collapse;border-color:#a2bae7;border-style:soli .trb{border-bottom:1px;border-bottom-style:solid;border-color:#dcdcdc;} th{font-weight:bold;background-color:#e5ecf9;color:#000000;height:18px;text-align:left;padding-left:2px;padding-right:8px;padding-top:0px;padding-bottom:0px;vertical-align:middle;white-space:nowrap;border-top:1px;border-bottom:1px;border-left:1px;border-right:1px;border-style:solid;border-top-color:#a2bae7;border-bottom-color:#d1d3d4;border-left-color:#a2bae7;border-right-color:#a2bae7;overflow:hidden;} .section{font-weight:bold;background-color:#e5ecf9;color:#000000;height:24px;padding-top:1px;padding-bottom:0px;padding-left:2px;padding-right:2px;border-top:1px;border-bottom:1px;border-left:0px;border-right:0px;border-style:solid;border-top-color:#a2bae7;border-bottom-color:#d1d3d4;border-left-color:#a2bae7;border-right-color:#a2bae7;overflow:hidden;} +.hsection{width:100%;height:50px;border-top:0px;border-bottom:1px;border-left:0px;border-right:0px;border-style:solid;border-bottom-color:#000000;background-color:#ffffff;padding:0px;margin-bottom:4px;margin-left:auto;margin-right:auto;text-align:center;} +.fsection{width:100%;height:50px;border-top:0px;border-bottom:0px;border-left:0px;border-right:0px;border-style:solid;border-top-color:#a2bae7;padding:0px;margin-top:4px;margin-left:auto;margin-right:auto;text-align:center;} .text{padding-top:3px;padding-bottom:4px;vertical-align:middle;} .thl{border-left:0px;} .thr{border-right:0px;} @@ -38,8 +22,6 @@ td{padding-left:2px;padding-top:2px;padding-right:8px;white-space:nowrap;vertica .databg{opacity:.6;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";filter:alpha(opacity=60);} .guide{border:1px;border-style:solid;border-color:#c0c0c0;} iframe{border:0px;margin:0px;padding:0px;} -.widgetframe{visibility:hidden;width:0px;height:0px;border:0px;} -.loadedframe{width:100%;height:100%;} .fakeframe{padding:3px;background-color:#dcdcdc;color:#000000;} input{vertical-align:middle;font-family:"Helvetica Neue", Helvetica;font-style:normal;font-variant:normal;font-size:13px;-webkit-text-size-adjust:100%;} textarea{font-family:"Helvetica Neue", Helvetica;font-style:normal;font-variant:normal;font-size:13px;overflow:auto;resize:none;} @@ -68,4 +50,4 @@ img{border:0px;} .suggest{background-color:#e5ecf9;color:#598edd;border-top:1px;border-bottom:1px;border-left:1px;border-right:1px;border-style:solid;border-top-color:#a2bae7;border-bottom-color:#d1d3d4;border-left-color:#d1d3d4;border-right-color:#d1d3d4;position:absolute;overflow:auto;overflow-x:hidden;padding:0px;margin:0px;cursor:default;} .suggestTable{border:0px;border-collapse:separate;padding-left:5px;padding-right:5px;padding-top:2px;padding-bottom:2px;margin:0px;} .suggestItem{padding-left:2px;padding-top:0px;padding-bottom:0px;padding-right:2px;vertical-align:middle;background-color:#e5ecf9;color:#598edd;} -.suggestHilighted{padding-left:2px;padding-top:0px;padding-bottom:0px;padding-right:2px;vertical-align:middle;background-color:#598edd;color:#e5ecf9;} +.suggestHilighted{padding-left:2px;padding-top:0px;padding-bottom:0px;padding-right:2px;vertical-align:middle;background-color:#598edd;color:#e5ecf9;} \ No newline at end of file diff --git a/sca-cpp/trunk/modules/js/htdocs/ui.css b/sca-cpp/trunk/modules/js/htdocs/ui.css index aa03b7570a..0842523bf2 100644 --- a/sca-cpp/trunk/modules/js/htdocs/ui.css +++ b/sca-cpp/trunk/modules/js/htdocs/ui.css @@ -56,6 +56,17 @@ border-top: 1px; border-bottom: 1px; border-left: 0px; border-right: 0px; border overflow: hidden; } +.hsection { +width: 100%; height: 50px; +border-top: 0px; border-bottom: 1px; border-left: 0px; border-right: 0px; border-style: solid; border-bottom-color: #000000; background-color: #ffffff; +padding: 0px; margin-bottom: 4px; margin-left: auto; margin-right: auto; text-align: center; +} + +.fsection{ +width: 100%; height: 50px; border-top: 0px; border-bottom: 0px; border-left: 0px; border-right: 0px; border-style: solid; border-top-color: #a2bae7; +padding: 0px; margin-top: 4px; margin-left: auto; margin-right: auto; text-align: center; +} + .text { padding-top: 3px; padding-bottom: 4px; vertical-align: middle; } @@ -119,14 +130,6 @@ iframe { border: 0px; margin: 0px; padding: 0px; } -.widgetframe { -visibility: hidden; width: 0px; height: 0px; border: 0px; -} - -.loadedframe { -width: 100%; height: 100%; -} - .fakeframe { padding: 3px; background-color: #dcdcdc; color: #000000; } @@ -313,10 +316,3 @@ padding-left: 2px; padding-top: 0px; padding-bottom: 0px; padding-right: 2px; ve padding-left: 2px; padding-top: 0px; padding-bottom: 0px; padding-right: 2px; vertical-align: middle; background-color: #598edd; color: #e5ecf9; } -/* -v\: * { -behavior:url(#default#VML); -display:inline-block; -} -*/ - diff --git a/sca-cpp/trunk/modules/js/htdocs/ui.js b/sca-cpp/trunk/modules/js/htdocs/ui.js index b0d159d07e..b5843d8916 100644 --- a/sca-cpp/trunk/modules/js/htdocs/ui.js +++ b/sca-cpp/trunk/modules/js/htdocs/ui.js @@ -228,66 +228,33 @@ ui.queryParams = function() { qp[qs[i].substring(0, e)] = unescape(qs[i].substring(e + 1)); } return qp; -} - -/** - * Bind a widget iframe to an element. - */ -ui.widgets = {}; -ui.onload = {}; - -ui.loadwidget = function(el, doc, cb) { - var f = el + 'Frame'; - window.ui.widgets[f] = el; - window.ui.onload[f] = cb; - var div = document.createElement('div'); - div.id = f + 'Div'; - div.innerHTML = ''; - document.body.appendChild(div); - return f; }; /** - * Show the current document body. + * Return true if the client is a mobile device. */ -ui.showbody = function() { - document.body.style.visibility = 'visible'; +ui.isMobile = function() { + var ua = navigator.userAgent; + if (ua.match(/iPhone/i) || ua.match(/iPad/i) || ua.match(/Android/i) || ua.match(/Blackberry/i) || ua.match(/WebOs/i)) + return true; + return false; }; /** - * Reload the current page. + * Initialize a document after it's loaded. */ -ui.reload = function() { - window.open(window.location, '_self'); - return true; -}; +ui.onload = function() { -/** - * Install a widget into the element bound to its iframe. - */ -ui.installwidget = function() { - if (isNil(window.parent) || isNil(window.parent.ui) || isNil(window.parent.ui.widgets)) + // Make the document visible + document.body.style.visibility = 'visible'; + + // Install orientation handler + document.body.onorientationchange = function() { + window.open(window.location, '_self'); return true; - var pdoc = ui.content(window.parent); - for (w in window.parent.ui.widgets) { - var ww = ui.elementByID(pdoc, w).contentWindow; - if (ww == window) { - document.widget = ui.elementByID(pdoc, window.parent.ui.widgets[w]); - document.widget.innerHTML = document.body.innerHTML; - return true; - } - } - return true; -}; + }; -/** - * Load an iframe into an element. - */ -ui.loadiframe = function(el, doc) { - var f = el + 'Frame'; - $(el).innerHTML = - ''; - return f; + return true; }; /** diff --git a/sca-cpp/trunk/modules/js/htdocs/util.js b/sca-cpp/trunk/modules/js/htdocs/util.js index b74eedc6ed..4c09b2b13c 100644 --- a/sca-cpp/trunk/modules/js/htdocs/util.js +++ b/sca-cpp/trunk/modules/js/htdocs/util.js @@ -222,7 +222,7 @@ function isIE() { */ var config; if (isNil(config)) - config = {} + config = {}; /** * Simple assert function. -- cgit v1.2.3