|
| 1 | +<#-- |
| 2 | +Licensed to the Apache Software Foundation (ASF) under one |
| 3 | +or more contributor license agreements. See the NOTICE file |
| 4 | +distributed with this work for additional information |
| 5 | +regarding copyright ownership. The ASF licenses this file |
| 6 | +to you under the Apache License, Version 2.0 (the |
| 7 | +"License"); you may not use this file except in compliance |
| 8 | +with the License. You may obtain a copy of the License at |
| 9 | +
|
| 10 | +http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +
|
| 12 | +Unless required by applicable law or agreed to in writing, |
| 13 | +software distributed under the License is distributed on an |
| 14 | +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | +KIND, either express or implied. See the License for the |
| 16 | +specific language governing permissions and limitations |
| 17 | +under the License. |
| 18 | +--> |
| 19 | + |
| 20 | +<#assign docLangAttr = locale.toString()?replace("_", "-")> |
| 21 | +<#assign initialLocale = locale.toString()> |
| 22 | +<#assign langDir = "ltr"> |
| 23 | +<#if "ar.iw"?contains(docLangAttr?substring(0, 2))> |
| 24 | + <#assign langDir = "rtl"> |
| 25 | +</#if> |
| 26 | +<html lang="${docLangAttr}" dir="${langDir}" xmlns="http://www.w3.org/1999/xhtml"> |
| 27 | +<head> |
| 28 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
| 29 | + <title>${title!}</title> |
| 30 | + <#if layoutSettings.shortcutIcon?has_content> |
| 31 | + <#assign shortcutIcon = layoutSettings.shortcutIcon/> |
| 32 | + <#elseif layoutSettings.VT_SHORTCUT_ICON?has_content> |
| 33 | + <#assign shortcutIcon = layoutSettings.VT_SHORTCUT_ICON /> |
| 34 | + </#if> |
| 35 | + <#if shortcutIcon?has_content> |
| 36 | + <link rel="shortcut icon" href="<@ofbizContentUrl>${StringUtil.wrapString(shortcutIcon)+".ico"}</@ofbizContentUrl>" type="image/x-icon"> |
| 37 | + <link rel="icon" href="<@ofbizContentUrl>${StringUtil.wrapString(shortcutIcon)+".png"}</@ofbizContentUrl>" type="image/png"> |
| 38 | + <link rel="icon" sizes="32x32" href="<@ofbizContentUrl>${StringUtil.wrapString(shortcutIcon)+"-32.png"}</@ofbizContentUrl>" type="image/png"> |
| 39 | + <link rel="icon" sizes="64x64" href="<@ofbizContentUrl>${StringUtil.wrapString(shortcutIcon)+"-64.png"}</@ofbizContentUrl>" type="image/png"> |
| 40 | + <link rel="icon" sizes="96x96" href="<@ofbizContentUrl>${StringUtil.wrapString(shortcutIcon)+"-96.png"}</@ofbizContentUrl>" type="image/png"> |
| 41 | + </#if> |
| 42 | + <#if layoutSettings.VT_STYLESHEET_LESS?has_content> |
| 43 | + <#list layoutSettings.VT_STYLESHEET_LESS as styleSheet> |
| 44 | + <link rel="stylesheet/less" href="<@ofbizContentUrl>${StringUtil.wrapString(styleSheet)}</@ofbizContentUrl>" type="text/css"/> |
| 45 | + </#list> |
| 46 | + </#if> |
| 47 | + <#if layoutSettings.javaScripts?has_content> |
| 48 | + <#--layoutSettings.javaScripts is a list of java scripts. --> |
| 49 | + <#-- use a Set to make sure each javascript is declared only once, but iterate the list to maintain the correct order --> |
| 50 | + <#assign javaScriptsSet = Static["org.apache.ofbiz.base.util.UtilMisc"].toSet(layoutSettings.javaScripts)/> |
| 51 | + <#list layoutSettings.javaScripts as javaScript> |
| 52 | + <#if javaScriptsSet.contains(javaScript)> |
| 53 | + <#assign nothing = javaScriptsSet.remove(javaScript)/> |
| 54 | + <script src="<@ofbizContentUrl>${StringUtil.wrapString(javaScript)}</@ofbizContentUrl>" |
| 55 | + type="text/javascript"></script> |
| 56 | + </#if> |
| 57 | + </#list> |
| 58 | + </#if> |
| 59 | + <#if layoutSettings.styleSheets?has_content> |
| 60 | + <#list layoutSettings.styleSheets as styleSheet> |
| 61 | + <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/> |
| 62 | + </#list> |
| 63 | + </#if> |
| 64 | + <#if layoutSettings.VT_STYLESHEET?has_content> |
| 65 | + <#list layoutSettings.VT_STYLESHEET as styleSheet> |
| 66 | + <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/> |
| 67 | + </#list> |
| 68 | + </#if> |
| 69 | + <#if layoutSettings.VT_HELPSTYLESHEET?has_content && lookupType?has_content> |
| 70 | + <#list layoutSettings.VT_HELPSTYLESHEET as styleSheet> |
| 71 | + <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/> |
| 72 | + </#list> |
| 73 | + </#if> |
| 74 | + <#if layoutSettings.rtlStyleSheets?has_content && "rtl" == langDir> |
| 75 | + <#list layoutSettings.rtlStyleSheets as styleSheet> |
| 76 | + <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/> |
| 77 | + </#list> |
| 78 | + </#if> |
| 79 | + <#if layoutSettings.VT_RTL_STYLESHEET?has_content && "rtl" == langDir> |
| 80 | + <#list layoutSettings.VT_RTL_STYLESHEET as styleSheet> |
| 81 | + <link rel="stylesheet" href="<@ofbizContentUrl>${styleSheet}</@ofbizContentUrl>" type="text/css"/> |
| 82 | + </#list> |
| 83 | + </#if> |
| 84 | + |
| 85 | + <script type="text/javascript"> |
| 86 | + // This code inserts the value lookedup by a popup window back into the associated form element |
| 87 | + var re_id = new RegExp('id=(\\d+)'); |
| 88 | + var num_id = (re_id.exec(String(window.location)) |
| 89 | + ? new Number(RegExp.$1) : 0); |
| 90 | + var obj_caller = (window.opener ? window.opener.lookups[num_id] : null); |
| 91 | + if (obj_caller == null) |
| 92 | + obj_caller = window.opener; |
| 93 | +
|
| 94 | + // function passing selected value to calling window |
| 95 | + function set_multivalues(value) { |
| 96 | + obj_caller.target.value = value; |
| 97 | + var thisForm = obj_caller.target.form; |
| 98 | + var evalString = ""; |
| 99 | +
|
| 100 | + if (arguments.length > 2) { |
| 101 | + for (var i = 1; i < arguments.length; i = i + 2) { |
| 102 | + evalString = "setSourceColor(thisForm." + arguments[i] + ")"; |
| 103 | + eval(evalString); |
| 104 | + evalString = "thisForm." + arguments[i] + ".value='" + arguments[i + 1] + "'"; |
| 105 | + eval(evalString); |
| 106 | + } |
| 107 | + } |
| 108 | + window.close(); |
| 109 | + } |
| 110 | + </script> |
| 111 | +</head> |
| 112 | +<body style="background-color: WHITE;"> |
0 commit comments