/*jslint nomen: false, evil: false, browser: true, eqeqeq: false, white: false, undef: false */ /* Oracle Database Application Express, Release 3.1 B32468-02 Copyright © 2003, 2008, Oracle. All rights reserved. The Programs (which include both the software and documentation) contain proprietary information; they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly, or decompilation of the Programs, except to the extent required to obtain interoperability with other independently created software or as specified by law, is prohibited. The information contained in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. This document is not warranted to be error-free. Except as may be expressly permitted in your license agreement for these Programs, no part of these Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose. If the Programs are delivered to the United States Government or anyone licensing or using the Programs on behalf of the United States Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the Programs, including documentation and technical data, shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement, and, to the extent applicable, the additional rights set forth in FAR 52.227-19, Commercial Computer Software--Restricted Rights (June 1987). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065. The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup, redundancy and other measures to ensure the safe use of such applications if the Programs are used for such purposes, and we disclaim liability for any damages caused by such use of the Programs. Oracle, JD Edwards, PeopleSoft, and Siebel are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. The Programs may provide links to Web sites and access to content, products, and services from third parties. Oracle is not responsible for the availability of, or any content provided on, third-party Web sites. You bear all risks associated with the use of such content. If you choose to purchase any products or services from a third party, the relationship is directly between you and the third party. Oracle is not responsible for: (a) the quality of third-party products or services; or (b) fulfilling any of the terms of the agreement with the third party, including delivery of products or services and warranty obligations related to purchased products or services. Oracle is not responsible for any loss or damage of any sort that you may incur from dealing with any third party. */ /** * @fileOverview * This file holds all namespaced objects and functions for Oracle Application Express * * */ var NameSpaceOnly = false; var apex = {}; if (apex===null || typeof(apex)!="object"){apex={};} if (apex.page===null || typeof(apex.page)!="object"){apex.page={};} if (apex.tabular===null || typeof(apex.tabular)!="object"){apex.tabular={};} if (apex.spreadsheet===null || typeof(apex.spreadsheet)!="object"){apex.spreadsheet={};} if (apex.items===null || typeof(apex.items)!="object"){apex.items={};} if (apex.util===null || typeof(apex.util)!="object"){apex.util={};} if (apex.ajax===null || typeof(apex.ajax)!="object"){apex.ajax={};} if (apex.dhtml===null || typeof(apex.dhtml)!="object"){apex.dhtml={};} if (apex.worksheet===null || typeof(apex.worksheet)!="object"){apex.worksheet={};} if (apex.validation===null || typeof(apex.validation)!="object"){apex.validation={};} if (apex.widget===null || typeof(apex.widget)!="object"){apex.widget={};} /* end standard namespaces */ /** * @namespace apex */ apex={ /** * This object holds utility functions mainly for built in functionality * @constructor */ util : function (){ var that = this; this.el = false; this.init = function(pId){ that.el = $x(pId); if(!that.el){return false;} }; this.select = {}; /** * In some cases an empty select function needs to be cleared out * @function */ this.select.clean = function(pId){ that.init(pId); if(that.el.length == 1 && that.el.options[0].value == 'DELETE ME'){that.el.length--;} } return that; } } var gUtil = new apex.util(); /** * @namespace apex.page */ apex.page = { /** * The apex page form object. This can be used to change requests on the fly or to supress page submission * @constructor */ form : function (pRequest){ var that = this; that.request = pRequest; that.supress = false; /* *This runs the standard doSubmit() **/ that.submit = function(pRequest){ if(pRequest){that.request = pRequest;} if(!that.supress){ /* should this be namespaced ?*/ flowSelectAll(); $s('pRequest',that.request); document.wwv_flow.submit(); } }; this.confirm = function(pMessage,pRequest){ if(!!!pRequest){pRequest='Delete';} that.supress = !confirm((!!!pMessage)?"Would you like to perform this delete action?":pMessage); that.submit(pRequest); } }, /** * The apex page item object. This will hold all single item functions * These functions assume that these are APEX generated ITEMS and will make best guess at the proper functionality to apply. * @constructor */ item : function (pNd){ var that = this; this.node = false; this.item_type = false; this.id = false; this.value = value; this.valueArray = valueArray; /**/ this.init = init; this.set = set; this.init(pNd); return; function init(pNd){ try{ switch(typeof (pNd)){ case 'string':that.node = document.getElementById(pNd);break; case 'object':that.node = pNd;break; default:that.node = false;break; } if(that.node.nodeType == 1){}else{that.node = false;} }catch(e){that.node = false;} if(that.node){ that.id = that.node.id; var lNodeType = that.node.nodeName.toUpperCase(); var lClass = that.node.className.toUpperCase(); if(lNodeType == 'FIELDSET'){ that.item_type = lClass; switch(lClass){ case 'CHECKBOX_GROUP':;break; case 'RADIO_GROUP':; break; case 'SHUTTLE':; break; case 'LISTMANAGER':; break; default: that.item_type = false; break; } }else if(lNodeType == 'INPUT'){ that.item_type = that.node.type.toUpperCase(); switch(that.item_type){ case 'CHECKBOX':; break; case 'RADIO':; break; case 'TEXT': var TEXT_TYPE = that.node.parentNode.className.toUpperCase(); switch(TEXT_TYPE){ case 'LOV':that.item_type = TEXT_TYPE;break; case 'COLORPICKER':that.item_type = TEXT_TYPE;break; case 'CALCULATOR':that.item_type = TEXT_TYPE;break; case 'DATEPICKER':that.item_type = TEXT_TYPE;break; default:;break; } ; break; case 'PASSWORD':; break; case 'HIDDEN':; break; case 'FILE':; break; default: that.item_type = false; break; } }else{ that.item_type = lNodeType; switch(that.item_type){ case 'TEXTAREA': if(that.node.parentNode.className == 'html_editor' && that.node.parentNode.tagName == 'FIELDSET'){ that.item_type = 'FCKEDITOR' } ; break; case 'SELECT':;break; case 'SPAN':that.item_type = false; break; default: that.item_type = false;break; } } } }; function valueArray(){ if(!that.node){return false;} var lArray = true,lReturn=[]; switch(that.item_type){ case 'RADIO_GROUP' : lOpts = $x_FormItems(that.node,'RADIO'); for(var i=0,len=lOpts.length;iUpDownBottom'; $x(pThis).innerHTML = lvar; var lSelect = $dom_AddTag('shuttle1','select'); var lSelect2 = $dom_AddTag('shuttle2','select'); lSelect.multiple = true; lSelect2.multiple = true; for (var i=0,len=myObject.row.length;i 10){$x_Style('apexir_rollover_content','height','210px')} else{$x_Style('apexir_rollover_content','height','')} $x_Show('apexir_rollover_content'); $s('apexir_search',''); }else{ $x_Hide('apexir_rollover_content'); } var pThis = $x(that.current_col_dom); $x_Show('apexir_rollover'); $x_Style('apexir_rollover','left',(findPosX(pThis.parentNode))+'px'); $x_Style('apexir_rollover','top',(findPosY(pThis)+pThis.offsetHeight+5)+'px'); $x_Class(pThis.parentNode,'current'); that.last_col_id = pThis.id; document.body.onclick = that.dialog.check; }else if(that.current_control == 'SHOW_FILTER' || that.current_control == 'SHOW_HIGHLIGHT'){ var lDrop = that.item.control_panel_drop(); $s(lDrop,p.responseText); $x_Show(lDrop); /* switch out */ ws_ColumnCheck($x('apexir_COLUMN_NAME')); }else if(that.current_control == 'NARROW' || that.current_control == 'FORMAT_MASK_LOV'){ var lBuild = new $d_LOV_from_JSON(); lBuild.l_Type = 'a'; lBuild.create(lDiv,p.responseText); lBuild.l_Dom.id='apexir_col_values_drop'; $x_Style(lBuild.l_Dom,'height','200px'); $x_Style(lBuild.l_Dom,'display','block'); if(!$x('apexir_col_values_drop_space')){ lThis = $dom_AddTag($x(that.temp_return_element).parentNode,'BR'); lThis.id="apexir_col_values_drop_space"; } $x(that.temp_return_element).parentNode.appendChild(lBuild.l_Dom); for(var i=0,len=lBuild.l_NewEls.length;i'); } else{ var lTd = $tr_AddTD(lRow[i]); var lImg_1 = this.create(lTd,that.src_up,that.class_name,function(){that.row.up(this)}) var lImg_2 = this.create(lTd,that.src_down,that.class_name,function(){that.row.down(this)}) } } return; function create(pThis,pSrc,pClass,pFunction){ var lImg_1 = $dom_AddTag(pThis,'IMG'); lImg_1.src=pSrc; lImg_1.className = pClass; lImg_1.onclick = pFunction; return lImg_1; } } } } /** * @ignore * This checks that the proper UI is displayed based on operator * */ function ws_OperatorCheck(pThis){ var lClass = $x('apexir_COLUMN_NAME').options[$x('apexir_COLUMN_NAME').selectedIndex].className; var lValue = $v(pThis); var lThis = []; lThis[0] = $x('apexir_EXPR').parentNode; lThis[1] = $x('apexir_EXPR2').parentNode; lThis[2] = $x('apexir_EXPR3').parentNode; lThis[3] = $x('apexir_BETWEEN_FROM_fieldset').parentNode; lThis[4] = $x('apexir_BETWEEN_TO_fieldset').parentNode; $x_Show_Hide('apexir_EXPR_ICON',lThis); if(lValue=='is null' || lValue=='is not null'){ $x_Hide('apexir_EXPRESSION_LABEL'); return; }else{ $x_Show('apexir_EXPRESSION_LABEL'); if(lClass == 'DATE' && !(lValue=='is in the last' || lValue=='is not in the last' || lValue=='is in the next' || lValue=='is not in the next')){ $x_Show(lThis[3]); (lValue=='between')?$x_Show(lThis[4]):null; }else{ $x_Show(lThis[0]); (lValue=='between')?$x_Show(lThis[1]):null; (lValue=='is in the last' || lValue=='is not in the last' || lValue=='is in the next' || lValue=='is not in the next')?$x_Show_Hide(lThis[2],'apexir_EXPR_ICON'):null; } } return; } /** * @ignore * Checks that proper operator select list is shown * */ function ws_ColumnCheck(pThis){ var lClass = pThis.options[pThis.selectedIndex].className; $x_HideSiblings('apexir_'+lClass+'_OPT'); ws_OperatorCheck('apexir_'+lClass+'_OPT'); } function item_menu(pThis,pColumn){ $x_Style('item_menu','position','absolute'); var lA = $x('item_menu').getElementsByTagName('a'); for (var i=0,len=lA.length;i