|
Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/images/profile.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/images/profile.js?rev=1006326&r1=1006325&r2=1006326&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/images/profile.js (original) +++ ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/images/profile.js Sun Oct 10 18:00:13 2010 @@ -17,97 +17,97 @@ specific language governing permissions under the License. */ -var validateNewUser = null; -var validateEditUser = null; -var validatePostalAddress = null; -document.observe('dom:loaded', function() { - if ($('newUserForm')) { - validateNewUser = new Validation('newUserForm', {immediate: true, onSubmit: false}); - addValidations(); - Event.observe($('emailAddress'), 'change', setUserNameFromEmail); +jQuery(document).ready( function() { + + // register a new user/customer + if (document.getElementById('newUserForm')) { + jQuery("#newUserForm").validate(); + + jQuery("#emailAddress").change(setUserNameFromEmail); useShippingAddressAsBillingToggle(); - Event.observe('useShippingAddressForBilling', 'click', useShippingAddressAsBillingToggle); - Event.observe($('submitNewUserForm'), 'click', submitValidNewUser); + + jQuery("#useShippingAddressForBilling").click(useShippingAddressAsBillingToggle); + jQuery("#submitNewUserForm").click(submitValidNewUser); // Get associate states for Shipping Information - Event.observe($('shipToCountryGeoId'), 'change', function(){ + jQuery("#shipToCountryGeoId").change( function(){ getAssociatedStateList('shipToCountryGeoId', 'shipToStateProvinceGeoId', 'advice-required-shipToStateProvinceGeoId', 'shipToStates'); }); // Get associate states for Billing Information - Event.observe($('billToCountryGeoId'), 'change', function() { + jQuery("#billToCountryGeoId").change( function(){ getAssociatedStateList('billToCountryGeoId', 'billToStateProvinceGeoId', 'advice-required-billToStateProvinceGeoId', 'billToStates'); }); getAssociatedStateList('shipToCountryGeoId', 'shipToStateProvinceGeoId', 'advice-required-shipToStateProvinceGeoId', 'shipToStates'); getAssociatedStateList('billToCountryGeoId', 'billToStateProvinceGeoId', 'advice-required-billToStateProvinceGeoId', 'billToStates'); } - if ($('editUserForm')) { - validateEditUser = new Validation('editUserForm', {immediate: true, onSubmit: false}); - Event.observe($('submitEditUserForm'), 'click', submitValidEditUser); - } - if (!$('newUserForm') && !$('editUserForm')) { - if ($('emailAddress')) { - inPlaceEditEmail('emailAddress'); - } - } - if ($('addAddress')) { - validatePostalAddress = new Validation('createPostalAddressForm', {immediate: true, onSubmit: false}); - } - if ($('submitPostalAddressForm')) { - Event.observe($('submitPostalAddressForm'), 'click', submitValidPostalAddress); + + // edit user information form validation + if (document.getElementById('editUserForm')) { + jQuery("#editUserForm").validate(); + } + + // add Address validation + if (document.getElementById('addAddress')) { + jQuery("#createPostalAddressForm").validate(); } - if ($('shipToPhoneRequired')) { - Event.observe($('shipToCountryCode'), 'blur', function() { + // special validation on blur for phone number fields + if (document.getElementById('shipToPhoneRequired')) { + jQuery("#shipToCountryCode").blur( function() { validatePhoneNumber('shipToPhoneRequired', 'shipToCountryCode', 'shipToAreaCode', 'shipToContactNumber'); }); - Event.observe($('shipToAreaCode'), 'blur', function() { + jQuery("#shipToAreaCode").blur( function() { validatePhoneNumber('shipToPhoneRequired', 'shipToAreaCode', 'shipToCountryCode', 'shipToContactNumber'); }); - Event.observe($('shipToContactNumber'), 'blur', function() { + jQuery("#shipToContactNumber").blur( function() { validatePhoneNumber('shipToPhoneRequired', 'shipToContactNumber', 'shipToCountryCode', 'shipToAreaCode'); }); } - if ($('billToPhoneRequired')) { - Event.observe($('billToCountryCode'), 'blur', function() { + if (document.getElementById('billToPhoneRequired')) { + jQuery("#billToCountryCode").blur( function() { validatePhoneNumber('billToPhoneRequired', 'billToCountryCode', 'billToAreaCode', 'billToContactNumber'); }); - Event.observe($('billToAreaCode'), 'blur', function() { + jQuery("#billToAreaCode").blur( function() { validatePhoneNumber('billToPhoneRequired', 'billToAreaCode', 'billToCountryCode', 'billToContactNumber'); }); - Event.observe($('billToContactNumber'), 'blur', function() { + jQuery("#billToContactNumber").blur( function() { validatePhoneNumber('billToPhoneRequired', 'billToContactNumber', 'billToCountryCode', 'billToAreaCode'); }); } - if ($('createPostalAddressForm')) { + + // postal address validation and geo autocomplete + if (document.getElementById('createPostalAddressForm')) { + jQuery("#createPostalAddressForm").validate(); + // Get associate states for Postal Address Information - Event.observe($('countryGeoId'), 'change', function() { + jQuery("#countryGeoId").change( function() { getAssociatedStateList('countryGeoId', 'stateProvinceGeoId', 'advice-required-stateProvinceGeoId', 'states'); }); getAssociatedStateList('countryGeoId', 'stateProvinceGeoId', 'advice-required-stateProvinceGeoId', 'states'); } - if ($('editBillToPostalAddress')) { + if (document.getElementById('editBillToPostalAddress')) { // Get associate states for Billing Information - Event.observe($('billToCountryGeoId'), 'change', function() { + jQuery("#billToCountryGeoId").change( function() { getAssociatedStateList('billToCountryGeoId', 'billToStateProvinceGeoId', 'advice-required-billToStateProvinceGeoId', 'billToStates'); }); - if($('billToStateProvinceGeoId').value == "_NA_"){ + if(document.getElementById('billToStateProvinceGeoId').value == "_NA_"){ getAssociatedStateList('billToCountryGeoId', 'billToStateProvinceGeoId', 'advice-required-billToStateProvinceGeoId', 'billToStates'); } else { - stateValue = $('billToStateProvinceGeoId').value; + stateValue = document.getElementById('billToStateProvinceGeoId').value; getAssociatedStateList('billToCountryGeoId', 'billToStateProvinceGeoId', 'advice-required-billToStateProvinceGeoId', 'billToStates'); - $('billToStateProvinceGeoId').value = stateValue; + document.getElementById('billToStateProvinceGeoId').value = stateValue; } } - if ($('editShipToPostalAddress')) { + if (document.getElementById ('editShipToPostalAddress')) { // Get associate states for Shipping Information - Event.observe($('shipToCountryGeoId'), 'change', function(){ + jQuery("#shipToCountryGeoId").change( function() { getAssociatedStateList('shipToCountryGeoId', 'shipToStateProvinceGeoId', 'advice-required-shipToStateProvinceGeoId', 'shipToStates'); }); - if($('shipToStateProvinceGeoId').value == "_NA_"){ + if(document.getElementById('shipToStateProvinceGeoId').value == "_NA_"){ getAssociatedStateList('shipToCountryGeoId', 'shipToStateProvinceGeoId', 'advice-required-shipToStateProvinceGeoId', 'shipToStates'); } else { - var stateValue = $('shipToStateProvinceGeoId').value; + var stateValue = document.getElementById('shipToStateProvinceGeoId').value; getAssociatedStateList('shipToCountryGeoId', 'shipToStateProvinceGeoId', 'advice-required-shipToStateProvinceGeoId', 'shipToStates'); - $('shipToStateProvinceGeoId').value = stateValue; + document.getElementById('shipToStateProvinceGeoId').value = stateValue; } } }); @@ -120,66 +120,62 @@ document.observe('dom:loaded', function( * 3) textToCheck1, textToCheck2 : Other text boxes to be check. */ function validatePhoneNumber(errorDivId, focusedTextId, textToCheck1, textToCheck2) { - if (($(focusedTextId).value == "")) { - Effect.Appear(errorDivId, {duration: 0.5}); - } else if (($(textToCheck1).value != "") && ($(textToCheck2).value != "" )) { - Effect.Fade(errorDivId, {duration: 0.5}); + if ((document.getElementById(focusedTextId).value == "")) { + jQuery("#" + errorDivId).fadeIn("fast"); + } else if ((document.getElementById(textToCheck1).value != "") && (document.getElementById(textToCheck2).value != "" )) { + jQuery("#" + errorDivId).fadeOut("fast"); } } function submitValidNewUser() { + validatePhoneNumber('shipToPhoneRequired', 'shipToContactNumber', 'shipToCountryCode', 'shipToAreaCode'); validatePhoneNumber('billToPhoneRequired', 'billToContactNumber', 'billToCountryCode', 'billToAreaCode'); - if (validateNewUser.validate()) { - $('newUserForm').submit(); + if (jQuery("#newUserForm").valid()) { + document.getElementById('newUserForm').submit(); } } function submitValidEditUser() { - if (validateEditUser.validate()) { - $('editUserForm').submit(); - } + document.getElementById('editUserForm').submit(); } function submitValidPostalAddress() { - if (validatePostalAddress.validate()) { - $('createPostalAddressForm').submit(); - } + document.getElementById('createPostalAddressForm').submit(); } function setUserNameFromEmail() { - if ($('username').value == "") { - $('username').value = $F('emailAddress'); + if (document.getElementById('username').value == "") { + document.getElementById('username').value = document.getElementById('emailAddress').value; } } function useShippingAddressAsBillingToggle() { - if ($('useShippingAddressForBilling').checked) { - $('billToAddress1').value = $F('shipToAddress1'); - $('billToAddress2').value = $F('shipToAddress2'); - $('billToCity').value = $F('shipToCity'); - $('billToCountryGeoId').value = $F('shipToCountryGeoId'); + if (document.getElementById('useShippingAddressForBilling').checked) { + document.getElementById('billToAddress1').value = document.getElementById('shipToAddress1').value; + document.getElementById('billToAddress2').value = document.getElementById('shipToAddress2').value; + document.getElementById('billToCity').value = document.getElementById('shipToCity').value; + document.getElementById('billToCountryGeoId').value = document.getElementById('shipToCountryGeoId').value; getAssociatedStateList('billToCountryGeoId', 'billToStateProvinceGeoId', 'advice-required-billToStateProvinceGeoId', 'billToStates'); - $('billToStateProvinceGeoId').value = $F('shipToStateProvinceGeoId'); - $('billToPostalCode').value = $F('shipToPostalCode'); + document.getElementById('billToStateProvinceGeoId').value = document.getElementById('shipToStateProvinceGeoId').value; + document.getElementById('billToPostalCode').value = document.getElementById('shipToPostalCode').value; - $('billToAddress1').disabled = true ; - $('billToAddress2').disabled = true ; - $('billToCity').disabled = true ; - $('billToCountryGeoId').disabled = true ; - $('billToStateProvinceGeoId').disabled = true ; - $('billToPostalCode').disabled = true; + document.getElementById('billToAddress1').disabled = true ; + document.getElementById('billToAddress2').disabled = true ; + document.getElementById('billToCity').disabled = true ; + document.getElementById('billToCountryGeoId').disabled = true ; + document.getElementById('billToStateProvinceGeoId').disabled = true ; + document.getElementById('billToPostalCode').disabled = true; copyShipToBillAddress(); hideErrorMessage(); } else { - validBillingAddress(); stopObservingShipToBillAddress(); - $('billToAddress1').disabled = false ; - $('billToAddress2').disabled = false ; - $('billToCity').disabled = false ; - $('billToCountryGeoId').disabled = false ; - $('billToStateProvinceGeoId').disabled = false ; - $('billToPostalCode').disabled = false; + document.getElementById('billToAddress1').disabled = false ; + document.getElementById('billToAddress2').disabled = false ; + document.getElementById('billToCity').disabled = false ; + document.getElementById('billToCountryGeoId').disabled = false ; + document.getElementById('billToStateProvinceGeoId').disabled = false ; + document.getElementById('billToPostalCode').disabled = false; } } @@ -189,11 +185,13 @@ function getServerError(data) { if (data._ERROR_MESSAGE_LIST_ != undefined) { serverErrorHash = data._ERROR_MESSAGE_LIST_; - serverErrorHash.each(function(error) { - if (error.message != undefined) { - serverError += error.message; + alert(serverErrorHash); + jQuery.each(serverErrorHash, function(error, message){ + if (error != undefined) { + serverError += message; } }); + if (serverError == "") { serverError = serverErrorHash; } @@ -204,112 +202,59 @@ function getServerError(data) { return serverError; } -function inPlaceEditEmail(e) { - if ($('updatedEmailContactMechId')) { - var url = 'updatePartyEmailAddress?contactMechId='+ $('updatedEmailContactMechId').value; - var errorId = 'serverError_' + $('updatedEmailContactMechId').value; - var oldEmailAddress = $('updatedEmailAddress').value; - var editor = new Ajax.InPlaceEditor(e, url, {clickToEditText: 'click here to change your email', paramName: 'emailAddress', htmlResponse: false, updateAfterRequestCall: true, - onComplete: function (transport) { - if (transport != undefined) { - var data = transport.responseText.evalJSON(true); - var serverError = getServerError(data); - if (serverError != "") { - Effect.Appear(errorId); - $(errorId).update(serverError); - $('emailAddress').update(oldEmailAddress); - } else { - Effect.Fade(errorId); - if (data.contactMechId != undefined) { - $('updatedEmailContactMechId').value = data.contactMechId; - $('updatedEmailAddress').value = data.emailAddress; - } else { - $('emailAddress').update(oldEmailAddress); - } - inPlaceEditEmail('emailAddress'); - $(errorId).id = 'serverError_' + $('updatedEmailContactMechId').value; - editor.dispose(); - } +function doAjaxRequest(formId, errorId, popupId, requestUrl) { + if (jQuery("#" + formId).valid()) { + jQuery.ajax({ + url: requestUrl, + type: 'POST', + async: false, + data: jQuery("#" + formId).serialize(), + success: function(data) { + var serverError = getServerError(data); + if (serverError != "") { + jQuery("#" + errorId).fadeIn("fast"); + jQuery("#" + popupId).fadeIn("fast"); + jQuery("#" + errorId).html(serverError); + } else { + jQuery("#" + errorId).fadeIn("slow"); + jQuery("#" + popupId).fadeIn("slow"); + document.getElementById('refreshRequestForm').submit(); } } + }); + } } function createPartyPostalAddress(e) { formId = 'createPostalAddressForm'; - var validateEditPostalAddress = new Validation(formId, {immediate: true, onSubmit: false}); errorId = 'serverError'; popupId = 'displayCreateAddressForm'; - if (validateEditPostalAddress.validate()) { - new Ajax.Request('createPartyPostalAddress', { - asynchronous: false, - onSuccess: function(transport) { - var data = transport.responseText.evalJSON(true); - var serverError = getServerError(data); - if (serverError != "") { - Effect.Appear(errorId); - Effect.Appear(popupId); - $(errorId).update(serverError); - } else { - Effect.Fade(popupId); - Effect.Fade(errorId); - $('refreshRequestForm').submit(); - } - }, parameters: $(formId).serialize(), requestHeaders: {Accept: 'application/json'} - }); - } + requestUrl = 'createPartyPostalAddress'; + + doAjaxRequest(formId, errorId, popupId, requestUrl); + + } function updatePartyPostalAddress(e) { contactMechId = e.split('_')[1]; formId = 'editPostalAddress_' + contactMechId; - var validateEditPostalAddress = new Validation(formId, {immediate: true, onSubmit: false}); errorId = 'serverError_' + contactMechId; popupId = 'displayEditAddressForm_' + contactMechId; - if (validateEditPostalAddress.validate()) { - new Ajax.Request('updatePartyPostalAddress', { - asynchronous: false, - onSuccess: function(transport) { - var data = transport.responseText.evalJSON(true); - var serverError = getServerError(data); - if (serverError != "") { - Effect.Appear(errorId); - Effect.Appear(popupId); - $(errorId).update(serverError); - } else { - Effect.Fade(popupId); - Effect.Fade(errorId); - $('refreshRequestForm').submit(); - } - }, parameters: $(formId).serialize(), requestHeaders: {Accept: 'application/json'} - }); - } + requestUrl = 'updatePartyPostalAddress'; + + doAjaxRequest(formId, errorId, popupId, requestUrl); } function updatePartyShipToPostalAddress(e) { formId = 'editShipToPostalAddress'; - var validateEditPostalAddress = new Validation(formId, {immediate: true, onSubmit: false}); errorId = 'shipToServerError'; popupId = 'displayEditShipToPostalAddress'; - if (validateEditPostalAddress.validate()) { - new Ajax.Request('updatePartyPostalAddress', { - asynchronous: false, - onSuccess: function(transport) { - var data = transport.responseText.evalJSON(true); - var serverError = getServerError(data); - if (serverError != "") { - Effect.Appear(errorId); - Effect.Appear(popupId); - $(errorId).update(serverError); - } else { - Effect.Fade(popupId); - Effect.Fade(errorId); - $('refreshRequestForm').submit(); - } - }, parameters: $(formId).serialize(), requestHeaders: {Accept: 'application/json'} - }); - } + requestUrl = 'updatePartyPostalAddress'; + + doAjaxRequest(formId, errorId, popupId, requestUrl); } function updatePartyBillToPostalAddress(e) { @@ -317,119 +262,67 @@ function updatePartyBillToPostalAddress( var validateEditPostalAddress = new Validation(formId, {immediate: true, onSubmit: false}); errorId = 'billToServerError'; popupId = 'displayEditBillToPostalAddress'; - if (validateEditPostalAddress.validate()) { - new Ajax.Request('updatePartyPostalAddress', { - asynchronous: false, - onSuccess: function(transport) { - var data = transport.responseText.evalJSON(true); - var serverError = getServerError(data); - if (serverError != "") { - Effect.Appear(errorId); - Effect.Appear(popupId); - $(errorId).update(serverError); - } else { - Effect.Fade(popupId); - Effect.Fade(errorId); - $('refreshRequestForm').submit(); - } - }, parameters: $(formId).serialize(), requestHeaders: {Accept: 'application/json'} - }); - } -} - -function validBillingAddress () { - Event.observe($('billToAddress1'), 'blur', function() { - if ($('billToAddress1').value == "") { - Effect.Appear('advice-required-billToAddress1'); - } - }); - Event.observe($('billToStateProvinceGeoId'), 'blur', function() { - if ($('billToStateProvinceGeoId').value == "") { - Effect.Appear('advice-required-billToStateProvinceGeoId'); - } - }); - Event.observe($('billToCity'), 'blur', function() { - if ($('billToCity').value == "") { - Effect.Appear('advice-required-billToCity'); - } - }); - Event.observe($('billToPostalCode'), 'blur', function() { - if ($('billToPostalCode').value == "") { - Effect.Appear('advice-required-billToPostalCode'); - } - }); - Event.observe($('billToCountryGeoId'), 'blur', function() { - if ($('billToCountryGeoId').value == "") { - Effect.Appear('advice-required-billToCountryGeoId'); - } - }); + requestUrl = 'updatePartyPostalAddress'; + + doAjaxRequest(formId, errorId, popupId, requestUrl); } function hideErrorMessage() { - Effect.Fade('advice-required-billToAddress1'); - Effect.Fade('advice-required-billToStateProvinceGeoId'); - Effect.Fade('advice-required-billToCity'); - Effect.Fade('advice-required-billToPostalCode'); - Effect.Fade('advice-required-billToCountryGeoId'); - Effect.Fade('billToPhoneRequired'); + jQuery('#advice-required-billToAddress1').fadeOut("fast"); + jQuery('#advice-required-billToStateProvinceGeoId').fadeOut("fast"); + jQuery('#advice-required-billToCity').fadeOut("fast"); + jQuery('#advice-required-billToPostalCode').fadeOut("fast");; + jQuery('#advice-required-billToCountryGeoId').fadeOut("fast"); + jQuery('#billToPhoneRequired').fadeOut("fast"); } function copyShipToBillAddress() { - Event.observe($('shipToAddress1'), 'change', function() { - $('billToAddress1').value = $F('shipToAddress1') - }); - Event.observe($('shipToAddress2'), 'change', function() { - $('billToAddress2').value = $F('shipToAddress2') + jQuery("#shipToAddress1").change( function() { + document.getElementById('billToAddress1').value = document.getElementById('shipToAddress1').value; }); - Event.observe($('shipToCity'), 'change', function() { - $('billToCity').value = $F('shipToCity') + jQuery("#shipToAddress2").change( function() { + document.getElementById('billToAddress2').value = document.getElementById('shipToAddress2').value; }); - Event.observe($('shipToStateProvinceGeoId'), 'change', function() { - $('billToStateProvinceGeoId').value = $F('shipToStateProvinceGeoId') + jQuery("#shipToCity").change( function() { + document.getElementById('billToCity').value = document.getElementById('shipToCity').value; }); - Event.observe($('shipToCountryGeoId'), 'change', copyShipToCountryToBillToCountry); - Event.observe($('shipToPostalCode'), 'change', function() { - $('billToPostalCode').value = $F('shipToPostalCode') + jQuery("#shipToStateProvinceGeoId").change( function() { + document.getElementById('billToStateProvinceGeoId').value = document.getElementById('shipToStateProvinceGeoId').value; + }); + + jQuery("#shipToCountryGeoId").change(copyShipToCountryToBillToCountry); + jQuery("#shipToPostalCode").change( function() { + document.getElementById('billToPostalCode').value = document.getElementById('shipToPostalCode').value; }); } function stopObservingShipToBillAddress() { - Event.stopObserving($('shipToAddress1'), 'change', ""); - Event.stopObserving($('shipToAddress2'), 'change', ""); - Event.stopObserving($('shipToCity'), 'change', ""); - Event.stopObserving($('shipToStateProvinceGeoId'), 'change', ""); - Event.stopObserving($('shipToCountryGeoId'), 'change', copyShipToCountryToBillToCountry); - Event.stopObserving($('shipToPostalCode'), 'change', ""); -} - -function addValidations() { - Validation.add('validate-password', "", { - minLength : 5, - notOneOf : ['password','PASSWORD'], - notEqualToField : 'username' - }); - Validation.add('validate-passwordVerify', "", { - equalToField : 'password' - }); + jQuery('#shipToAddress1').unbind('change'); + jQuery('shipToAddress2').unbind('change'); + jQuery('shipToCity').unbind('change'); + jQuery('shipToStateProvinceGeoId').unbind('change'); + jQuery('shipToCountryGeoId').unbind('change', copyShipToCountryToBillToCountry); + jQuery('shipToPostalCode').unbind('change'); } function showState(id) { - if ($('editPostalAddress_'+id)) { + if (document.getElementById('editPostalAddress_' + id)) { // Get associate states for Postal Address Information - Event.observe($('countryGeoId_'+id), 'change', function() { + jQuery("#countryGeoId_" + id).change( function() { getAssociatedStateList('countryGeoId_'+id, 'stateProvinceGeoId_'+id, 'advice-required-stateProvinceGeoId_'+id, 'states_'+id); }); - if ($('stateProvinceGeoId_'+id).value == "_NA_") { + + if (document.getElementById('stateProvinceGeoId_'+id).value == "_NA_") { getAssociatedStateList('countryGeoId_'+id, 'stateProvinceGeoId_'+id, 'advice-required-stateProvinceGeoId_'+id, 'states_'+id); } else { - var stateValue = $('stateProvinceGeoId_'+id).value; + var stateValue = document.getElementById('stateProvinceGeoId_'+id).value; getAssociatedStateList('countryGeoId_'+id, 'stateProvinceGeoId_'+id, 'advice-required-stateProvinceGeoId_'+id, 'states_'+id); - $('stateProvinceGeoId_'+id).value = stateValue; + document.getElementById('stateProvinceGeoId_'+id).value = stateValue; } } } function copyShipToCountryToBillToCountry(){ - $('billToCountryGeoId').value = $F('shipToCountryGeoId'); + document.getElementById('billToCountryGeoId').value = document.getElementById('shipToCountryGeoId').value; getAssociatedStateList('billToCountryGeoId', 'billToStateProvinceGeoId', 'advice-required-billToStateProvinceGeoId', 'billToStates'); } \ No newline at end of file Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/images/quickAnonCustSettings.js URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/images/quickAnonCustSettings.js?rev=1006326&r1=1006325&r2=1006326&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/images/quickAnonCustSettings.js (original) +++ ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/images/quickAnonCustSettings.js Sun Oct 10 18:00:13 2010 @@ -17,41 +17,41 @@ specific language governing permissions under the License. */ -document.observe('dom:loaded', isValidElement); +jQuery(document).ready(isValidElement); function isValidElement(element){ - var validator = new Validation('quickAnonProcessCustomer', {immediate : true}); + jQuery('#quickAnonProcessCustomer').validate(); } -document.observe('dom:loaded', function() { - Event.observe('useShippingPostalAddressForBilling', 'click', changeText2); +jQuery(document).ready(function() { + jQuery('#useShippingPostalAddressForBilling').click(changeText2); }); function changeText2(){ - if($('useShippingPostalAddressForBilling').checked) { - $('billToName').value = $F('shipToName'); - $('billToAttnName').value = $F('shipToAttnName'); - $('billToAddress1').value = $F('shipToAddress1'); - $('billToAddress2').value = $F('shipToAddress2'); - $('billToCity').value = $F('shipToCity'); - $('billToStateProvinceGeoId').value = $F('shipToStateProvinceGeoId'); - $('billToPostalCode').value = $F('shipToPostalCode'); - $('billToCountryGeoId').value = $F('shipToCountryGeoId'); - $('billToName').disabled = true; - $('billToAttnName').disabled = true; - $('billToAddress1').disabled = true; - $('billToAddress2').disabled = true; - $('billToCity').disabled = true; - $('billToStateProvinceGeoId').disabled = true; - $('billToPostalCode').disabled = true; - $('billToCountryGeoId').disabled = true; + if(document.getElementById('useShippingPostalAddressForBilling').checked) { + document.getElementById('billToName').value = document.getElementById('shipToName').value; + document.getElementById('billToAttnName').value = document.getElementById('shipToAttnName').value; + document.getElementById('billToAddress1').value = document.getElementById('shipToAddress1').value; + document.getElementById('billToAddress2').value = document.getElementById('shipToAddress2').value; + document.getElementById('billToCity').value = document.getElementById('shipToCity').value; + document.getElementById('billToStateProvinceGeoId').value = document.getElementById('shipToStateProvinceGeoId').value; + document.getElementById('billToPostalCode').value = document.getElementById('shipToPostalCode').value; + document.getElementById('billToCountryGeoId').value = document.getElementById('shipToCountryGeoId').value; + document.getElementById('billToName').disabled = true; + document.getElementById('billToAttnName').disabled = true; + document.getElementById('billToAddress1').disabled = true; + document.getElementById('billToAddress2').disabled = true; + document.getElementById('billToCity').disabled = true; + document.getElementById('billToStateProvinceGeoId').disabled = true; + document.getElementById('billToPostalCode').disabled = true; + document.getElementById('billToCountryGeoId').disabled = true; } else { - $('billToName').disabled = false; - $('billToAttnName').disabled = false; - $('billToAddress1').disabled = false; - $('billToAddress2').disabled = false; - $('billToCity').disabled = false; - $('billToStateProvinceGeoId').disabled = false; - $('billToPostalCode').disabled = false; - $('billToCountryGeoId').disabled = false; + document.getElementById('billToName').disabled = false; + document.getElementById('billToAttnName').disabled = false; + document.getElementById('billToAddress1').disabled = false; + document.getElementById('billToAddress2').disabled = false; + document.getElementById('billToCity').disabled = false; + document.getElementById('billToStateProvinceGeoId').disabled = false; + document.getElementById('billToPostalCode').disabled = false; + document.getElementById('billToCountryGeoId').disabled = false; } } \ No newline at end of file Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl?rev=1006326&r1=1006325&r2=1006326&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl (original) +++ ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/includes/headerHead.ftl Sun Oct 10 18:00:13 2010 @@ -88,9 +88,4 @@ under the License. <#if metaKeywords?exists> <meta name="keywords" content="${metaKeywords}"/> </#if> - <#if requireDojo?exists> - <script type="text/javascript"> - dojo.require("dojo.widget.*"); - </script> - </#if> </head> Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl?rev=1006326&r1=1006325&r2=1006326&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl (original) +++ ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/order/OnePageCheckoutProcess.ftl Sun Oct 10 18:00:13 2010 @@ -624,6 +624,7 @@ under the License. </div> </div> </fieldset> + <br style="clear:both;"/> <fieldset> <a href="javascript:void(0);" class="button" id="savePaymentAndBillingContact">${uiLabelMap.EcommerceContinueToStep} 5</a> <a href="javascript:void(0);" class="button" style="display: none;" id="processingOrderSubmitPanel">${uiLabelMap.EcommercePleaseWait}....</a> Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/order/checkoutpayment.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/order/checkoutpayment.ftl?rev=1006326&r1=1006325&r2=1006326&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/order/checkoutpayment.ftl (original) +++ ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/order/checkoutpayment.ftl Sun Oct 10 18:00:13 2010 @@ -74,10 +74,10 @@ function submitForm(form, mode, value) { <div> <label>${uiLabelMap.CommonAdd}:</label> <#if productStorePaymentMethodTypeIdMap.CREDIT_CARD?exists> - <a href="javascript:submitForm($('checkoutInfoForm'), 'NC', '');" class="button">${uiLabelMap.AccountingCreditCard}</a> + <a href="javascript:submitForm(document.getElementById('checkoutInfoForm'), 'NC', '');" class="button">${uiLabelMap.AccountingCreditCard}</a> </#if> <#if productStorePaymentMethodTypeIdMap.EFT_ACCOUNT?exists> - <a href="javascript:submitForm($('checkoutInfoForm'), 'NE', '');" class="button">${uiLabelMap.AccountingEFTAccount}</a> + <a href="javascript:submitForm(document.getElementById('checkoutInfoForm'), 'NE', '');" class="button">${uiLabelMap.AccountingEFTAccount}</a> </#if> <#if productStorePaymentMethodTypeIdMap.EXT_OFFLINE?exists> </div> @@ -134,7 +134,7 @@ function submitForm(form, mode, value) { <input type="checkbox" id="checkOutPayment_${paymentMethod.paymentMethodId}" name="checkOutPaymentId" value="${paymentMethod.paymentMethodId}" <#if cart.isPaymentSelected(paymentMethod.paymentMethodId)>checked="checked"</#if> /> <label for="checkOutPayment_${paymentMethod.paymentMethodId}">${uiLabelMap.AccountingGift}:${giftCardNumber}</label> <#if paymentMethod.description?has_content>(${paymentMethod.description})</#if> - <a href="javascript:submitForm($('checkoutInfoForm'), 'EG', '${paymentMethod.paymentMethodId}');" class="button">${uiLabelMap.CommonUpdate}</a> + <a href="javascript:submitForm(document.getElementById('checkoutInfoForm'), 'EG', '${paymentMethod.paymentMethodId}');" class="button">${uiLabelMap.CommonUpdate}</a> <strong>${uiLabelMap.OrderBillUpTo}:</strong> <input type="text" size="5" class="inputBox" name="amount_${paymentMethod.paymentMethodId}" value="<#if (cart.getPaymentAmount(paymentMethod.paymentMethodId)?default(0) > 0)>${cart.getPaymentAmount(paymentMethod.paymentMethodId)?string("##0.00")}</#if>" /> </div> </#if> @@ -145,7 +145,7 @@ function submitForm(form, mode, value) { <input type="checkbox" id="checkOutPayment_${paymentMethod.paymentMethodId}" name="checkOutPaymentId" value="${paymentMethod.paymentMethodId}" <#if cart.isPaymentSelected(paymentMethod.paymentMethodId)>checked="checked"</#if> /> <label for="checkOutPayment_${paymentMethod.paymentMethodId}">CC:${Static["org.ofbiz.party.contact.ContactHelper"].formatCreditCard(creditCard)}</label> <#if paymentMethod.description?has_content>(${paymentMethod.description})</#if> - <a href="javascript:submitForm($('checkoutInfoForm'), 'EC', '${paymentMethod.paymentMethodId}');" class="button">${uiLabelMap.CommonUpdate}</a> + <a href="javascript:submitForm(document.getElementById('checkoutInfoForm'), 'EC', '${paymentMethod.paymentMethodId}');" class="button">${uiLabelMap.CommonUpdate}</a> <label for="amount_${paymentMethod.paymentMethodId}"><strong>${uiLabelMap.OrderBillUpTo}:</strong></label><input type="text" size="5" class="inputBox" id="amount_${paymentMethod.paymentMethodId}" name="amount_${paymentMethod.paymentMethodId}" value="<#if (cart.getPaymentAmount(paymentMethod.paymentMethodId)?default(0) > 0)>${cart.getPaymentAmount(paymentMethod.paymentMethodId)?string("##0.00")}</#if>" /> </div> </#if> @@ -156,7 +156,7 @@ function submitForm(form, mode, value) { <input type="radio" id="checkOutPayment_${paymentMethod.paymentMethodId}" name="checkOutPaymentId" value="${paymentMethod.paymentMethodId}" <#if paymentMethod.paymentMethodId == checkOutPaymentId>checked="checked"</#if> /> <label for="checkOutPayment_${paymentMethod.paymentMethodId}">${uiLabelMap.AccountingEFTAccount}:${eftAccount.bankName?if_exists}: ${eftAccount.accountNumber?if_exists}</label> <#if paymentMethod.description?has_content><p>(${paymentMethod.description})</p></#if> - <a href="javascript:submitForm($('checkoutInfoForm'), 'EE', '${paymentMethod.paymentMethodId}');" class="button">${uiLabelMap.CommonUpdate}</a> + <a href="javascript:submitForm(document.getElementById('checkoutInfoForm'), 'EE', '${paymentMethod.paymentMethodId}');" class="button">${uiLabelMap.CommonUpdate}</a> </div> </#if> </#if> @@ -193,17 +193,17 @@ function submitForm(form, mode, value) { </div> <div> <label for="giftCardNumber">${uiLabelMap.AccountingNumber}</label> - <input type="text" size="15" class="inputBox" id="giftCardNumber" name="giftCardNumber" value="${(requestParameters.giftCardNumber)?if_exists}" onfocus="$('addGiftCard').checked=true;" /> + <input type="text" size="15" class="inputBox" id="giftCardNumber" name="giftCardNumber" value="${(requestParameters.giftCardNumber)?if_exists}" onfocus="document.getElementById('addGiftCard').checked=true;" /> </div> <#if cart.isPinRequiredForGC(delegator)> <div> <label for="giftCardPin">${uiLabelMap.AccountingPIN}</label> - <input type="text" size="10" class="inputBox" id="giftCardPin" name="giftCardPin" value="${(requestParameters.giftCardPin)?if_exists}" onfocus="$('addGiftCard').checked=true;" /> + <input type="text" size="10" class="inputBox" id="giftCardPin" name="giftCardPin" value="${(requestParameters.giftCardPin)?if_exists}" onfocus="document.getElementById('addGiftCard').checked=true;" /> </div> </#if> <div> <label for="giftCardAmount">${uiLabelMap.AccountingAmount}</label> - <input type="text" size="6" class="inputBox" id="giftCardAmount" name="giftCardAmount" value="${(requestParameters.giftCardAmount)?if_exists}" onfocus="$('addGiftCard').checked=true;" /> + <input type="text" size="6" class="inputBox" id="giftCardAmount" name="giftCardAmount" value="${(requestParameters.giftCardAmount)?if_exists}" onfocus="document.getElementById('addGiftCard').checked=true;" /> </div> </#if> @@ -219,6 +219,6 @@ function submitForm(form, mode, value) { </form> <div> - <a href="javascript:submitForm($('checkoutInfoForm'), 'CS', '');" class="buttontextbig">${uiLabelMap.OrderBacktoShoppingCart}</a> - <a href="javascript:submitForm($('checkoutInfoForm'), 'DN', '');" class="buttontextbig">${uiLabelMap.OrderContinueToFinalOrderReview}</a> + <a href="javascript:submitForm(document.getElementById('checkoutInfoForm'), 'CS', '');" class="buttontextbig">${uiLabelMap.OrderBacktoShoppingCart}</a> + <a href="javascript:submitForm(document.getElementById('checkoutInfoForm'), 'DN', '');" class="buttontextbig">${uiLabelMap.OrderContinueToFinalOrderReview}</a> </div> Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/order/quickAnonCheckoutReview.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/order/quickAnonCheckoutReview.ftl?rev=1006326&r1=1006325&r2=1006326&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/order/quickAnonCheckoutReview.ftl (original) +++ ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/order/quickAnonCheckoutReview.ftl Sun Oct 10 18:00:13 2010 @@ -34,12 +34,13 @@ under the License. function shippingMethodChanged(shippingMethod) { var submitToUri = "<@ofbizUrl>quickAnonProcessShipOptionsUpdateOrderItems</@ofbizUrl>?shipping_method=" + shippingMethod; - dojo.io.bind({url: submitToUri, - load: function(type, data, evt){ - if(type == "load"){ + jQuery.ajax({ + url: submitToUri, + type: "POST", + success: function(data) { document.getElementById("orderItemsSection").innerHTML = data; } - },mimetype: "text/html"}); + }); } // --> Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/order/quickAnonOptionSettings.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/order/quickAnonOptionSettings.ftl?rev=1006326&r1=1006325&r2=1006326&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/order/quickAnonOptionSettings.ftl (original) +++ ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/order/quickAnonOptionSettings.ftl Sun Oct 10 18:00:13 2010 @@ -18,13 +18,9 @@ under the License. --> <script language="JavaScript" type="text/javascript"> -dojo.require("dojo.event.*"); -dojo.require("dojo.io.*"); - -dojo.addOnLoad(init); +jQuery(document).ready(init); function init() { - dojo.event.connect("around", "processOrder", "aroundOptSubmitOrder"); var optForm = document.quickAnonOptSetupForm; document.getElementById("noShippingMethodSelectedError").innerHTML = ""; } @@ -38,12 +34,14 @@ function aroundOptSubmitOrder(invocation } } if (shipMethodOption != "none") { - dojo.io.bind({ url: formToSubmit.action, load: function(type, evaldObj){ - document.getElementById("optInfoSection").innerHTML = evaldObj; - - var result = invocation.proceed(); - return result; - },formNode: document.quickAnonOptSetupForm}); + jQuery.ajax({ + url: formToSubmit.action, + type: "POST", + data: jQuery("#quickAnonOptSetupForm").serialize(), + success: function(data) { + document.getElementById("optInfoSection").innerHTML = data; + } + }); } else { document.getElementById("noShippingMethodSelectedError").innerHTML = "${uiLabelMap.EcommerceMessagePleaseSelectShippingMethod}"; } Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/order/quickAnonPaymentInformation.ftl URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/order/quickAnonPaymentInformation.ftl?rev=1006326&r1=1006325&r2=1006326&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/order/quickAnonPaymentInformation.ftl (original) +++ ofbiz/branches/jquery/specialpurpose/ecommerce/webapp/ecommerce/order/quickAnonPaymentInformation.ftl Sun Oct 10 18:00:13 2010 @@ -21,14 +21,10 @@ under the License. </#if> <script language="JavaScript" type="text/javascript"> -dojo.require("dojo.event.*"); -dojo.require("dojo.io.*"); - -dojo.addOnLoad(init); +jQuery(document).ready(init); function init() { getPaymentInformation(); - dojo.event.connect("around", "processOrder", "aroundSubmitOrder"); var paymentForm = document.setPaymentInformation; } @@ -39,35 +35,31 @@ function aroundSubmitOrder(invocation) { document.setPaymentInformation.action = "<@ofbizUrl>quickAnonAddGiftCardToCart</@ofbizUrl>"; } - dojo.io.bind({ url: formToSubmit.action, load: function(type, evaldObj){ - if(type == "load"){ - if(paymentMethodTypeOption == "EXT_OFFLINE"){ - var result = invocation.proceed(); - return result; - }else { - if(paymentMethodTypeOption == "none"){ - document.getElementById("noPaymentMethodSelectedError").innerHTML = "${uiLabelMap.EcommerceMessagePleaseSelectPaymentMethod}"; - return result; - } else { - document.getElementById("paymentInfoSection").innerHTML = evaldObj; - } - if(formToSubmit.paymentMethodTypeId.value != "") { - var result = invocation.proceed(); - return result; - } - } - } - },formNode: document.setPaymentInformation}); + jQuery.ajax({ + url: formToSubmit.action, + type: "POST", + data: jQuery("#setPaymentInformation").serialize(), + success: function(data) { + if (paymentMethodTypeOption != "EXT_OFFLINE"){ + if(paymentMethodTypeOption == "none"){ + document.getElementById("noPaymentMethodSelectedError").innerHTML = "${uiLabelMap.EcommerceMessagePleaseSelectPaymentMethod}"; + } else { + document.getElementById("paymentInfoSection").innerHTML = data; + } + } + } + }); } function getGCInfo() { if (document.setPaymentInformation.addGiftCard.checked) { - dojo.io.bind({url: "<@ofbizUrl>quickAnonGcInfo</@ofbizUrl>", - load: function(type, data, evt){ - if(type == "load"){ - document.getElementById("giftCardSection").innerHTML = data; + jQuery.ajax({ + url: "<@ofbizUrl>quickAnonGcInfo</@ofbizUrl>", + type: "POST", + success: function(data) { + document.getElementById("giftCardSection").innerHTML = data; } - },mimetype: "text/html"}); + }); } else { document.getElementById("giftCardSection").innerHTML = ""; } @@ -77,22 +69,32 @@ function getPaymentInformation() { document.getElementById("noPaymentMethodSelectedError").innerHTML = ""; var paymentMethodTypeOption = document.setPaymentInformation.paymentMethodTypeOptionList.options[document.setPaymentInformation.paymentMethodTypeOptionList.selectedIndex].value; var connectionObject; - if(paymentMethodTypeOption.length > 0){ + if (paymentMethodTypeOption.length > 0){ if(paymentMethodTypeOption == "CREDIT_CARD"){ - dojo.io.bind({url: "<@ofbizUrl>quickAnonCcInfo</@ofbizUrl>", - load: function(type, data, evt){ - if(type == "load"){document.getElementById("paymentInfoSection").innerHTML = data;} - },mimetype: "text/html"}); + + jQuery.ajax({ + url: "<@ofbizUrl>quickAnonCcInfo</@ofbizUrl>", + type: "POST", + success: function(data) { + document.getElementById("paymentInfoSection").innerHTML = data; + } + }); + document.setPaymentInformation.paymentMethodTypeId.value = "CREDIT_CARD"; document.setPaymentInformation.action = "<@ofbizUrl>quickAnonEnterCreditCard</@ofbizUrl>"; - } else if(paymentMethodTypeOption == "EFT_ACCOUNT"){ - dojo.io.bind({url: "<@ofbizUrl>quickAnonEftInfo</@ofbizUrl>", - load: function(type, data, evt){ - if(type == "load"){document.getElementById("paymentInfoSection").innerHTML = data;} - },mimetype: "text/html"}); - document.setPaymentInformation.paymentMethodTypeId.value = "EFT_ACCOUNT"; + } else if (paymentMethodTypeOption == "EFT_ACCOUNT"){ + + jQuery.ajax({ + url: "<@ofbizUrl>quickAnonEftInfo</@ofbizUrl>", + type: "POST", + success: function(data) { + document.getElementById("paymentInfoSection").innerHTML = data; + } + }); + + document.setPaymentInformation.paymentMethodTypeId.value = "EFT_ACCOUNT"; document.setPaymentInformation.action = "<@ofbizUrl>quickAnonEnterEftAccount</@ofbizUrl>"; - } else if(paymentMethodTypeOption == "EXT_OFFLINE"){ + } else if (paymentMethodTypeOption == "EXT_OFFLINE"){ document.setPaymentInformation.paymentMethodTypeId.value = "EXT_OFFLINE"; document.getElementById("paymentInfoSection").innerHTML = ""; document.setPaymentInformation.action = "<@ofbizUrl>quickAnonEnterExtOffline</@ofbizUrl>"; Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/widget/CommonScreens.xml?rev=1006326&r1=1006325&r2=1006326&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ecommerce/widget/CommonScreens.xml (original) +++ ofbiz/branches/jquery/specialpurpose/ecommerce/widget/CommonScreens.xml Sun Oct 10 18:00:13 2010 @@ -41,13 +41,14 @@ under the License. <!-- NOTE: this should be included on each screen that uses it to avoid including it in all screens: --> <set field="layoutSettings.javaScripts[]" value="/images/fieldlookup.js" global="true"/> <set field="layoutSettings.javaScripts[]" value="/images/selectall.js" global="true"/> - <set field="layoutSettings.javaScripts[]" value="/images/calendarDateSelect/calendar_date_select.js" global="true"/> - <set field="initialLocale" type="String" value="${groovy:parameters?.userLogin?.lastLocale?.substring(0,2)}" default-value="${groovy:locale?.toString()?.substring(0,2)?:'en'}"/> - <set field="layoutSettings.javaScripts[]" value="/images/calendarDateSelect/locale/${initialLocale}.js" global="true"/> - <set field="layoutSettings.javaScripts[+0]" value="/images/prototypejs/effects.js" global="true"/> - <set field="layoutSettings.javaScripts[+0]" value="/images/prototypejs/validation.js" global="true"/> - <set field="layoutSettings.javaScripts[+0]" value="/images/prototypejs/prototype.js" global="true"/> - <set field="layoutSettings.javaScripts[]" value="/images/prototypejs/popup.js" global="true"/> + + <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/js/jquery-ui-1.8.2.custom.min.js" global="true"/> + <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/datetimepicker/jquery-ui-timepicker-addon-0.5.js" global="true"/> + <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/plugins/validate/jquery.validate.min.js" global="true"/> + <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/development-bundle/ui/jquery.ui.datepicker.js" global="true"/> + <set field="initialLocale" type="String" value="${parameters.userLogin.lastLocale}" default-value="${groovy:locale.toString()}"/> + <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/ui/development-bundle/ui/i18n/jquery.ui.datepicker-${initialLocale}.js" global="true"/> + <set field="layoutSettings.javaScripts[+0]" value="/images/jquery/jquery-1.4.2.min.js" global="true"/> <script location="component://ecommerce/widget/EcommerceSetup.groovy"/> Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/widget/CustomerScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/widget/CustomerScreens.xml?rev=1006326&r1=1006325&r2=1006326&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ecommerce/widget/CustomerScreens.xml (original) +++ ofbiz/branches/jquery/specialpurpose/ecommerce/widget/CustomerScreens.xml Sun Oct 10 18:00:13 2010 @@ -39,7 +39,7 @@ under the License. </widgets> </section> </screen> - +<!-- <screen name="newcustomer"> <section> <actions> @@ -76,6 +76,7 @@ under the License. </widgets> </section> </screen> + --> <screen name="editcontactmech"> <section> <actions> @@ -514,7 +515,7 @@ under the License. </section> </screen> <!-- To use new pages uncomment following screens i.e. newcustomer and viewprofile and comment existing newcustomer and viewprofile screens above --> - <!-- + <screen name="newcustomer"> <section> <actions> @@ -543,7 +544,6 @@ under the License. <entity-one entity-name="Person" value-field="person"/> <entity-one entity-name="PartyGroup" value-field="partyGroup"/> - <set field="layoutSettings.javaScripts[+0]" value="/images/prototypejs/controls.js" global="true"/> <set field="layoutSettings.javaScripts[]" value="/ecommerce/images/profile.js" global="true"/> <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy"/> <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditBillingAddress.groovy"/> @@ -558,7 +558,7 @@ under the License. </widgets> </section> </screen> - --> + <screen name="EditProfile"> <section> @@ -585,7 +585,6 @@ under the License. <set field="titleProperty" value="EcommerceManageAddresses"/> <set field="partyId" from-field="userLogin.partyId"/> - <set field="layoutSettings.javaScripts[+0]" value="/images/prototypejs/controls.js" global="true"/> <set field="layoutSettings.javaScripts[]" value="/ecommerce/images/profile.js" global="true"/> <set field="layoutSettings.javaScripts[]" value="/ordermgr/images/js/geoAutoCompleter.js" global="true"/> <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/customer/EditShippingAddress.groovy"/> Modified: ofbiz/branches/jquery/specialpurpose/ecommerce/widget/OrderScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/specialpurpose/ecommerce/widget/OrderScreens.xml?rev=1006326&r1=1006325&r2=1006326&view=diff ============================================================================== --- ofbiz/branches/jquery/specialpurpose/ecommerce/widget/OrderScreens.xml (original) +++ ofbiz/branches/jquery/specialpurpose/ecommerce/widget/OrderScreens.xml Sun Oct 10 18:00:13 2010 @@ -439,8 +439,6 @@ under the License. <screen name="quickAnonCheckoutDecorator"> <section> <actions> - <set field="layoutSettings.javaScripts[]" value="/images/dojo/dojo.js" global="true"/> - <set field="requireDojo" value="true"/> <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/order/QuickAnonCheckoutLinks.groovy"/> </actions> <widgets> @@ -613,10 +611,6 @@ under the License. <section> <actions> <set field="titleProperty" value="EcommerceOnePageCheckout"/> - <set field="layoutSettings.styleSheets[+0]" value="/images/prototypejs/scriptaculouscontrols.css" global="true"/> - <set field="layoutSettings.javaScripts[+0]" value="/images/prototypejs/scriptaculous.js" global="true"/> - <set field="layoutSettings.javaScripts[+0]" value="/images/prototypejs/effects.js" global="true"/> - <set field="layoutSettings.javaScripts[]" value="/images/prototypejs/controls.js" global="true"/> <set field="layoutSettings.javaScripts[]" value="/ecommerce/images/checkoutProcess.js" global="true"/> <set field="layoutSettings.javaScripts[]" value="/ordermgr/images/js/geoAutoCompleter.js" global="true"/> <script location="component://ecommerce/webapp/ecommerce/WEB-INF/actions/cart/ShowCart.groovy"/> |
| Free forum by Nabble | Edit this page |
