123456 |
- // Licensed Materials - Property of IBM
- // IBM Cognos Products: cchl
- // (C) Copyright IBM Corp. 2003, 2016.
- // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- function C_PromptSelectValue(_cHB, _cTM, _cCB1){G_HAL.F_VerifyDependencies("C_PromptControl");G_HAL.F_VerifyDependencies("C_ComboBox");G_HAL.F_VerifyDependencies("C_ListView");G_HAL.F_VerifyDependencies("C_SimpleValue");C_PromptSelectValue.baseConstructor.call(this, _cTM, _cCB1);this._cFM1=U_XML.F_CreateDocument();this._cKI1=document;this._c0D();this._cIB=_cHB;this._cOK="220px";this._cLI1=0;this._cUY=this._cIB["id"]||this._cIB["uniqueID"];if(this._cHX===true){this._cNO=G_ResManager.F_GetString("IDS_CCHL_PRMT_SELECTALL");this._c9H=G_ResManager.F_GetString("IDS_CCHL_PRMT_DESELECTALL");if(this._c0P1===true){this._cVY=G_ResManager.F_GetString("IDS_CCHL_PRMT_CHOICES");this._cOO=G_ResManager.F_GetString("IDS_CCHL_PRMT_INSERTTIP");this._cPO=G_ResManager.F_GetString("IDS_CCHL_PRMT_REMOVETIP");}}if(this._c0P1===true){this._cLE=G_ResManager.F_GetString("IDS_CCHL_PRMT_HIGHEST_VALUE");this._cAH=G_ResManager.F_GetString("IDS_CCHL_PRMT_LOWEST_VALUE");this._cQO=G_ResManager.F_GetString("IDS_CCHL_PRMT_FROM");this._cWY=G_ResManager.F_GetString("IDS_CCHL_PRMT_TO");}this._cZD1=[];this._cBT1();this.F_UpdateControlStyle(_cHB, this._cU7());this._cGI1();};C_PromptSelectValue.F_Extends(C_PromptControl);C_PromptSelectValue.prototype._cU7=function(){var _cKN1=200, _cDK1=30;if(this._c0P1||this._cHX||this._cRO!=="dropdown"){_cDK1=200;}if(this._c0P1&&this._cHX){_cKN1=400;}return "min-width:" + _cKN1 + "px;width:" + _cKN1 + "px;min-height:" + _cDK1 + "px;height:" + _cDK1 + "px";};C_PromptSelectValue.prototype._c0D=function(){C_PromptSelectValue.superClass._c0D.call(this);this._cRO=this._cWM.getAttribute("selectValueUI")||"comboBox";this._cR31=this._cWM.getAttribute("columnName")||"";if(this._cHX===false&&this._cRO==="checkboxGroup"){this._cRO="radioGroup";}};C_PromptSelectValue.prototype.F_Detach=function(){while(this._cZD1.length>0){this._cZD1.pop()._cQP1();}if(this._c091){this._c091.F_Detach();}if(this._cMI1){this._cMI1.F_Detach();}if(this._cPK){var _cS81=this._cPK.F_GetListItems();for(var _c6U1=0; _c6U1<_cS81.length; _c6U1++){_cS81[_c6U1]["simpleValueObj"]=null;}this._cPK.F_Detach();}if(this._c3E1){this._c3E1.F_Detach();}if(this._c4E1){this._c4E1.F_Detach();}while(this._cIB.hasChildNodes()){this._cIB.removeChild(this._cIB.firstChild);}};C_PromptSelectValue.prototype._c191=function(){if(this._c0P1===true&&this._cHX===true){this._cIB.innerHTML='<div class="clsPromptSelectValue" style="display: flex; flex-direction: row; height: 100%; width: 100%">' +'<div class="clsInputArea" style="flex: 1.5"></div>' +'<div>'+'<div style="width: 40px; height: 40px; line-height: 40px; text-align: center">' +'<button name="add" hal_iscoolbutton="true" class="clsCoolButton" title="' + this._cOO + '" _cSP1="hal/images/btn_arrow_right">' +'<img src="hal/images/next-right-forward_24.svg" class="clsImg16x16">' +'</button>'+'</div>'+'<div style="width: 40px; height: 40px; line-height: 40px; text-align: center">' +'<button name="remove" hal_iscoolbutton="true" class="clsCoolButton" title="' + this._cPO + '" _cSP1="hal/images/btn_arrow_left">' +'<img src="hal/images/next-left_24.svg" class="clsImg16x16">' +'</button>'+'</div>'+'</div>'+'<div style="display: flex; flex-direction: column; flex: 1">' +((this._cWC1===true&&this._cUJ===false)?'<div class="clsAdornmentsArea"></div>':'') +'<div style="padding-bottom: 3px">' + this._cVY + '</div>' +'<div class="clsOutputArea" style="flex: 1 0 auto; position: relative"></div>' +'<div class="clsDialogText" style="text-align: right; padding-top: 8px">' +'<a class="clsHyperlink" style="margin-right: 8px" href="#">' + this._cNO + '</a><a class="clsHyperlink" href="#">' + this._c9H + '</a>' +'</div>'+'</div>'+'</div>';}else {this._cIB.innerHTML='<div class="clsPromptSelectValue" style="display: flex; flex-direction: row; height: 100%; width: 100%">' +((this._cWC1===true&&this._cUJ===false)?'<div class="clsAdornmentsArea" style="; padding-right: 3px"></div>':'') +'<div style="display: flex; flex-direction: column; flex: 1">' +((this._cRO==="comboBox"||this._cRO==="dropdown")?'<div class="clsInputArea" style="position: relative"></div>':'<div class="clsInputArea" style="flex: 1 0 auto; position: relative"></div>')+((this._cHX===true)?'<div class="clsDialogText" style="text-align: right; padding-top: 8px"><a class="clsHyperlink" style="margin-right: 8px" href="#">' + this._cNO + '</a><a class="clsHyperlink" href="#">' + this._c9H + '</a></div>':'') +'</div>'+'</div>';}};C_PromptSelectValue.prototype._c44=function(_cI51){var _cOA1=_cI51.appendChild(_cI51.ownerDocument.createElement("listItem"));_cOA1.setAttribute("label", this._cR31);_cOA1=_cI51.appendChild(_cI51.ownerDocument.createElement("listItem"));_cOA1.setAttribute("label", "------------------------------");};C_PromptSelectValue.prototype._cSO=function(_cIR1,_cGX,_cTP1){var _cPA1=this._cFM1.createElement("listView");var _cI51=_cPA1.appendChild(_cPA1.ownerDocument.createElement("listItems"));if(_cIR1==="radioGroup"){_cPA1.setAttribute("view", "radio");}else if(_cIR1==="checkboxGroup"){_cPA1.setAttribute("view", "checkbox");}if(_cGX===true){_cPA1.setAttribute("multiSelect", "true");}if(_cTP1!==true){var _cTO=this._cWM.selectNodes("selectOptions/selectOption");if(this._cRO==="comboBox"||this._cRO==="dropdown"){this._c44(_cI51);}if(_cTO&&_cTO.length>0){var _c6U1, _c6M1, _cOA1;for(_c6U1=0; _c6U1<_cTO.length; _c6U1++){_c6M1=_cTO[_c6U1];_cOA1=_cI51.appendChild(_cI51.ownerDocument.createElement("listItem"));_cOA1.setAttribute("value", _c6M1.getAttribute("useValue"));_cOA1.setAttribute("label", _c6M1.getAttribute("displayValue"));}}}return _cPA1;};C_PromptSelectValue.prototype._cB6=function(_cNI1){var _c9O=[];var _cGO=this._cWM.selectNodes("selectChoices/*");if(_cGO&&_cGO.length>0){var _cHY, _c6U1, _c6M1, _c3S1;for(_c6U1=0; _c6U1<_cGO.length; _c6U1++){_c9O.push(_cHY=new C_SimpleValue(_cNI1));_c6M1=_cGO[_c6U1];var _cWB1=_c6M1.getAttribute("useValue");if(_cNI1){if(_cWB1){var a=_cWB1.split(":");if(a[0]){_cHY.F_SetUseValue(a[0], C_ParameterValue._cUC1);_cHY.F_SetUseValue(a[0], C_ParameterValue._cZB1);}if(a[1]){_cHY.F_SetUseValue(a[1], C_ParameterValue._cZB1);}}else{if(_c6M1.tagName==="selectBoundRange"){_c3S1=_c6M1.selectSingleNode("start");if(_c3S1){_cHY.F_SetUseValue(_c3S1.getAttribute("useValue"), C_ParameterValue._cUC1);}_c3S1=_c6M1.selectSingleNode("end");if(_c3S1){_cHY.F_SetUseValue(_c3S1.getAttribute("useValue"), C_ParameterValue._cZB1);}}else if(_c6M1.tagName==="selectOption"){_cHY.F_SetUseValue(_cWB1, C_ParameterValue._cUC1);_cHY.F_SetUseValue(_cWB1, C_ParameterValue._cZB1);}}}else {_cHY.F_SetUseValue(_cWB1);}}}return _c9O;};C_PromptSelectValue.prototype._cKK=function(_cBR1,_cHI1,_cZ81){var _c4S1=_cZ81.bind(this);_cBR1.addEventListener(_cHI1, _c4S1);this._cZD1.push({_cQP1: function(){_cBR1.removeEventListener(_cHI1, _c4S1);}});};C_PromptSelectValue.prototype._cQK=function(_c291){_c291.innerHTML=(this._cHX===true||this._cWC1===false)? '<div>' + this._cQO + '</div>' +'<div style="display: flex; flex-direction: row">' +'<input type="radio" value="low_value" />' +'<div style="flex: 1; margin-left: 4px">' +'<table class="clsComboFrom" style="border-collapse: collapse; border-spacing: 0px; width: 100%"></table>' +'</div>'+'</div>'+'<input type="radio" value="lowest" checked="true" />' +'<label>' + this._cAH + '</label>' +'<div style="margin-top: 16px">' + this._cWY + '</div>' +'<div style="display: flex; flex-direction: row">' +'<input type="radio" value="high_value" />' +'<div style="flex: 1; margin-left: 4px">' +'<table class="clsComboTo" style="border-collapse: collapse; border-spacing: 0px; width: 100%"></table>' +'</div>'+'</div>'+'<input type="radio" value="highest" checked="true" />' +'<label>' + this._cLE + '</label>': '<div>' + this._cQO + '</div>' +'<div><table class="clsComboFrom" style="border-collapse: collapse; border-spacing: 0px; width: 100%"></table></div>' +'<div style="margin-top: 16px">' + this._cWY + '</div>' +'<div><table class="clsComboTo" style="border-collapse: collapse; border-spacing: 0px; width: 100%"></table></div>';this._c091=new C_ComboBox(_c291.getElementsByClassName("clsComboFrom")[0], null, this._cSO(), this);this._c091.F_SetDropDownHeight(this._cOK);this._c091.F_SelectByIndex(0);this._cMI1=new C_ComboBox(_c291.getElementsByClassName("clsComboTo")[0], null, this._cSO(), this);this._cMI1.F_SetDropDownHeight(this._cOK);this._cMI1.F_SelectByIndex(0);if(this._cHX===true||this._cWC1===false){if(this._cHX===true){var _cS31=this._cIB.getElementsByClassName("clsOutputArea")[0];_cS31.innerHTML='<div class="clsListView" style="position: absolute; top: 0; right: 0; bottom: 0; left: 0"></div>';this._cPK=new C_ListView(_cS31.firstChild, this._cSO(undefined, true, true), this);}this._cUO={"names": []};var _c6U1, _cUP1, _cYQ1, _c1V1;var _cGM1=_c291.getElementsByTagName("input"), _cHM1 = _c291.getElementsByTagName("label");for(_c6U1=0; _c6U1<_cGM1.length; _c6U1++){_cUP1=_cGM1[_c6U1];if(_c6U1 % 2===0){_cYQ1=this._cUY+"_RadioGroup_" + this._cLI1++;}_cUP1.setAttribute("name", _cYQ1);_c1V1=this._cUY+"_RadioButton_" + this._cLI1++;_cUP1.setAttribute("id", _c1V1);if(_c6U1 % 2===1){_cHM1[Math.floor(_c6U1 / 2)].setAttribute("for", _c1V1);}this._cKK(_cUP1, "click", this._cJB);if(_cUP1.checked===true){this._cUO[_cUP1.name]={"value": _cUP1.value, "idx": this._cUO["names"].length};this._cUO["names"].push(_cUP1.name);if(_cUP1.value=="lowest"){this._cXY=_cUP1;}else{this._cST=_cUP1;}}else{if(_cUP1.value=="low_value"){this._cVO=_cUP1;}else{this._cRK=_cUP1;}}}var _cOI1=this._cIB.getElementsByTagName("button");for(_c6U1=0; _c6U1<_cOI1.length; _c6U1++){this._cKK(_cOI1[_c6U1], "click", this._cFQ);_cOI1[_c6U1].setAttribute("id", this._cUY + "_Button_" + this._cLI1++);}if(this._cHX===true){this._cKB(0, true);this._cKB(1, true);}}};C_PromptSelectValue.prototype._cKB=function(_c6U1,_cHC1){var _cOI1=this._cIB.getElementsByTagName("button");if(_cOI1&&_c6U1<_cOI1.length){_cOI1[_c6U1].disabled=_cHC1;_cOI1[_c6U1].parentNode.style.opacity=_cHC1?0.3:1.0;_cOI1[_c6U1].style.cursor=(_cHC1?"initial":"pointer");}};C_PromptSelectValue.prototype._c54=function(_cQA1,_cS81){var _c6U1, _cOA1;for(_c6U1=0; _c6U1<_cS81.length; _c6U1++){_cOA1=_cS81[_c6U1];_cOA1["simpleValueObj"]=null;_cQA1.F_RemoveListItemWithValue(_cOA1.getAttribute("value"));}};C_PromptSelectValue.prototype._cBH=function(btn){var _cYQ1=btn.name, _cIM1=btn.value, _c6U1=this._cUO[_cYQ1]["idx"];this._cUO[_cYQ1]["value"]=_cIM1;_cYQ1=(_c6U1===1)?this._cUO["names"][0]:this._cUO["names"][1];var _cJM1=this._cUO[_cYQ1]["value"];if(this._cHX===true){if((_cIM1==="lowest"&&_cJM1==="highest")||(_cIM1==="highest"&&_cJM1==="lowest")){this._cKB(0, true);}else {var _c391=this._c091.F_GetContainer().parentNode.previousSibling;var _cPI1=this._cMI1.F_GetContainer().parentNode.previousSibling;this._cKB(0,((_c391.checked&&!this._c091.F_GetValue())||(_cPI1.checked&&!this._cMI1.F_GetValue())));}}};C_PromptSelectValue.prototype._cJB=function(evt){evt.stopPropagation();this._cBH(evt.target);this._cGI1();};C_PromptSelectValue.prototype._cH2=function(){var _cHY;var _c491=this._c091.F_GetContainer().parentNode.previousSibling.checked;var _cQI1=this._cMI1.F_GetContainer().parentNode.previousSibling.checked;if(_c491===true&&_cQI1===true){_cHY=this._cME(this._c091.F_GetValue(), this._c091.F_GetText(), this._cMI1.F_GetValue(), this._cMI1.F_GetText());}else if(_c491===true){_cHY=this._cME(this._c091.F_GetValue(), this._c091.F_GetText(), "", "");}else if(_cQI1===true){_cHY=this._cME("", "", this._cMI1.F_GetValue(), this._cMI1.F_GetText());}else {_cHY=this._cME("", "", "", "");}return _cHY;};C_PromptSelectValue.prototype._cFQ=function(evt){evt.stopPropagation();var _cYQ1=evt.target.name||"";if(_cYQ1==="add"){var _cHY=this._cH2();if(!this._cPK.F_FindListItem("value", _cHY.F_GetUseValue())){var _cI51=this._cPK.F_GetListItemsNode();var _cOA1=_cI51.appendChild(_cI51.ownerDocument.createElement("listItem"));_cOA1.setAttribute("value", _cHY.F_GetUseValue());_cOA1.setAttribute("label", _cHY._cD7());_cOA1["simpleValueObj"]=_cHY;this._cPK._cWO(_cOA1, false);this._cPK.F_Draw();this._cKB(1, false);}}else if(_cYQ1==="remove"){this._c54(this._cPK, this._cPK.F_GetSelectedListItems());this._cPK.F_Draw();this._cKB(1, true);}this._cGI1();};C_PromptSelectValue.prototype._cCH=function(evt){evt.stopPropagation();var _cQA1=this._cPK||this._c4E1||undefined;if(evt.target.textContent===this._cNO){if(_cQA1){if(this._cRO==="checkboxGroup"){_cQA1.F_CheckAll();}else {_cQA1.F_SelectAll();}if(_cQA1===this._cPK){this._cKB(1, !_cQA1.F_GetListItemsNode().hasChildNodes());}}this._cGI1();}else if(evt.target.textContent===this._c9H){this._cZ4(_cQA1);}};C_PromptSelectValue.prototype._cZ4=function(_cQA1,_cKM1){if(_cQA1){if(this._cRO==="checkboxGroup"){_cQA1.F_UncheckAll();}else{_cQA1.F_DeselectAll();}if(this._cPK){if(_cKM1){this._cPK.F_Clear();this._cPK.F_Draw();}this._cKB(1, true);}this._cGI1();}};C_PromptSelectValue.prototype._cBT1=function(){this._c191();var _c291=this._cIB.getElementsByClassName("clsInputArea")[0], _cVP1;if(this._c0P1===true){this._cQK(_c291);}else if(this._c0P1===false){if(this._cRO==="comboBox"||this._cRO==="dropdown"){_c291.innerHTML='<div style="position: absolute"><table style="border-collapse: collapse; border-spacing: 0px; width: 100%"></table></div>';this._c3E1=new C_ComboBox(_c291.firstChild.firstChild, null, this._cSO(), this);this._c3E1.F_SetDropDownHeight(this._cOK);this._c3E1.F_SelectByIndex(0);}else {_c291.innerHTML='<div class="clsListView" style="position: absolute; top: 0; right: 0; bottom: 0; left: 0"></div>';this._c4E1=new C_ListView(_c291.firstChild, this._cSO(this._cRO, this._cHX), this);}}var _c6U1, _cBU1=this._cWM.selectSingleNode("style/CSS");if(_cBU1){var _c5E1=_cBU1.getAttribute("value");var _cRL1=_c5E1.split(";"), _cGN1, _c9S1;for(_c6U1=0; _c6U1<_cRL1.length; _c6U1++){_cGN1=_cRL1[_c6U1];_c9S1=_cGN1.split(":");if(_c9S1[0]==="height"&&!this._c4E1){continue;}_c291.style[_c9S1[0]]=_c9S1[1];}}this._cV7();if(this._cHX===true){var _cT31=this._cIB.getElementsByClassName("clsHyperlink");for(_c6U1=0; _c6U1<_cT31.length; _c6U1++){this._cKK(_cT31[_c6U1], "click", this._cCH);_cT31[_c6U1].setAttribute("id", this._cUY + "_HyperLink_" + this._cLI1++);}}if(this._cWC1===true&&this._cUJ===false){var _cSK=this._cIB.getElementsByClassName("clsAdornmentsArea")[0];this._cU5(_cSK);}};C_PromptSelectValue.prototype._cV7=function(){var _c9O=this._cB6(this._c0P1);if(_c9O&&_c9O.length>0){var _cWP1=[], _c5M1=false;if(this._cPK){_c5M1=true;_cWP1.push(this._cPK);this._cKB(1, false);}else if(this._c4E1){_cWP1.push(this._c4E1);}else if(this._c091&&this._cMI1){_cWP1.push(this._c091);_cWP1.push(this._cMI1);}else if(this._c3E1){_cWP1.push(this._c3E1);}var _cYO1, _cOA1, _c6U1;if(_c5M1===true){var _cI51=_cWP1[0].F_GetListItemsNode();for(_c6U1=0; _c6U1<_c9O.length; _c6U1++){_cYO1=_c9O[_c6U1];_cOA1=_cI51.appendChild(_cI51.ownerDocument.createElement("listItem"));_cOA1.setAttribute("value", _cYO1.F_GetUseValue());_cOA1.setAttribute("label", _cYO1._cD7());_cWP1[0]._cWO(_cOA1, false);}_cWP1[0].F_Draw();}else {if(this._cHX===true){var _cXP1=(this._cRO==="checkboxGroup");for(_c6U1=0; _c6U1<_c9O.length; _c6U1++){_cYO1=_c9O[_c6U1];var _cWB1=_cYO1.F_GetUseValue();_cOA1=_cWB1?C_ListView.F_FindListItem(_cWP1[0].F_GetListViewNode(), "value", _cWB1):null;if(_cOA1){if(_cXP1===true){_cOA1.setAttribute("checked", "true");_cWP1[0]._cA3(_cOA1);}else {_cWP1[0]._cWO(_cOA1, false);}}}_cWP1[0].F_Draw();}else {_cYO1=_c9O[_c9O.length-1];if(_cWP1.length===1){var _cWB1=_cYO1.F_GetUseValue();if(_cWB1&&_cWB1.length>0){_cWP1[0].F_SelectByValue(_cYO1.F_GetUseValue());}}else {var _cWB1=_cYO1.F_GetUseValue(C_ParameterValue._cUC1);if(_cWB1&&_cWB1.length>0){_cWP1[0].F_SelectByValue(_cWB1);if(!this._cWC1){_cWP1[0].F_GetContainer().parentNode.previousSibling.checked=true;}}_cWB1=_cYO1.F_GetUseValue(C_ParameterValue._cZB1);if(_cWB1&&_cWB1.length>0){_cWP1[1].F_SelectByValue(_cWB1);if(!this._cWC1){_cWP1[1].F_GetContainer().parentNode.previousSibling.checked=true;}}}}}}};C_PromptSelectValue.prototype._cNE=function(_cQA1){var _cHY, _cOA1, _c6U1, _cCL1=[], _cS81;if(this._cU31&&this._cHX){_cS81=_cQA1.F_GetListItems();}else{_cS81=(this._cRO==="checkboxGroup")?_cQA1.F_GetCheckedListItems():_cQA1.F_GetSelectedListItems();}this._cU31=false;for(_c6U1=0; _c6U1<_cS81.length; _c6U1++){_cOA1=_cS81[_c6U1];_cHY=_cOA1["simpleValueObj"];if(!_cHY){_cHY=new C_SimpleValue(false, _cOA1.getAttribute("value"), C_SimpleValue._cUR1, undefined);_cHY._cYR=_cOA1.getAttribute("label");}_cCL1.push(_cHY);}return _cCL1;};C_PromptSelectValue.prototype._cME=function(_c591,_cXO,_cRI1,_cYY){var _cHY=new C_SimpleValue(true, null, C_SimpleValue._cUR1, undefined);_cHY.F_SetUseValue(_c591, C_ParameterValue._cUC1);_cHY.F_SetUseValue(_cRI1, C_ParameterValue._cZB1);_cHY._cR5=_cXO;_cHY._cS5=_cYY;return _cHY;};C_PromptSelectValue.prototype.F_GetParameterValues=function(){var _cHY, _cS81, _cOA1, _c6U1, _cCL1=[];if(this._cHX===true){if(this._cPK||this._c4E1){_cCL1=this._cNE(this._cPK||this._c4E1);}}else if(this._cHX===false){if(this._c0P1===true){if(this._cWC1===true){_cHY=this._cME(this._c091.F_GetValue(), this._c091.F_GetText(), this._cMI1.F_GetValue(), this._cMI1.F_GetText());}else {_cHY=this._cH2();}_cCL1.push(_cHY);}else if(this._c0P1===false){if(this._c3E1){_cHY=new C_SimpleValue(false, this._c3E1.F_GetValue(), C_SimpleValue._cUR1, undefined);_cHY._cYR=this._c3E1.F_GetText();_cCL1.push(_cHY);}else if(this._c4E1){_cCL1=this._cNE(this._c4E1);}}}return _cCL1;};C_PromptSelectValue.prototype.F_ComboBox_OnShowDropDown=function(_cRA1,_c6E1){if((this._cHX===true||this._cWC1===false)&&(this._c091===_cRA1||this._cMI1===_cRA1)){var _c7E1=_cRA1.F_GetContainer().parentNode.previousSibling;_c7E1.checked=true;this._cBH(_c7E1);}};C_PromptSelectValue.prototype._cGI1=function(){var _cWP1=[];if(this._cPK){_cWP1.push(this._cPK);}else if(this._c4E1){_cWP1.push(this._c4E1);}else if(this._c091&&this._cMI1){_cWP1.push(this._c091);_cWP1.push(this._cMI1);}else if(this._c3E1){_cWP1.push(this._c3E1);}var _c6U1, _cAS1, _cGN1, _c8E1, _cTO1, _cYO;for(_c6U1=0; _c6U1<_cWP1.length; _c6U1++){_cTO1=true;if(this._cWC1===true){if(_cWP1[_c6U1] instanceof C_ComboBox){_cGN1=_cWP1[_c6U1].F_GetValue();if(this._c231){_cTO1=this._c231(this.F_GetValues());}else if(!_cGN1){_cTO1=false;}}else{if(this._c231){_cTO1=this._c231(this.F_GetValues());}else{if(this._cRO==="checkboxGroup"){_cYO=_cWP1[_c6U1].F_GetCheckedListItems(); }else{_cYO=_cWP1[_c6U1].F_GetSelectedListItems();}if(!_cYO||_cYO.length===0){_cTO1=false;}else{for(_cAS1=0; _cAS1<_cYO.length; _cAS1++){_cGN1=_cYO[_cAS1].getAttribute("value");if(!_cGN1||_cGN1===""){_cTO1=false;break;}}}}}_c8E1=_cWP1[_c6U1].F_GetContainer().parentNode;}else{_c8E1=null;}if(_cTO1){if(_c8E1){_c8E1.style.padding="1px";_c8E1.style.border="none";}this._c9B=true;if(this._cDB1&&this._cDB1.F_PromptControl_OnOverallValidState){this._cDB1.F_PromptControl_OnOverallValidState(this);}}else{if(_c8E1){_c8E1.style.padding="0";_c8E1.style.border="1px solid #D64427";}this._c9B=false;if(this._cDB1&&this._cDB1.F_PromptControl_OnOverallInvalidState){this._cDB1.F_PromptControl_OnOverallInvalidState(this);}}}if(this._cDB1&&this._cDB1.F_PromptControl_OnValueChange){this._cDB1.F_PromptControl_OnValueChange(this);}};C_PromptSelectValue.prototype.F_ComboBox_OnChange=function(_cRA1,_cOA1){if(this._cPK){var _cYP1=(_cRA1===this._c091)?this._cMI1:this._c091;var _c7E1=_cYP1.F_GetContainer().parentNode.previousSibling;this._cKB(0,(_cOA1.getAttribute("value")===""||(_c7E1.checked&&!_cYP1.F_GetValue())));}else {this._cGI1();}};C_PromptSelectValue.prototype.F_ListView_OnItemClick=function(_cQA1,_cOA1,_c1V){if(_cQA1===this._cPK){this._cKB(1, !_cQA1.F_GetListItemsNode().hasChildNodes());}this._cGI1();};C_PromptSelectValue.prototype.F_ListView_OnCheckboxClick=function(_cQA1,_cOA1){this._cGI1();};C_PromptSelectValue.prototype.F_SetAllOptions=function(_cC31){this._cU31=_cC31;};C_PromptSelectValue.prototype.F_ClearParameterValues=function(){if(this._cHX){this._cZ4(this._cPK||this._c4E1||undefined, true);}else{if(this._c0P1){this._c091.F_SelectByIndex(0);this._cMI1.F_SelectByIndex(0);if(!this._cWC1){this._cXY.checked=true;this._cST.checked=true;}this._cGI1();}else{if(this._c3E1){this._c3E1.F_SelectByIndex(0);this._cGI1();}else if(this._c4E1){this._cZ4(this._c4E1);}}}};C_PromptSelectValue.prototype.F_AddValues=function(_cRL1){var _cYO1, _cSI1, _cOA1, _cHY;if(!_cRL1||_cRL1.length<1){this.F_ClearParameterValues();}else{if(this._cHX){var _c6U1;_cSI1=this._cPK||this._c4E1;if(this._c0P1){for(_c6U1=0; _c6U1<_cRL1.length; _c6U1++){_cYO1=_cRL1[_c6U1];_cHY=this._cME(_cYO1["start"]["use"], _cYO1["start"]["display"], _cYO1["end"]["use"], _cYO1["end"]["display"]);if(!_cSI1.F_FindListItem("value", _cHY.F_GetUseValue())){_cOA1=_cSI1.F_AppendNewListItem();_cOA1.setAttribute("value", _cHY.F_GetUseValue());_cOA1.setAttribute("label", _cHY._cD7());_cOA1.setAttribute("selected", "true");_cOA1["simpleValueObj"]=_cHY;}}_cSI1.F_Draw();this._cKB(1, false);}else{var _cPA1=_cSI1.F_GetListViewNode(), _c0S1=this._cRO=="checkboxGroup"?"checked":"selected";for(_c6U1=0; _c6U1<_cRL1.length; _c6U1++){_cYO1=_cRL1[_c6U1];_cOA1=C_ListView.F_FindListItem(_cPA1, "value", _cYO1["use"]);if(_cOA1.getAttribute(_c0S1)!="true"){_cOA1.setAttribute(_c0S1, "true");}}_cSI1.F_Draw();}}else{_cYO1=_cRL1[0];if(this._c0P1){if(_cYO1["start"]["use"]){this._c091.F_SelectByValue(_cYO1["start"]["use"]);if(!this._cWC1){this._cVO.checked=true;}}else{this._c091.F_SelectByIndex(0);if(!this._cWC1){this._cXY.checked=true;}}if(_cYO1["end"]["use"]){this._cMI1.F_SelectByValue(_cYO1["end"]["use"]);if(!this._cWC1){this._cRK.checked=true;}}else{this._cMI1.F_SelectByIndex(0);if(!this._cWC1){this._cST.checked=true;}}}else{_cSI1=this._c3E1||this._c4E1;if(_cYO1["use"]){_cSI1.F_SelectByValue(_cYO1["use"]);}else{_cSI1.F_SelectByIndex(0);}}}this._cGI1();}};
|