From d1146122184e153e1fac944eafe3535274859ca0 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Sat, 29 Oct 2011 17:47:19 +0000 Subject: 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 --- sca-cpp/trunk/modules/edit/htdocs/graph/index.html | 23 ++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'sca-cpp/trunk/modules/edit/htdocs/graph') 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 @@ - +

Saved
@@ -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 = '' + '' + appname + '' + appname + '' + savedcomposxml + ''; 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); -- cgit v1.2.3