Improved: Apply multi-block attr to each application (OFBIZ-11706)

For eCommerce application.
This commit is contained in:
James Yong
2020-05-16 12:31:24 +08:00
parent 071240205f
commit a802ae0a02
24 changed files with 32 additions and 76 deletions
-6
View File
@@ -17,7 +17,6 @@ specific language governing permissions and limitations
under the License.
-->
<script type="application/javascript">
//<![CDATA[
function removeSelected() {
var cform = document.cartform;
cform.removeSelected.value = true;
@@ -60,15 +59,12 @@ under the License.
}
cform.submit();
}
//]]>
</script>
<script type="application/javascript">
//<![CDATA[
function setAlternateGwp(field) {
window.location=field.value;
};
//]]>
</script>
<#assign fixedAssetExist = shoppingCart.containAnyWorkEffortCartItems() />
<#-- change display format when rental items exist in the shoppingcart -->
@@ -127,9 +123,7 @@ under the License.
</div>
<script type="application/javascript">
//<![CDATA[
document.quickaddform.add_product_id.focus();
//]]>
</script>
<div>
@@ -24,7 +24,6 @@ under the License.
<#-- virtual product javascript -->
${virtualJavaScript!}
<script type="application/javascript">
<!--
var detailImageUrl = null;
function setAddProductId(name) {
document.addform.add_product_id.value = name;
@@ -132,11 +131,9 @@ ${virtualJavaScript!}
toggleAmt(checkAmtReq(sku));
}
}
//-->
</script>
<script type="application/javascript">
<!--
jQuery(document).ready(function () {
jQuery('#configFormId').change(getConfigDetails)
@@ -157,7 +154,6 @@ ${virtualJavaScript!}
});
}
-->
</script>
<div id="productdetail" class="card">
@@ -23,9 +23,7 @@ under the License.
<img src="${requestParameters.detail}" alt=""/>
<#else>
<script type="application/javascript">
<!-- //
window.close();
// -->
</script>
</#if>
</body>
+1 -2
View File
@@ -25,7 +25,6 @@ under the License.
${virtualJavaScript!}
${virtualVariantJavaScript!}
<script type="application/javascript">
//<![CDATA[
var detailImageUrl = null;
function setAddProductId(name) {
document.addform.add_product_id.value = name;
@@ -306,7 +305,7 @@ ${virtualVariantJavaScript!}
priceElem.appendChild(priceTxt);
}
}
//]]>
$(function(){
$('a[id^=productTag_]').click(function(){
var id = $(this).attr('id');
@@ -18,7 +18,6 @@
-->
${virtualJavaScript!}
<script type="application/javascript">
<!--
function displayProductVirtualId(variantId, virtualProductId, pForm) {
if(variantId){
pForm.product_id.value = variantId;
@@ -49,7 +48,6 @@
priceElem.appendChild(priceTxt);
}
}
//-->
</script>
<#if product??>
<#-- variable setup -->
@@ -57,9 +57,7 @@ under the License.
</table>
<#else>
<script type="application/javascript">
<!-- //
window.close();
// -->
</script>
<div>${uiLabelMap.EcommerceTellAFriendSorry}</div>
</#if>
@@ -22,14 +22,12 @@ under the License.
<strong>${uiLabelMap.CommonContactUs}</strong>
</div>
<script type="application/javascript">
<!--
function reloadCaptcha(fieldName) {
var captchaUri = "<@ofbizUrl>captcha.jpg?captchaCodeId=" + fieldName + "&amp;unique=_PLACEHOLDER_</@ofbizUrl>";
var unique = Date.now();
captchaUri = captchaUri.replace("_PLACEHOLDER_", unique);
document.getElementById(fieldName).src = captchaUri;
}
//-->
</script>
<div class="card-body">
<form id="contactForm" method="post" action="<@ofbizUrl>submitAnonContact</@ofbizUrl>">
@@ -99,7 +99,6 @@ under the License.
</form>
</div>
<script type="application/javascript">
//<![CDATA[
jQuery("#displayCreateAddressForm").dialog({
autoOpen: false, modal: true,
buttons: {
@@ -118,7 +117,6 @@ under the License.
jQuery("#addAddress").click(function () {
jQuery("#displayCreateAddressForm").dialog("open")
});
//]]>
</script>
</div>
@@ -163,7 +161,6 @@ under the License.
<#include "EditBillToAddress.ftl" />
</div>
<script type="application/javascript">
//<![CDATA[
jQuery("#displayEditBillToPostalAddress").dialog({
autoOpen: false, modal: true,
buttons: {
@@ -183,7 +180,6 @@ under the License.
jQuery("#updateBillToPostalAddress").click(function () {
jQuery("#displayEditBillToPostalAddress").dialog("open")
});
//]]>
</script>
<#--===================================== Shipping Address and Telecom number ===================================-->
@@ -223,7 +219,6 @@ under the License.
<#include "EditShipToAddress.ftl" />
</div>
<script type="application/javascript">
//<![CDATA[
jQuery("#displayEditShipToPostalAddress").dialog({
autoOpen: false, modal: true,
buttons: {
@@ -242,7 +237,6 @@ under the License.
jQuery("#updateShipToPostalAddress").click(function () {
jQuery("#displayEditShipToPostalAddress").dialog("open")
});
//]]>
</script>
</div>
</div>
@@ -303,7 +297,6 @@ under the License.
</form>
</div>
<script type="application/javascript">
//<![CDATA[
jQuery("#displayEditAddressForm_${contactMech.contactMechId}").dialog({
autoOpen: false, modal: true,
buttons: {
@@ -322,7 +315,6 @@ under the License.
jQuery("#update_${contactMech.contactMechId}").click(function () {
jQuery("#displayEditAddressForm_${contactMech.contactMechId}").dialog("open")
});
//]]>
</script>
<#else>
<div>
@@ -18,7 +18,6 @@ under the License.
-->
<script type="application/javascript">
//<![CDATA[
function submitForm(form, mode, value) {
if ("DN" == mode) {
// done action; checkout
@@ -70,7 +69,6 @@ function submitForm(form, mode, value) {
form.submit();
}
}
//]]>
</script>
<#assign shipping = !shoppingCart.containAllWorkEffortCartItems()> <#-- contains items which need shipping? -->
@@ -20,7 +20,6 @@ under the License.
<!-- TODO : Need formatting -->
<script type="application/javascript">
//<![CDATA[
function submitForm(form, mode, value) {
if ("DN" == mode) {
// done action; checkout
@@ -55,7 +54,6 @@ function submitForm(form, mode, value) {
form.action="<@ofbizUrl>updateCheckoutOptions/editgiftcard?DONE_PAGE=checkoutpayment&paymentMethodId="+value+"</@ofbizUrl>";
form.submit();
}
//]]>
</script>
@@ -18,7 +18,6 @@ under the License.
-->
<script type="application/javascript">
<!--
var clicked = 0;
function processOrder() {
if (clicked == 0) {
@@ -31,7 +30,6 @@ under the License.
showErrorAlert("${uiLabelMap.CommonErrorMessage2}", "${uiLabelMap.YoureOrderIsBeingProcessed}");
}
}
// -->
</script>
<h2>${uiLabelMap.OrderFinalCheckoutReview}</h2>
@@ -18,7 +18,6 @@ under the License.
-->
<script type="application/javascript">
//<![CDATA[
function submitForm(form, mode, value) {
if ("DN" == mode) {
// done action; checkout
@@ -51,7 +50,6 @@ function toggleBillingAccount(box) {
}
}
//]]>
</script>
<#assign cart = shoppingCart!/>
<form method="post" name="checkoutInfoForm" style="margin:0;">
@@ -18,7 +18,6 @@ under the License.
-->
<script type="application/javascript">
//<![CDATA[
function submitForm(form, mode, value) {
if ("DN" == mode) {
// done action; checkout
@@ -54,8 +53,6 @@ under the License.
form.submit();
}
}
//]]>
</script>
<form method="post" name="checkoutInfoForm" style="margin:0;">
@@ -18,7 +18,6 @@ under the License.
-->
<script type="application/javascript">
<!--
var clicked = 0;
function processOrder() {
if (clicked == 0) {
@@ -43,7 +42,6 @@ under the License.
});
}
// -->
</script>
<h1>${uiLabelMap.OrderFinalCheckoutReview}</h1>
-2
View File
@@ -18,7 +18,6 @@ under the License.
-->
<script type="application/javascript">
//<![CDATA[
function submitForm(form, mode, value) {
if ("DN" == mode) {
// done action; payment info
@@ -42,7 +41,6 @@ function submitForm(form, mode, value) {
form.submit();
}
}
//]]>
</script>
<div class="screenlet">
@@ -18,7 +18,6 @@ under the License.
-->
<script type="application/javascript">
//<![CDATA[
<!-- function to add extra info for Timestamp format -->
function TimestampSubmit(obj) {
reservStartStr = jQuery(obj).find("input[name='reservStartStr']");
@@ -52,7 +51,6 @@ under the License.
}
});
}
//]]>
</script>
<#macro paginationControls>
<#local viewIndexMax = Static["java.lang.Math"].ceil((listSize)?double / viewSize?double)>
+1 -1
View File
@@ -82,7 +82,7 @@ under the License.
<include-screen name="leftbar" location="component://ecommerce/widget/CommonScreens.xml"/>
</decorator-section>
<decorator-section name="body">
<platform-specific><html><html-template location="component://ecommerce/template/cart/ShowCart.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/cart/ShowCart.ftl"/></html></platform-specific>
</decorator-section>
</decorator-screen>
</widgets>
+6 -6
View File
@@ -143,7 +143,7 @@ under the License.
<script location="component://order/groovyScripts/entry/catalog/ProductSummary.groovy"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/template/catalog/ProductSummary.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/catalog/ProductSummary.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
@@ -226,7 +226,7 @@ under the License.
<set field="paginateEcommerceStyle" value="Y"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/template/catalog/CategoryDetail.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/catalog/CategoryDetail.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
@@ -299,7 +299,7 @@ under the License.
</actions>
<widgets>
<include-screen name="breadcrumbs"/>
<platform-specific><html><html-template location="component://ecommerce/template/catalog/ProductDetail.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/catalog/ProductDetail.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
@@ -325,7 +325,7 @@ under the License.
</actions>
<widgets>
<include-screen name="breadcrumbs"/>
<platform-specific><html><html-template location="component://ecommerce/template/catalog/ConfigProductDetail.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/catalog/ConfigProductDetail.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
@@ -379,7 +379,7 @@ under the License.
<screen name="detailImage">
<section>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/template/catalog/DetailImage.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/catalog/DetailImage.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
@@ -564,7 +564,7 @@ under the License.
<script location="component://ecommerce/groovyScripts/catalog/ProductCategories.groovy"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/template/catalog/ProductCategories.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/catalog/ProductCategories.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
+4 -4
View File
@@ -61,7 +61,7 @@ under the License.
<not><if-empty field="globalContext.productStore"/></not>
</condition>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/template/includes/HeaderHead.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/includes/HeaderHead.ftl"/></html></platform-specific>
<platform-specific><html><html-template location="component://common-theme/template/includes/OpenHtmlBody.ftl"/></html></platform-specific>
<!-- render header -->
<container id="parentContainer">
@@ -290,7 +290,7 @@ under the License.
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/template/includes/HeaderHead.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/includes/HeaderHead.ftl"/></html></platform-specific>
<platform-specific><html><html-template location="component://common-theme/template/includes/OpenHtmlBody.ftl"/></html></platform-specific>
<platform-specific><html><html-template location="component://common-theme/template/includes/Messages.ftl"/></html></platform-specific>
@@ -351,7 +351,7 @@ under the License.
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific>
<html><html-template location="component://ecommerce/template/Login.ftl"/></html>
<html><html-template multi-block="true" location="component://ecommerce/template/Login.ftl"/></html>
</platform-specific>
<!-- <include-screen name="ListThirdPartyLogins" location="component://passport/widget/PassportScreens.xml"/> -->
<platform-specific>
@@ -373,7 +373,7 @@ under the License.
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific>
<html><html-template location="component://ecommerce/template/RequirePasswordChange.ftl"/></html>
<html><html-template multi-block="true" location="component://ecommerce/template/RequirePasswordChange.ftl"/></html>
</platform-specific>
</decorator-section>
</decorator-screen>
+2 -2
View File
@@ -638,7 +638,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific><html><html-template location="component://ecommerce/template/customer/profile/ManageAddress.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/customer/profile/ManageAddress.ftl"/></html></platform-specific>
</decorator-section>
</decorator-screen>
</widgets>
@@ -659,7 +659,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific><html><html-template location="component://ecommerce/template/customer/AnonContactus.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/customer/AnonContactus.ftl"/></html></platform-specific>
</decorator-section>
<decorator-section name="right-column">
<include-screen name="rightbar" location="component://ecommerce/widget/CommonScreens.xml"/>
+1 -1
View File
@@ -44,7 +44,7 @@ under the License.
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/template/customer/MiniSignUpForContactList.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/customer/MiniSignUpForContactList.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
+1 -1
View File
@@ -27,7 +27,7 @@ under the License.
<property-map resource="EcommerceUiLabels" map-name="uiLabelMap" global="true"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/template/email/TellAFriend.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/email/TellAFriend.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
+14 -14
View File
@@ -66,7 +66,7 @@ under the License.
<script location="component://ecommerce/groovyScripts/order/AnonymousCheckoutLinks.groovy"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/template/order/AnonymousCheckoutLinks.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/order/AnonymousCheckoutLinks.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
@@ -192,7 +192,7 @@ under the License.
<widgets>
<decorator-screen name="anonymousCheckoutDecorator">
<decorator-section name="body">
<platform-specific><html><html-template location="component://ecommerce/template/order/PaymentInformation.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/order/PaymentInformation.ftl"/></html></platform-specific>
</decorator-section>
<decorator-section name="right-column">
<include-screen name="rightbar" location="component://ecommerce/widget/CommonScreens.xml"/>
@@ -212,7 +212,7 @@ under the License.
<widgets>
<decorator-screen name="anonymousCheckoutDecorator">
<decorator-section name="body">
<platform-specific><html><html-template location="component://ecommerce/template/order/CheckoutReview.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/order/CheckoutReview.ftl"/></html></platform-specific>
</decorator-section>
</decorator-screen>
</widgets>
@@ -232,7 +232,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific><html><html-template location="component://ecommerce/template/order/BillSettings.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/order/BillSettings.ftl"/></html></platform-specific>
</decorator-section>
<decorator-section name="right-column">
<include-screen name="rightbar" location="component://ecommerce/widget/CommonScreens.xml"/>
@@ -254,7 +254,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific><html><html-template location="component://ecommerce/template/order/CheckoutOptions.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/order/CheckoutOptions.ftl"/></html></platform-specific>
</decorator-section>
</decorator-screen>
</widgets>
@@ -272,7 +272,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific><html><html-template location="component://ecommerce/template/order/CheckoutShippingAddress.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/order/CheckoutShippingAddress.ftl"/></html></platform-specific>
</decorator-section>
<decorator-section name="right-column">
<include-screen name="rightbar" location="component://ecommerce/widget/CommonScreens.xml"/>
@@ -293,7 +293,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific><html><html-template location="component://ecommerce/template/order/CheckoutShippingOptions.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/order/CheckoutShippingOptions.ftl"/></html></platform-specific>
</decorator-section>
<decorator-section name="right-column">
<include-screen name="rightbar" location="component://ecommerce/widget/CommonScreens.xml"/>
@@ -312,7 +312,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific><html><html-template location="component://ecommerce/template/order/SplitShip.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/order/SplitShip.ftl"/></html></platform-specific>
</decorator-section>
</decorator-screen>
</widgets>
@@ -329,7 +329,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific><html><html-template location="component://ecommerce/template/order/CheckoutReview.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/order/CheckoutReview.ftl"/></html></platform-specific>
</decorator-section>
</decorator-screen>
</widgets>
@@ -433,7 +433,7 @@ under the License.
<script location="component://ecommerce/groovyScripts/order/QuickAnonCheckoutLinks.groovy"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/template/order/QuickAnonCheckoutLinks.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/order/QuickAnonCheckoutLinks.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
@@ -497,7 +497,7 @@ under the License.
<script location="component://ecommerce/groovyScripts/order/QuickAnonOptionSettings.groovy"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/template/order/QuickAnonOptionSettings.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/order/QuickAnonOptionSettings.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
@@ -510,7 +510,7 @@ under the License.
<script location="component://order/groovyScripts/entry/StorePaymentOptions.groovy"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/template/order/QuickAnonPaymentInformation.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/order/QuickAnonPaymentInformation.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>
@@ -525,7 +525,7 @@ under the License.
<widgets>
<decorator-screen name="quickAnonCheckoutDecorator">
<decorator-section name="body">
<platform-specific><html><html-template location="component://ecommerce/template/order/QuickAnonCheckoutReview.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/order/QuickAnonCheckoutReview.ftl"/></html></platform-specific>
</decorator-section>
</decorator-screen>
</widgets>
@@ -663,7 +663,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific><html><html-template location="component://ecommerce/template/order/CheckoutPayment.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/order/CheckoutPayment.ftl"/></html></platform-specific>
</decorator-section>
<decorator-section name="right-column">
<include-screen name="rightbar" location="component://ecommerce/widget/CommonScreens.xml"/>
+2 -2
View File
@@ -33,7 +33,7 @@ under the License.
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<platform-specific><html><html-template location="component://ecommerce/template/shoppinglist/EditShoppingList.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/shoppinglist/EditShoppingList.ftl"/></html></platform-specific>
</decorator-section>
<decorator-section name="right-column">
<include-screen name="rightbar" location="component://ecommerce/widget/CommonScreens.xml"/>
@@ -61,7 +61,7 @@ under the License.
<set field="layoutSettings" from-field="themeResources" default-value="${layoutSettings}" global="true"/>
</actions>
<widgets>
<platform-specific><html><html-template location="component://ecommerce/template/shoppinglist/EditShoppingList.ftl"/></html></platform-specific>
<platform-specific><html><html-template multi-block="true" location="component://ecommerce/template/shoppinglist/EditShoppingList.ftl"/></html></platform-specific>
</widgets>
</section>
</screen>