Author: adityasharma
Date: Sat Mar 9 06:36:14 2019 New Revision: 1855087 URL: http://svn.apache.org/viewvc?rev=1855087&view=rev Log: Applied fix from trunk for revision: 1855083 === Improved: Replace document.write() occurrences with some legitimate code (OFBIZ-10759) Removed js code and added Js files in LookupDecorator. Added Js library files as there were some errors in console logs Modified: ofbiz/ofbiz-framework/branches/release18.12/ (props changed) ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/template/includes/Lookup.ftl ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/widget/CommonScreens.xml Propchange: ofbiz/ofbiz-framework/branches/release18.12/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sat Mar 9 06:36:14 2019 @@ -10,4 +10,4 @@ /ofbiz/branches/json-integration-refactoring:1634077-1635900 /ofbiz/branches/multitenant20100310:921280-927264 /ofbiz/branches/release13.07:1547657 -/ofbiz/ofbiz-framework/trunk:1849931,1850015,1850023,1850530,1850647,1850685,1850694,1850711,1850914,1850918,1850921,1850948,1850953,1851006,1851013,1851068,1851074,1851130,1851158,1851200,1851224,1851247,1851254,1851315,1851319,1851350,1851353,1851433,1851500,1851805,1851885,1851998,1852503,1852587,1852818,1852882,1853070,1853109,1853691,1853745,1853750,1854306,1854457,1854683,1855078 +/ofbiz/ofbiz-framework/trunk:1849931,1850015,1850023,1850530,1850647,1850685,1850694,1850711,1850914,1850918,1850921,1850948,1850953,1851006,1851013,1851068,1851074,1851130,1851158,1851200,1851224,1851247,1851254,1851315,1851319,1851350,1851353,1851433,1851500,1851805,1851885,1851998,1852503,1852587,1852818,1852882,1853070,1853109,1853691,1853745,1853750,1854306,1854457,1854683,1855078,1855083 Modified: ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/template/includes/Lookup.ftl URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/template/includes/Lookup.ftl?rev=1855087&r1=1855086&r2=1855087&view=diff ============================================================================== --- ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/template/includes/Lookup.ftl (original) +++ ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/template/includes/Lookup.ftl Sat Mar 9 06:36:14 2019 @@ -27,25 +27,6 @@ under the License. <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>${title!}</title> - <#-- the trick "<scr" + "ipt below is because browsers should not parse the contents of CDATA elements, but apparently they do. --> - <script type="application/javascript">//<![CDATA[ - var jQueryLibLoaded = false; - function initJQuery() { - if (typeof(jQuery) == 'undefined') { - if (!jQueryLibLoaded) { - jQueryLibLoaded = true; - document.write("<scr" + "ipt type=\"application/javascript\" src=\"<@ofbizContentUrl>/common/js/jquery/jquery-3.2.1.min.js</@ofbizContentUrl>\"></scr" + "ipt>"); - document.write("<scr" + "ipt type=\"application/javascript\" src=\"<@ofbizContentUrl>/common/js/jquery/jquery-migrate-3.0.0.min.js</@ofbizContentUrl>\"></scr" + "ipt>"); - document.write("<scr" + "ipt type=\"application/javascript\" src=\"<@ofbizContentUrl>/common/js/jquery/plugins/browser-plugin/jquery.browser-0.1.0.min.js</@ofbizContentUrl>\"></scr" + "ipt>"); - } - setTimeout("initJQuery()", 50); - } - } - initJQuery(); - //]]> - </script> - <script src="<@ofbizContentUrl>/common/js/util/OfbizUtil.js</@ofbizContentUrl>" - type="application/javascript"></script> <#if layoutSettings.javaScripts?has_content> <#--layoutSettings.javaScripts is a list of java scripts. --> <#-- use a Set to make sure each javascript is declared only once, but iterate the list to maintain the correct order --> Modified: ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/widget/CommonScreens.xml?rev=1855087&r1=1855086&r2=1855087&view=diff ============================================================================== --- ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/widget/CommonScreens.xml (original) +++ ofbiz/ofbiz-framework/branches/release18.12/themes/common-theme/widget/CommonScreens.xml Sat Mar 9 06:36:14 2019 @@ -351,6 +351,14 @@ under the License. <set field="defaultOrganizationPartyId" from-field="userPreferences.ORGANIZATION_PARTY" global="true"/> <set field="messagesTemplateLocation" from-field="layoutSettings.VT_MSG_TMPLT_LOC" default-value="component://common-theme/template/includes/Messages.ftl"/> + <set field="layoutSettings.javaScripts[+0]" value="/common/js/jquery/plugins/select2/js/select2-4.0.6.js"/> + <set field="layoutSettings.javaScripts[+0]" value="/common/js/jquery/plugins/datetimepicker/jquery-ui-timepicker-addon-1.6.3.min.js"/> + <set field="layoutSettings.javaScripts[+0]" value="/common/js/jquery/ui/jquery-ui-1.12.1.min.js"/> + <set field="layoutSettings.javaScripts[+0]" value="/common/js/jquery/plugins/validate/jquery.validate.min.js"/> + <set field="layoutSettings.javaScripts[+0]" value="/common/js/jquery/plugins/browser-plugin/jquery.browser-0.1.0.min.js" global="true"/> + <set field="layoutSettings.javaScripts[+0]" value="/common/js/jquery/jquery-migrate-3.0.0.min.js" global="true"/> + <set field="layoutSettings.javaScripts[+0]" value="/common/js/jquery/jquery-3.2.1.min.js" global="true"/> + <set field="layoutSettings.javaScripts[]" value="/common/js/util/OfbizUtil.js" global="true"/> </actions> <widgets> <section> |
Free forum by Nabble | Edit this page |