You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2013/02/11 06:48:21 UTC

svn commit: r1444660 [1/2] - in /tuscany/sca-cpp/trunk: hosting/server/ hosting/server/data/apps/nearme/ hosting/server/data/apps/nearme2/ hosting/server/data/apps/new/ hosting/server/data/apps/ourphotos/ hosting/server/data/apps/shoppingcart/ hosting/...

Author: jsdelfino
Date: Mon Feb 11 05:48:20 2013
New Revision: 1444660

URL: http://svn.apache.org/r1444660
Log:
Improvements to the app management UI.

Modified:
    tuscany/sca-cpp/trunk/hosting/server/apps.py
    tuscany/sca-cpp/trunk/hosting/server/composites.py
    tuscany/sca-cpp/trunk/hosting/server/data/apps/nearme/app.info
    tuscany/sca-cpp/trunk/hosting/server/data/apps/nearme2/app.info
    tuscany/sca-cpp/trunk/hosting/server/data/apps/new/app.info
    tuscany/sca-cpp/trunk/hosting/server/data/apps/ourphotos/app.info
    tuscany/sca-cpp/trunk/hosting/server/data/apps/shoppingcart/app.info
    tuscany/sca-cpp/trunk/hosting/server/data/apps/slice/app.info
    tuscany/sca-cpp/trunk/hosting/server/data/apps/test/app.info
    tuscany/sca-cpp/trunk/hosting/server/data/apps/testanimation/app.info
    tuscany/sca-cpp/trunk/hosting/server/data/apps/testdb/app.info
    tuscany/sca-cpp/trunk/hosting/server/data/apps/testevents/app.info
    tuscany/sca-cpp/trunk/hosting/server/data/apps/testhttp/app.info
    tuscany/sca-cpp/trunk/hosting/server/data/apps/testlogic/app.info
    tuscany/sca-cpp/trunk/hosting/server/data/apps/testsearch/app.info
    tuscany/sca-cpp/trunk/hosting/server/data/apps/testsms/app.info
    tuscany/sca-cpp/trunk/hosting/server/data/apps/testsocial/app.info
    tuscany/sca-cpp/trunk/hosting/server/data/apps/testtext/app.info
    tuscany/sca-cpp/trunk/hosting/server/data/apps/testurl/app.info
    tuscany/sca-cpp/trunk/hosting/server/data/apps/testvalues/app.info
    tuscany/sca-cpp/trunk/hosting/server/data/apps/testwidgets/app.info
    tuscany/sca-cpp/trunk/hosting/server/data/apps/testwidgets2/app.info
    tuscany/sca-cpp/trunk/hosting/server/data/apps/testwidgets3/app.info
    tuscany/sca-cpp/trunk/hosting/server/data/apps/twsms/app.info
    tuscany/sca-cpp/trunk/hosting/server/data/store/all/store.apps
    tuscany/sca-cpp/trunk/hosting/server/data/store/featured/store.apps
    tuscany/sca-cpp/trunk/hosting/server/data/store/new/store.apps
    tuscany/sca-cpp/trunk/hosting/server/data/store/top/store.apps
    tuscany/sca-cpp/trunk/hosting/server/htdocs/account/index.html
    tuscany/sca-cpp/trunk/hosting/server/htdocs/app/index.html
    tuscany/sca-cpp/trunk/hosting/server/htdocs/clone/index.html
    tuscany/sca-cpp/trunk/hosting/server/htdocs/create/index.html
    tuscany/sca-cpp/trunk/hosting/server/htdocs/delete/index.html
    tuscany/sca-cpp/trunk/hosting/server/htdocs/graph/index.html
    tuscany/sca-cpp/trunk/hosting/server/htdocs/home/index.html
    tuscany/sca-cpp/trunk/hosting/server/htdocs/index.html
    tuscany/sca-cpp/trunk/hosting/server/htdocs/info/index.html
    tuscany/sca-cpp/trunk/hosting/server/htdocs/login/index.html
    tuscany/sca-cpp/trunk/hosting/server/htdocs/page/index.html
    tuscany/sca-cpp/trunk/hosting/server/htdocs/proxy/public/oops/index.html
    tuscany/sca-cpp/trunk/hosting/server/htdocs/public/notauth/index.html
    tuscany/sca-cpp/trunk/hosting/server/htdocs/public/notfound/index.html
    tuscany/sca-cpp/trunk/hosting/server/htdocs/public/notyet/index.html
    tuscany/sca-cpp/trunk/hosting/server/htdocs/public/oops/index.html
    tuscany/sca-cpp/trunk/hosting/server/htdocs/rate/index.html
    tuscany/sca-cpp/trunk/hosting/server/htdocs/search/index.html
    tuscany/sca-cpp/trunk/hosting/server/htdocs/store/index.html
    tuscany/sca-cpp/trunk/hosting/server/icons.py
    tuscany/sca-cpp/trunk/hosting/server/pages.py
    tuscany/sca-cpp/trunk/hosting/server/ratings.py
    tuscany/sca-cpp/trunk/hosting/server/server.composite
    tuscany/sca-cpp/trunk/hosting/server/store.py
    tuscany/sca-cpp/trunk/hosting/server/test.py
    tuscany/sca-cpp/trunk/modules/js/htdocs/component.js
    tuscany/sca-cpp/trunk/modules/js/htdocs/ui.js

Modified: tuscany/sca-cpp/trunk/hosting/server/apps.py
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/apps.py?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/apps.py (original)
+++ tuscany/sca-cpp/trunk/hosting/server/apps.py Mon Feb 11 05:48:20 2013
@@ -25,7 +25,7 @@ def appid(id):
     return ("apps", car(id), "app.info")
 
 # Put an app into the apps db
-def put(id, app, user, cache, dashboard, store, composites, pages, icons):
+def put(id, app, user, cache, db, dashboard, store, composites, pages, icons):
     debug('apps.py::put::id', id)
     debug('apps.py::put::app', app)
 
@@ -68,7 +68,7 @@ def put(id, app, user, cache, dashboard,
         return False
 
     # Clone app
-    appentry = mkentry(title(app), car(id), user.get(()), now(), content(app))
+    appentry = mkentry(title(capp), car(id), user.get(()), now(), content(capp))
     debug('apps.py::put::appentry', appentry)
     cache.put(appid(id), appentry)
     composites.put(id, composites.get((eid,)))
@@ -78,10 +78,19 @@ def put(id, app, user, cache, dashboard,
     return True
 
 # Get an app from the apps db
-def get(id, user, cache, dashboard, store, composites, pages, icons):
+def get(id, user, cache, db, dashboard, store, composites, pages, icons):
     debug('apps.py::get::id', id)
+
+    # Return the newest apps
     if isNull(id):
-        return (("'feed", ("'title", "Apps"), ("'id", "apps")),)
+        newentries = db.get((("'regex", '("apps" .* "app.info")'), ("'rank", "(regexp_matches(value, '(.*\(updated )([^\)]+)(\).*)'))[2]::timestamp"), ("'limit", 25)))
+        flatentries = tuple(map(lambda v: car(v), () if isNull(newentries) else newentries))
+        def sortkey(e):
+            return updated((e,))
+        sortedentries = tuple(sorted(flatentries, key = sortkey, reverse = True))[0:25]
+        newapps = ((("'feed", ("'title", "Apps"), ("'id", 'apps')) + sortedentries),)
+        debug('apps.py::get::newapps', newapps)
+        return newapps
 
     # Get the requested app
     app = cache.get(appid(id))
@@ -94,7 +103,7 @@ def get(id, user, cache, dashboard, stor
     return app
 
 # Delete an app from the apps db
-def delete(id, user, cache, dashboard, store, composites, pages, icons):
+def delete(id, user, cache, db, dashboard, store, composites, pages, icons):
     debug('apps.py::delete::id', id)
 
     # Get the requested app

Modified: tuscany/sca-cpp/trunk/hosting/server/composites.py
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/composites.py?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/composites.py (original)
+++ tuscany/sca-cpp/trunk/hosting/server/composites.py Mon Feb 11 05:48:20 2013
@@ -43,7 +43,12 @@ def put(id, comp, user, cache, apps):
     # Update the composite in the composite db
     compentry = mkentry(title(app), car(id), user.get(()), now(), content(comp))
     debug('composites.py::put::compentry', compentry)
-    return cache.put(compid(id), compentry)
+    rc = cache.put(compid(id), compentry)
+    if rc == False:
+        return False
+
+    # Update the app's updated date
+    return apps.put(id, app)
 
 # Get a composite from the composite db
 def get(id, user, cache, apps):
@@ -88,5 +93,10 @@ def delete(id, user, cache, apps):
         return False
 
     # Delete the composite
-    return cache.delete(compid(id))
+    rc = cache.delete(compid(id))
+    if rc == False:
+        return False
+
+    # Update the app's updated date
+    return apps.put(id, app)
 

Modified: tuscany/sca-cpp/trunk/hosting/server/data/apps/nearme/app.info
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/apps/nearme/app.info?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/apps/nearme/app.info (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/apps/nearme/app.info Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((entry (title "nearme") (id "nearme") (author "admin@example.com") (updated "Jan 01, 2012") (content (info (description "Sample app")))))
+((entry (title "nearme") (id "nearme") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00") (content (info (description "Sample app")))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/apps/nearme2/app.info
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/apps/nearme2/app.info?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/apps/nearme2/app.info (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/apps/nearme2/app.info Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((entry (title "nearme2") (id "nearme2") (author "admin@example.com") (updated "Jan 01, 2012") (content (info (description "Sample app")))))
+((entry (title "nearme2") (id "nearme2") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00") (content (info (description "Sample app")))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/apps/new/app.info
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/apps/new/app.info?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/apps/new/app.info (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/apps/new/app.info Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((entry (title "An empty app template") (id "new") (author "admin@example.com") (updated "Jan 01, 2012") (content (info (description "Sample app")))))
+((entry (title "A new app") (id "new") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00") (content (info (description "A new app")))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/apps/ourphotos/app.info
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/apps/ourphotos/app.info?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/apps/ourphotos/app.info (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/apps/ourphotos/app.info Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((entry (title "Our photos of an event") (id "ourphotos") (author "admin@example.com") (updated "Jan 01, 2012") (content (info (description "Sample app")))))
+((entry (title "Our photos of an event") (id "ourphotos") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00") (content (info (description "Sample app")))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/apps/shoppingcart/app.info
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/apps/shoppingcart/app.info?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/apps/shoppingcart/app.info (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/apps/shoppingcart/app.info Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((entry (title "My online store") (id "shoppingcart") (author "admin@example.com") (updated "Jan 01, 2012") (content (info (description "Sample app")))))
+((entry (title "My online store") (id "shoppingcart") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00") (content (info (description "Sample app")))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/apps/slice/app.info
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/apps/slice/app.info?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/apps/slice/app.info (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/apps/slice/app.info Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((entry (title "Slice") (id "slice") (author "admin@example.com") (updated "Jan 01, 2012") (content (info (description "Sample app")))))
+((entry (title "Slice") (id "slice") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00") (content (info (description "Sample app")))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/apps/test/app.info
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/apps/test/app.info?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/apps/test/app.info (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/apps/test/app.info Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((entry (title "An empty test app") (id "test") (author "admin@example.com") (updated "Jan 01, 2012") (content (info (description "Sample app")))))
+((entry (title "An empty test app") (id "test") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00") (content (info (description "Sample app")))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/apps/testanimation/app.info
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/apps/testanimation/app.info?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/apps/testanimation/app.info (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/apps/testanimation/app.info Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((entry (title "Test animation components") (id "testanimation") (author "admin@example.com") (updated "Jan 01, 2012") (content (info (description "Sample app")))))
+((entry (title "Test animation components") (id "testanimation") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00") (content (info (description "Sample app")))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/apps/testdb/app.info
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/apps/testdb/app.info?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/apps/testdb/app.info (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/apps/testdb/app.info Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((entry (title "Test database components") (id "testdb") (author "admin@example.com") (updated "Jan 01, 2012") (content (info (description "Sample app")))))
+((entry (title "Test database components") (id "testdb") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00") (content (info (description "Sample app")))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/apps/testevents/app.info
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/apps/testevents/app.info?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/apps/testevents/app.info (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/apps/testevents/app.info Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((entry (title "Test event components") (id "testevents") (author "admin@example.com") (updated "Jan 01, 2012") (content (info (description "Sample app")))))
+((entry (title "Test event components") (id "testevents") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00") (content (info (description "Sample app")))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/apps/testhttp/app.info
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/apps/testhttp/app.info?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/apps/testhttp/app.info (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/apps/testhttp/app.info Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((entry (title "Test HTTP components") (id "testhttp") (author "admin@example.com") (updated "Jan 01, 2012") (content (info (description "Sample app")))))
+((entry (title "Test HTTP components") (id "testhttp") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00") (content (info (description "Sample app")))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/apps/testlogic/app.info
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/apps/testlogic/app.info?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/apps/testlogic/app.info (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/apps/testlogic/app.info Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((entry (title "Test logic components") (id "testlogic") (author "admin@example.com") (updated "Jan 01, 2012") (content (info (description "Sample app")))))
+((entry (title "Test logic components") (id "testlogic") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00") (content (info (description "Sample app")))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/apps/testsearch/app.info
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/apps/testsearch/app.info?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/apps/testsearch/app.info (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/apps/testsearch/app.info Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((entry (title "Test search components") (id "testsearch") (author "admin@example.com") (updated "Jan 01, 2012") (content (info (description "Sample app")))))
+((entry (title "Test search components") (id "testsearch") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00") (content (info (description "Sample app")))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/apps/testsms/app.info
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/apps/testsms/app.info?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/apps/testsms/app.info (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/apps/testsms/app.info Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((entry (title "Test HTTP components") (id "testhttp") (author "admin@example.com") (updated "Jan 01, 2012") (content (info (description "Sample app")))))
+((entry (title "Test HTTP components") (id "testhttp") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00") (content (info (description "Sample app")))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/apps/testsocial/app.info
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/apps/testsocial/app.info?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/apps/testsocial/app.info (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/apps/testsocial/app.info Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((entry (title "Test social components") (id "testsocial") (author "admin@example.com") (updated "Jan 01, 2012") (content (info (description "Sample app")))))
+((entry (title "Test social components") (id "testsocial") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00") (content (info (description "Sample app")))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/apps/testtext/app.info
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/apps/testtext/app.info?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/apps/testtext/app.info (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/apps/testtext/app.info Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((entry (title "Test text processing components") (id "testtext") (author "admin@example.com") (updated "Jan 01, 2012") (content (info (description "Sample app")))))
+((entry (title "Test text processing components") (id "testtext") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00") (content (info (description "Sample app")))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/apps/testurl/app.info
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/apps/testurl/app.info?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/apps/testurl/app.info (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/apps/testurl/app.info Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((entry (title "Test URL components") (id "testurl") (author "admin@example.com") (updated "Jan 01, 2012") (content (info (description "Sample app")))))
+((entry (title "Test URL components") (id "testurl") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00") (content (info (description "Sample app")))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/apps/testvalues/app.info
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/apps/testvalues/app.info?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/apps/testvalues/app.info (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/apps/testvalues/app.info Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((entry (title "Test values and lists") (id "testvalues") (author "admin@example.com") (updated "Jan 01, 2012") (content (info (description "Sample app")))))
+((entry (title "Test values and lists") (id "testvalues") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00") (content (info (description "Sample app")))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/apps/testwidgets/app.info
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/apps/testwidgets/app.info?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/apps/testwidgets/app.info (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/apps/testwidgets/app.info Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((entry (title "Test widgets") (id "testwidgets") (author "admin@example.com") (updated "Jan 01, 2012") (content (info (description "Sample app")))))
+((entry (title "Test widgets") (id "testwidgets") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00") (content (info (description "Sample app")))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/apps/testwidgets2/app.info
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/apps/testwidgets2/app.info?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/apps/testwidgets2/app.info (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/apps/testwidgets2/app.info Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((entry (title "Test more widgets") (id "testwidgets2") (author "admin@example.com") (updated "Jan 01, 2012") (content (info (description "Sample app")))))
+((entry (title "Test more widgets") (id "testwidgets2") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00") (content (info (description "Sample app")))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/apps/testwidgets3/app.info
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/apps/testwidgets3/app.info?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/apps/testwidgets3/app.info (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/apps/testwidgets3/app.info Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((entry (title "Test HTML generator components") (id "testwidgets3") (author "admin@example.com") (updated "Jan 01, 2012") (content (info (description "Sample app")))))
+((entry (title "Test HTML generator components") (id "testwidgets3") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00") (content (info (description "Sample app")))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/apps/twsms/app.info
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/apps/twsms/app.info?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/apps/twsms/app.info (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/apps/twsms/app.info Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((entry (title "SMS send service") (id "twsms") (author "admin@example.com") (updated "Jan 01, 2012") (content (info (description "Sample app")))))
+((entry (title "SMS send service") (id "twsms") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00") (content (info (description "Sample app")))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/store/all/store.apps
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/store/all/store.apps?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/store/all/store.apps (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/store/all/store.apps Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((feed (title "App Store") (id "all") (entry (title "Check my public social data") (id "me360") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Where are my friends") (id "nearme") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Where are my friends") (id "nearme2") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Our photos of an event") (id "ourphotos") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Slice") (id "slice") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "My online store") (id "shoppingcart") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "SMS send service") (id "twsms") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "An empty test app") (id "test") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Test values and lists") (id "testvalues") (author "admin@example.com") (updated "Jan 01, 2012
 ")) (entry (title "Test social components") (id "testsocial") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Test URL components") (id "testurl") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Test logic components") (id "testlogic") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Test text processing components") (id "testtext") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Test HTTP components") (id "testhttp") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Test SMS API") (id "testsms") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Test widgets") (id "testwidgets") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Test more widgets") (id "testwidgets2") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Test event components") (id "testevents") (author "admin@example.com") (updated "Jan 01, 2012"))
  (entry (title "Test search components") (id "testsearch") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Test database components") (id "testdb") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Test HTML generator components") (id "testwidgets3") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Test animation components") (id "testanimation") (author "admin@example.com") (updated "Jan 01, 2012"))))
+((feed (title "App Store") (id "all") (entry (title "Check my public social data") (id "me360") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Where are my friends") (id "nearme") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Where are my friends") (id "nearme2") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Our photos of an event") (id "ourphotos") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Slice") (id "slice") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "My online store") (id "shoppingcart") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "SMS send service") (id "twsms") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "An empty test app") (id "test") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (ent
 ry (title "Test values and lists") (id "testvalues") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Test social components") (id "testsocial") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Test URL components") (id "testurl") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Test logic components") (id "testlogic") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Test text processing components") (id "testtext") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Test HTTP components") (id "testhttp") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Test SMS API") (id "testsms") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Test widgets") (id "testwidgets") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title
  "Test more widgets") (id "testwidgets2") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Test event components") (id "testevents") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Test search components") (id "testsearch") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Test database components") (id "testdb") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Test HTML generator components") (id "testwidgets3") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Test animation components") (id "testanimation") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00"))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/store/featured/store.apps
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/store/featured/store.apps?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/store/featured/store.apps (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/store/featured/store.apps Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((feed (title "App Store") (id "featured") (entry (title "Check my public social data") (id "me360") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Where are my friends") (id "nearme") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Where are my friends") (id "nearme2") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Our photos of an event") (id "ourphotos") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Slice") (id "slice") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "My online store") (id "shoppingcart") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "SMS send service") (id "twsms") (author "admin@example.com") (updated "Jan 01, 2012"))))
+((feed (title "App Store") (id "featured") (entry (title "Check my public social data") (id "me360") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Where are my friends") (id "nearme") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Where are my friends") (id "nearme2") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Our photos of an event") (id "ourphotos") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Slice") (id "slice") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "My online store") (id "shoppingcart") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "SMS send service") (id "twsms") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00"))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/store/new/store.apps
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/store/new/store.apps?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/store/new/store.apps (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/store/new/store.apps Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((feed (title "App Store") (id "new") (entry (title "Check my public social data") (id "me360") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Where are my friends") (id "nearme") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Where are my friends") (id "nearme2") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Our photos of an event") (id "ourphotos") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Slice") (id "slice") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "My online store") (id "shoppingcart") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "SMS send service") (id "twsms") (author "admin@example.com") (updated "Jan 01, 2012"))))
+((feed (title "App Store") (id "new") (entry (title "Check my public social data") (id "me360") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Where are my friends") (id "nearme") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Where are my friends") (id "nearme2") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Our photos of an event") (id "ourphotos") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Slice") (id "slice") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "My online store") (id "shoppingcart") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "SMS send service") (id "twsms") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00"))))

Modified: tuscany/sca-cpp/trunk/hosting/server/data/store/top/store.apps
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/data/store/top/store.apps?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/data/store/top/store.apps (original)
+++ tuscany/sca-cpp/trunk/hosting/server/data/store/top/store.apps Mon Feb 11 05:48:20 2013
@@ -1 +1 @@
-((feed (title "App Store") (id "top") (entry (title "Check my public social data") (id "me360") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Where are my friends") (id "nearme") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Where are my friends") (id "nearme2") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Our photos of an event") (id "ourphotos") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "Slice") (id "slice") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "My online store") (id "shoppingcart") (author "admin@example.com") (updated "Jan 01, 2012")) (entry (title "SMS send service") (id "twsms") (author "admin@example.com") (updated "Jan 01, 2012"))))
+((feed (title "App Store") (id "top") (entry (title "Check my public social data") (id "me360") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Where are my friends") (id "nearme") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Where are my friends") (id "nearme2") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Our photos of an event") (id "ourphotos") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "Slice") (id "slice") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "My online store") (id "shoppingcart") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00")) (entry (title "SMS send service") (id "twsms") (author "admin@example.com") (updated "2012-01-01T00:00:00+00:00"))))

Modified: tuscany/sca-cpp/trunk/hosting/server/htdocs/account/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/htdocs/account/index.html?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/htdocs/account/index.html (original)
+++ tuscany/sca-cpp/trunk/hosting/server/htdocs/account/index.html Mon Feb 11 05:48:20 2013
@@ -28,7 +28,7 @@
 <tr><tr><td class="label">Email:</td></tr>
 <tr><td><input type="text" id="userEmail" class="readentry" size="30" readonly="readonly" placeholder="Your email address" style="width: 300px;"/></td></tr>
 <tr><tr><td class="label">Picture:</td></tr>
-<tr><td><img id="userPicture" style="width: 50px; height: 50px; vertical-align: top;"/><input id="uploadPicture" type="button" class="lightbutton" value="Upload"/><input id="uploadFile" type="file" accept="image/*" style="display:none;"/><span id="refreshingPicture" class="refreshing" style="display:none;"/></td></tr>
+<tr><td><img id="userPicture" style="width: 50px; height: 50px; vertical-align: top;"/><input id="uploadPicture" type="button" class="lightbutton" value="Upload"/><input id="uploadFile" type="file" accept="image/*" style="visibility: hidden;"/><span id="refreshingPicture" class="refreshing" style="display:none;"/></td></tr>
 <tr><tr><td class="label">Name:</td></tr>
 <tr><td><input type="text" id="userFullname" class="flatentry" size="30" placeholder="Your name" style="width: 300px;"/></td></tr>
 <tr><tr><td class="label">Bio:</td></tr>
@@ -86,7 +86,7 @@ TODO Disabled for now
 (function layout() {
     document.title = config.windowtitle() + ' - Account';
     $('viewhead').innerHTML = '<span class="cmenu">' + username + '</span>' +
-        '<input type="button" class="redbutton plusminus" style="position: absolute; top: 4px; left: 5px;" id="deleteUser" value="-" title="Delete your account" disabled="true"/>';
+        '<input type="button" class="redbutton plusminus" style="position: absolute; top: 4px; left: 2px;" id="deleteUser" value="-" title="Delete your account" disabled="true"/>';
     if (!ui.isMobile())
         $('viewform').className = 'viewform flatscrollbars';
     $('userName').value = username;
@@ -133,7 +133,7 @@ var savedpicxml = '';
         var acct = cadr(assoc("'content", acctentry));
 
         var email = assoc("'email", acct);
-        $('userEmail').value = isNull(email) || isNull(cdr(email))? '' : cadr(email);
+        $('userEmail').value = isNull(email) || isNull(cdr(email))? (username.indexOf('@') != -1? username : '') : cadr(email);
 
         var desc = assoc("'description", acct);
         $('userDescription').innerHTML = isNull(desc) || isNull(cdr(desc))? '' : cadr(desc);
@@ -354,7 +354,7 @@ var lastkeyup = null;
 $('userFullname').onkeyup = $('userDescription').onkeyup = function() {
     var t = new Date().getTime();
     lastkeyup = t;
-    ui.delay(function() {
+    ui.async(function() {
             return t == lastkeyup? onaccountchange() : true;
         }, 2000);
 };
@@ -395,7 +395,7 @@ function readpic(files) {
             showstatus('Loaded');
 
             // Now upload it
-            ui.delay(function() {
+            ui.async(function() {
                 var picentry = mklist("'entry", mklist("'title", username), mklist("'id", username), mklist("'author", username), mklist("'content", mklist("'picture", mklist("'image", url))));
                 var entryxml = car(atom.writeATOMEntry(valuesToElements(mklist(picentry))));
                 if (savedpicxml == entryxml) {
@@ -429,7 +429,7 @@ function emailpicture() {
 
         // Open the email app
         var mailto = safeb64encode('p/' + username + '/' + token);
-        ui.navigate('mailto:' + mailto + '@' + topdomainname(window.location.hostname) + '?subject=Email to upload&body=Paste picture here', '_self');
+        ui.navigate('mailto:' + mailto + '@' + topdomainname(window.location.hostname) + '?subject=Uploading picture&body=Paste picture here', '_self');
 
         // Refresh app icon
         refreshingpic = true;
@@ -440,11 +440,12 @@ function emailpicture() {
 /**
  * Handle picture upload events.
  */
-$('uploadPicture').onclick = function() {
-    if (ui.isMobile())
-        return emailpicture();
-    return $('uploadFile').click();
-};
+ui.onclick($('uploadPicture'), function(e) {
+    debug('uploadPicture.onclick()');
+    if (ui.isMobile() && ((ui.isWebkit() && ui.browserVersion() < 6.0) || (ui.isAndroid() && ui.browserVersion() < 2.2)))
+        return ui.delay(function() { return emailpicture(); });
+    return ui.delay(function() { return $('uploadFile').click(); });
+});
 $('uploadFile').onchange = function(e) {
     return readpic(e.target.files);
 };

Modified: tuscany/sca-cpp/trunk/hosting/server/htdocs/app/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/htdocs/app/index.html?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/htdocs/app/index.html (original)
+++ tuscany/sca-cpp/trunk/hosting/server/htdocs/app/index.html Mon Feb 11 05:48:20 2013
@@ -28,11 +28,9 @@
 <script src="http://www.example.com:9998/target/target-script-min.js#anonymous"></script>
 -->
 <title></title>
-<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"/> 
-<!--
+<meta name="viewport" content="user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-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="apple-touch-icon-precomposed" href="/public/touchicon.png"/>
 <base href="/"/>
 <script type="text/javascript">
@@ -311,7 +309,7 @@ function setwidgetvalue(e, dv) {
 
                 // Define the stylesheet
                 if (s != '') {
-                    var esheet = ui.elementByID(contentdiv, 'style_' + e.id);
+                    var esheet = ui.elementByID(document, 'style_' + e.id);
                     if (isNull(esheet)) {
                         var nesheet = document.createElement('style');
                         nesheet.id = 'style_' + e.id;
@@ -434,7 +432,7 @@ function updatepage(l) {
         return e;
     }
 
-    map(updatewidget, filter(function(e) { return !isNull(e.id) && e.id.substring(0, 5) != 'page:'; }, nodeList(ui.elementByID(contentdiv, 'page').childNodes)));
+    map(updatewidget, filter(function(e) { return !isNull(e.id) && e.id.substring(0, 5) != 'page:'; }, nodeList(ui.elementByID(document, 'page').childNodes)));
     return true;
 }
 
@@ -464,18 +462,19 @@ function bindwidgethandler(e, appname) {
     if (e.className == 'button') {
         var b = car(childElements(e));
         b.name = e.id;
-        b.onclick = function() { return buttonClickHandler(b.value, appname); };
+        ui.onclick(b, function(e) {
+            return buttonClickHandler(b.value, appname);
+        });
         return e;
     }
     if (e.className == 'link') {
         var l = car(childElements(e));
         var hr = l.href;
         if (hr.substring(0, 5) == 'link:' && hr.indexOf('://') == -1) {
-            var f = function(e) {
+            ui.onclick(l, function(e) {
                 e.preventDefault();
                 return buttonClickHandler(hr.substring(5), appname);
-            };
-            l.ontouchstart = l.onclick = f;
+            });
             l.href = 'javascript:void()';
         }
         return e;
@@ -609,7 +608,7 @@ function getappdata(appname, page, compo
         }
 
         // Setup the widgets
-        map(setupwidget, filter(function(e) { return !isNull(e.id); }, nodeList(ui.elementByID(contentdiv, 'page').childNodes)));
+        map(setupwidget, filter(function(e) { return !isNull(e.id); }, nodeList(ui.elementByID(document, 'page').childNodes)));
 
         // Get the app components
         var comps = scdl.components(compos);
@@ -720,7 +719,7 @@ function compquery() {
         return append(nodeList(n.childNodes), reduce(append, mklist(), map(childrenList, nodeList(n.childNodes))));
     }
 
-    var args = map(queryarg, filter(function(e) { return !isNull(e.id) && !isNull(inputvalue(e)); }, childrenList(ui.elementByID(contentdiv, 'page'))));
+    var args = map(queryarg, filter(function(e) { return !isNull(e.id) && !isNull(inputvalue(e)); }, childrenList(ui.elementByID(document, 'page'))));
 
     // Append current location properties if known
     if (!isNull(geoposition)) {

Modified: tuscany/sca-cpp/trunk/hosting/server/htdocs/clone/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/htdocs/clone/index.html?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/htdocs/clone/index.html (original)
+++ tuscany/sca-cpp/trunk/hosting/server/htdocs/clone/index.html Mon Feb 11 05:48:20 2013
@@ -164,9 +164,9 @@ $('cloneAppForm').onsubmit = function() 
 /**
  * Cancel cloning an app.
  */
-$('cloneAppCancelButton').onclick = function() {
+ui.onclick($('cloneAppCancelButton'), function(e) {
     history.back();
-};
+});
 
 })();
 </script>

Modified: tuscany/sca-cpp/trunk/hosting/server/htdocs/create/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/htdocs/create/index.html?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/htdocs/create/index.html (original)
+++ tuscany/sca-cpp/trunk/hosting/server/htdocs/create/index.html Mon Feb 11 05:48:20 2013
@@ -72,6 +72,7 @@ function saveapp(name, entryxml) {
     apps.put(name, savedappxml, function(e) {
         if (e) {
             if (e.code && e.code == 404) {
+                alert('name taken');
                 errorstatus('App name is taken, please pick another name');
                 workingstatus(false);
                 return false;
@@ -115,6 +116,7 @@ $('createAppForm').onsubmit = function()
     // Check reserved app names
     var reserved = mklist('account', 'app', 'cache', 'clone', 'create', 'delete', 'graph', 'home', 'login', 'new', 'page', 'proxy', 'public', 'private', 'info', 'store');
     if (!isNull(assoc(name, map(function(r) { return mklist(r, r); }, reserved)))) {
+        alert('invalid name');
         errorstatus('App name is taken, please pick another name');
         return false;
     }
@@ -129,9 +131,9 @@ $('createAppForm').onsubmit = function()
 /**
  * Cancel creating an app.
  */
-$('createAppCancelButton').onclick = function() {
+ui.onclick($('createAppCancelButton'), function(e) {
     history.back();
-};
+});
 
 /**
  * Show the status.

Modified: tuscany/sca-cpp/trunk/hosting/server/htdocs/delete/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/htdocs/delete/index.html?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/htdocs/delete/index.html (original)
+++ tuscany/sca-cpp/trunk/hosting/server/htdocs/delete/index.html Mon Feb 11 05:48:20 2013
@@ -138,9 +138,9 @@ $('deleteAppForm').onsubmit = function()
 /**
  * Cancel cloning an app.
  */
-$('deleteAppCancelButton').onclick = function() {
+ui.onclick($('deleteAppCancelButton'), function(e) {
     history.back();
-};
+});
 
 })();
 </script>

Modified: tuscany/sca-cpp/trunk/hosting/server/htdocs/graph/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/htdocs/graph/index.html?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/htdocs/graph/index.html (original)
+++ tuscany/sca-cpp/trunk/hosting/server/htdocs/graph/index.html Mon Feb 11 05:48:20 2013
@@ -2055,7 +2055,7 @@ function showdata(gcomp) {
         return displaydata(t, '100%');
     });
 
-    ui.async(function hidegraphdiv() {
+    ui.delay(function hidegraphdiv() {
         graphdiv.style.display = 'none'
     });
     return true;
@@ -2071,7 +2071,7 @@ function showgraph(gcomp) {
     graphdiv.style.display = 'block'
     gvisible = true;
     graph.compselect(gcomp, true, atitle, cvalue, ccopy, cdelete);
-    ui.async(function hideplaydiv() {
+    ui.delay(function hideplaydiv() {
         pdiv.style.display = 'none';
         pdiv.innerHTML = '';
     });

Modified: tuscany/sca-cpp/trunk/hosting/server/htdocs/home/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/htdocs/home/index.html?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/htdocs/home/index.html (original)
+++ tuscany/sca-cpp/trunk/hosting/server/htdocs/home/index.html Mon Feb 11 05:48:20 2013
@@ -32,7 +32,7 @@
 <input type="button" class="bluebutton" style="font-size: 21px; padding: 10px; height: 50px;" id="getstarted" title="Get Started" value="Get Started"/>
 
 <br/><br/>
-<div class="note">Requires Safari 5+, Chrome 11+, Firefox 4+ or IE 9+</div>
+<div class="note">Requires Safari 6+, Chrome 24+, Firefox 18+ or IE 10+</div>
 <br/>
 
 </div>
@@ -51,9 +51,9 @@
         $('viewcontent').className = 'viewcontent flatscrollbars';
 })();
 
-$('getstarted').onclick = function() {
+ui.onclick($('getstarted'), function(e) {
     return ui.navigate('/#view=store', '_view');
-};
+});
 
 /**
  * Display animation.

Modified: tuscany/sca-cpp/trunk/hosting/server/htdocs/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/htdocs/index.html?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/htdocs/index.html (original)
+++ tuscany/sca-cpp/trunk/hosting/server/htdocs/index.html Mon Feb 11 05:48:20 2013
@@ -28,11 +28,9 @@
 <script src="http://www.example.com:9998/target/target-script-min.js#anonymous"></script>
 -->
 <title></title>
-<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"/> 
-<!--
+<meta name="viewport" content="user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-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="apple-touch-icon-precomposed" href="/public/touchicon.png"/>
 <base href="/"/>
 <script type="text/javascript">
@@ -174,6 +172,11 @@ var storecat = 'top';
 var storeidx = 0;
 
 /**
+ * The current search query.
+ */
+var searchquery = '';
+
+/**
  * Populate cache with app resources.
  */
 var appresources = [
@@ -329,19 +332,18 @@ function showmenu(view, appname) {
      $('menu').innerHTML = ui.menubar(
         append(mklist(ui.menu('menuhome', 'Home', '/', '_view', view == 'home'),
                     ui.menu('menustore', 'Store', '/#view=store&category=' + storecat + '&idx=' + storeidx, '_view', view == 'store'),
-                    ui.menu('menusearch', 'Search', '/#view=search', '_view', view == 'search')),
+                    ui.menu('menusearch', 'Search', '/#view=search&q=' + searchquery, '_view', view == 'search')),
                 (isNull(appname) || appname == 'undefined')?
                     mklist() :
                     mklist(
-                        ui.menu('menuinfo', 'Info', '/#view=info&app=' + appname, '_view', view == 'info'),
-                        ui.menu('menupage', 'Edit', '/#view=page&app=' + appname, '_view', view == 'page')
                         /* TODO disabled for now
-                        ,
+                        ui.menu('menuinfo', 'Info', '/#view=info&app=' + appname, '_view', view == 'info'),
+                        ui.menu('menupage', 'Edit', '/#view=page&app=' + appname, '_view', view == 'page'),
                         ui.menu('menulogic', config.logic(), '/#view=graph&app=' + appname, '_view', view == 'graph'),
                         ui.menu('menurun', '<span class="greentext" style="font-weight: bold">Run!</span>', '/' + appname + '/', '_blank', false)
                         */
                         )),
-        (isNull(appname) || appname == 'undefined')? mklist(
+        (true || isNull(appname) || appname == 'undefined')? mklist(
             ui.menufunc('menusignout', 'Sign out', 'return logout();', false),
             ui.menu('menuaccount', 'Account', '/#view=account', '_view', view == 'account')) :
             mklist());
@@ -380,12 +382,16 @@ function showview(url) {
     var uri = '/' + view + '/';
     var idx = isNull(params['idx'])? 0 : parseInt(params['idx']);
 
-    // Track store category view
+    // Track store category
     if (view == 'store') {
         storecat = isNull(params['category'])? 'top' : params['category'];
         storeidx = idx;
     }
 
+    // Track search query
+    if (view == 'search')
+        searchquery = isNull(params['q'])? '' : params['q'];
+
     // Determine the transition to use
     var vtransition = uri == viewuri? (idx >= viewidx? 'left' : 'right') : viewtransition(viewuri, uri);
 
@@ -407,7 +413,7 @@ function showview(url) {
         // Prepare current view for transition out
         var ovdiv = viewdiv;
         if (!isNull(ovdiv)) {
-            ovdiv.skipNode = true;
+            ui.removeElementIDs(ovdiv);
             ovdiv.className = 'viewunloading3dm';
         }
 
@@ -416,7 +422,6 @@ function showview(url) {
         var vdoc = appcache.get(uri);
         vdiv.innerHTML = vdoc;
         $('viewcontainer').appendChild(vdiv);
-        map(ui.evalScript, ui.innerScripts(vdiv));
 
         ui.async(function mtransitionview() {
             // Transition the old view out
@@ -425,20 +430,23 @@ function showview(url) {
 
             // Transition the new view in
             vdiv.className = 'viewloaded3dm';
+
+            ui.async(function mtransitioneval() {
+                map(ui.evalScript, ui.innerScripts(vdiv));
+            });
         });
 
     } else {
         // Prepare current view for transition out
         var ovdiv = viewdiv;
         if (!isNull(ovdiv))
-            ovdiv.skipNode = true;
+            ui.removeElementIDs(ovdiv);
 
         // Load the requested doc into the view
         var vdiv = mkviewdiv('viewloading3d');
         var vdoc = appcache.get(uri);
         vdiv.innerHTML = vdoc;
         $('viewcontainer').appendChild(vdiv);
-        map(ui.evalScript, ui.innerScripts(vdiv));
 
         ui.async(function transitionview() {
             // Transition the new view in
@@ -447,6 +455,10 @@ function showview(url) {
             // Transition the old view out
             if (!isNull(ovdiv))
                 ovdiv.parentNode.removeChild(ovdiv);
+
+            ui.async(function mtransitioneval() {
+                map(ui.evalScript, ui.innerScripts(vdiv));
+            });
         });
     }
 
@@ -622,7 +634,7 @@ document.body.onorientationchange = func
             //debug('appcache iframe loaded');
         };
 
-        ui.delay(function() {
+        ui.async(function() {
             $('installer').innerHTML = '<iframe src="/cache/" class="installer"></iframe>';
         });
 
@@ -639,10 +651,10 @@ document.body.onorientationchange = func
         }
 
         //debug('cache-manifest changed, reloading');
-        ui.delay(function() {
+        ui.async(function() {
             workingstatus(true);
             showstatus('Updating');
-            ui.delay(function() {
+            ui.async(function() {
                 workingstatus(true);
                 showstatus('Updating');
                 map(function(res) {

Modified: tuscany/sca-cpp/trunk/hosting/server/htdocs/info/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/htdocs/info/index.html?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/htdocs/info/index.html (original)
+++ tuscany/sca-cpp/trunk/hosting/server/htdocs/info/index.html Mon Feb 11 05:48:20 2013
@@ -26,7 +26,7 @@
 <tr><td class="label">URL:</td></tr>
 <tr><td><input type="text" id="appURL" class="readentry" size="30" readonly="readonly" placeholder="App URL" style="width: 300px;"/></td></tr>
 <tr><td class="label">Icon:</td></tr>
-<tr><td><img id="appIcon" style="width: 50px; height: 50px; vertical-align: top;"/><input id="uploadIcon" type="button" class="lightbutton" value="Upload" style="display:none;"/><input id="uploadFile" type="file" accept="image/*" style="display: none;"/><span id="refreshingIcon" class="refreshing" style="display:none;"/></td></tr>
+<tr><td><img id="appIcon" style="width: 50px; height: 50px; vertical-align: top;"/><input id="uploadIcon" type="button" class="lightbutton" value="Upload" style="display: none;"/><input id="uploadFile" type="file" accept="image/*" style="visibility: hidden;"/><span id="refreshingIcon" class="refreshing" style="display:none;"/></td></tr>
 <tr><td class="label">Author:</td></tr>
 <tr><td><img id="authorPicture" style="width: 50px; height: 50px; vertical-align: middle;"/><input type="text" id="appAuthor" class="readentry" size="30" readonly="readonly" placeholder="Author of the app" style="width: 248px;"/></td></tr>
 <tr><td class="label">Rating:</td></tr>
@@ -55,12 +55,11 @@ var appname = ui.fragmentParams(location
  */
 (function layout() {
     document.title = config.windowtitle() + ' - Info - ' + appname;
-    $('viewhead').innerHTML = '<span id="appname" class="cmenu">' + appname + '</span>' +
-        '<input type="button" class="redbutton plusminus" style="position: absolute; top: 4px; left: 5px;" id="deleteApp" value="-" title="Delete this app" disabled="true"/>' +
-        '<span style="position: absolute; top: 0px; right: 5px;">' +
-        '<input type="button" class="greenbutton" id="runApp" value="Run" title="Run this app"/>' +
-        '<input type="button" class="bluebutton" id="cloneApp" value="'+ config.clone() +'" title="' + config.clone() + ' this app"/>' +
-        '</span>';
+    $('viewhead').innerHTML = '<span id="appname" class="cmenu">' + appname + 
+        '<input type="button" class="redbutton plusminus" style="position: absolute; top: 4px; left: 2px;" id="deleteApp" value="-" title="Delete this app" disabled="true"/>' +
+        '<input type="button" class="bluebutton" id="editApp" style="position: absolute; top: 4px; right: 72px;" value="Edit" title="Edit this app" disabled="true"/>' +
+        '<input type="button" class="greenbutton plusminus" id="runApp" style="position: absolute; top: 4px; right: 37px;" value="&gt;" title="Run this app"/>' +
+        '<input type="button" class="bluebutton" style="position: absolute; top: 4px; right: 2px; font-size: 16px;" id="cloneApp" value="C" title="' + config.clone() + ' this app"/>';
     if (!ui.isMobile())
         $('viewform').className = 'viewform flatscrollbars';
     $('appURL').value = window.location.hostname + '/' + appname + '/';
@@ -133,9 +132,13 @@ var savediconxml;
             $('appDescription').className = 'flatentry';
             $('uploadIcon').style.display = 'inline';
             $('deleteApp').disabled = false;
-            $('deleteApp').onclick = function() {
+            $('editApp').disabled = false;
+            ui.onclick($('editApp'), function(e) {
+                return ui.navigate('/#view=page&app=' + appname, '_view');
+            });
+            ui.onclick($('deleteApp'), function(e) {
                 return ui.navigate('/#view=delete&app=' + appname, '_view');
-            }
+            });
             onlinestatus();
         } else {
             showstatus('Read only');
@@ -360,7 +363,7 @@ var lastkeyup = null;
 $('appDescription').onkeyup = function() {
     var t = new Date().getTime();
     lastkeyup = t;
-    ui.delay(function() {
+    ui.async(function() {
             return t == lastkeyup? onappchange() : true;
         }, 2000);
 };
@@ -376,16 +379,16 @@ $('appForm').onsubmit = function() {
 /**
  * Handle Clone button event.
  */
-$('cloneApp').onclick = function() {
+ui.onclick($('cloneApp'), function(e) {
     return ui.navigate('/#view=clone&app=' + appname, '_view');
-};
+});
 
 /**
  * Handle Run button event.
  */
-$('runApp').onclick = function() {
+ui.onclick($('runApp'), function(e) {
     return ui.navigate('/' + appname + '/', '_blank');
-};
+});
 
 /**
  * Read and upload icon file.
@@ -417,7 +420,7 @@ function uploadicon(files) {
             showstatus('Loaded');
 
             // Now upload it
-            ui.delay(function() {
+            ui.async(function() {
                 var iconentry = mklist("'entry", mklist("'title", appname), mklist("'id", appname), mklist("'author", username), mklist("'content", mklist("'icon", mklist("'image", url))));
                 var entryxml = car(atom.writeATOMEntry(valuesToElements(mklist(iconentry))));
                 if (savediconxml == entryxml) {
@@ -451,7 +454,7 @@ function emailicon() {
 
         // Open the email app
         var mailto = safeb64encode('i/' + appname + '/' + token);
-        ui.navigate('mailto:' + mailto + '@' + topdomainname(window.location.hostname) + '?subject=Email to upload&body=Paste icon here', '_self');
+        ui.navigate('mailto:' + mailto + '@' + topdomainname(window.location.hostname) + '?subject=Uploading icon&body=Paste icon here', '_self');
 
         // Refresh app icon
         refreshingicon = true;
@@ -462,11 +465,11 @@ function emailicon() {
 /**
  * Handle icon upload events.
  */
-$('uploadIcon').onclick = function() {
-    if (ui.isMobile())
-        return emailicon();
-    return $('uploadFile').click();
-};
+ui.onclick($('uploadIcon'), function(e) {
+    if (ui.isMobile() && ((ui.isWebkit() && ui.browserVersion() < 6.0) || (ui.isAndroid() && ui.browserVersion() < 2.2)))
+        return ui.delay(function() { return emailicon(); });
+    return ui.delay(function() { return $('uploadFile').click(); });
+});
 $('uploadFile').onchange = function(e) {
     return uploadicon(e.target.files);
 };
@@ -484,9 +487,9 @@ $('appIcon').ondrop = function(e) {
 /**
  * Handle rate button event.
  */
-$('rateApp').onclick = function() {
+ui.onclick($('rateApp'), function(e) {
     return ui.navigate('/#view=rate&app=' + appname, '_view');
-};
+});
 
 })();
 </script>

Modified: tuscany/sca-cpp/trunk/hosting/server/htdocs/login/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/htdocs/login/index.html?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/htdocs/login/index.html (original)
+++ tuscany/sca-cpp/trunk/hosting/server/htdocs/login/index.html Mon Feb 11 05:48:20 2013
@@ -28,11 +28,9 @@
 <script src="http://www.example.com:9998/target/target-script-min.js#anonymous"></script>
 -->
 <title>Sign in</title>
-<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"/> 
-<!--
+<meta name="viewport" content="user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-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="apple-touch-icon-precomposed" href="/public/touchicon.png"/>
 <base href="/login/"/>
 <script type="text/javascript">
@@ -137,7 +135,7 @@ ui.includeCSS(appcache.get('/ui-min.css'
 <tr><td><span id="loginprompt" style="font-size: 16px;"></span></tr></td>
 <tr><td><input type="text" class="flatentry" name="httpd_username" value="" placeholder="Username or email"/></td></tr>
 <tr><td><input type="password" class="flatentry" name="httpd_password" value="" placeholder="Password"/></td></tr>
-<tr><td><input type="submit" class="bluebutton" style="font-size: 16px; line-height: 16px; padding: 6px; height: 32px" value="Sign in"/></td></tr>
+<tr><td><input type="submit" class="bluebutton" style="font-size: 16px; line-height: 16px;" value="Sign in"/></td></tr>
 </table>
 <input type="hidden" name="httpd_location" value="/"/>
 </form>
@@ -146,7 +144,7 @@ ui.includeCSS(appcache.get('/ui-min.css'
 <form name="facebookOAuth2Form" style="width: 100%;">
 <table style="width: 100%;">
 <tr><td><span style="font-size: 16px;">Sign in with your <span style="font-weight: bold;">Facebook</span> account</span></td></tr>
-<tr><td><input type="button" id="facebookOAuth2Signin" value="Sign in" class="bluebutton" style="font-size: 16px; line-height: 16px; padding: 6px; height: 32px"/></td></tr>
+<tr><td><input type="button" id="facebookOAuth2Signin" value="Sign in" class="bluebutton" style="font-size: 16px;"/></td></tr>
 </table>
 </form>
 <br/>
@@ -154,7 +152,7 @@ ui.includeCSS(appcache.get('/ui-min.css'
 <form name="googleOAuth2Form" style="width: 100%;">
 <table style="width: 100%;">
 <tr><td><span style="font-size: 16px;">Sign in with your <span style="font-weight: bold;" >Google</span> account</span></td></tr>
-<tr><td><input type="button" id="googleOAuth2Signin" value="Sign in" class="bluebutton" style="font-size: 16px; line-height: 16px; padding: 6px; height: 32px"/></td></tr>
+<tr><td><input type="button" id="googleOAuth2Signin" value="Sign in" class="bluebutton" style="font-size: 16px;"/></td></tr>
 </table>
 </form>
 <br/>
@@ -194,7 +192,7 @@ try {
     $('loginprompt').innerHTML = config.loginprompt();
     document.title = config.windowtitle() + ' - Sign in';
     $('viewhead').innerHTML = '<span class="bcmenu">' + config.pagetitle() + '</span>' +
-        '<span class="rmenu"><input type="button" id="signUp" class="redbutton" style="font-size: 16px; line-height: 16px; padding: 6px; height: 32px" title="' + config.signuptitle() + '" value="Sign up"/></span>';
+        '<input type="button" id="signUp" class="redbutton" style="position: absolute; top: 4px; right: 2px; font-size: 16px;" title="' + config.signuptitle() + '" value="Sign up"/>';
     if (!ui.isMobile())
         $('viewcontent').className = 'viewcontent flatscrollbars';
     $('status').className = ui.isMobile()? 'status3dm' : 'status3d';
@@ -337,13 +335,13 @@ function withgoogle() {
     return parms;
 }
 
-$('facebookOAuth2Signin').onclick = function() {
+ui.onclick($('facebookOAuth2Signin'), function(e) {
     return submitoauth2signin(withfacebook);
-};
+});
 
-$('googleOAuth2Signin').onclick = function() {
+ui.onclick($('googleOAuth2Signin'), function(e) {
     return submitoauth2signin(withgoogle);
-};
+});
 
 /**
  * Signin with a username and password.
@@ -356,9 +354,9 @@ $('formSignin').onsubmit = function subm
 /**
  * Signup.
  */
-$('signUp').onclick = function submitsignup() {
+ui.onclick($('signUp'), function submitsignup(e) {
     ui.navigate('/public/notyet/', '_self');
-};
+});
 
 /**
  * Handle orientation change.
@@ -442,7 +440,7 @@ var appresources = [
             //debug('appcache iframe loaded');
         };
 
-        ui.delay(function() {
+        ui.async(function() {
             $('installer').innerHTML = '<iframe src="/public/cache/" class="installer"></iframe>';
         });
 
@@ -459,10 +457,10 @@ var appresources = [
         }
 
         //debug('cache-manifest changed, reloading');
-        ui.delay(function() {
+        ui.async(function() {
             workingstatus(true);
             showstatus('Updating');
-            ui.delay(function() {
+            ui.async(function() {
                 workingstatus(true);
                 showstatus('Updating');
                 map(function(res) {

Modified: tuscany/sca-cpp/trunk/hosting/server/htdocs/page/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/htdocs/page/index.html?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/htdocs/page/index.html (original)
+++ tuscany/sca-cpp/trunk/hosting/server/htdocs/page/index.html Mon Feb 11 05:48:20 2013
@@ -95,11 +95,12 @@ var appname = ui.fragmentParams(location
     document.title = config.windowtitle() + ' - Page - ' + appname;
 
     $('viewhead').innerHTML = '<span id="appTitle" class="cmenu">' + appname + '</span>' +
-    '<input type="button" id="deleteWidgetButton" title="Delete a Widget" class="redbutton plusminus" style="position: absolute; top: 4px; left: 5px;" disabled="true" value="-"/>' +
-    '<span style="position: absolute; top: 0px; left: 45px; right: 115px; padding: 0px; background: transparent;"><input id="widgetValue" type="text" value="" class="flatentry" title="Widget value" autocapitalize="off" placeholder="Value" style="position: absolute; left: 0px; top: 4px; width: 100%; display: none;" readonly="readonly"/></span>' +
-    '<input type="button" id="playPageButton" title="View page" class="greenbutton plusminus" style="position: absolute; top: 4px; right: 75px;" value="&gt;"/>' +
-    '<input type="button" id="copyWidgetButton" title="Copy a Widget" class="bluebutton" style="position: absolute; top: 4px; right: 40px; font-size: 16px;" disabled="true" value="C"/>' +
-    '<input type="button" id="addWidgetButton" title="Add a Widget" class="bluebutton plusminus" style="position: absolute; top: 4px; right: 5px;" disabled="true" value="+"/>';
+    '<input type="button" id="deleteWidgetButton" title="Delete a widget" class="redbutton plusminus" style="position: absolute; top: 4px; left: 2px;" disabled="true" value="-"/>' +
+    '<span style="position: absolute; top: 0px; left: 37px; right: 110px; padding: 0px; background: transparent;"><input id="widgetValue" type="text" value="" class="flatentry" title="Widget value" autocapitalize="off" placeholder="Value" style="position: absolute; left: 0px; top: 4px; width: 100%; display: none;" readonly="readonly"/></span>' +
+    '<input type="button" id="playPageButton" title="View page" class="greenbutton plusminus" style="position: absolute; top: 4px; right: 72px;" value="&gt;"/>' +
+    '<input type="button" id="copyWidgetButton" title="Copy a widget" class="bluebutton" style="position: absolute; top: 4px; right: 37px; font-size: 16px;" disabled="true" value="C"/>' +
+    '<input type="button" id="addWidgetButton" title="Add a widget" class="bluebutton plusminus" style="position: absolute; top: 4px; right: 2px;" disabled="true" value="+"/>';
+    //'<input type="button" id="appInfoButton" title="View app info" class="bluebutton" style="position: absolute; top: 4px; right: 2px; font-size: 16px;" value="i"/>';
 
     if (ui.isMobile()) {
         $('palettecontainer').className = 'palettecontainer3dm';
@@ -606,7 +607,7 @@ function showpalette() {
         $('paletteview').className = 'paletteloading3dm';
         $('paletteview').style.display = 'block';
         $('paletteview').visible = true;
-        ui.async(function transitionview() {
+        ui.delay(function transitionview() {
             $('paletteview').className = 'paletteloaded3dm';
         });
     } else {
@@ -624,7 +625,7 @@ function hidepalette() {
     if (ui.isMobile()) {
         $('paletteview').className = 'paletteunloading3dm';
         $('paletteview').visible = false;
-        ui.async(function transitionview() {
+        ui.delay(function transitionview() {
             $('paletteview').className = 'paletteunloaded3dm';
         });
     } else {
@@ -675,7 +676,7 @@ function mkeditor() {
             return save(newxml);
 
         // Autosave other changes after 1 second
-        ui.delay(function autosave() {
+        ui.async(function autosave() {
             if (savedxhtml == newxml) {
                 showstatus('Saved');
                 return false;
@@ -806,14 +807,6 @@ function mkeditor() {
             moved = false;
             return onmousedown(e);
         };
-        $('pagediv').addEventListener('touchstart', function(e) {
-            //debug('ontouchstart');
-            mdown = true;
-            moveX = e.touches[0].clientX;
-            moveY = e.touches[0].clientY;
-            moved = false;
-            return onmousedown(e);
-        }, false);
         $('palettecontent').ontouchstart = function(e) {
             //debug('ontouchstart');
             mdown = true;
@@ -977,24 +970,6 @@ function mkeditor() {
         return true;
     }
 
-    /*
-    if (!ui.isMobile()) {
-        $('pagediv').onclick = function(e) {
-            //debug('onclick');
-            moveX = e.clientX;
-            moveY = e.clientY;
-            return onclick(e);
-        };
-    } else {
-        window.onclick = function(e) {
-            //debug('onclick');
-            moveX = e.touches[0].clientX;
-            moveY = e.touches[0].clientY;
-            return onclick(e);
-        };
-    }
-    */
-
     /**
      * Handle field on change events.
      */
@@ -1009,16 +984,16 @@ function mkeditor() {
     };
 
     // Handle add widget event.
-    $('addWidgetButton').onclick = function() {
+    ui.onclick($('addWidgetButton'), function(e) {
 
         // Show / hide the palette
         if ($('paletteview').visible)
             return hidepalette();
         return showpalette();
-    };
+    });
 
     // Handle delete event.
-    $('deleteWidgetButton').onclick = function() {
+    ui.onclick($('deleteWidgetButton'), function(e) {
         if (selected == null)
             return false;
 
@@ -1035,10 +1010,10 @@ function mkeditor() {
         // Trigger page change event
         onpagechange(true);
         return false;
-    };
+    });
 
     // Handle copy event.
-    $('copyWidgetButton').onclick = function() {
+    ui.onclick($('copyWidgetButton'), function(e) {
         if (selected == null)
             return false;
         if (selected.id.substring(0, 8) == 'palette:')
@@ -1068,18 +1043,18 @@ function mkeditor() {
         // Trigger page change event
         onpagechange(true);
         return false;
-    };
+    });
 
     /**
-    * Handle play page button event.
-    */
-    $('playPageButton').onclick = function() {
+     * Handle play page button event.
+     */
+    ui.onclick($('playPageButton'), function(e) {
 
         // Show / hide the page play frame
         if ($('playdiv').visible)
             return showeditor();
         return showplaying();
-    }
+    });
 
     // Show the editor
     showeditor();
@@ -1234,6 +1209,15 @@ function save(newxml) {
 };
 
 /**
+ * Handle app info button event.
+ */
+/* Disabled for now.
+ui.onclick($('appInfoButton'), function(e) {
+    return ui.navigate('/#view=info&app=' + appname, '_view');
+});
+*/
+
+/**
  * Initialize the page editor.
  */
 mkeditor();

Modified: tuscany/sca-cpp/trunk/hosting/server/htdocs/proxy/public/oops/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/htdocs/proxy/public/oops/index.html?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/htdocs/proxy/public/oops/index.html (original)
+++ tuscany/sca-cpp/trunk/hosting/server/htdocs/proxy/public/oops/index.html Mon Feb 11 05:48:20 2013
@@ -28,11 +28,9 @@
 <script src="http://www.example.com:9998/target/target-script-min.js#anonymous"></script>
 -->
 <title>Oops</title>
-<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"/> 
-<!--
+<meta name="viewport" content="user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-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="apple-touch-icon-precomposed" href="/proxy/public/touchicon.png"/>
 <base href="/proxy/public/oops/"/>
 <script type="text/javascript">
@@ -305,7 +303,7 @@ var appresources = [
             //debug('appcache iframe loaded');
         };
 
-        ui.delay(function() {
+        ui.async(function() {
             $('installer').innerHTML = '<iframe src="/proxy/public/cache/" class="installer"></iframe>';
         });
 
@@ -322,9 +320,9 @@ var appresources = [
         }
 
         //debug('cache-manifest changed, reloading');
-        ui.delay(function() {
+        ui.async(function() {
             showstatus('Updating');
-            ui.delay(function() {
+            ui.async(function() {
                 map(function(res) {
                     appcache.remove(res[0]);
                     appcache.get(res[0], 'remote');

Modified: tuscany/sca-cpp/trunk/hosting/server/htdocs/public/notauth/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/htdocs/public/notauth/index.html?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/htdocs/public/notauth/index.html (original)
+++ tuscany/sca-cpp/trunk/hosting/server/htdocs/public/notauth/index.html Mon Feb 11 05:48:20 2013
@@ -28,11 +28,9 @@
 <script src="http://www.example.com:9998/target/target-script-min.js#anonymous"></script>
 -->
 <title>Sorry</title>
-<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"/> 
-<!--
+<meta name="viewport" content="user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-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="apple-touch-icon-precomposed" href="/public/touchicon.png"/>
 <base href="/public/notauth/"/>
 <script type="text/javascript">
@@ -304,7 +302,7 @@ var appresources = [
             //debug('appcache iframe loaded');
         };
 
-        ui.delay(function() {
+        ui.async(function() {
             $('installer').innerHTML = '<iframe src="/public/cache/" class="installer"></iframe>';
         });
 
@@ -321,9 +319,9 @@ var appresources = [
         }
 
         //debug('cache-manifest changed, reloading');
-        ui.delay(function() {
+        ui.async(function() {
             showstatus('Updating');
-            ui.delay(function() {
+            ui.async(function() {
                 map(function(res) {
                     appcache.remove(res[0]);
                     appcache.get(res[0], 'remote');

Modified: tuscany/sca-cpp/trunk/hosting/server/htdocs/public/notfound/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/htdocs/public/notfound/index.html?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/htdocs/public/notfound/index.html (original)
+++ tuscany/sca-cpp/trunk/hosting/server/htdocs/public/notfound/index.html Mon Feb 11 05:48:20 2013
@@ -28,11 +28,9 @@
 <script src="http://www.example.com:9998/target/target-script-min.js#anonymous"></script>
 -->
 <title>Page not found</title>
-<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"/> 
-<!--
+<meta name="viewport" content="user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-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="apple-touch-icon-precomposed" href="/public/touchicon.png"/>
 <base href="/public/notfound/"/>
 <script type="text/javascript">
@@ -305,7 +303,7 @@ var appresources = [
             //debug('appcache iframe loaded');
         };
 
-        ui.delay(function() {
+        ui.async(function() {
             $('installer').innerHTML = '<iframe src="/public/cache/" class="installer"></iframe>';
         });
 
@@ -322,9 +320,9 @@ var appresources = [
         }
 
         //debug('cache-manifest changed, reloading');
-        ui.delay(function() {
+        ui.async(function() {
             showstatus('Updating');
-            ui.delay(function() {
+            ui.async(function() {
                 map(function(res) {
                     appcache.remove(res[0]);
                     appcache.get(res[0], 'remote');

Modified: tuscany/sca-cpp/trunk/hosting/server/htdocs/public/notyet/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/htdocs/public/notyet/index.html?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/htdocs/public/notyet/index.html (original)
+++ tuscany/sca-cpp/trunk/hosting/server/htdocs/public/notyet/index.html Mon Feb 11 05:48:20 2013
@@ -28,11 +28,9 @@
 <script src="http://www.example.com:9998/target/target-script-min.js#anonymous"></script>
 -->
 <title>Page not found</title>
-<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"/> 
-<!--
+<meta name="viewport" content="user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-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="apple-touch-icon-precomposed" href="/public/touchicon.png"/>
 <base href="/public/notyet/"/>
 <script type="text/javascript">
@@ -305,7 +303,7 @@ var appresources = [
             //debug('appcache iframe loaded');
         };
 
-        ui.delay(function() {
+        ui.async(function() {
             $('installer').innerHTML = '<iframe src="/public/cache/" class="installer"></iframe>';
         });
 
@@ -322,9 +320,9 @@ var appresources = [
         }
 
         //debug('cache-manifest changed, reloading');
-        ui.delay(function() {
+        ui.async(function() {
             showstatus('Updating');
-            ui.delay(function() {
+            ui.async(function() {
                 map(function(res) {
                     appcache.remove(res[0]);
                     appcache.get(res[0], 'remote');

Modified: tuscany/sca-cpp/trunk/hosting/server/htdocs/public/oops/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/htdocs/public/oops/index.html?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/htdocs/public/oops/index.html (original)
+++ tuscany/sca-cpp/trunk/hosting/server/htdocs/public/oops/index.html Mon Feb 11 05:48:20 2013
@@ -28,11 +28,9 @@
 <script src="http://www.example.com:9998/target/target-script-min.js#anonymous"></script>
 -->
 <title>Oops</title>
-<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"/> 
-<!--
+<meta name="viewport" content="user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-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="apple-touch-icon-precomposed" href="/public/touchicon.png"/>
 <base href="/public/oops/"/>
 <script type="text/javascript">
@@ -304,7 +302,7 @@ var appresources = [
             //debug('appcache iframe loaded');
         };
 
-        ui.delay(function() {
+        ui.async(function() {
             $('installer').innerHTML = '<iframe src="/public/cache/" class="installer"></iframe>';
         });
 
@@ -321,9 +319,9 @@ var appresources = [
         }
 
         //debug('cache-manifest changed, reloading');
-        ui.delay(function() {
+        ui.async(function() {
             showstatus('Updating');
-            ui.delay(function() {
+            ui.async(function() {
                 map(function(res) {
                     appcache.remove(res[0]);
                     appcache.get(res[0], 'remote');

Modified: tuscany/sca-cpp/trunk/hosting/server/htdocs/rate/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/htdocs/rate/index.html?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/htdocs/rate/index.html (original)
+++ tuscany/sca-cpp/trunk/hosting/server/htdocs/rate/index.html Mon Feb 11 05:48:20 2013
@@ -82,14 +82,14 @@ var reviews = sca.reference(editorComp, 
  * Initialize the rate buttons.
  */
 var rateAppButtons = [
-    [$('rateApp1'), 1, function() { return onclickrating(1); }, 'Don\'t like it'],
-    [$('rateApp2'), 2, function() { return onclickrating(2); }, 'It\'s ok'],
-    [$('rateApp3'), 3, function() { return onclickrating(3); }, 'It\'s good'],
-    [$('rateApp4'), 4, function() { return onclickrating(4); }, 'It\'s great']
+    [$('rateApp1'), 1, function(e) { return onclickrating(1); }, 'Don\'t like it'],
+    [$('rateApp2'), 2, function(e) { return onclickrating(2); }, 'It\'s ok'],
+    [$('rateApp3'), 3, function(e) { return onclickrating(3); }, 'It\'s good'],
+    [$('rateApp4'), 4, function(e) { return onclickrating(4); }, 'It\'s great']
 ];
 (function initRateAppButtons() {
     map(function(b) {
-        b[0].onclick = b[2];
+        ui.onclick(b[0], b[2]);
     }, rateAppButtons);
 })();
 
@@ -180,9 +180,9 @@ function onclickrating(r) {
 /**
  * Navigate back.
  */
-$('rateAppDoneButton').onclick = function() {
+ui.onclick($('rateAppDoneButton'), function(e) {
     history.back();
-};
+});
 
 })();
 </script>

Modified: tuscany/sca-cpp/trunk/hosting/server/htdocs/search/index.html
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/hosting/server/htdocs/search/index.html?rev=1444660&r1=1444659&r2=1444660&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/hosting/server/htdocs/search/index.html (original)
+++ tuscany/sca-cpp/trunk/hosting/server/htdocs/search/index.html Mon Feb 11 05:48:20 2013
@@ -38,8 +38,8 @@
         $('viewcontent').className = 'viewcontent flatscrollbars';
 
     $('viewhead').innerHTML = '<form id="searchForm">' +
-    '<span style="position: absolute; top: 0px; left: 5px; right: 70px; padding: 0px; background: transparent;"><input type="text" id="searchQuery" value="" class="flatentry" title="Search" autocapitalize="off" placeholder="Search for apps" style="position: absolute; left: 0px; top: 4px; width: 100%;"></span>' +
-    '<input type="submit" id="searchButton" title="Search" class="bluebutton search" style="position: absolute; top: 4px; right: 5px; width: 60px; background-position: center center; background-repeat: no-repeat; background-image: url(\'' + ui.b64png(appcache.get('/public/search.b64')) + '\');" value=" "/>' +
+    '<span style="position: absolute; top: 0px; left: 2px; right: 70px; padding: 0px; background: transparent;"><input type="text" id="searchQuery" value="" class="flatentry" title="Search" autocapitalize="off" placeholder="Search for apps" style="position: absolute; left: 0px; top: 4px; width: 100%;"></span>' +
+    '<input type="submit" id="searchButton" title="Search" class="bluebutton search" style="position: absolute; top: 4px; right: 2px; width: 60px; background-position: center center; background-repeat: no-repeat; background-image: url(\'' + ui.b64png(appcache.get('/public/search.b64')) + '\');" value=" "/>' +
     '</form>';
 
     $('viewcontent').appendChild(ui.declareCSS(
@@ -50,6 +50,11 @@
 })();
 
 /**
+ * Get the requested search query.
+ */
+var query = ui.fragmentParams(location)['q'];
+
+/**
  * Initialize service references.
  */
 var editorComp = sca.component("Editor");
@@ -186,10 +191,16 @@ $('searchForm').onsubmit = function() {
         return false;
     if (ui.isMobile())
         $('searchQuery').blur();
-    getapps($('searchQuery').value.trim());
+    //getapps($('searchQuery').value.trim());
+    ui.navigate('/#view=search&q=' + $('searchQuery').value.trim(), '_view');
     return false;
 };
 
+if(query && query != '') {
+    $('searchQuery').value = query;
+    getapps(query);
+}
+
 })();
 </script>