summaryrefslogtreecommitdiffstats
path: root/sca-cpp
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-06-13 07:57:39 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-06-13 07:57:39 +0000
commit2d73791e1d6fe81a262df6ffcc06875462d585b7 (patch)
treeb8a9bfb3fb75ec1a4613489e0515a7066dc6adb0 /sca-cpp
parentd3bdc051ec4a6499c73d00e80f744aa375a01687 (diff)
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
Diffstat (limited to 'sca-cpp')
-rw-r--r--sca-cpp/trunk/.gitignore2
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/account/index.html20
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/app/cache-manifest.cmf.off4
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/app/frame.html31
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/app/index.html49
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/cache-manifest.cmf6
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/clone/index.html20
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/create/index.html20
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/data/index.html11
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/graph/graph.js8
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/graph/index.html28
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/index.html20
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/login/index.html10
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/logout/index.html10
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/page/index.html41
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/public/notauth.html18
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/public/notfound.html18
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/public/notyet.html17
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/public/oops.html18
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/stats/index.html20
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/store/index.html20
-rwxr-xr-xsca-cpp/trunk/modules/edit/ssl-start8
-rwxr-xr-xsca-cpp/trunk/modules/edit/start8
-rwxr-xr-xsca-cpp/trunk/modules/http/httpd-conf9
-rw-r--r--sca-cpp/trunk/modules/js/htdocs/all-min.js9
-rw-r--r--sca-cpp/trunk/modules/js/htdocs/ui-min.css24
-rw-r--r--sca-cpp/trunk/modules/js/htdocs/ui.css26
-rw-r--r--sca-cpp/trunk/modules/js/htdocs/ui.js65
-rw-r--r--sca-cpp/trunk/modules/js/htdocs/util.js2
29 files changed, 273 insertions, 269 deletions
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 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<link rel="apple-touch-icon" href="/public/touchicon.png"/>
<link rel="stylesheet" type="text/css" href="/ui-min.css"/>
-<script type="text/javascript" src="/config.js"></script>
<script type="text/javascript" src="/all-min.js"></script>
<script type="text/javascript" src="/menu.js"></script>
</head>
-<body class="delayed" onorientationchange="ui.reload();">
+<body class="delayed" onload="ui.onload();">
<div id="bodydiv" class="devicewidth">
+<div id="headdiv" class="hsection">
+<script type="text/javascript" src="/headconfig.js"></script>
+</div>
+
<div id="menu"></div>
<table style="width: 100%;">
@@ -47,7 +50,7 @@
</tr>
</table>
-<form id="userForm" style="position: absolute; top: 90px; left: 0px; width: 100%">
+<form id="userForm">
<table style="width: 100%;">
<tr><tr><td><b>Photo:</b></td></tr>
<tr><td><img src="/public/app.png" style="width: 50px; height: 50px; vertical-align: top;"></td></tr>
@@ -93,8 +96,6 @@
</table>
</form>
-</div>
-
<script type="text/javascript">
// Init service references
var editWidget = sca.component("EditWidget");
@@ -111,9 +112,6 @@ $('userNameHeader').innerHTML = username;
// Load the menu bar
displaymenu();
-// Show the page
-ui.showbody();
-
/**
* The current account entry and corresponding saved XML content.
*/
@@ -219,9 +217,13 @@ $('userForm').onsubmit = function() {
// Get the user's account
getaccount(username);
-
</script>
+<div id="footdiv" class="fsection">
+<script type="text/javascript" src="/footconfig.js"></script>
+</div>
+
+</div>
</body>
</html>
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 @@
+<!DOCTYPE html>
+<!--
+ * 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.
+-->
+<html>
+<head>
+<title></title>
+<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0"/>
+<meta name="apple-mobile-web-app-capable" content="yes"/>
+<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
+<link rel="stylesheet" type="text/css" href="/ui-min.css"/>
+</head>
+<body>
+</body>
+</html>
+
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 @@
-->
<html>
<head>
-<title>App</title>
+<title></title>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
@@ -28,26 +28,29 @@ document.title = window.location.hostname.split('.')[0];
</script>
<link rel="apple-touch-icon" href="/public/touchicon.png"/>
<link rel="stylesheet" type="text/css" href="/ui-min.css"/>
-<script type="text/javascript" src="/config.js"></script>
<script type="text/javascript" src="/all-min.js"></script>
</head>
-<body class="delayed" onorientationchange="ui.reload();">
-
+<body class="delayed" onload="ui.onload();">
<div id="bodydiv" class="devicewidth">
-<div id="app"></div>
+<div id="headdiv" class="hsection">
+<script type="text/javascript" src="/headconfig.js"></script>
+</div>
-<span id="appbuffer"></span>
-<span id="appebuffer"></span>
+<div id="app">
+<iframe id="appframe" style="position: relative; height: 5000px; width: 100%;" scrolling="no" frameborder="0" src="/frame.html"></iframe>
+</div>
+<div id="appbuffer" style="visibility: hidden">
</div>
<script type="text/javascript">
-
/**
* The main app div.
*/
var appdiv = $('app');
+var appframe = $('appframe');
+var appbody;
/**
* Start, stop, timer, animation and location components.
@@ -214,7 +217,7 @@ function updatepage(l) {
return e;
}
- map(updatewidget, filter(function(e) { return !isNil(e.id) && e.id.substring(0, 5) != 'page:'; }, nodeList(ui.elementByID(appdiv, 'page').childNodes)));
+ map(updatewidget, filter(function(e) { return !isNil(e.id) && e.id.substring(0, 5) != 'page:'; }, nodeList(ui.elementByID(appbody, 'page').childNodes)));
return true;
}
@@ -317,9 +320,6 @@ function getpagedata() {
// Display component data on the page
function displaypage(doc) {
updatepage(docdata(doc));
-
- // Reveal the page
- ui.showbody();
return true;
}
@@ -345,17 +345,13 @@ function getpagedata() {
var doc = getdoc(startcomp, 'start', window.location.search);
// Prepare app HTML page
- var appFrame = $('appFrame');
- if (!isNil(appFrame.contentDocument.body)) {
- appdiv.innerHTML = appFrame.contentDocument.body.innerHTML;
- } else {
- $('appebuffer').appendChild(appFrame.contentDocument.documentElement);
- appdiv.innerHTML = appebuffer.innerHTML;
- appebuffer.innerHTML = '';
- }
+ appbody = appframe.contentDocument.body;
+ var appbufferbody = $('appbufferframe').contentDocument.body;
+ appbody.innerHTML = appbufferbody.innerHTML;
+ appbufferbody.innerHTML = '';
// Setup the widgets
- map(setupwidget, filter(function(e) { return !isNil(e.id); }, nodeList(ui.elementByID(appdiv, 'page').childNodes)));
+ map(setupwidget, filter(function(e) { return !isNil(e.id); }, nodeList(ui.elementByID(appbody, 'page').childNodes)));
// Display data on the page
displaypage(doc);
@@ -385,7 +381,7 @@ function compquery() {
return append(nodeList(n.childNodes), reduce(append, mklist(), map(childrenList, nodeList(n.childNodes))));
}
- var args = map(queryarg, filter(function(e) { return !isNil(e.id) && !isNil(inputvalue(e)); }, childrenList(ui.elementByID(appdiv, 'page'))));
+ var args = map(queryarg, filter(function(e) { return !isNil(e.id) && !isNil(inputvalue(e)); }, childrenList(ui.elementByID(appbody, 'page'))));
// Append current location properties if known
if (!isNil(geoposition)) {
@@ -550,9 +546,14 @@ function setupLocationHandler() {
}
// Load the app frame
-$('appbuffer').innerHTML = '<iframe id="appFrame" class="widgetframe" src="app.html" onload="getpagedata()"></iframe>';
-
+$('appbuffer').innerHTML = '<iframe id="appbufferframe" style="position: relative; height: 5000px; width: 100%;" scrolling="no" frameborder="0" src="app.html" onload="getpagedata()"></iframe>';
</script>
+
+<div id="footdiv" class="fsection">
+<script type="text/javascript" src="/footconfig.js"></script>
+</div>
+
+</div>
</body>
</html>
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 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<link rel="apple-touch-icon" href="/public/touchicon.png"/>
<link rel="stylesheet" type="text/css" href="/ui-min.css"/>
-<script type="text/javascript" src="/config.js"></script>
<script type="text/javascript" src="/all-min.js"></script>
<script type="text/javascript" src="/menu.js"></script>
</head>
-<body class="delayed" onorientationchange="ui.reload();">
+<body class="delayed" onload="ui.onload();">
<div id="bodydiv" class="devicewidth">
+<div id="headdiv" class="hsection">
+<script type="text/javascript" src="/headconfig.js"></script>
+</div>
+
<div id="menu"></div>
<table style="width: 100%;">
@@ -46,7 +49,7 @@
</tr>
</table>
-<form id="cloneAppForm" style="position: absolute; top: 90px; left: 0px;">
+<form id="cloneAppForm">
<table style="width: 100%;">
<tr><td><b>New App Name:</b></td></tr>
<tr><td><input type="text" id="appName" size="15" autocapitalize="off" placeholder="Your app name"/>&nbsp;<span id="appDomain"></span></td></tr>
@@ -65,8 +68,6 @@
</table>
</form>
-</div>
-
<script type="text/javascript">
// Get the app name
var appname = ui.queryParams()['app'];
@@ -101,9 +102,6 @@ displaymenu();
// Init form
$('appDomain').innerHTML = '.' + window.location.hostname;
-// Show the page
-ui.showbody();
-
// Init service references
var editWidget = sca.component("EditWidget");
var dashboards = sca.reference(editWidget, "dashboards");
@@ -159,9 +157,13 @@ $('cloneAppCancelButton').onclick = function() {
// Get the current app
getapp(appname);
-
</script>
+<div id="footdiv" class="fsection">
+<script type="text/javascript" src="/footconfig.js"></script>
+</div>
+
+</div>
</body>
</html>
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 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<link rel="apple-touch-icon" href="/public/touchicon.png"/>
<link rel="stylesheet" type="text/css" href="/ui-min.css"/>
-<script type="text/javascript" src="/config.js"></script>
<script type="text/javascript" src="/all-min.js"></script>
<script type="text/javascript" src="/menu.js"></script>
</head>
-<body class="delayed" onorientationchange="ui.reload();">
+<body class="delayed" onload="ui.onload();">
<div id="bodydiv" class="devicewidth">
+<div id="headdiv" class="hsection">
+<script type="text/javascript" src="/headconfig.js"></script>
+</div>
+
<div id="menu"></div>
<table style="width: 100%;">
@@ -44,7 +47,7 @@
</tr>
</table>
-<form id="createAppForm" style="position: absolute; top: 90px; left: 0px;">
+<form id="createAppForm">
<table style="width: 100%;">
<tr><td><b>App Name:</b></td></tr>
<tr><td><input type="text" id="appName" size="15" autocapitalize="off" placeholder="Your app name"/>&nbsp;<span id="appDomain"></span></td></tr>
@@ -63,8 +66,6 @@
</table>
</form>
-</div>
-
<script type="text/javascript">
// Set page titles
document.title = windowtitle(window.location.hostname) + ' - Create App';
@@ -76,9 +77,6 @@ displaymenu();
// Init form
$('appDomain').innerHTML = '.' + window.location.hostname;
-// Show the page
-ui.showbody();
-
// Init service references
var editWidget = sca.component("EditWidget");
var dashboards = sca.reference(editWidget, "dashboards");
@@ -109,9 +107,13 @@ $('createAppForm').onsubmit = function() {
$('createAppCancelButton').onclick = function() {
return window.open('/store/', '_self');
};
-
</script>
+<div id="footdiv" class="fsection">
+<script type="text/javascript" src="/footconfig.js"></script>
+</div>
+
+</div>
</body>
</html>
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;
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<link rel="apple-touch-icon" href="/public/touchicon.png"/>
<link rel="stylesheet" type="text/css" href="/ui-min.css">
-<script type="text/javascript" src="/config.js"></script>
<script type="text/javascript" src="/all-min.js"></script>
</head>
-<body class="delayed" onorientationchange="ui.reload();">
+<body class="delayed" onload="ui.onload();">
<div id="bodydiv" style="position: absolute; top: 0px; left: 0px; right: 0px;">
<div id="compLinkHeader" style="margin-top: 4px; margin-bottom: 4px;"></div>
@@ -40,7 +39,6 @@ document.title = 'View - ' + window.location.hostname.split('.')[0] + '/' + cn;
</div>
<script type="text/javascript">
-
// Get the component name
var cname = ui.queryParams()['component'];
@@ -54,8 +52,6 @@ var comp = sca.component(cname);
*/
function display(e) {
$('datadiv').innerHTML = e;
-
- ui.showbody();
return true;
}
@@ -93,7 +89,10 @@ function getdata() {
}
getdata();
-
</script>
+
+<div id="footdiv" class="fsection">
+<script type="text/javascript" src="/footconfig.js"></script>
+</div>
</body>
</html>
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 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<link rel="apple-touch-icon" href="/public/touchicon.png"/>
<link rel="stylesheet" type="text/css" href="/ui-min.css"/>
-<script type="text/javascript" src="/config.js"></script>
<script type="text/javascript" src="/all-min.js"></script>
<script type="text/javascript" src="/menu.js"></script>
<script type="text/javascript" src="graph.js"></script>
</head>
-<body class="delayed" onorientationchange="ui.reload();">
+<body class="delayed" onload="ui.onload();">
<div id="bodydiv" class="devicewidth">
+<div id="headdiv" class="hsection">
+<script type="text/javascript" src="/headconfig.js"></script>
+</div>
+
<div id="menu"></div>
<table style="width: 100%;">
@@ -58,13 +61,12 @@
</tr>
</table>
-<div id="playdiv" style="position:absolute; top: 95px; left: 0px; right: 0px; height: 5000px; visibility: hidden">
+<div id="contentdiv" style="margin-top: 4px; width: 100%;">
+<div id="playdiv" style="position:relative; top: 0x; left: 0px; right: 0px; height: 5000px; visibility: hidden">
</div>
-
</div>
<script type="text/javascript">
-
// Get the app name
var appname = ui.queryParams()['app'];
var ispalette = false;
@@ -118,9 +120,6 @@ function resizeFields() {
resizeFields();
window.onresize = resizeFields;
-// Show the page
-ui.showbody();
-
// Init componnent references
var editWidget = sca.component("EditWidget");
var palettes = sca.reference(editWidget, "palettes");
@@ -143,8 +142,13 @@ var gdiv;
var bg;
var gvisible = true;
var gcomp = null;
+var cdiv = $('contentdiv');
var pdiv = $('playdiv');
+// Position play div inside the content div
+pdiv.style.position = 'absolute';
+pdiv.style.top = cdiv.offsetTop + 'px';
+
/**
* Track the palettes.
*/
@@ -372,7 +376,7 @@ cplay.onclick = function() {
}
// Create editor graph area
-g = graph.mkgraph(graph.mkpath().move(-2500,95), cvalue, cadd, cdelete);
+g = graph.mkgraph(cdiv, graph.mkpath().move(-2500,0), cvalue, cadd, cdelete);
gdiv = g.parentNode;
bg = graph.mkgroup(graph.mkpath());
@@ -395,9 +399,13 @@ installpalette('python', pos.rmove(0, 35), g, bg, spalette, gpalettes);
// Get and display the current app
getapp(appname, g);
-
</script>
+<div id="footdiv" class="fsection">
+<script type="text/javascript" src="/footconfig.js"></script>
+</div>
+
+</div>
</body>
</html>
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 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<link rel="apple-touch-icon" href="/public/touchicon.png"/>
<link rel="stylesheet" type="text/css" href="/ui-min.css"/>
-<script type="text/javascript" src="/config.js"></script>
<script type="text/javascript" src="/all-min.js"></script>
<script type="text/javascript" src="/menu.js"></script>
</head>
-<body class="delayed" onorientationchange="ui.reload();">
+<body class="delayed" onload="ui.onload();">
<div id="bodydiv" class="devicewidth">
+<div id="headdiv" class="hsection">
+<script type="text/javascript" src="/headconfig.js"></script>
+</div>
+
<div id="menu"></div>
<table style="width: 100%;">
-<tr><td><h1><span id="h1"></span></h1></td></tr>
+<tr><td><h2><span id="h1"></span></h2></td></tr>
</table>
<div style="margin-left: auto; margin-right: auto; text-align: center;">
@@ -52,8 +55,6 @@
</div>
-</div>
-
<script type="text/javascript">
// Set page titles
document.title = windowtitle(window.location.hostname);
@@ -76,11 +77,12 @@ setInterval(function() {
bgpos = 0;
diagram.style.backgroundPosition = '0px ' + ui.pixpos(bgpos);
}, 2000);
-
-// Show the page
-ui.showbody();
-
</script>
+<div id="footdiv" class="fsection">
+<script type="text/javascript" src="/footconfig.js"></script>
+</div>
+
+</div>
</body>
</html>
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 @@
<link rel="stylesheet" type="text/css" href="/ui-min.css"/>
<script type="text/javascript" src="/all-min.js"></script>
</head>
-<body class="delayed" onorientationchange="ui.reload();">
+<body class="delayed" onload="ui.onload();">
<div id="bodydiv" class="devicewidth">
<h1>Sign in</h1>
@@ -43,13 +43,7 @@
<input type="hidden" name="httpd_location" value="/"/>
</form>
-</div>
-
<script type="text/javascript">
-
-// Show the page
-ui.showbody();
-
function queryParams() {
qp = new Array();
qs = window.location.search.substring(1).split('&');
@@ -80,8 +74,8 @@ function submitSignin() {
document.formSignin.httpd_location.value = oauthReferrer();
document.formSignin.submit();
}
-
</script>
+</div>
</body>
</html>
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 @@
<link rel="stylesheet" type="text/css" href="/ui-min.css"/>
<script type="text/javascript" src="/all-min.js"></script>
</head>
-<body class="delayed" onorientationchange="ui.reload();">
+<body class="delayed" onload="ui.onload();">
<div id="bodydiv" class="devicewidth">
<h1>Sign out</h1>
@@ -36,21 +36,15 @@
<input type="submit" id="signOut" value="Sign out" class="greenbutton" style="font-weight: bold"/>
</form>
-</div>
-
<script type="text/javascript">
-
-// Show the page
-ui.showbody();
-
function submitSignout() {
var reset = 'TuscanyOpenAuth=;expires=' + new Date(1970,01,01).toGMTString() + ';domain=.' + domainname(window.location.hostname) + ';path=/;secure=TRUE';
document.cookie = reset;
document.signout.submit();
return true;
}
-
</script>
+</div>
</body>
</html>
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 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<link rel="apple-touch-icon" href="/public/touchicon.png"/>
<link rel="stylesheet" type="text/css" href="/ui-min.css"/>
-<script type="text/javascript" src="/config.js"></script>
<script type="text/javascript" src="/all-min.js"></script>
<script type="text/javascript" src="/menu.js"></script>
<script type="text/javascript" src="page.js"></script>
</head>
-<body class="delayed" onorientationchange="ui.reload();">
+<body class="delayed" onload="ui.onload();">
<div id="bodydiv" class="devicewidth">
+<div id="headdiv" class="hsection">
+<script type="text/javascript" src="/headconfig.js"></script>
+</div>
+
<div id="menu"></div>
<table style="width: 100%;">
@@ -58,9 +61,10 @@
</tr>
</table>
-<div id="editdiv" style="position: absolute; top: 95px; left: -2500px; right: 0px; height: 5000px;">
+<div id="contentdiv" style="margin-top: 4px; width: 100%;">
+<div id="editdiv" style="visibility: visible; position: relative; top: 0px; left: -2500px; right: 0px; height: 5000px;">
-<div style="position: absolute; left: 2500px; top: 0px; right: 0px; height: 5000px; border:1px; border-style: solid; border-color: #a2bae7; background: url(/public/grid72.png);"></div>
+<div style="position: relative; left: 2500px; top: 0px; right: 0px; height: 5000px; border:1px; border-style: solid; border-color: #a2bae7; background: url(/public/grid72.png);"></div>
<div class="guide" style="position: absolute; left: 2500px; top: 0px; width: 320px; height: 460px;"></div>
<div class="guide" style="position: absolute; left: 2500px; top: 0px; width: 480px; height: 300px;"></div>
<div class="guide" style="position: absolute; left: 2500px; top: 0px; width: 768px; height: 911px;"></div>
@@ -84,17 +88,15 @@
<span class="text" id="palette:text" style="position: absolute; left: 0px; top: 370px;"><span>text</span></span>
<span class="iframe fakeframe" id="palette:iframe" style="position: absolute; left: 0px; top: 400px; width: 200px;"><a href="/public/iframe.html"><span class="fakeframe"><span>frame ...</span></span></a></span>
<span class="img" id="palette:img" style="position: absolute; left: 0px; top: 430px;"><img src="/public/img.png"/></span>
-
</div>
-<div id="playdiv" style="visibility: hidden; position: absolute; top: 95px; left: 0px; right: 0px; height: 5000px;"></div>
-
-<div id="buffer" style="visibility: hidden; position: absolute; top: 0px; left: 0px; width: 0px; height: 0px"></div>
-
+<div id="playdiv" style="visibility: hidden; position: absolute; top: 0px; left: 0px; right: 0px; height: 5000px;">
+</div>
</div>
-<script type="text/javascript">
+<div id="buffer" style="visibility: hidden; width: 0px; height: 0px"></div>
+<script type="text/javascript">
// Get the app name
var appname = ui.queryParams()['app'];
if (isNil(appname))
@@ -124,6 +126,7 @@ displaymenu();
/**
* Page editor area, widget value field, add, delete and play page buttons.
*/
+var cdiv = $('contentdiv');
var ediv = $('editdiv');
var evisible = true;
var pdiv = $('playdiv');
@@ -132,6 +135,12 @@ var wadd = $('addWidgetButton');
var wdelete = $('deleteWidgetButton');
var pplay = $('playPageButton');
+// Position edit and play divs inside the content div
+ediv.style.position = 'absolute';
+ediv.style.top = cdiv.offsetTop + 'px';
+pdiv.style.position = 'absolute';
+pdiv.style.top = cdiv.offsetTop + 'px';
+
/**
* Adjust fields sizes.
*/
@@ -144,9 +153,6 @@ function resizeFields() {
resizeFields();
window.onresize = resizeFields;
-// Show the page
-ui.showbody();
-
// Init component references
var editWidget = sca.component("EditWidget");
var pages = sca.reference(editWidget, "pages");
@@ -364,7 +370,7 @@ function playpage() {
ediv.style.visibility = 'hidden'
evisible = false;
pdiv.style.visibility = 'visible';
- pdiv.innerHTML = '<iframe id="appFrame" style="position: relative; height: 5000px; width: 100%; border: 0px;" scrolling="no" frameborder="0" src="' +
+ pdiv.innerHTML = '<iframe id="playappframe" style="position: relative; height: 5000px; width: 100%; border: 0px;" scrolling="no" frameborder="0" src="' +
applink(appname) + '"></iframe>';
return true;
}
@@ -399,8 +405,13 @@ page.edit(ediv, wvalue, wadd, wdelete, onpagechange, onwidgetselect);
// Get and display the current app page
getpage(appname, ediv);
-
</script>
+
+<div id="footdiv" class="fsection">
+<script type="text/javascript" src="/footconfig.js"></script>
+</div>
+
+</div>
</body>
</html>
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 @@
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<link rel="stylesheet" type="text/css" href="/ui-min.css"/>
-<script type="text/javascript" src="/config.js"></script>
<script type="text/javascript" src="/all-min.js"></script>
<script type="text/javascript" src="/menu.js"></script>
</head>
-<body class="delayed" onorientationchange="ui.reload();">
+<body class="delayed" onload="ui.onload();">
<div id="bodydiv" class="devicewidth">
+<div id="headdiv" class="hsection">
+<script type="text/javascript" src="/headconfig.js"></script>
+</div>
+
<div id="menu"></div>
<table style="width: 100%;">
<tr><td><h1><span id="h1"></span></h1></td></tr>
</table>
-<br/>
<div style="margin-left: auto; margin-right: auto; text-align: center;">
<div class="hd2">Sorry, you're not authorized to view this page.</div>
</div>
-</div>
-
<form name="signout" action="/public/notauth.html" method="GET">
</form>
@@ -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') {
}
</script>
+<div id="footdiv" class="fsection">
+<script type="text/javascript" src="/footconfig.js"></script>
+</div>
+
+</div>
</body>
</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 @@
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<link rel="stylesheet" type="text/css" href="/ui-min.css"/>
-<script type="text/javascript" src="/config.js"></script>
<script type="text/javascript" src="/all-min.js"></script>
<script type="text/javascript" src="/menu.js"></script>
</head>
-<body class="delayed" onorientationchange="ui.reload();">
+<body class="delayed" onload="ui.onload();">
<div id="bodydiv" class="devicewidth">
+<div id="headdiv" class="hsection">
+<script type="text/javascript" src="/headconfig.js"></script>
+</div>
+
<div id="menu"></div>
<table style="width: 100%;">
<tr><td><h1><span id="h1"></span></h1></td></tr>
</table>
-<br/>
<div style="margin-left: auto; margin-right: auto; text-align: center;">
<div class="hd2">Sorry, that page was not found.</div>
<div>You may have clicked an expired link or mistyped the address.</div>
</div>
-</div>
-
<script type="text/javascript">
// Set page title
$('h1').innerHTML = hometitle(window.location.hostname);
@@ -52,10 +52,12 @@ $('h1').innerHTML = hometitle(window.location.hostname);
// Load the menu bar
if (!issubdomain(window.location.hostname))
displaymenu();
-
-// Show the page
-ui.showbody();
</script>
+<div id="footdiv" class="fsection">
+<script type="text/javascript" src="/footconfig.js"></script>
+</div>
+
+</div>
</body>
</html>
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 @@
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<link rel="stylesheet" type="text/css" href="/ui-min.css"/>
-<script type="text/javascript" src="/config.js"></script>
<script type="text/javascript" src="/all-min.js"></script>
<script type="text/javascript" src="/menu.js"></script>
</head>
-<body class="delayed" onorientationchange="ui.reload();">
+<body class="delayed" onload="ui.onload();">
<div id="bodydiv" class="devicewidth">
+<div id="headdiv" class="hsection">
+<script type="text/javascript" src="/headconfig.js"></script>
+</div>
<div id="menu"></div>
<table style="width: 100%;">
<tr><td><h1><span id="h1"></span></h1></td></tr>
</table>
-<br/>
<div style="margin-left: auto; margin-right: auto; text-align: center;">
<div class="hd2">Sorry, that page is still under construction.</div>
<div>Please check back later.</div>
</div>
-</div>
-
<script type="text/javascript">
// Set page title
$('h1').innerHTML = hometitle(window.location.hostname);
@@ -52,10 +51,12 @@ $('h1').innerHTML = hometitle(window.location.hostname);
// Load the menu bar
if (!issubdomain(window.location.hostname))
displaymenu();
-
-// Show the page
-ui.showbody();
</script>
+<div id="footdiv" class="fsection">
+<script type="text/javascript" src="/footconfig.js"></script>
+</div>
+
+</div>
</body>
</html>
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 @@
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<link rel="stylesheet" type="text/css" href="/ui-min.css"/>
-<script type="text/javascript" src="/config.js"></script>
<script type="text/javascript" src="/all-min.js"></script>
<script type="text/javascript" src="/menu.js"></script>
</head>
-<body class="delayed" onorientationchange="ui.reload();">
+<body class="delayed" onload="ui.onload();">
<div id="bodydiv" class="devicewidth">
+<div id="headdiv" class="hsection">
+<script type="text/javascript" src="/headconfig.js"></script>
+</div>
+
<div id="menu"></div>
<table style="width: 100%;">
<tr><td><h1><span id="h1"></span></h1></td></tr>
</table>
-<br/>
<div style="margin-left: auto; margin-right: auto; text-align: center;">
<div class="hd2">Oops, something went wrong...</div>
</div>
-</div>
-
<script type="text/javascript">
// Set page title
$('h1').innerHTML = hometitle(window.location.hostname);
@@ -51,10 +51,12 @@ $('h1').innerHTML = hometitle(window.location.hostname);
// Load the menu bar
if (!issubdomain(window.location.hostname))
displaymenu();
-
-// Show the page
-ui.showbody();
</script>
+<div id="footdiv" class="fsection">
+<script type="text/javascript" src="/footconfig.js"></script>
+</div>
+
+</div>
</body>
</html>
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 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<link rel="apple-touch-icon" href="/public/touchicon.png"/>
<link rel="stylesheet" type="text/css" href="/ui-min.css"/>
-<script type="text/javascript" src="/config.js"></script>
<script type="text/javascript" src="/all-min.js"></script>
<script type="text/javascript" src="/menu.js"></script>
</head>
-<body class="delayed" onorientationchange="ui.reload();">
+<body class="delayed" onload="ui.onload();">
<div id="bodydiv" class="devicewidth">
+<div id="headdiv" class="hsection">
+<script type="text/javascript" src="/headconfig.js"></script>
+</div>
+
<div id="menu"></div>
<table style="width: 100%;">
@@ -51,7 +54,7 @@
</tr>
</table>
-<form id="appForm" style="position: absolute; top: 90px; left: 0px;">
+<form id="appForm">
<table style="width: 100%;">
<tr><tr><td><b>App Icon:</b></td></tr>
<tr><td><img src="/public/app.png" style="width: 50px; height: 50px; vertical-align: top;"></td></tr>
@@ -66,8 +69,6 @@
</table>
</form>
-</div>
-
<script type="text/javascript">
// Get the app name
var appname = ui.queryParams()['app'];
@@ -98,9 +99,6 @@ $('cloneApp').title = tclone + ' this app';
// Load the menu bar
displaymenu();
-// Show the page
-ui.showbody();
-
// Init service references
var editWidget = sca.component("EditWidget");
var dashboards = sca.reference(editWidget, "dashboards");
@@ -172,9 +170,13 @@ $('cloneApp').onclick = function() {
// Get the current app
getapp(appname);
-
</script>
+<div id="footdiv" class="fsection">
+<script type="text/javascript" src="/footconfig.js"></script>
+</div>
+
+</div>
</body>
</html>
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 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black"/>
<link rel="apple-touch-icon" href="/public/touchicon.png"/>
<link rel="stylesheet" type="text/css" href="/ui-min.css"/>
-<script type="text/javascript" src="/config.js"></script>
<script type="text/javascript" src="/all-min.js"></script>
<script type="text/javascript" src="/menu.js"></script>
</head>
-<body class="delayed" onorientationchange="ui.reload();">
+<body class="delayed" onload="ui.onload();">
<div id="bodydiv" class="devicewidth">
+<div id="headdiv" class="hsection">
+<script type="text/javascript" src="/headconfig.js"></script>
+</div>
+
<div id="menu"></div>
<table style="width: 100%;">
-<tr><td><h1><span id="h1"></span></h1></td></tr>
+<tr><td><h2><span id="h1"></span></h2></td></tr>
</table>
<div id="catmenu"></div>
<div id="apps"></div>
-</div>
-
<script type="text/javascript">
// Set page titles
document.title = windowtitle(window.location.hostname) + ' - Store';
@@ -86,9 +87,6 @@ function catmenu() {
// Build store menu bar
$('catmenu').innerHTML = catmenu();
-// Show the page
-ui.showbody();
-
/**
* Service references.
*/
@@ -177,9 +175,13 @@ function getapps(category) {
// Get and display the list of apps
getapps(category);
-
</script>
+<div id="footdiv" class="fsection">
+<script type="text/javascript" src="/footconfig.js"></script>
+</div>
+
+</div>
</body>
</html>
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 <<EOF
Alias /cache-manifest.cmf $here/htdocs/app/cache-manifest.cmf
Alias /data $here/htdocs/data
Alias /favicon.ico $here/htdocs/favicon.ico
+Alias /footconfig.js $here/htdocs/footconfig.js
+Alias /frame.html $here/htdocs/app/frame.html
+Alias /headconfig.js $here/htdocs/headconfig.js
+Alias /index.html $here/htdocs/app/index.html
Alias /login $here/htdocs/login
Alias /logout $here/htdocs/logout
+Alias /menu.js $here/htdocs/menu.js
Alias /public $here/htdocs/public
Alias /robots.txt $here/htdocs/robots.txt
-Alias /index.html $here/htdocs/app/index.html
-Alias /menu.js $here/htdocs/menu.js
-Alias /config.js $here/htdocs/config.js
EOF
diff --git a/sca-cpp/trunk/modules/edit/start b/sca-cpp/trunk/modules/edit/start
index 048a24387b..554061073b 100755
--- a/sca-cpp/trunk/modules/edit/start
+++ b/sca-cpp/trunk/modules/edit/start
@@ -78,13 +78,15 @@ cat >>tmp/conf/dvhost.conf <<EOF
Alias /cache-manifest.cmf $here/htdocs/app/cache-manifest.cmf
Alias /data $here/htdocs/data
Alias /favicon.ico $here/htdocs/favicon.ico
+Alias /footconfig.js $here/htdocs/footconfig.js
+Alias /frame.html $here/htdocs/app/frame.html
+Alias /headconfig.js $here/htdocs/headconfig.js
+Alias /index.html $here/htdocs/app/index.html
Alias /login $here/htdocs/login
Alias /logout $here/htdocs/logout
+Alias /menu.js $here/htdocs/menu.js
Alias /public $here/htdocs/public
Alias /robots.txt $here/htdocs/robots.txt
-Alias /index.html $here/htdocs/app/index.html
-Alias /menu.js $here/htdocs/menu.js
-Alias /config.js $here/htdocs/config.js
EOF
diff --git a/sca-cpp/trunk/modules/http/httpd-conf b/sca-cpp/trunk/modules/http/httpd-conf
index 199eec8301..769211a125 100755
--- a/sca-cpp/trunk/modules/http/httpd-conf
+++ b/sca-cpp/trunk/modules/http/httpd-conf
@@ -123,19 +123,16 @@ AuthType None
Require all granted
</Location>
-# Enable compression
+# Configure output filters to enable compression and rate limiting
<Location />
-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
-</Location>
-# Enable per client bandwidth rate limt
-<Location />
-SetOutputFilter RATE_LIMIT
SetEnv rate-limit 400
</Location>
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;i<qs.length;i++){var e=qs[i].indexOf('=');if(e>0)
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='<iframe id="'+f+'" class="widgetframe" scrolling="no" frameborder="0" src="'+doc+'" onload="window.ui.onload[this.id]()"></iframe>';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='<iframe id="'+f+'" class="loadedframe" scrolling="no" frameborder="0" src="'+doc+'"></iframe>';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'&nbsp;&nbsp;'+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 = '<iframe id="' + f + '" class="widgetframe" scrolling="no" frameborder="0" src="' + doc + '" onload="window.ui.onload[this.id]()"></iframe>';
- 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 =
- '<iframe id="' + f + '" class="loadedframe" scrolling="no" frameborder="0" src="' + doc + '"></iframe>';
- 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.