Author: erwan
Date: Mon May 17 13:01:20 2010 New Revision: 945126 URL: http://svn.apache.org/viewvc?rev=945126&view=rev Log: First version for a spinner when calling ajax requests Added: ofbiz/trunk/framework/images/webapp/images/spinner.gif (with props) ofbiz/trunk/themes/tomahawk/webapp/tomahawk/images/spinner.gif (with props) Modified: ofbiz/trunk/framework/images/webapp/images/selectall.js ofbiz/trunk/themes/bizznesstime/includes/header.ftl ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/style.css ofbiz/trunk/themes/bluelight/includes/header.ftl ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css ofbiz/trunk/themes/droppingcrumbs/includes/header.ftl ofbiz/trunk/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css ofbiz/trunk/themes/flatgrey/includes/header.ftl ofbiz/trunk/themes/flatgrey/webapp/flatgrey/maincss.css ofbiz/trunk/themes/multiflex/webapp/multiflex/style.css ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css Modified: ofbiz/trunk/framework/images/webapp/images/selectall.js URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/selectall.js?rev=945126&r1=945125&r2=945126&view=diff ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/selectall.js (original) +++ ofbiz/trunk/framework/images/webapp/images/selectall.js Mon May 17 13:01:20 2010 @@ -233,7 +233,11 @@ function confirmActionFormLink(msg, form * @param targetParams The URL parameters */ function ajaxUpdateArea(areaId, target, targetParams) { - new Ajax.Updater(areaId, target, {parameters: targetParams, evalScripts: true}); + waitSpinnerShow(); + new Ajax.Updater(areaId, target, {parameters: targetParams, evalScripts: true, + onSuccess: function(transport) {waitSpinnerHide();}, + onFailure: function() {waitSpinnerHide();} + }); } /** Update multiple areas (HTML container elements). @@ -241,6 +245,7 @@ function ajaxUpdateArea(areaId, target, * form of: areaId, target, target parameters [, areaId, target, target parameters...]. */ function ajaxUpdateAreas(areaCsvString) { + waitSpinnerShow(); responseFunction = function(transport) { // Uncomment the next two lines to see the HTTP responses //var response = transport.responseText || "no response text"; @@ -249,7 +254,13 @@ function ajaxUpdateAreas(areaCsvString) var areaArray = areaCsvString.split(","); var numAreas = parseInt(areaArray.length / 3); for (var i = 0; i < numAreas * 3; i = i + 3) { - new Ajax.Updater(areaArray[i], areaArray[i + 1], {parameters: areaArray[i + 2], onComplete: responseFunction,evalScripts: true }); + new Ajax.Updater(areaArray[i], areaArray[i + 1], { + parameters: areaArray[i + 2], + onComplete: responseFunction, + evalScripts: true, + onSuccess: function(transport) {waitSpinnerHide();}, + onFailure: function() {waitSpinnerHide();} + }); } } @@ -300,6 +311,7 @@ function submitFormInBackground(form, ar */ function ajaxSubmitFormUpdateAreas(form, areaCsvString) { submitFormDisableSubmits($(form)); + waitSpinnerShow(); updateFunction = function(transport) { var data = transport.responseText.evalJSON(true); if (data._ERROR_MESSAGE_LIST_ != undefined || data._ERROR_MESSAGE_ != undefined) { @@ -550,3 +562,11 @@ function setUserLayoutPreferences(userPr function toggleLeftColumn(){ } + +function waitSpinnerShow() { + document.getElementById("wait-spinner").style.visibility = 'visible'; +} + +function waitSpinnerHide() { + document.getElementById("wait-spinner").style.visibility = 'hidden'; +} \ No newline at end of file Added: ofbiz/trunk/framework/images/webapp/images/spinner.gif URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/spinner.gif?rev=945126&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/trunk/framework/images/webapp/images/spinner.gif ------------------------------------------------------------------------------ svn:mime-type = image/gif Modified: ofbiz/trunk/themes/bizznesstime/includes/header.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/bizznesstime/includes/header.ftl?rev=945126&r1=945125&r2=945126&view=diff ============================================================================== --- ofbiz/trunk/themes/bizznesstime/includes/header.ftl (original) +++ ofbiz/trunk/themes/bizznesstime/includes/header.ftl Mon May 17 13:01:20 2010 @@ -128,5 +128,10 @@ under the License. <#include "component://common/webcommon/includes/helplink.ftl" /> <span><a href="javascript:lookup_popup2('showHelp?helpTopic=${helpTopic}&portalPageId=${parameters.portalPageId?if_exists}','help' ,500,500);">${uiLabelMap.CommonHelp}</a></span> </#if> - </div> - </div> \ No newline at end of file + <div class="wait-spinner" style="background:none; visibility:hidden"> + <div id="wait-spinner" style=""> + <img src="/images/spinner.gif" alt="" title=""/> + </div> + </div> + </div> + </div> \ No newline at end of file Modified: ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/style.css URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/style.css?rev=945126&r1=945125&r2=945126&view=diff ============================================================================== --- ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/style.css (original) +++ ofbiz/trunk/themes/bizznesstime/webapp/bizznesstime/css/style.css Mon May 17 13:01:20 2010 @@ -1565,3 +1565,11 @@ height:16px; .calendar_date_select .cds_buttons a { background: none !important; } + +.wait-spinner { + float: right; + margin-right: 10px; +} +.wait-spinner div { + padding-top: 4px; +} Modified: ofbiz/trunk/themes/bluelight/includes/header.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/bluelight/includes/header.ftl?rev=945126&r1=945125&r2=945126&view=diff ============================================================================== --- ofbiz/trunk/themes/bluelight/includes/header.ftl (original) +++ ofbiz/trunk/themes/bluelight/includes/header.ftl Mon May 17 13:01:20 2010 @@ -172,6 +172,13 @@ under the License. </li> </#if> </#if> + <li class="control-area"> + <div class="wait-spinner" style="background:none; visibility:hidden"> + <div id="wait-spinner" style=""> + <img src="/images/spinner.gif" alt="" title=""/> + </div> + </div> + </li> </ul> </li> </ul> Modified: ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css?rev=945126&r1=945125&r2=945126&view=diff ============================================================================== --- ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css (original) +++ ofbiz/trunk/themes/bluelight/webapp/bluelight/style.css Mon May 17 13:01:20 2010 @@ -2270,3 +2270,11 @@ Lookups left: 0px; top: 0px; } + +.wait-spinner { + float: right; + margin-right: 10px; +} +.wait-spinner div { + padding-top: 4px; +} \ No newline at end of file Modified: ofbiz/trunk/themes/droppingcrumbs/includes/header.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/droppingcrumbs/includes/header.ftl?rev=945126&r1=945125&r2=945126&view=diff ============================================================================== --- ofbiz/trunk/themes/droppingcrumbs/includes/header.ftl (original) +++ ofbiz/trunk/themes/droppingcrumbs/includes/header.ftl Mon May 17 13:01:20 2010 @@ -182,6 +182,13 @@ under the License. <li class="org">${orgName}</li> </#if> </#if> + <li class="control-area"> + <div class="wait-spinner" style="background:none; visibility:hidden"> + <div id="wait-spinner" style=""> + <img src="/images/spinner.gif" alt="" title=""/> + </div> + </div> + </li> </ul> </li> </ul> Modified: ofbiz/trunk/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css?rev=945126&r1=945125&r2=945126&view=diff ============================================================================== --- ofbiz/trunk/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css (original) +++ ofbiz/trunk/themes/droppingcrumbs/webapp/droppingcrumbs/css/style.css Mon May 17 13:01:20 2010 @@ -2247,4 +2247,12 @@ Lookups visibility: visible; left: 0px; top: 0px; - } \ No newline at end of file + } + +.wait-spinner { + float: right; + margin-right: 10px; +} +.wait-spinner div { + padding-top: 4px; +} \ No newline at end of file Modified: ofbiz/trunk/themes/flatgrey/includes/header.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/flatgrey/includes/header.ftl?rev=945126&r1=945125&r2=945126&view=diff ============================================================================== --- ofbiz/trunk/themes/flatgrey/includes/header.ftl (original) +++ ofbiz/trunk/themes/flatgrey/includes/header.ftl Mon May 17 13:01:20 2010 @@ -184,6 +184,13 @@ under the License. <#include "component://common/webcommon/includes/helplink.ftl" /> <li><a <#if pageAvail?has_content>class="alert"</#if> href="javascript:lookup_popup2('showHelp?helpTopic=${helpTopic}&portalPageId=${parameters.portalPageId?if_exists}','help' ,500,500);">${uiLabelMap.CommonHelp}</a></li> </#if> + <li class="control-area"> + <div class="wait-spinner" style="background:none; visibility:hidden"> + <div id="wait-spinner" style=""> + <img src="/images/spinner.gif" alt="" title=""/> + </div> + </div> + </li> </ul> </li> </#if> Modified: ofbiz/trunk/themes/flatgrey/webapp/flatgrey/maincss.css URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/flatgrey/webapp/flatgrey/maincss.css?rev=945126&r1=945125&r2=945126&view=diff ============================================================================== --- ofbiz/trunk/themes/flatgrey/webapp/flatgrey/maincss.css (original) +++ ofbiz/trunk/themes/flatgrey/webapp/flatgrey/maincss.css Mon May 17 13:01:20 2010 @@ -2297,3 +2297,10 @@ Lookups left: 0px; top: 0px; } +.wait-spinner { + float: right; + margin-right: 10px; +} +.wait-spinner div { + padding-top: 4px; +} \ No newline at end of file Modified: ofbiz/trunk/themes/multiflex/webapp/multiflex/style.css URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/multiflex/webapp/multiflex/style.css?rev=945126&r1=945125&r2=945126&view=diff ============================================================================== --- ofbiz/trunk/themes/multiflex/webapp/multiflex/style.css (original) +++ ofbiz/trunk/themes/multiflex/webapp/multiflex/style.css Mon May 17 13:01:20 2010 @@ -2295,3 +2295,10 @@ font-size: 1px; height: 1px; } +.wait-spinner { + float: right; + margin-right: 10px; +} +.wait-spinner div { + padding-top: 4px; +} \ No newline at end of file Modified: ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl?rev=945126&r1=945125&r2=945126&view=diff ============================================================================== --- ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl (original) +++ ofbiz/trunk/themes/tomahawk/includes/appbarClose.ftl Mon May 17 13:01:20 2010 @@ -53,6 +53,13 @@ under the License. <div id="control-area"> <ul id="preferences-menu"> <#if userLogin?exists> + <li> + <div class="wait-spinner" style="background:none; visibility:hidden;"> + <div id="wait-spinner" style=""> + <img src="/tomahawk/images/spinner.gif" alt="" title=""/> + </div> + </div> + </li> <#if (userPreferences.COMPACT_HEADER)?default("N") == "Y"> <li class="collapsed"><a href="javascript:document.setUserPreferenceCompactHeaderN.submit()"> </a> <form name="setUserPreferenceCompactHeaderN" method="post" action="<@ofbizUrl>setUserPreference</@ofbizUrl>"> Modified: ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css?rev=945126&r1=945125&r2=945126&view=diff ============================================================================== --- ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css (original) +++ ofbiz/trunk/themes/tomahawk/webapp/tomahawk/css/style.css Mon May 17 13:01:20 2010 @@ -2495,3 +2495,11 @@ background-color:#a9b996; .order-item-status-list.REJECTED .screenlet-body, .alternate-row .order-item-status-list.REJECTED .screenlet-body { background-color:#b29898; } + +.wait-spinner { + float: right; + margin-right: 10px; +} +.wait-spinner div { + padding-top: 4px; +} \ No newline at end of file Added: ofbiz/trunk/themes/tomahawk/webapp/tomahawk/images/spinner.gif URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/tomahawk/webapp/tomahawk/images/spinner.gif?rev=945126&view=auto ============================================================================== Binary file - no diff available. Propchange: ofbiz/trunk/themes/tomahawk/webapp/tomahawk/images/spinner.gif ------------------------------------------------------------------------------ svn:mime-type = image/gif |
Free forum by Nabble | Edit this page |