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/clone/index.html | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'sca-cpp/trunk/modules/edit/htdocs/clone/index.html') diff --git a/sca-cpp/trunk/modules/edit/htdocs/clone/index.html b/sca-cpp/trunk/modules/edit/htdocs/clone/index.html index 38b4edefa8..dd041e591e 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/clone/index.html +++ b/sca-cpp/trunk/modules/edit/htdocs/clone/index.html @@ -22,6 +22,7 @@ +

@@ -99,11 +100,16 @@ var savedappentryxml = ''; function getapp(name) { if (isNil(name)) return false; + showStatus('Loading'); + return apps.get(name, function(doc) { // Stop now if we didn't get the app - if (doc == null) + if (doc == null) { + showStatus('No data'); return false; + } + showStatus(defaultStatus()); appentry = doc != null? car(elementsToValues(atom.readATOMEntry(mklist(doc)))) : mklist("'entry", mklist("'title", ''), mklist("'id", name)); var title = cadr(assoc("'title", cdr(appentry))); @@ -121,14 +127,18 @@ $('cloneAppForm').onsubmit = function() { var name = $('appName').value; if (name == '') return false; + showStatus('Saving'); // Clone the app var title = $('appTitle').value; var app = mklist(mklist("'entry", mklist("'title", title != ''? title : name), mklist("'id", appname))); var entry = atom.writeATOMEntry(valuesToElements(app)); dashboards.put(name, car(entry), function(e) { - if (e) + if (e) { + showStatus('Local copy'); return false; + } + showStatus(defaultStatus()); // Open it in the page editor ui.navigate('/#view=page&app=' + name, '_view'); -- cgit v1.2.3