From 4951c1b04bf66f81cf648b76af3795245d56381a Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Mon, 11 Feb 2013 05:48:20 +0000 Subject: Improvements to the app management UI. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1444660 13f79535-47bb-0310-9956-ffa450edef68 --- .../trunk/hosting/server/htdocs/page/index.html | 72 +++++++++------------- 1 file changed, 28 insertions(+), 44 deletions(-) (limited to 'sca-cpp/trunk/hosting/server/htdocs/page') 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 = '' + appname + '' + - '' + - '' + - '' + - '' + - ''; + '' + + '' + + '' + + '' + + ''; + //''; 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(); @@ -1233,6 +1208,15 @@ function save(newxml) { return true; }; +/** + * 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. */ -- cgit v1.2.3