diff options
Diffstat (limited to '')
19 files changed, 176 insertions, 177 deletions
diff --git a/sca-cpp/trunk/hosting/server/htdocs/account/index.html b/sca-cpp/trunk/hosting/server/htdocs/account/index.html index 9357a89dd6..c16dde4b53 100644 --- a/sca-cpp/trunk/hosting/server/htdocs/account/index.html +++ b/sca-cpp/trunk/hosting/server/htdocs/account/index.html @@ -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); }; diff --git a/sca-cpp/trunk/hosting/server/htdocs/app/index.html b/sca-cpp/trunk/hosting/server/htdocs/app/index.html index 9ff3a72b0f..108a35ee09 100644 --- a/sca-cpp/trunk/hosting/server/htdocs/app/index.html +++ b/sca-cpp/trunk/hosting/server/htdocs/app/index.html @@ -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, compos) { } // 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)) { diff --git a/sca-cpp/trunk/hosting/server/htdocs/clone/index.html b/sca-cpp/trunk/hosting/server/htdocs/clone/index.html index e9de1be1fb..208aea94b8 100644 --- a/sca-cpp/trunk/hosting/server/htdocs/clone/index.html +++ b/sca-cpp/trunk/hosting/server/htdocs/clone/index.html @@ -164,9 +164,9 @@ $('cloneAppForm').onsubmit = function() { /** * Cancel cloning an app. */ -$('cloneAppCancelButton').onclick = function() { +ui.onclick($('cloneAppCancelButton'), function(e) { history.back(); -}; +}); })(); </script> diff --git a/sca-cpp/trunk/hosting/server/htdocs/create/index.html b/sca-cpp/trunk/hosting/server/htdocs/create/index.html index 3fc26b8515..daae21202d 100644 --- a/sca-cpp/trunk/hosting/server/htdocs/create/index.html +++ b/sca-cpp/trunk/hosting/server/htdocs/create/index.html @@ -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. diff --git a/sca-cpp/trunk/hosting/server/htdocs/delete/index.html b/sca-cpp/trunk/hosting/server/htdocs/delete/index.html index 3855a09e3c..d578842e7b 100644 --- a/sca-cpp/trunk/hosting/server/htdocs/delete/index.html +++ b/sca-cpp/trunk/hosting/server/htdocs/delete/index.html @@ -138,9 +138,9 @@ $('deleteAppForm').onsubmit = function() { /** * Cancel cloning an app. */ -$('deleteAppCancelButton').onclick = function() { +ui.onclick($('deleteAppCancelButton'), function(e) { history.back(); -}; +}); })(); </script> diff --git a/sca-cpp/trunk/hosting/server/htdocs/graph/index.html b/sca-cpp/trunk/hosting/server/htdocs/graph/index.html index 557f427e38..d239c3c021 100644 --- a/sca-cpp/trunk/hosting/server/htdocs/graph/index.html +++ b/sca-cpp/trunk/hosting/server/htdocs/graph/index.html @@ -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 = ''; }); diff --git a/sca-cpp/trunk/hosting/server/htdocs/home/index.html b/sca-cpp/trunk/hosting/server/htdocs/home/index.html index b5240bfd11..c586e54349 100644 --- a/sca-cpp/trunk/hosting/server/htdocs/home/index.html +++ b/sca-cpp/trunk/hosting/server/htdocs/home/index.html @@ -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. diff --git a/sca-cpp/trunk/hosting/server/htdocs/index.html b/sca-cpp/trunk/hosting/server/htdocs/index.html index 7722f96e3f..a77c59508f 100644 --- a/sca-cpp/trunk/hosting/server/htdocs/index.html +++ b/sca-cpp/trunk/hosting/server/htdocs/index.html @@ -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 = function(e) { //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 = function(e) { } //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) { diff --git a/sca-cpp/trunk/hosting/server/htdocs/info/index.html b/sca-cpp/trunk/hosting/server/htdocs/info/index.html index 3038d37cf2..5143808523 100644 --- a/sca-cpp/trunk/hosting/server/htdocs/info/index.html +++ b/sca-cpp/trunk/hosting/server/htdocs/info/index.html @@ -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)['app']; */ (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=">" 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> diff --git a/sca-cpp/trunk/hosting/server/htdocs/login/index.html b/sca-cpp/trunk/hosting/server/htdocs/login/index.html index 93d47d3f28..10e7b34d04 100644 --- a/sca-cpp/trunk/hosting/server/htdocs/login/index.html +++ b/sca-cpp/trunk/hosting/server/htdocs/login/index.html @@ -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 submitformsignin() { /** * 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) { diff --git a/sca-cpp/trunk/hosting/server/htdocs/page/index.html b/sca-cpp/trunk/hosting/server/htdocs/page/index.html index ca89ed34db..3834640dbc 100644 --- a/sca-cpp/trunk/hosting/server/htdocs/page/index.html +++ b/sca-cpp/trunk/hosting/server/htdocs/page/index.html @@ -95,11 +95,12 @@ var appname = ui.fragmentParams(location)['app']; 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=">"/>' + - '<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=">"/>' + + '<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(); diff --git a/sca-cpp/trunk/hosting/server/htdocs/proxy/public/oops/index.html b/sca-cpp/trunk/hosting/server/htdocs/proxy/public/oops/index.html index f7cdab9bf2..6d3b8b21aa 100644 --- a/sca-cpp/trunk/hosting/server/htdocs/proxy/public/oops/index.html +++ b/sca-cpp/trunk/hosting/server/htdocs/proxy/public/oops/index.html @@ -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'); diff --git a/sca-cpp/trunk/hosting/server/htdocs/public/notauth/index.html b/sca-cpp/trunk/hosting/server/htdocs/public/notauth/index.html index cf5f3465d8..2cfd72e5b1 100644 --- a/sca-cpp/trunk/hosting/server/htdocs/public/notauth/index.html +++ b/sca-cpp/trunk/hosting/server/htdocs/public/notauth/index.html @@ -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'); diff --git a/sca-cpp/trunk/hosting/server/htdocs/public/notfound/index.html b/sca-cpp/trunk/hosting/server/htdocs/public/notfound/index.html index ba82ecb897..728319daf3 100644 --- a/sca-cpp/trunk/hosting/server/htdocs/public/notfound/index.html +++ b/sca-cpp/trunk/hosting/server/htdocs/public/notfound/index.html @@ -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'); diff --git a/sca-cpp/trunk/hosting/server/htdocs/public/notyet/index.html b/sca-cpp/trunk/hosting/server/htdocs/public/notyet/index.html index 0597d10942..02d8f846cf 100644 --- a/sca-cpp/trunk/hosting/server/htdocs/public/notyet/index.html +++ b/sca-cpp/trunk/hosting/server/htdocs/public/notyet/index.html @@ -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'); diff --git a/sca-cpp/trunk/hosting/server/htdocs/public/oops/index.html b/sca-cpp/trunk/hosting/server/htdocs/public/oops/index.html index 788435289f..ba9f563a5f 100644 --- a/sca-cpp/trunk/hosting/server/htdocs/public/oops/index.html +++ b/sca-cpp/trunk/hosting/server/htdocs/public/oops/index.html @@ -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'); diff --git a/sca-cpp/trunk/hosting/server/htdocs/rate/index.html b/sca-cpp/trunk/hosting/server/htdocs/rate/index.html index 90d45bd3ea..f5211ca23c 100644 --- a/sca-cpp/trunk/hosting/server/htdocs/rate/index.html +++ b/sca-cpp/trunk/hosting/server/htdocs/rate/index.html @@ -82,14 +82,14 @@ var reviews = sca.reference(editorComp, "reviews"); * 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> diff --git a/sca-cpp/trunk/hosting/server/htdocs/search/index.html b/sca-cpp/trunk/hosting/server/htdocs/search/index.html index d46b0528c4..d50b492640 100644 --- a/sca-cpp/trunk/hosting/server/htdocs/search/index.html +++ b/sca-cpp/trunk/hosting/server/htdocs/search/index.html @@ -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> diff --git a/sca-cpp/trunk/hosting/server/htdocs/store/index.html b/sca-cpp/trunk/hosting/server/htdocs/store/index.html index 57920ede2e..b64e3de1ba 100644 --- a/sca-cpp/trunk/hosting/server/htdocs/store/index.html +++ b/sca-cpp/trunk/hosting/server/htdocs/store/index.html @@ -50,8 +50,7 @@ var categories = [ ['Featured', 'featured', 1], ['Top', 'top', 2], - //['New', 'new', 3], - //['Search', 'all', 4], + ['New', 'new', 3], ['My Apps', 'myapps', 5] ]; @@ -83,7 +82,7 @@ $('viewhead').innerHTML = (function catmenu() { var m = ''; map(function(c) { m += catmenuitem(car(c), cadr(c), caddr(c)); }, categories); - m += '<span class="rmenu"><input type="button" class="bluebutton" id="createApp" title="Create a new app" Value="Create"/></span>'; + m += '<input type="button" class="bluebutton" id="createApp" style="position: absolute; top: 4px; right: 2px;" title="Create a new app" Value="Create"/>'; return m; })(); @@ -113,9 +112,9 @@ function viewapp(appname) { /** * Create an app. */ -$('createApp').onclick = function() { +ui.onclick($('createApp'), function(e) { return ui.navigate('/#view=create', '_view'); -}; +}); /** * Get and display an app icon. |