diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-08-06 05:59:32 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-08-06 05:59:32 +0000 |
commit | 3b3beac5adfa1995a9a4c92fd92a881f024be08e (patch) | |
tree | d958076da28db597359af0ae27db369925e253e4 /sca-cpp/trunk/modules/edit/htdocs/create | |
parent | 4b14cefc9e79850ebb18844752771c3f141c7385 (diff) |
Javascript improvements: add local storage, improve caching using URI fragments instead of query strings, simplify component layout and optimize some of the Javascript functions, and add the ability to clone components.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1154447 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | sca-cpp/trunk/modules/edit/htdocs/create/index.html | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/sca-cpp/trunk/modules/edit/htdocs/create/index.html b/sca-cpp/trunk/modules/edit/htdocs/create/index.html index bf8f71f7e9..575016aeb8 100644 --- a/sca-cpp/trunk/modules/edit/htdocs/create/index.html +++ b/sca-cpp/trunk/modules/edit/htdocs/create/index.html @@ -17,7 +17,7 @@ * specific language governing permissions and limitations * under the License. --> -<html> +<html manifest="/cache-manifest.cmf"> <head> <title>Create App</title> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0"/> @@ -28,8 +28,8 @@ <script type="text/javascript" src="/all-min.js"></script> <script type="text/javascript" src="/menu.js"></script> </head> -<body class="delayed" onload="ui.onload();"> -<div id="bodydiv" class="devicewidth"> +<body class="delayed" onload="ui.onload();" onbeforeunload="ui.onbeforeunload();"> +<div id="bodydiv" class="bodydiv"> <div id="headdiv" class="hsection"> <script type="text/javascript" src="/headconfig.js"></script> @@ -60,13 +60,15 @@ <tr><tr><td style="padding-top: 6px;"><b>Description:</b></td></tr> <tr><td><textarea id="appDescription" cols="40" rows="3" placeholder="Enter a short description of your app" style="width: 300px;"></textarea></td></tr> <tr><td> -<input id="createAppOKButton" type="submit" class="greenbutton" style="font-weight: bold;" value="Create" title="Create the app"/> -<input id="createAppCancelButton" type="button" class="redbutton" value="Cancel"/> +<input id="createAppOKButton" type="submit" class="graybutton" style="font-weight: bold;" value="Create" title="Create the app"/> +<input id="createAppCancelButton" type="button" class="graybutton" value="Cancel"/> </td></tr> </table> </form> <script type="text/javascript"> +ui.initbody(); + // Set page titles document.title = windowtitle(window.location.hostname) + ' - Create App'; $('h1').innerHTML = hometitle(window.location.hostname); @@ -94,10 +96,14 @@ $('createAppForm').onsubmit = function() { var title = $('appTitle').value; var app = mklist(mklist("'entry", mklist("'title", title != ''? title : name), mklist("'id", 'new'))); var entry = atom.writeATOMEntry(valuesToElements(app)); - dashboards.put(name, car(entry)); + dashboards.put(name, car(entry), function(e) { + if (e) + return false; - // Open it in the page editor - window.open('/page/?app=' + name, '_self'); + // Open it in the page editor + ui.navigate('/page/#app=' + name, '_self'); + return false; + }); return false; }; @@ -105,7 +111,7 @@ $('createAppForm').onsubmit = function() { * Cancel creating an app. */ $('createAppCancelButton').onclick = function() { - return window.open('/store/', '_self'); + return ui.navigate('/store/', '_self'); }; </script> |