summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/edit/htdocs/graph/index.html
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/graph/index.html
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 '')
-rw-r--r--sca-cpp/trunk/modules/edit/htdocs/graph/index.html23
1 files changed, 15 insertions, 8 deletions
diff --git a/sca-cpp/trunk/modules/edit/htdocs/graph/index.html b/sca-cpp/trunk/modules/edit/htdocs/graph/index.html
index 3cc735971c..77fa1d4888 100644
--- a/sca-cpp/trunk/modules/edit/htdocs/graph/index.html
+++ b/sca-cpp/trunk/modules/edit/htdocs/graph/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>
@@ -1924,11 +1924,16 @@ function atomcomposite(doc) {
function getapp(name, g) {
if (isNil(name))
return false;
+ showStatus('Loading');
+
return composites.get(name, function(doc) {
// Stop now if we didn't get a composite
- if (doc == null)
+ if (doc == null) {
+ showStatus('No data');
return false;
+ }
+ showStatus(defaultStatus());
composite = atomcomposite(doc);
if (isNil(composite)) {
@@ -2003,15 +2008,17 @@ function installpalette(name, pos, g, bg, palette, gpalettes) {
* Save the current composite.
*/
function save(savexml) {
- $('saveStatus').innerHTML = 'Saving';
+ showStatus('Saving');
savedcomposxml = savexml;
var entry = '<entry xmlns="http://www.w3.org/2005/Atom">' +
'<title type="text">' + appname + '</title><id>' + appname + '</id><content type="application/xml">' +
savedcomposxml + '</content></entry>';
composites.put(appname, entry, function(e) {
- if (e)
+ if (e) {
+ showStatus('Local copy');
return false;
- $('saveStatus').innerHTML = 'Saved';
+ }
+ showStatus('Saved');
return false;
});
return true;
@@ -2024,17 +2031,17 @@ function oncomposchange(prop) {
var newxml = car(writeXML(composite, false));
if (savedcomposxml == newxml)
return false;
- $('saveStatus').innerHTML = 'Modified';
+ showStatus('Modified');
// Save property changes right away
if (prop)
return save(newxml);
// Autosave other changes after 1 second
- $('saveStatus').innerHTML = 'Modified';
+ showStatus('Modified');
setTimeout(function() {
if (savedcomposxml == newxml) {
- $('saveStatus').innerHTML = 'Saved';
+ showStatus('Saved');
return false;
}
return save(newxml);