summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/edit/htdocs/page
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-10-29 17:47:19 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-10-29 17:47:19 +0000
commitd1146122184e153e1fac944eafe3535274859ca0 (patch)
tree368b450c8be8f42eeb13a071f6bce9fcc61ec91f /sca-cpp/trunk/modules/edit/htdocs/page
parent11adbc1719db790bd485f4f511b2740c151e5872 (diff)
Better network connectivity status reporting and handling of orientation change events.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1194948 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/edit/htdocs/page')
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/page/index.html21
1 files changed, 14 insertions, 7 deletions
diff --git a/sca-cpp/trunk/modules/edit/htdocs/page/index.html b/sca-cpp/trunk/modules/edit/htdocs/page/index.html
index 1b4c455ff7..7df8a1a1d9 100644
--- a/sca-cpp/trunk/modules/edit/htdocs/page/index.html
+++ b/sca-cpp/trunk/modules/edit/htdocs/page/index.html
@@ -22,7 +22,7 @@
<table style="width: 100%;">
<tr>
<td><h2><span id="appNameHeader"></span></h2></td>
-<td style="vertical-align: middle; text-align: right; padding-right: 8px;"><span id="saveStatus" style="font-weight: bold; color: #808080;">Saved</span></td>
+<td style="vertical-align: middle; text-align: right; padding-right: 8px;"><span id="status" style="font-weight: bold; color: #808080;"></span></td>
</tr>
</table>
@@ -744,11 +744,16 @@ var widget = null;
function getpage(name, ediv) {
if (isNil(name))
return false;
+ showStatus('Loading');
+
return pages.get(name, function(doc) {
// Stop now if we didn't get a page
- if (doc == null)
+ if (doc == null) {
+ showStatus('No data');
return false;
+ }
+ showStatus(defaultStatus());
// Convert the page to XHTML and place it in a hidden buffer
var buffer = $('buffer');
@@ -861,7 +866,7 @@ function pagexhtml(ediv) {
* Save the current page.
*/
function save(newxml) {
- $('saveStatus').innerHTML = 'Saving';
+ showStatus('Saving');
// Get the current page XHTML content
savedpagexhtml = newxml;
@@ -872,9 +877,11 @@ function save(newxml) {
newxml + '</content></entry>';
pages.put(appname, entry, function(e) {
- if (e)
+ if (e) {
+ showStatus('Local copy');
return false;
- $('saveStatus').innerHTML = 'Saved';
+ }
+ showStatus('Saved');
return false;
});
return true;
@@ -887,7 +894,7 @@ function onpagechange(prop) {
var newxml = pagexhtml(ediv);
if (savedpagexhtml == newxml)
return false;
- $('saveStatus').innerHTML = 'Modified';
+ showStatus('Modified');
// Save property changes right away
if (prop)
@@ -896,7 +903,7 @@ function onpagechange(prop) {
// Autosave other changes after 1 second
setTimeout(function() {
if (savedpagexhtml == newxml) {
- $('saveStatus').innerHTML = 'Saved';
+ showStatus('Saved');
return false;
}
return save(newxml);