# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # $Header:$ # # This properties files defines all of the JavaScript generated by the HTML # tags. This file does not need I18N support. In fact, if this is internationalized # the JavaScriptUtils class needs updating because it caches the Bundle internally # so it is only looked up once. functionComment=\ \n// **** Start the NetUI Framework Generated JavaScript ****\n\ \n # generic method to submit a form, used by Anchor and ImageAnchor # The following method will be written out once an may be called by # multiple anchor and imageAnchors. The event JavaScript is defined following it. anchorFormSubmit=\ // submit the form from an Anchor or ImageAnchor\n\ // Search for the form by actionName,\n\ // Replace the action with the passed in action\n\ // Submit the form\n\ function anchor_submit_form(netuiName, newAction)\n\ {\n\ \ for (var i=0; i 0) '{'\n\ \ var formNode = null;\n\ \ for (var i = 0; i < document.forms.length; i++) '{'\n\ \ if (document.forms[i].name == formName) '{'\n\ \ formNode = document.forms[i];\n\ \ break;\n\ \ '}'\n\ \ '}'\n\ \n\ \ if (formNode != null) '{'\n\ \ var sep = "?";\n\ \ if (url != null && url.length != 0 && url.indexOf("?") > 0) '{'\n\ \ sep = "&";\n\ \ '}'\n\ \ url += sep + get_form_query(formNode);\n\ \ '}'\n\ \ '}'\n\ \n\ \ window_netui_popup[popup]=open(url, name, features, replace);\n\ \ if (window_netui_popup[popup].opener == null) window_netui_popup[popup].opener=self;\n\ '}'\n # Open a popup window using a custom function popupSupportOnClick={0}(''{1}'',''{2}'',''{3}'',{4},''{5}'',null);return false; popupSupportUpdateFormOnClick={0}(''{1}'',''{2}'',''{3}'',{4},''{5}'',''{6}'');return false; popupDone=\ function {0}(map)\n\ '{'\n\ \ for (var i in map)\n\ \ '{'\n\ \ var element = document.getElementById(i);\n\ \ if (element != null)\n\ \ '{'\n\ \ element.value=map[i];\n\ \ '}'\n\ \ '}'\n\ '}'\n popupReturn_begin=\ var map = new Object();\n popupReturn_item=\ map["{0}"] = "{1}";\n popupReturn_end=\ top.opener.{0}(map);\n\ window.close();\n # This script will run and set the focus onto the named element # It is a page level statement that runs to set the initial focus on # the page. setFocus=\ // set the focus on a field within the named form\n\ if (document.forms["{0}"]["{1}"].type != "hidden")\n\ \ document.forms["{0}"]["{1}"].focus();\n # This script will do a standard image replacement in a rollover rollover=\ // Simple rollover function which replaces the image.src with the passed image\n\ function swapImage(control, image)\n\ {\n\ \ control.src = image;\n\ }\n # JavaScript that will become the mapping between the id and real name idMappingTable=\ // Build the netui_names table to map the tagId attributes\n\ // to the real id written into the HTML\n\ if (netui_names == null)\n\ \ var netui_names = new Object();\n\ {0}\n # JavaScript that will become the mapping between the tagId and the real name tagIdNameMappingTable=\ // Build the netui_names table to map the tagId attributes\n\ // to the real id written into the HTML\n\ if (netui_tagIdNameMap == null)\n\ \ var netui_tagIdNameMap = new Object();\n\ {0}\n # this is the individual entry into the mapping table for each mapping idMappingEntry=\ netui_names.{0}="{1}"\n # This is a mapping between tagId and name tagIdNameMappingEntry=\ netui_tagIdNameMap["{0}"]="{1}"\n # simple method to return the real id for the a scoped tagId getNetuiTagNameAdvanced=\ // method which will return a real id for a tagId,\n\ // the tag parameter will be used to find the idScope for\n\ // containers that may scope their ids\n\ function getNetuiTagName(id, tag)\n\ {\n\ \ var idScope = getScopeId(tag);\n\ \ if (idScope == \"\")\n\ \ return netui_names[id];\n\ \ else\n\ \ return netui_names[idScope + "__" + id];\n\ }\n #method map the TagId to the real ID lookupIdByTagId=\ // lookup by tagId to "real id"\n\ function lookupIdByTagId(id, tag)\n\ {\n\ \ var idScope = lookupIdScope(tag,".");\n\ \ return (idScope == "") ? id : idScope + id;\n\ }\n #method to do lookup in netui_tagIdNameMap lookupNameByTagId=\ // lookup by tagId to "real name"\n\ function lookupNameByTagId(id, tag)\n\ {\n\ \ var idScope = lookupIdScope(tag,"_");\n\ \ if (idScope == \"\")\n\ \ return netui_tagIdNameMap[id];\n\ \ else\n\ \ return netui_tagIdNameMap[idScope + "__" + id];\n\ }\n # method to find the scope id getScopeId=\ // This method will walk the hierarchy from the pass element looking for a idScope.\n\ // The first idScope found will be returned or the empty string if a idScope is not found.\n\ function getScopeId(tag)\n\ {\n\ \ if (tag == null || tag.getAttribute == null)\n\ \ return "";\n\ \ try {\n\ \ var attrVal = tag.getAttribute("netui:idScope");\n\ \ } catch (e) { /* ignore, in IE6 calling on a table results in an exception */ }\n\ \ if (attrVal != null)\n\ \ return attrVal;\n\ \ return getScopeId(tag.parentNode);\n\ }\n lookupScopeId=\ //Non-Legacy lookup method creating a fully qualified scope id\n\ function lookupIdScope(tag,sep)\n\ {\n\ \ var val = "";\n\ \ if (sep == null) sep = "";\n\ \ while (tag != null && tag.getAttribute != null) {\n\ \ try {\n\ \ var attrVal = tag.getAttribute("netui:idScope");\n\ \ } catch (e) { /* ignore, in IE6 calling on a table results in an exception */ }\n\ \ if (attrVal != null)\n\ \ val = attrVal + sep + val;\n\ \ tag = tag.parentNode;\n\ \ }\n\ \ return val;\n\ }\n\ # JavaScript that will become the mapping between the id and real name (legacy mode) singleIdMappingTable=\ // Build the netui_names table to map the tagId attributes\n\ // to the real id written into the HTML\n\ if (netui_names == null)\n\ \ var netui_names = new Object();\n\ netui_names.{0}="{1}"\n #JavaScript that will become the mapping between the id and the real name singleIdToNameMappingTable=\ \n// map tagId to "real name"\n\ if (netui_tagIdNameMap == null)\n\ \ var netui_tagIdNameMap = new Object();\n\ netui_tagIdNameMap["{0}"]="{1}"\n #This method will invoke the NetUICommand infrastructure netuiAction=\ return netUI.action(this, ''{0}''); #initialization code for the tree initTree=\ if (netUI.netUITree == null) '{\n\ \ netUI.netUITree = new NetUITree();\n\ \ netUI.netUITree.trees = new Object();\n\ '}\n\ netUI.netUITree.trees.{1} = new Object();\n\ netUI.netUITree.trees["{1}"].imgExpandName = "{0}" + "{2}";\n\ netUI.netUITree.trees["{1}"].imgCollapseName = "{0}" + "{3}";\n\ netUI.netUITree.trees["{1}"].imgExpandLastName = "{0}" + "{4}";\n\ netUI.netUITree.trees["{1}"].imgCollapseLastName = "{0}" + "{5}";\n\ netUI.netUITree.trees["{1}"].altExpand = "{6}";\n\ netUI.netUITree.trees["{1}"].altCollapse = "{7}";\n\ netUI.netUITree.init();\n # The AJAX Prefix initTreePrefix=\ netUI.netUITree.trees["{0}"].ajaxPrefix = "{1}";\n # The AJAX Paramter initTreeParam=\ netUI.netUITree.trees["{0}"].ajaxParam = "{1}";\n #initialization code for the divPanel initDivPanel=\ netUI.netUIDivPanel = new NetUIDivPanel();\n\ netUI.netUIDivPanel.init();\n #initialize the webapp name writeWebAppName=\ // write out the webapp name\n\ netUI.webAppName = "{0}";\n