From 49f4223605b4946a2bf6831262dd442375a4a929 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Mon, 23 May 2011 02:28:47 +0000 Subject: Simplify page navigations and optimize layout and event handling on touch devices. Optimize caching and minimize Ajax calls. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1126297 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/modules/edit/htdocs/create/index.html | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'sca-cpp/trunk/modules/edit/htdocs/create/index.html') diff --git a/sca-cpp/trunk/modules/edit/htdocs/create/index.html b/sca-cpp/trunk/modules/edit/htdocs/create/index.html index 9452275a83..0195473ca5 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/create/index.html +++ b/sca-cpp/trunk/modules/edit/htdocs/create/index.html @@ -47,7 +47,7 @@
- + @@ -81,7 +81,8 @@ ui.showbody(); // Init service references var editWidget = sca.component("EditWidget"); -var dashboard = sca.reference(editWidget, "dashboard"); +var dashboards = sca.reference(editWidget, "dashboards"); +var apps = sca.reference(editWidget, "apps"); /** * Create an app. @@ -90,11 +91,15 @@ $('createAppForm').onsubmit = function() { var name = $('appName').value; if (name == '') return false; + + // Clone the '.new' app template var title = $('appTitle').value; - var app = mklist(mklist("'entry", mklist("'title", title != ''? title : name), mklist("'id", name))); + var app = mklist(mklist("'entry", mklist("'title", title != ''? title : name), mklist("'id", 'new'))); var entry = atom.writeATOMEntry(valuesToElements(app)); - dashboard.put(name, car(entry)); - window.open('/store/', '_self'); + dashboards.put(name, car(entry)); + + // Open it in the page editor + window.open('/page/?app=' + name, '_self'); return false; }; -- cgit v1.2.3
App Name:
 
 
App Icon:
Sharing: