123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538 |
- function genSelectDateHTML(sPromptId, sFormName, sParameterName, sSubmitType, sPrmtDefaultDate, sDefaultValue, sStartOfWeek, sCalendar, sSelectUI, sSelectDateUI, sInputOrder, sFirstDate, sLastDate, iDateTime, iInitialState, bRequired, bSuppressDisabled, bHideAdornments, bSuppressExtraPromptNames, bMultiSelect, bRange, sStyle, sSelectDateEditBoxStyle, sSelectDateYearsStyle, sSelectDateMonthsStyle, sSelectDateDaysOfWeekStyle, sSelectDateDaysStyle, sEndRange, sPopupLabel, sPopupZIndex)
- {
- var oProperties = sPromptId;
- if (arguments.length > 1 || typeof oProperties != K_PRMT_sOBJECT)
- {
- oProperties = {
- id: sPromptId,
- formName: sFormName,
- parameterName: sParameterName,
- submitType: sSubmitType,
- prmtDefaultDate: sPrmtDefaultDate,
- defaultValue: sDefaultValue,
- startOfWeek: sStartOfWeek,
- calendar: sCalendar,
- selectUI: sSelectUI,
- selectDateUI: sSelectDateUI,
- inputOrder: sInputOrder,
- firstDate: sFirstDate,
- lastDate: sLastDate,
- dateTime: iDateTime,
- initialState: iInitialState,
- required: bRequired,
- suppressDisabled: bSuppressDisabled,
- hideAdornments: bHideAdornments,
- suppressExtraPromptNames: bSuppressExtraPromptNames,
- multi: bMultiSelect,
- range: bRange,
- style: sStyle,
- selectDateEditBoxStyle: sSelectDateEditBoxStyle,
- selectDateYearsStyle: sSelectDateYearsStyle,
- selectDateMonthsStyle: sSelectDateMonthsStyle,
- selectDateDaysOfWeekStyle: sSelectDateDaysOfWeekStyle,
- selectDateDaysStyle: sSelectDateDaysStyle,
- endRange: sEndRange,
- popupLabel: sPopupLabel,
- popupZindex: sPopupZIndex
- };
- }
- oProperties.startRange = oProperties.defaultValue;
- if (oProperties.multi)
- {
- if (!oProperties.range) {
- genSelectDateMultipleHTML(oProperties);
- }
- else {
- genSelectDateRangeMultipleHTML(oProperties);
- }
- }
- else
- {
- if (oProperties.range) {
- genSelectDateRangeHTML(oProperties);
- }
- else {
- genSelectDateSingleHTML(oProperties);
- }
- }
- }
- function genSelectDateSingleHTML(s_PromptId, s_FormName, s_ParameterName, s_SubmitType, s_PrmtDefaultDate, s_DefaultValue, s_StartOfWeek, s_Calendar, s_SelectUI, s_SelectDateUI, s_InputOrder, s_FirstDate, s_LastDate, i_DateTime, b_Required, b_SuppressDisabled, b_HideAdornments, b_SuppressExtraPromptNames, s_Style, s_SelectDateEditBoxStyle, s_SelectDateYearsStyle, s_SelectDateMonthsStyle, s_SelectDateDaysOfWeekStyle, s_SelectDateDaysStyle, sPopupLabel)
- {
- var oProperties = s_PromptId;
- if (arguments.length > 1 || typeof oProperties != K_PRMT_sOBJECT)
- {
- oProperties = {
- id: s_PromptId,
- formName: s_FormName,
- parameterName: s_ParameterName,
- submitType: s_SubmitType,
- prmtDefaultDate: s_PrmtDefaultDate,
- defaultValue: s_DefaultValue,
- startOfWeek: s_StartOfWeek,
- calendar: s_Calendar,
- selectUI: s_SelectUI,
- selectDateUI: s_SelectDateUI,
- inputOrder: s_InputOrder,
- firstDate: s_FirstDate,
- lastDate: s_LastDate,
- dateTime: i_DateTime,
- required: b_Required,
- suppressDisabled: b_SuppressDisabled,
- hideAdornments: b_HideAdornments,
- suppressExtraPromptNames: b_SuppressExtraPromptNames,
- style: s_Style,
- selectDateEditBoxStyle: s_SelectDateEditBoxStyle,
- selectDateYearsStyle: s_SelectDateYearsStyle,
- selectDateMonthsStyle: s_SelectDateMonthsStyle,
- selectDateDaysOfWeekStyle: s_SelectDateDaysOfWeekStyle,
- selectDateDaysStyle: s_SelectDateDaysStyle
- };
- }
- var sPromptId = oProperties.id;
- if (!verifyPromptId(sPromptId)) {
- return;
- }
-
- var sSkin = (typeof getPromptSkin != K_PRMT_sUNDEFINED ? getPromptSkin() : K_PRMT_sDEFAULTSKIN);
-
-
- var sRangeOnClick = K_PRMT_sEMPTY;
- if (sPromptId.search("range_from") != -1) {
- sRangeOnClick = sPromptId.substring(10) + ".fromGotFocus";
- }
- if (sPromptId.search("range_to") != -1) {
- sRangeOnClick = sPromptId.substring(8) + ".toGotFocus";
- }
- var sFormName = oProperties.formName;
- if (!sFormName) {
- sFormName = "forms[0]";
- }
-
- var iStartDay = 0;
- if (oProperties.startOfWeek == "Monday") {
- iStartDay = 1;
- }
- else if (oProperties.startOfWeek == "Tuesday") {
- iStartDay = 2;
- }
- else if (oProperties.startOfWeek == "Wednesday") {
- iStartDay = 3;
- }
- else if (oProperties.startOfWeek == "Thursday") {
- iStartDay = 4;
- }
- else if (oProperties.startOfWeek == "Friday") {
- iStartDay = 5;
- }
- else if (oProperties.startOfWeek == "Saturday") {
- iStartDay = 6;
- }
- var sParamName = "p_" + oProperties.parameterName;
- if (oProperties.suppressExtraPromptNames) {
- sParamName = sParamName.substring(1);
- }
-
- var intType = 0;
- if (oProperties.calendar == "Imperial") {
- intType = 1;
- }
- var oErrorImg = "document." + sFormName + ".imgTest" + sPromptId;
- if (oProperties.hideAdornments) {
- oErrorImg = null;
- }
- var formElementName = sParamName;
- if (oProperties.submitType == K_PRMT_sXML) {
- formElementName = "_oDS_" + sPromptId;
- }
-
- var sSelectDateCalendarStyle = "clsSelectDateCalendar";
- if (oProperties.selectUI == "editBox") {
- sSelectDateCalendarStyle = "clsSelectDateCalendarDialog";
- }
- var HTMLOut = K_PRMT_sEMPTY;
- if (oProperties.submitType == K_PRMT_sXML) {
- HTMLOut += genHiddenInputHTML(sFormName, jsEncodeStr(sParamName), K_PRMT_sEMPTY);
- }
- HTMLOut +=
- "<input type='hidden' name='" + formElementName + "' id='" + formElementName + "' value='" + oProperties.prmtDefaultDate + "' >" +
- "<div class='clsFieldSet' style='"+cssParser(oProperties.style,gsCSS_DEFAULT_STYLE)+"'>" +
- "<table role='presentation' cellpadding='0' cellspacing='0' border='0' class='clsPromptComponent' style='"+cssParser(oProperties.style,"visibility")+"'>" +
- "<tr>";
- if (!oProperties.required && !oProperties.suppressDisabled && (oProperties.selectUI != "editBox" || !oProperties.selectUI || oProperties.selectDateUI != "editBox"))
- {
- HTMLOut +=
- "<td valign='top'>" +
- "<input type='checkbox' value='anyValue' name='chkAnyValue" + sPromptId + "' onclick='pickerControl" + sPromptId + ".toggleDisable(this.checked)' checked='checked'>" +
- "</td>";
- }
- else if (!oProperties.hideAdornments && oProperties.required)
- {
- HTMLOut +=
- "<td valign='top'>" +
- "<table role='presentation' cellpadding='0' cellspacing='0' border='0' width='10' height='20'>" +
- "<tr>" +
- "<td><img src='" + sSkin + "/prompting/images/icon_required.gif' class='clsErrorRequired' align='bottom' height='10' width='10' border='0'/></td>" +
- "</tr>" +
- "<tr>" +
- "<td valign='middle' align='right'><img id='imgTest" + sPromptId + "' name='imgTest" + sPromptId + "' class='clsErrorRequired' src='" + sSkin + "/prompting/images/error_timed_small_off.gif' align='bottom' height='10' width='10' border='0'/></td>" +
- "</tr>" +
- "</table>" +
- "</td>";
- }
-
- HTMLOut +=
- "<td valign='top' nowrap='nowrap' id='dateEditBox" + sPromptId + "'>";
- if (oProperties.selectUI == "editBox" || oProperties.selectDateUI == "editBox")
- {
- HTMLOut +=
- "<table role='presentation' cellpadding='0' cellspacing='0' border='0'>" +
- "<tr>" +
- "<td>" +
- "<input type='text' class='clsSelectDateEditBox pt' style=\"" + oProperties.selectDateEditBoxStyle + "\" name='txtDate" + sPromptId + "' id='txtDate" + sPromptId + "' onkeyup='pickerControl" + sPromptId + ".checkDate(this)' onkeypress='pickerControl" + sPromptId + ".keyPress(event);' value='' onfocus='pickerControl" + sPromptId + ".gotFocus()' onblur='pickerControl" + sPromptId + ".lostFocus()'>"+
- "</td><td>" +
- "<img role='button' tabindex='0' id='" + sPromptId + "imgPicker' name='" + sPromptId + "imgPicker' src='" + sSkin + "/prompting/images/icon_datepicker.gif' onKeydown=\"{if (event.keyCode == 9) {if (pickerControl" + sPromptId + ".m_oDatePickerDialog.isVisible()){if (event.shiftKey){pickerControl" + sPromptId + ".toggleDialogDatePicker(this,event); if (typeof range" + sRangeOnClick + " == 'function') {range" + sRangeOnClick + "();}} else {var focusEl = document.getElementById('" + sPromptId + "_btnYearDown');if (focusEl != null){focusEl.focus();PRMTUtils.F_StopEvent(event);}} }} else if ((event.keyCode == 13) || (event.keyCode == 32)) {pickerControl" + sPromptId + ".toggleDialogDatePicker(this,event); event.cancelBubble=true;if (typeof range" + sRangeOnClick + " == 'function') {range" + sRangeOnClick + "();}}}\" onClick=\"pickerControl" + sPromptId + ".toggleDialogDatePicker(this,event); event.cancelBubble=true;if (typeof range" + sRangeOnClick + " == 'function') {range" + sRangeOnClick + "();}\" height='20' width='25' class='clsToolbarButton' onmouseover='buttonOver(this)' onmouseout='buttonOut(this)' onmousedown='buttonOver(this)' alt='" + PMT_DTP_DATECONTROLBUTTONPOPUP + "' title='" + PMT_DTP_DATECONTROLBUTTONPOPUP + "' align='top' style=\"padding:0px;height:20px;\"/>"+
- "</td>" +
- "</tr>" +
- "</table>";
- }
- var theLabel = "";
- if ((oProperties.popupLabel == null) || (oProperties.popupLabel == "")) {
- theLabel = PMT_DTP_DATECONTROLPOPUP;
- } else {
- theLabel = oProperties.popupLabel;
- }
-
- HTMLOut +=
- "<div name='dialogDatePicker' role='dialog' aria-label='" + theLabel +"' id='dialogDatePicker" + sPromptId + "' style='";
-
- if (oProperties.selectUI == "editBox" || oProperties.selectDateUI == "editBox") {
- HTMLOut += "display:none;";
- }
- HTMLOut +=
- "' onclick='event.cancelBubble=true;' onmousedown=\"if (typeof range" + sRangeOnClick + " == 'function') {range" + sRangeOnClick + "()}\">" +
- "<table role='presentation' border='0' cellpadding='0' cellspacing='0' class='" + sSelectDateCalendarStyle + "'>" +
- "<tr>" +
- "<td valign='top'>" +
- "<table role='presentation' class='clsSelectDateDialogTopTable' border='0' cellpadding='0' cellspacing='0' align='center' width='100%'>" +
- "<tr class='clsSelectDateYears' style=\"color: black" + oProperties.selectDateYearsStyle + "\">" +
- "<td role='presentation' width='15' class='clsToolbarButton' onmouseover='buttonOver(this)' onmouseout='buttonOut(this)' onmousedown='buttonOver(this)'>" +
- "<img tabindex='0' role='button' id='" + sPromptId +"_btnYearDown' alt='" + PMT_DTP_DATECONTROLBUTTONYEARDECREMENT + "' title='" + PMT_DTP_DATECONTROLBUTTONYEARDECREMENT + "' src='" + sSkin + "/prompting/images/icon_year_down.gif' onKeydown='if (event.keyCode == 9 && event.shiftKey){var focusEl=document.getElementById(\"" + sPromptId + "imgPicker\");if (focusEl != null){focusEl.focus(); PRMTUtils.F_StopEvent(event);}} else if ((event.keyCode == 13) || (event.keyCode == 32)) {pickerControl" + sPromptId + ".m_oDatePickerDialog.yearDown();}' onclick='pickerControl" + sPromptId + ".m_oDatePickerDialog.yearDown()' ondblclick='pickerControl" + sPromptId + ".m_oDatePickerDialog.yearDown()' align='top'/>" +
- "</td>" +
- "<td width='100%' align='center'>" +
- "<input tabindex='0' class='clsSelectDateYearEditBox pcl' size='8' type='text' id='myYear" + sPromptId + "' onkeyup='pickerControl" + sPromptId + ".m_oDatePickerDialog.checkYear(this)' onkeypress='pickerControl" + sPromptId + ".m_oDatePickerDialog.keyPress(event.keyCode);pickerControl" + sPromptId + ".m_oDatePickerDialog.m_oParentControl.checkDate(pickerControl" + sPromptId + ".m_oDatePickerDialog.m_oParentControl.m_oEditBox);' onblur='pickerControl" + sPromptId + ".m_oDatePickerDialog.lostFocus()'>" +
- "</td>" +
- "<td role='presentation' width='15' align='right' class='clsToolbarButton' onmouseover='buttonOver(this)' onmouseout='buttonOut(this)' onmousedown='buttonOver(this)'>" +
- "<img tabindex='0' role='button' id='"+ sPromptId +"_btnYearUp' alt='" + PMT_DTP_DATECONTROLBUTTONYEARINCREMENT + "' title='" + PMT_DTP_DATECONTROLBUTTONYEARINCREMENT +"' src='" + sSkin + "/prompting/images/icon_year_up.gif' onKeydown='if ((event.keyCode == 13) || (event.keyCode == 32)) {pickerControl" + sPromptId + ".m_oDatePickerDialog.yearUp();}' onclick='pickerControl" + sPromptId + ".m_oDatePickerDialog.yearUp()' ondblclick='pickerControl" + sPromptId + ".m_oDatePickerDialog.yearUp()' align='top'/>" +
- "</td>" +
- "</tr>" +
- "</table>" +
- "<table role='listbox' border='0' cellpadding='2' cellspacing='0' aria-label='" + PMT_DTP_DATECONTROLBUTTONPOPUP_MONTHS + "' width='100%' align='center'>" +
- "<tr>" +
- "<td tabindex='0' role='option' id='" + sPromptId + "m0' onkeydown='if ((event.keyCode == 13) || (event.keyCode == 32)) {pickerControl" + sPromptId + ".m_oDatePickerDialog.newMonth(0);}' onmousedown='pickerControl" + sPromptId + ".m_oDatePickerDialog.newMonth(0);' nowrap='nowrap' class='clsSelectDateMonths pm' style=\"" + oProperties.selectDateMonthsStyle + "\"> </td>"+
- "<td tabindex='0' role='option' id='" + sPromptId + "m1' onkeydown='if ((event.keyCode == 13) || (event.keyCode == 32)) {pickerControl" + sPromptId + ".m_oDatePickerDialog.newMonth(1);}' onmousedown='pickerControl" + sPromptId + ".m_oDatePickerDialog.newMonth(1);' nowrap='nowrap' class='clsSelectDateMonths pm' style=\"" + oProperties.selectDateMonthsStyle + "\"> </td>" +
- "<td tabindex='0' role='option' id='" + sPromptId + "m2' onkeydown='if ((event.keyCode == 13) || (event.keyCode == 32)) {pickerControl" + sPromptId + ".m_oDatePickerDialog.newMonth(2);}' onmousedown='pickerControl" + sPromptId + ".m_oDatePickerDialog.newMonth(2);' nowrap='nowrap' class='clsSelectDateMonths pm' style=\"" + oProperties.selectDateMonthsStyle + "\"> </td>" +
- "<td tabindex='0' role='option' id='" + sPromptId + "m3' onkeydown='if ((event.keyCode == 13) || (event.keyCode == 32)) {pickerControl" + sPromptId + ".m_oDatePickerDialog.newMonth(3);}' onmousedown='pickerControl" + sPromptId + ".m_oDatePickerDialog.newMonth(3);' nowrap='nowrap' class='clsSelectDateMonths pm' style=\"" + oProperties.selectDateMonthsStyle + "\"> </td>" +
- "<td tabindex='0' role='option' id='" + sPromptId + "m4' onkeydown='if ((event.keyCode == 13) || (event.keyCode == 32)) {pickerControl" + sPromptId + ".m_oDatePickerDialog.newMonth(4);}' onmousedown='pickerControl" + sPromptId + ".m_oDatePickerDialog.newMonth(4);' nowrap='nowrap' class='clsSelectDateMonths pm' style=\"" + oProperties.selectDateMonthsStyle + "\"> </td>" +
- "<td tabindex='0' role='option' id='" + sPromptId + "m5' onkeydown='if ((event.keyCode == 13) || (event.keyCode == 32)) {pickerControl" + sPromptId + ".m_oDatePickerDialog.newMonth(5);}' onmousedown='pickerControl" + sPromptId + ".m_oDatePickerDialog.newMonth(5);' nowrap='nowrap' class='clsSelectDateMonths pm' style=\"" + oProperties.selectDateMonthsStyle + "\"> </td>" +
- "</tr>" +
- "<tr>" +
- "<td tabindex='0' role='option' id='" + sPromptId + "m6' onkeydown='if ((event.keyCode == 13) || (event.keyCode == 32)) {pickerControl" + sPromptId + ".m_oDatePickerDialog.newMonth(6);}' onmousedown='pickerControl" + sPromptId + ".m_oDatePickerDialog.newMonth(6);' nowrap='nowrap' class='clsSelectDateMonths pm' style=\"" + oProperties.selectDateMonthsStyle + "\"> </td>" +
- "<td tabindex='0' role='option' id='" + sPromptId + "m7' onkeydown='if ((event.keyCode == 13) || (event.keyCode == 32)) {pickerControl" + sPromptId + ".m_oDatePickerDialog.newMonth(7);}' onmousedown='pickerControl" + sPromptId + ".m_oDatePickerDialog.newMonth(7);' nowrap='nowrap' class='clsSelectDateMonths pm' style=\"" + oProperties.selectDateMonthsStyle + "\"> </td>" +
- "<td tabindex='0' role='option' id='" + sPromptId + "m8' onkeydown='if ((event.keyCode == 13) || (event.keyCode == 32)) {pickerControl" + sPromptId + ".m_oDatePickerDialog.newMonth(8);}' onmousedown='pickerControl" + sPromptId + ".m_oDatePickerDialog.newMonth(8);' nowrap='nowrap' class='clsSelectDateMonths pm' style=\"" + oProperties.selectDateMonthsStyle + "\"> </td>" +
- "<td tabindex='0' role='option' id='" + sPromptId + "m9' onkeydown='if ((event.keyCode == 13) || (event.keyCode == 32)) {pickerControl" + sPromptId + ".m_oDatePickerDialog.newMonth(9);}' onmousedown='pickerControl" + sPromptId + ".m_oDatePickerDialog.newMonth(9);' nowrap='nowrap' class='clsSelectDateMonths pm' style=\"" + oProperties.selectDateMonthsStyle + "\"> </td>" +
- "<td tabindex='0' role='option' id='" + sPromptId + "m10' onkeydown='if ((event.keyCode == 13) || (event.keyCode == 32)) {pickerControl" + sPromptId + ".m_oDatePickerDialog.newMonth(10);}' onmousedown='pickerControl" + sPromptId + ".m_oDatePickerDialog.newMonth(10);' nowrap='nowrap' class='clsSelectDateMonths pm' style=\"" + oProperties.selectDateMonthsStyle + "\"> </td>" +
- "<td tabindex='0' role='option' id='" + sPromptId + "m11' onkeydown='if ((event.keyCode == 13) || (event.keyCode == 32)) {pickerControl" + sPromptId + ".m_oDatePickerDialog.newMonth(11);}' onmousedown='pickerControl" + sPromptId + ".m_oDatePickerDialog.newMonth(11);' nowrap='nowrap' class='clsSelectDateMonths pm' style=\"" + oProperties.selectDateMonthsStyle + "\"> </td>" +
- "</tr>" +
- "</table>" +
- "<table role='listbox' border='0' cellspacing='0' width='100%' aria-label='" + PMT_DTP_DATECONTROLBUTTONPOPUP_DAYS + "' align='center'>" +
- "<tr>" +
- "<td id='" + sPromptId + "d0' class='clsSelectDateDaysOfWeek pw' style=\"" + oProperties.selectDateDaysOfWeekStyle + "\"> </td>" +
- "<td id='" + sPromptId + "d1' class='clsSelectDateDaysOfWeek pw' style=\"" + oProperties.selectDateDaysOfWeekStyle + "\"> </td>" +
- "<td id='" + sPromptId + "d2' class='clsSelectDateDaysOfWeek pw' style=\"" + oProperties.selectDateDaysOfWeekStyle + "\"> </td>" +
- "<td id='" + sPromptId + "d3' class='clsSelectDateDaysOfWeek pw' style=\"" + oProperties.selectDateDaysOfWeekStyle + "\"> </td>" +
- "<td id='" + sPromptId + "d4' class='clsSelectDateDaysOfWeek pw' style=\"" + oProperties.selectDateDaysOfWeekStyle + "\"> </td>" +
- "<td id='" + sPromptId + "d5' class='clsSelectDateDaysOfWeek pw' style=\"" + oProperties.selectDateDaysOfWeekStyle + "\"> </td>" +
- "<td id='" + sPromptId + "d6' class='clsSelectDateDaysOfWeek pw' style=\"" + oProperties.selectDateDaysOfWeekStyle + "\"> </td>" +
- "</tr>" +
- "<tr>" +
- "<td tabindex='0' id='" + sPromptId + "r0c0' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r0c1' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r0c2' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r0c3' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r0c4' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r0c5' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r0c6' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "</tr>" +
- "<tr>" +
- "<td tabindex='0' id='" + sPromptId + "r1c0' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r1c1' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r1c2' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td role='option' tabindex='0' id='" + sPromptId + "r1c3' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r1c4' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r1c5' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r1c6' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "</tr>" +
- "<tr>" +
- "<td tabindex='0' id='" + sPromptId + "r2c0' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r2c1' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r2c2' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r2c3' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r2c4' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r2c5' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r2c6' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "</tr>" +
- "<tr>" +
- "<td tabindex='0' id='" + sPromptId + "r3c0' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r3c1' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r3c2' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r3c3' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r3c4' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r3c5' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r3c6' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "</tr>" +
- "<tr>" +
- "<td tabindex='0' id='" + sPromptId + "r4c0' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r4c1' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r4c2' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r4c3' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r4c4' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r4c5' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r4c6' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "</tr>" +
- "<tr>" +
- "<td tabindex='0' id='" + sPromptId + "r5c0' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r5c1' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r5c2' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r5c3' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r5c4' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r5c5' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "<td tabindex='0' id='" + sPromptId + "r5c6' class='clsSelectDateDays pd' style=\"" + oProperties.selectDateDaysStyle + "\" > </td>" +
- "</tr>" +
- "</table>" +
- "</td>" +
- "</tr>" +
- "</table>" +
- "</div>" +
- "</td>" +
- "</tr>" +
- "</table>" +
- "</div>" +
- "<iframe role='presentation' id='pickerControl" + sPromptId + "iframe' style=\"position:absolute; display:none;height:0px;width:0px;\" src='" + sSkin + "/prompting/images/spacer.gif'></iframe>";
- renderPromptControlHTML("selectDate" + sPromptId, HTMLOut);
- var JSOut = K_PRMT_sEMPTY;
- if (oProperties.selectUI == "editBox" || oProperties.selectDateUI == "editBox")
- {
- JSOut = "this.pickerControl" + sPromptId + " = new CDatePicker(document.forms['" + sFormName + "'].elements['" + sParamName + "'], document.forms['" + sFormName + "'].elements['" + formElementName + "'], document.forms['" + sFormName + "'].elements['txtDate" + sPromptId + "'], document.getElementById('dialogDatePicker" + sPromptId + "'), '" + sPromptId + "', '" + oProperties.defaultValue + "', 0, " + intType + ", '" + oProperties.inputOrder + "', " + iStartDay + ", " + oProperties.dateTime + ", '" + oProperties.firstDate + "', '" + oProperties.lastDate + "', " + oProperties.required + ", '" + oProperties.submitType + "', " + oErrorImg + ", '" + getCVId(oProperties) + "'," + oProperties.popupZindex + " );";
- }
- else
- {
- JSOut = "this.pickerControl" + sPromptId + " = new CDatePicker(document.forms['" + sFormName + "'].elements['" + sParamName + "'], document.forms['" + sFormName + "'].elements['" + formElementName + "'], document.forms['" + sFormName + "'].elements['" + formElementName + "'], document.getElementById('dialogDatePicker" + sPromptId + "'), '" + sPromptId + "', '" + oProperties.defaultValue + "', 1, " + intType + ", '" + oProperties.inputOrder + "', " + iStartDay + ", " + oProperties.dateTime + ", '" + oProperties.firstDate + "', '" + oProperties.lastDate + "', " + oProperties.required + ", '" + oProperties.submitType + "', " + oErrorImg + ", '" + getCVId(oProperties) + "'," + oProperties.popupZindex + " );";
- }
- var sCVObj = getCVInstance(oProperties);
- JSOut += sCVObj + "preProcessControlArray = " + sCVObj + "preProcessControlArray.concat('pickerControl" + sPromptId + "');" +
- sCVObj + "datePickerObserverArray = " + sCVObj + "datePickerObserverArray.concat('pickerControl" + sPromptId + "');";
- executePromptControlJS(JSOut);
- }
- function genSelectDateMultipleHTML(s_PromptId, s_FormName, s_ParameterName, s_SubmitType, s_PrmtDefaultDate, s_DefaultValue, s_StartOfWeek, s_Calendar, s_SelectUI, s_SelectDateUI, s_InputOrder, s_FirstDate, s_LastDate, i_DateTime, b_Required, b_SuppressDisabled, b_HideAdornments, b_SuppressExtraPromptNames, s_Style, s_SelectDateEditBoxStyle, s_SelectDateYearsStyle, s_SelectDateMonthsStyle, s_SelectDateDaysOfWeekStyle, s_SelectDateDaysStyle)
- {
- var oProperties = s_PromptId;
- if (arguments.length > 1 || typeof oProperties != K_PRMT_sOBJECT)
- {
- oProperties = {
- id: s_PromptId,
- formName: s_FormName,
- parameterName: s_ParameterName,
- submitType: s_SubmitType,
- prmtDefaultDate: s_PrmtDefaultDate,
- defaultValue: s_DefaultValue,
- startOfWeek: s_StartOfWeek,
- calendar: s_Calendar,
- selectUI: s_SelectUI,
- selectDateUI: s_SelectDateUI,
- inputOrder: s_InputOrder,
- firstDate: s_FirstDate,
- lastDate: s_LastDate,
- dateTime: i_DateTime,
- required: b_Required,
- suppressDisabled: b_SuppressDisabled,
- hideAdornments: b_HideAdornments,
- suppressExtraPromptNames: b_SuppressExtraPromptNames,
- style: s_Style,
- selectDateEditBoxStyle: s_SelectDateEditBoxStyle,
- selectDateYearsStyle: s_SelectDateYearsStyle,
- selectDateMonthsStyle: s_SelectDateMonthsStyle,
- selectDateDaysOfWeekStyle: s_SelectDateDaysOfWeekStyle,
- selectDateDaysStyle: s_SelectDateDaysStyle
- };
- }
- var sPromptId = oProperties.id;
- if (!verifyPromptId(sPromptId)) {
- return;
- }
-
- var sSkin = (typeof getPromptSkin != K_PRMT_sUNDEFINED ? getPromptSkin() : K_PRMT_sDEFAULTSKIN);
- var sFormName = oProperties.formName;
- if (!sFormName) {
- sFormName = "forms[0]";
- }
- var sParamName = "p_" + oProperties.parameterName;
- if (oProperties.suppressExtraPromptNames) {
- sParamName = sParamName.substring(1);
- }
- var formElementName = sParamName;
- if (oProperties.submitType == K_PRMT_sXML) {
- formElementName = "_oDM_" + sPromptId;
- }
- var HTMLOut = K_PRMT_sEMPTY;
- if (oProperties.submitType == K_PRMT_sXML) {
- HTMLOut += genHiddenInputHTML(sFormName, jsEncodeStr(sParamName), K_PRMT_sEMPTY);
- }
- HTMLOut +=
- "<div class='clsFieldSet' style='"+cssParser(oProperties.style,gsCSS_DEFAULT_STYLE)+"'>" +
- "<table role='presentation' cellpadding='0' cellspacing='0' border='0' class='clsPromptComponent' style='"+cssParser(oProperties.style, "visibility")+"'>" +
- "<tr>" +
- "<td colspan='2'><img src='" + sSkin + "/prompting/images/spacer.gif' alt='' width='1' height='1'/></td>" +
- "<td class='clsControlLabel pc'>";
- if (!oProperties.hideAdornments && oProperties.required) {
- HTMLOut +=
- "<img src='" + sSkin + "/prompting/images/icon_required.gif' class='clsErrorRequired' align='top' height='10' width='10' border='0'/>";
- }
- HTMLOut +=
- PMT_UIM_CHOICES +
- "</td>" +
- "</tr>" +
- "<tr>" +
-
- "<td valign='top' id='selectDateSingle" + sPromptId + "'> </td>" +
- "<td valign='top' align='center' class='clsButtonLeftRightPadding'>" +
- "<table role='presentation' border='0' cellpadding='2' cellspacing='0'>" +
- "<tr>" +
- "<td id='getInsertButton" + sPromptId + "'> </td>" +
- "</tr>" +
- "<tr>" +
- "<td id='getRemoveButton" + sPromptId + "'> </td>" +
- "</tr>" +
- "<tr>" +
- "<td><img src='" + sSkin + "/prompting/images/spacer.gif' alt='' width='90' height='1'/></td>" +
- "</tr>" +
- "</table>" +
- "</td>" +
- "<td valign='top'>" +
- "<table role='presentation' border='0' cellspacing='0' cellpadding='0' width='100%'>" +
- "<tr>" +
- "<td><select name='" + formElementName + "' id='" + formElementName + "' style='"+cssParser(oProperties.style,"font,text,color,height")+"' class='clsChoicesListbox pv' multiple='multiple' size='7' onmouseup=\"setTimeout('multipleDatePicker" + sPromptId + ".checkInsertRemove()', 100);\" onkeyup='multipleDatePicker" + sPromptId + ".catchDeleteKey(event.keyCode)'></select></td>" +
- "</tr>" +
- "<tr>" +
- "<td>" +
- "<div id='multipleFeedback" + sPromptId + "' class='clsFeedbackWidget'>" +
- "<img name='sizer" + sPromptId + "' src='" + sSkin + "/prompting/images/spacer.gif' alt='' width='100%' height='3'/>" +
- "</div>" +
- "</td>" +
- "</tr>" +
- "<tr>" +
- "<td align='right'>" +
- "<a href='javascript:multipleDatePicker" + sPromptId + ".selectAll()' class='clsLink pl'>" + PMT_UIM_SELECTALL + "</a>" +
- " " +
- "<a href='javascript:multipleDatePicker" + sPromptId + ".deSelectAll()' class='clsLink pl'>" + PMT_UIM_DESELECTALL + "</a>" +
- "</td>" +
- "</tr>" +
- "</table>" +
- "</td>" +
- "</tr>" +
- "</table>" +
- "</div>";
- renderPromptControlHTML("selectDate" + sPromptId, HTMLOut);
- var sCVObj = getCVInstance(oProperties);
- var JSOut = "genSelectDateSingleHTML(" + generatePromptProperties(oProperties, {
- id: "Single" + sPromptId,
- formName: sFormName,
- parameterName: "D_" + oProperties.parameterName,
- defaultValue: K_PRMT_sEMPTY,
- startOfWeek: K_PRMT_sEMPTY,
- calendar: K_PRMT_sEMPTY,
- inputOrder: K_PRMT_sEMPTY,
- firstDate: oProperties.firstDate,
- lastDate: oProperties.lastDate,
- required: false,
- suppressDisabled: true,
- style: cssParser(oProperties.style,"visibility"),
- suppressExtraPromptNames: true}) + ");" +
- "genInsertButtonHTML('" + sPromptId + "', 'multipleDatePicker" + sPromptId + ".insert()', 'insertButton" + sPromptId + "');" +
- "genRemoveButtonHTML('" + sPromptId + "', 'multipleDatePicker" + sPromptId + ".remove()', 'removeButton" + sPromptId + "');" +
- "this.multipleDatePicker" + sPromptId + " = new CMultipleDatePicker(pickerControlSingle" + sPromptId + ", document.forms['" + sFormName + "'].elements['" + formElementName + "'], document.forms['" + sFormName + "'].elements['" + sParamName + "'], " + oProperties.required + ", '" + oProperties.submitType + "', document.getElementById('multipleFeedback" + sPromptId + "'), document.sizer" + sPromptId + ", document.getElementById('insertButton" + sPromptId + "'), document.getElementById('removeButton" + sPromptId + "'), '" + getCVId(oProperties) + "');" +
- sCVObj + "preProcessControlArray = " + sCVObj + "preProcessControlArray.concat('multipleDatePicker" + sPromptId + "');" +
- sCVObj + "multipleObserverArray = " + sCVObj + "multipleObserverArray.concat('multipleDatePicker" + sPromptId + "');";
- executePromptControlJS(JSOut);
- }
- function genSelectDateRangeHTML(s_PromptId, s_FormName, s_ParameterName, s_SubmitType, s_PrmtDefaultDate, s_StartRange, s_EndRange, s_StartOfWeek, s_Calendar, s_SelectUI, s_SelectDateUI, s_InputOrder, s_FirstDate, s_LastDate, i_DateTime, i_InitialState, b_Required, b_SuppressDisabled, b_HideAdornments, b_SuppressExtraPromptNames, s_Style, s_SelectDateEditBoxStyle, s_SelectDateYearsStyle, s_SelectDateMonthsStyle, s_SelectDateDaysOfWeekStyle, s_SelectDateDaysStyle)
- {
- var oProperties = s_PromptId;
- if (arguments.length > 1 || typeof oProperties != K_PRMT_sOBJECT)
- {
- oProperties = {
- id: s_PromptId,
- formName: s_FormName,
- parameterName: s_ParameterName,
- submitType: s_SubmitType,
- prmtDefaultDate: s_PrmtDefaultDate,
- startRange: s_StartRange,
- endRange: s_EndRange,
- startOfWeek: s_StartOfWeek,
- calendar: s_Calendar,
- selectUI: s_SelectUI,
- selectDateUI: s_SelectDateUI,
- inputOrder: s_InputOrder,
- firstDate: s_FirstDate,
- lastDate: s_LastDate,
- dateTime: i_DateTime,
- initialState: i_InitialState,
- required: b_Required,
- suppressDisabled: b_SuppressDisabled,
- hideAdornments: b_HideAdornments,
- suppressExtraPromptNames: b_SuppressExtraPromptNames,
- style: s_Style,
- selectDateEditBoxStyle: s_SelectDateEditBoxStyle,
- selectDateYearsStyle: s_SelectDateYearsStyle,
- selectDateMonthsStyle: s_SelectDateMonthsStyle,
- selectDateDaysOfWeekStyle: s_SelectDateDaysOfWeekStyle,
- selectDateDaysStyle: s_SelectDateDaysStyle
- };
- }
- var sPromptId = oProperties.id;
- if (!verifyPromptId(sPromptId)) {
- return;
- }
-
- oProperties.startRange = ((typeof oProperties.firstDate != K_PRMT_sUNDEFINED) && oProperties.firstDate) && ((typeof oProperties.startRange == K_PRMT_sUNDEFINED) || !oProperties.startRange) ? oProperties.firstDate : oProperties.startRange;
- oProperties.endRange = ((typeof oProperties.lastDate != K_PRMT_sUNDEFINED) && oProperties.lastDate) && ((typeof oProperties.endRange == K_PRMT_sUNDEFINED) || !oProperties.endRange) ? oProperties.lastDate : oProperties.endRange;
- if(!oProperties.startRange) { oProperties.startRange = K_PRMT_sEMPTY;}
- if(!oProperties.endRange) { oProperties.endRange = K_PRMT_sEMPTY;}
-
- var sSkin = (typeof getPromptSkin != K_PRMT_sUNDEFINED ? getPromptSkin() : K_PRMT_sDEFAULTSKIN);
- var sFormName = oProperties.formName;
- if (!sFormName) {
- sFormName = "forms[0]";
- }
- var sParamName = "p_" + oProperties.parameterName;
- if (oProperties.suppressExtraPromptNames) {
- sParamName = sParamName.substring(1);
- }
- var HTMLOut = K_PRMT_sEMPTY;
- if (oProperties.submitType == K_PRMT_sXML) {
- HTMLOut += genHiddenInputHTML(sFormName, jsEncodeStr(sParamName), K_PRMT_sEMPTY);
- }
- HTMLOut +=
- "<div class='clsFieldSet' style='"+cssParser(oProperties.style,gsCSS_DEFAULT_STYLE)+"'>" +
- "<table role='presentation' border='0' cellspacing='0' cellpadding='1' class='clsPromptComponent' style='"+cssParser(oProperties.style, "visibility")+"'>" +
- "<tr>" +
- "<td class='clsControlLabel pc' colspan='2' nowrap='nowrap'>" + PMT_RNG_FROM + "</td>" +
- "</tr>" +
- "<tr>" +
- "<td nowrap='nowrap'> </td>" +
- "<td nowrap='nowrap' onClick='range" + sPromptId + ".fromGotFocus();' onkeyup='range" + sPromptId + ".fromCheckRadioState(event.keyCode);' onkeypress='range" + sPromptId + ".fromKeyPress(event.keyCode);' style=\"valign-align:text-top\">";
- if (!oProperties.required)
- {
- HTMLOut +=
- "<table role='presentation' border='0' cellspacing='0' cellpadding='0'>" +
- "<tr>" +
- "<td style='vertical-align:top;'>" +
- "<input name='fromValue" + sPromptId + "' type='radio' onclick='range" + sPromptId + ".rangeNotify()'/>" +
- "<img width='10' alt='' src='" + sSkin + "/prompting/images/spacer.gif'>" +
- "</td>" +
- "<td>";
- }
-
- HTMLOut +=
- "<div id='selectDaterange_from" + sPromptId + "'> </div>";
- if (!oProperties.required)
- {
- HTMLOut +=
- "</td>" +
- "</tr>" +
- "</table>";
- }
- HTMLOut +=
- "</td>" +
- "</tr>";
- if (!oProperties.required)
- {
- HTMLOut +=
- "<tr>" +
- "<td nowrap='nowrap'>" +
- "<img src='" + sSkin + "/prompting/images/spacer.gif' height='1' width='5'/>" +
- "</td>" +
- "<td class='clsReadOnlyText pe' onclick=\"document.forms['" + sFormName + "'].elements['fromValue" + sPromptId + "'][1].checked=true;range" + sPromptId + ".rangeNotify()\">" +
- "<input value='lowest' name='fromValue" + sPromptId + "' type='radio' checked='true'>" +
- "<img width='10' alt='' src='" + sSkin + "/prompting/images/spacer.gif'/>" + PMT_RNG_EARLIEST_DATE +
- "</td>" +
- "</tr>";
- }
- HTMLOut +=
- "<tr>" +
- "<td nowrap='nowrap' colspan='2'> </td>" +
- "</tr>" +
- "<tr>" +
- "<td class='clsControlLabel pc' colspan='2' nowrap='nowrap'>" + PMT_RNG_TO + "</td>" +
- "</tr>" +
- "<tr>" +
- "<td nowrap='nowrap'> </td>" +
- "<td nowrap='nowrap' onClick='range" + sPromptId + ".toGotFocus();' onkeyup='range" + sPromptId + ".toCheckRadioState(event.keyCode);' onkeypress='range" + sPromptId + ".toKeyPress(event.keyCode);'>";
- if (!oProperties.required)
- {
- HTMLOut +=
- "<table role='presentation' border='0' cellspacing='0' cellpadding='0'>" +
- "<tr>" +
- "<td style='vertical-align:top;'>" +
- "<input name='toValue" + sPromptId + "' type='radio' onclick='range" + sPromptId + ".rangeNotify()'>" +
- "<img width='10' alt='' src='" + sSkin + "/prompting/images/spacer.gif'/>" +
- "</td>" +
- "<td>";
- }
-
- HTMLOut +=
- "<div id='selectDaterange_to" + sPromptId + "'> </div>";
- if (!oProperties.required)
- {
- HTMLOut +=
- "</td>" +
- "</tr>" +
- "</table>";
- }
- HTMLOut +=
- "</td>" +
- "</tr>";
- if (!oProperties.required)
- {
- HTMLOut +=
- "<tr>" +
- "<td nowrap='nowrap'>" +
- "<img src='" + sSkin + "/prompting/images/spacer.gif' height='1' width='5'/>" +
- "</td>" +
- "<td class='clsReadOnlyText pe' onclick=\"document.forms['" + sFormName + "'].elements['toValue" + sPromptId + "'][1].checked=true;range" + sPromptId + ".rangeNotify()\">" +
- "<input value='highest' name='toValue" + sPromptId + "' type='radio' checked='true'>" +
- "<img width='10' alt='' src='" + sSkin + "/prompting/images/spacer.gif'/>" + PMT_RNG_LATEST_DATE + "</td>" +
- "</tr>";
- }
- HTMLOut +=
- "</table>" +
- "</div>";
- renderPromptControlHTML("selectDate" + sPromptId, HTMLOut);
-
- var JSOut = "genSelectDateSingleHTML(" + generatePromptProperties(oProperties, {
- id: "range_from" + sPromptId,
- formName: sFormName,
- parameterName: "range_from" + oProperties.parameterName,
- defaultValue: oProperties.startRange,
- startOfWeek: K_PRMT_sEMPTY,
- calendar: K_PRMT_sEMPTY,
- inputOrder: K_PRMT_sEMPTY,
- style: cssParser(oProperties.style, "visibility"),
- suppressDisabled: true,
- suppressExtraPromptNames: true}) + ");" +
- "genSelectDateSingleHTML(" + generatePromptProperties(oProperties, {
- id: "range_to" + sPromptId,
- formName: sFormName,
- parameterName: "range_to" + oProperties.parameterName,
- defaultValue: oProperties.endRange,
- startOfWeek: K_PRMT_sEMPTY,
- calendar: K_PRMT_sEMPTY,
- style: cssParser(oProperties.style, "visibility"),
- inputOrder: K_PRMT_sEMPTY,
- suppressDisabled: true,
- suppressExtraPromptNames: true}) + ");";
- if (oProperties.required) {
- JSOut += "this.range" + sPromptId + " = new CRange(document.forms['" + sFormName + "'].elements['" + sParamName + "'], null, pickerControlrange_from" + sPromptId + ", null, null, pickerControlrange_to" + sPromptId + ", null, 'date', true, '" + oProperties.submitType + "', null, '" + getCVId(oProperties) + "');";
- }
- else {
- JSOut += "this.range" + sPromptId + " = new CRange(document.forms['" + sFormName + "'].elements['" + sParamName + "'], document.forms['" + sFormName + "'].elements['fromValue" + sPromptId + "'][0], pickerControlrange_from" + sPromptId + ", null, document.forms['" + sFormName + "'].elements['toValue" + sPromptId + "'][0], pickerControlrange_to" + sPromptId + ", null, 'date', false, '" + oProperties.submitType + "' , " + oProperties.initialState + ", '" + getCVId(oProperties) + "');";
- }
- var sCVObj = getCVInstance(oProperties);
- JSOut += sCVObj + "preProcessControlArray = " + sCVObj + "preProcessControlArray.concat('range" + sPromptId + "');" +
- sCVObj + "rangeObserverArray = " + sCVObj + "rangeObserverArray.concat('range" + sPromptId + "');";
- executePromptControlJS(JSOut);
- }
- function genSelectDateRangeMultipleHTML(s_PromptId, s_FormName, s_ParameterName, s_SubmitType, s_PrmtDefaultDate, s_StartRange, s_EndRange, s_StartOfWeek, s_Calendar, s_SelectUI, s_SelectDateUI, s_InputOrder, s_FirstDate, s_LastDate, i_DateTime, i_InitialState, b_Required, b_SuppressDisabled, b_HideAdornments, b_SuppressExtraPromptNames, s_Style, s_SelectDateEditBoxStyle, s_SelectDateYearsStyle, s_SelectDateMonthsStyle, s_SelectDateDaysOfWeekStyle, s_SelectDateDaysStyle)
- {
- var oProperties = s_PromptId;
- if (arguments.length > 1 || typeof oProperties != K_PRMT_sOBJECT)
- {
- oProperties = {
- id: s_PromptId,
- formName: s_FormName,
- parameterName: s_ParameterName,
- submitType: s_SubmitType,
- prmtDefaultDate: s_PrmtDefaultDate,
- startRange: s_StartRange,
- endRange: s_EndRange,
- startOfWeek: s_StartOfWeek,
- calendar: s_Calendar,
- selectUI: s_SelectUI,
- selectDateUI: s_SelectDateUI,
- inputOrder: s_InputOrder,
- firstDate: s_FirstDate,
- lastDate: s_LastDate,
- dateTime: i_DateTime,
- initialState: i_InitialState,
- required: b_Required,
- suppressDisabled: b_SuppressDisabled,
- hideAdornments: b_HideAdornments,
- suppressExtraPromptNames: b_SuppressExtraPromptNames,
- style: s_Style,
- selectDateEditBoxStyle: s_SelectDateEditBoxStyle,
- selectDateYearsStyle: s_SelectDateYearsStyle,
- selectDateMonthsStyle: s_SelectDateMonthsStyle,
- selectDateDaysOfWeekStyle: s_SelectDateDaysOfWeekStyle,
- selectDateDaysStyle: s_SelectDateDaysStyle
- };
- }
- var sPromptId = oProperties.id;
- if (!verifyPromptId(sPromptId)) {
- return;
- }
- if(!oProperties.startRange) { oProperties.startRange = K_PRMT_sEMPTY;}
- if(!oProperties.endRange) { oProperties.endRange = K_PRMT_sEMPTY;}
-
- var sSkin = (typeof getPromptSkin != K_PRMT_sUNDEFINED ? getPromptSkin() : K_PRMT_sDEFAULTSKIN);
- var sFormName = oProperties.formName;
- if (!sFormName) {
- sFormName = "forms[0]";
- }
- var sParamName = "p_" + oProperties.parameterName;
- if (oProperties.suppressExtraPromptNames) {
- sParamName = sParamName.substring(1);
- }
- var formElementName = sParamName;
- if (oProperties.submitType == K_PRMT_sXML) {
- formElementName = "_oLstDRM_" + sPromptId;
- }
- var HTMLOut = K_PRMT_sEMPTY;
- if (oProperties.submitType == K_PRMT_sXML) {
- HTMLOut += genHiddenInputHTML(sFormName, jsEncodeStr(sParamName), K_PRMT_sEMPTY);
- }
- HTMLOut +=
- "<div class='clsFieldSet' style='"+cssParser(oProperties.style,gsCSS_DEFAULT_STYLE)+"'>" +
- "<table role='presentation' cellpadding='0' cellspacing='0' border='0' class='clsPromptComponent' style='"+cssParser(oProperties.style, "visibility")+"'>" +
- "<tr>" +
- "<td valign='top' id='selectDateRange" + sPromptId + "'> </td>" +
- "<td valign='top' align='center' class='clsButtonLeftRightPadding'>" +
- "<table role='presentation' border='0' cellpadding='0' cellspacing='0'>" +
- "<tr>" +
- "<td><img src='" + sSkin + "/prompting/images/spacer.gif' alt='' width='1' height='16'/></td>" +
- "</tr>" +
- "</table>" +
- "<table role='presentation' border='0' cellpadding='2' cellspacing='0'>" +
- "<tr>" +
- "<td id='getInsertButton" + sPromptId + "'> </td>" +
- "</tr>" +
- "<tr>" +
- "<td id='getRemoveButton" + sPromptId + "'> </td>" +
- "</tr>" +
- "<tr>" +
- "<td><img src='" + sSkin + "/prompting/images/spacer.gif' alt='' width='90' height='1'/></td>" +
- "</tr>" +
- "</table>" +
- "</td>" +
- "<td valign='top'>" +
- "<table role='presentation' border='0' cellspacing='0' cellpadding='0' width='100%'>" +
- "<tr>" +
- "<td class='clsControlLabel pc'>";
- if (oProperties.required)
- {
- HTMLOut +=
- "<img src='" + sSkin + "/prompting/images/icon_required.gif' class='clsErrorRequired' align='top' height='10' width='10' border='0'/>";
- }
- HTMLOut +=
- PMT_UIM_CHOICES +
- "</td>" +
- "</tr>" +
- "<tr>" +
- "<td>" +
- "<select name='" + formElementName + "' style='"+cssParser(oProperties.style,"font,text,color,height")+"' class='clsChoicesListbox pv' multiple='multiple' size='7' onmouseup=\"setTimeout('multipleRange" + sPromptId + ".checkInsertRemove()', 100);\" onkeyup='multipleRange" + sPromptId + ".catchDeleteKey(event.keyCode)'></select>" +
- "</td>" +
- "</tr>" +
- "<tr>" +
- "<td>" +
- "<div id='multipleRangeFeedback" + sPromptId + "' class='clsFeedbackWidget'><img name='sizer" + sPromptId + "' src='" + sSkin + "/prompting/images/spacer.gif' alt='' width='100%' height='3'/></div>" +
- "</td>" +
- "</tr>" +
- "<tr>" +
- "<td align='right'>" +
- "<a href='javascript:multipleRange" + sPromptId + ".selectAll()' class='clsLink pl'>" + PMT_UIM_SELECTALL + "</a>" +
- " " +
- "<a href='javascript:multipleRange" + sPromptId + ".deSelectAll()' class='clsLink pl'>" + PMT_UIM_DESELECTALL + "</a>" +
- "</td>" +
- "</tr>" +
- "</table>" +
- "</td>" +
- "</tr>" +
- "</table>" +
- "</div>";
- renderPromptControlHTML("selectDate" + sPromptId, HTMLOut);
- var sCVObj = getCVInstance(oProperties);
- var JSOut = "genSelectDateRangeHTML(" + generatePromptProperties(oProperties, {
- id: "Range" + sPromptId,
- formName: sFormName,
- parameterName: "r_" + oProperties.parameterName,
- style: cssParser(oProperties.style,"visibility"),
- suppressExtraPromptNames: true}) + ");" +
- "genInsertButtonHTML('" + sPromptId + "', 'multipleRange" + sPromptId + ".insertChoiceList()', 'insertButton" + sPromptId + "');" +
- "genRemoveButtonHTML('" + sPromptId + "', 'multipleRange" + sPromptId + ".removeChoiceList()', 'removeButton" + sPromptId + "');" +
- "this.multipleRange" + sPromptId + " = new CMultipleRange(rangeRange" + sPromptId + ", document.forms['" + sFormName + "'].elements['" + formElementName + "'], document.forms['" + sFormName + "'].elements['" + sParamName + "'], " + oProperties.required + ", '" + oProperties.submitType + "', document.getElementById('multipleRangeFeedback" + sPromptId + "'), document.sizer" + sPromptId + ", '" + sPromptId + "', document.getElementById('insertButton" + sPromptId + "'), document.getElementById('removeButton" + sPromptId + "'), '" + getCVId(oProperties) + "');" +
- sCVObj + "preProcessControlArray = " + sCVObj + "preProcessControlArray.concat('multipleRange" + sPromptId + "');" +
- sCVObj + "multipleObserverArray = " + sCVObj + "multipleObserverArray.concat('multipleRange" + sPromptId + "');" +
- "multipleRange" + sPromptId + ".initChoiceList();";
- executePromptControlJS(JSOut);
- }
- function genSelectTimeHTML(sPromptId, sFormName, sParameterName, sSubmitType, sDefaultValue, sSelectUI, sTimeZone, sHourFormat, sMinuteFormat, sSecondFormat, iType, iDisplay, iMode, iInitialState, bRequired, bSuppressDisabled, bHideAdornments, bSuppressExtraPromptNames, bMulti, bRange, sEndTime, sStyle)
- {
- var oProperties = sPromptId;
- if (arguments.length > 1 || typeof oProperties != K_PRMT_sOBJECT)
- {
- oProperties = {
- id: sPromptId,
- formName: sFormName,
- parameterName: sParameterName,
- submitType: sSubmitType,
- defaultValue: sDefaultValue,
- selectUI: sSelectUI,
- timeZone: sTimeZone,
- hourFormat: sHourFormat,
- minuteFormat: sMinuteFormat,
- secondFormat: sSecondFormat,
- type: iType,
- display: iDisplay,
- mode: iMode,
- initialState: iInitialState,
- required: bRequired,
- suppressDisabled: bSuppressDisabled,
- hideAdornments: bHideAdornments,
- suppressExtraPromptNames: bSuppressExtraPromptNames,
- multi: bMulti,
- range: bRange,
- style: sStyle,
- endTime: sEndTime
- };
- }
- oProperties.startTime = oProperties.defaultValue;
- if (oProperties.multi)
- {
- if (!oProperties.range) {
- genSelectTimeMultipleHTML(oProperties);
- }
- else {
- genSelectTimeRangeMultipleHTML(oProperties);
- }
- }
- else
- {
- if (oProperties.range) {
- genSelectTimeRangeHTML(oProperties);
- }
- else {
- genSelectTimeSingleHTML(oProperties);
- }
- }
- }
- function genSelectTimeSingleHTML(s_PromptId, s_FormName, s_ParameterName, s_SubmitType, s_DefaultValue, s_SelectUI, s_TimeZone, s_HourFormat, s_MinuteFormat, s_SecondFormat, i_Type, i_Display, i_Mode, b_Required, b_SuppressDisabled, b_HideAdornments, b_SuppressExtraPromptNames)
- {
- var oProperties = s_PromptId;
- if (arguments.length > 1 || typeof oProperties != K_PRMT_sOBJECT)
- {
- oProperties = {
- id: s_PromptId,
- formName: s_FormName,
- parameterName: s_ParameterName,
- submitType: s_SubmitType,
- defaultValue: s_DefaultValue,
- selectUI: s_SelectUI,
- timeZone: s_TimeZone,
- hourFormat: s_HourFormat,
- minuteFormat: s_MinuteFormat,
- secondFormat: s_SecondFormat,
- type: i_Type,
- display: i_Display,
- mode: i_Mode,
- required: b_Required,
- suppressDisabled: b_SuppressDisabled,
- hideAdornments: b_HideAdornments,
- suppressExtraPromptNames: b_SuppressExtraPromptNames
- };
- }
- var sPromptId = oProperties.id;
- if (!verifyPromptId(sPromptId)) {
- return;
- }
-
- var sSkin = (typeof getPromptSkin != K_PRMT_sUNDEFINED ? getPromptSkin() : K_PRMT_sDEFAULTSKIN);
- var sFormName = oProperties.formName;
- if (!sFormName) {
- sFormName = "forms[0]";
- }
- var sParamName = "p_" + oProperties.parameterName;
- if (oProperties.suppressExtraPromptNames) {
- sParamName = sParamName.substring(1);
- }
- var formElementName = sParamName;
- if (oProperties.submitType == K_PRMT_sXML) {
- formElementName = "_oTS_" + sPromptId;
- }
- var oSubmitField = "document.forms['" + sFormName + "'].elements['" + sParamName + "']";
- var oFormField = "document.forms['" + sFormName + "'].elements['" + formElementName + "']";
- var oHours = "document.forms['" + sFormName + "'].elements['hours" + sPromptId + "']";
- var oMinutes = "document.forms['" + sFormName + "'].elements['minutes" + sPromptId + "']";
- var oSeconds = "document.forms['" + sFormName + "'].elements['seconds" + sPromptId + "']";
- var oMilliseconds = "document.forms['" + sFormName + "'].elements['milliseconds" + sPromptId + "']";
- var oAMPM = "document.forms['" + sFormName + "'].elements['AMPM" + sPromptId + "']";
- var oImgTest = "document.forms['" + sFormName + "'].elements['imgTest" + sPromptId + "']";
- if (oProperties.hideAdornments) {
- oImgTest = null;
- }
- var bInline = true;
- if (oProperties.selectUI == "clock") {
- bInline = true;
- }
- else if (oProperties.selectUI == "editBox") {
- bInline = false;
- }
- var clockObject = null;
- var clockBox = null;
- if (bInline)
- {
- clockObject = "clockDisplay" + sPromptId;
- clockBox = "document.getElementById('clock" + sPromptId + "')";
- }
- var timeZone = oProperties.timeZone;
- if (!timeZone) {
- timeZone = "GMT";
- }
- var hrFormat = oProperties.hourFormat;
- if (!hrFormat) {
- hrFormat = "hh";
- }
- var minFormat = oProperties.minuteFormat;
- if (!minFormat) {
- minFormat = "mm";
- }
- var secFormat = oProperties.secondFormat;
- if (!secFormat) {
- secFormat = "ss";
- }
- var HTMLOut = K_PRMT_sEMPTY;
- if (oProperties.submitType == K_PRMT_sXML) {
- HTMLOut += genHiddenInputHTML(sFormName, jsEncodeStr(sParamName), K_PRMT_sEMPTY);
- }
-
- HTMLOut +=
- "<input type='hidden' name='" + formElementName + "' value='00:00:00.000'>" +
- "<div class='clsFieldSet' style='"+cssParser(oProperties.style,gsCSS_DEFAULT_STYLE)+"'>" +
- "<table role='presentation' border='0' cellspacing='0' cellpadding='0' class='clsPromptComponent' style='"+cssParser(oProperties.style,"visibility")+"'>" +
- "<tr>";
- if (!oProperties.required && !oProperties.suppressDisabled)
- {
- HTMLOut +=
- "<td valign='top'>" +
- "<input type='checkbox' value='anyValue' name='chkAnyValue" + sPromptId + "' onclick='timePicker" + sPromptId + ".toggleDisable(this.checked)' checked='checked'>" +
- "</td>";
- }
- HTMLOut +=
- "<td valign='top'>" +
- "<table role='presentation' border='0' cellspacing='0' cellpadding='0' class='clsSelectTime' id='timeTable_" + sPromptId + "' ";
-
- if ((oProperties.timeLabel != null) && (oProperties.timeLabel != "")){
- HTMLOut += "role='group' aria-label='" + oProperties.timeLabel + "'";
- } else {
- HTMLOut += "role='presnetation' ";
- }
-
- HTMLOut += ">";
- var bShowSecondHand = false;
- if (bInline)
- {
- if (oProperties.display == 1 || oProperties.display === 0){
- bShowSecondHand = true;
- }
- HTMLOut +=
- "<tr class='clsClockPosition'>" +
- "<td height='100%' colspan='3'><div class='clsClockBlock' align='center'><div id='clock" + sPromptId + "' class='clsClock'> </div></div></td>" +
- "</tr>";
- }
- HTMLOut +=
- "<tr>";
- if (!oProperties.hideAdornments && oProperties.required)
- {
- HTMLOut +=
- "<td valign='top'>" +
- "<table role='presentation' cellpadding='0' cellspacing='0' border='0' width='10' height='20'>" +
- "<tr>" +
- "<td><img src='" + sSkin + "/prompting/images/icon_required.gif' class='clsErrorRequired' align='bottom' height='10' width='10' border='0'/></td>" +
- "</tr>" +
- "<tr>" +
- "<td valign='middle' align='right'><img id='imgTest" + sPromptId + "' name='imgTest" + sPromptId + "' class='clsErrorRequired' src='" + sSkin + "/prompting/images/error_timed_small_off.gif' align='bottom' height='10' width='10' border='0'/></td>" +
- "</tr>" +
- "</table>" +
- "</td>";
- }
- HTMLOut +=
- "<td id='timeEditBox" + sPromptId + "' nowrap='nowrap'>" +
- "<div ";
- if (typeof oProperties.type != "number")
- {
- if (typeof g_24HourClock != K_PRMT_sUNDEFINED && g_24HourClock.toString().toLowerCase() == "true")
- {
- oProperties.type = 2;
- }
- else
- {
- if (typeof g_AMPMLocation != K_PRMT_sUNDEFINED && g_AMPMLocation == 'left')
- {
- oProperties.type = 1;
- }
- else
- {
- oProperties.type = 0;
- }
- }
- }
- if (oProperties.display === 0 && (oProperties.type === 0 || oProperties.type == 1)) {
- HTMLOut += "class='clsSelectTimeEditBoxExtend pcl' id='editBox" + sPromptId + "'>";
- }
- else {
- HTMLOut += "class='clsSelectTimeEditBox pcl' id='editBox" + sPromptId + "'>";
- }
- if (oProperties.type == 1) {
- HTMLOut +=
- "<span>" +
- "<input name='AMPM" + sPromptId + "' class='clsSelectTimeControl' style='border:none;' onkeyup='timePicker" + sPromptId + ".keyPress(event,this);timePicker" + sPromptId + ".bCheckAMPM()' onblur='timePicker" + sPromptId + ".refreshTime()' onfocus='timePicker" + sPromptId + ".setCurrentFocus(this)' value='PM' size='2' maxlength='2'>" +
- "</span>";
- }
- HTMLOut +=
- "<span style=\"text-align: right\"><input name='hours" + sPromptId + "' style='border:none;' class='clsSelectTimeControl' onkeyup='timePicker" + sPromptId + ".keyPress(event,this);timePicker" + sPromptId + ".bCheckHour()' onblur='timePicker" + sPromptId + ".refreshTime()' onfocus='timePicker" + sPromptId + ".setCurrentFocus(this)' value='12' size='2' maxlength='2'></span>" +
- "<span class='clsColon pcl'>:</span>" +
- "<span class='pcl'><input name='minutes" + sPromptId + "' style='border:none;' class='clsSelectTimeControl' onkeyup='timePicker" + sPromptId + ".keyPress(event,this);timePicker" + sPromptId + ".bCheckMinute()' onblur='timePicker" + sPromptId + ".refreshTime()' onfocus='timePicker" + sPromptId + ".setCurrentFocus(this)' value='10' size='2' maxlength='2'></span>";
- if (oProperties.display == 1 || oProperties.display === 0)
- {
- HTMLOut +=
- "<span class='clsColon pcl'>:</span>" +
- "<span><input name='seconds" + sPromptId + "' class='clsSelectTimeControl' style='border:none;' onkeyup='timePicker" + sPromptId + ".keyPress(event,this);timePicker" + sPromptId + ".bCheckSecond()' onblur='timePicker" + sPromptId + ".refreshTime()' onfocus='timePicker" + sPromptId + ".setCurrentFocus(this)' value='59' size='2' maxlength='2'></span>";
- }
- if (oProperties.display === 0)
- {
- HTMLOut +=
- "<span class='clsColon pcl'>.</span>" +
- "<span><input name='milliseconds" + sPromptId + "' class='clsSelectTimeControl' style='border:none;' onkeyup='timePicker" + sPromptId + ".keyPress(event,this);timePicker" + sPromptId + ".bCheckMillisecond()' onblur='timePicker" + sPromptId + ".refreshTime()' onfocus='timePicker" + sPromptId + ".setCurrentFocus(this)' value='000' size='3' maxlength='3'></span>";
- }
- if (oProperties.type === 0) {
- HTMLOut +=
- "<span><input name='AMPM" + sPromptId + "' class='clsSelectTimeControl' style='border:none;' onkeyup='timePicker" + sPromptId + ".keyPress(event,this);timePicker" + sPromptId + ".bCheckAMPM()' onblur='timePicker" + sPromptId + ".refreshTime()' onfocus='timePicker" + sPromptId + ".setCurrentFocus(this)' value='PM' size='3' maxlength='2'></span>";
- }
- HTMLOut +=
- "</div>" +
- "</td>" +
- "<td>" +
- "<table cellpadding='0' cellspacing='0' border='0' role='presentation' >" +
- "<tr>" +
- "<td width='15' align='right' role='button' class='clsToolbarButton' onmouseover='buttonOver(this)' onmouseout='buttonOut(this)' onmousedown='buttonOver(this)' onclick='timePicker" + sPromptId + ".timeUp()' ondblclick='timePicker" + sPromptId + ".timeUp()'><img id='btnTimeUp" + sPromptId + "' src='" + sSkin + "/prompting/images/icon_time_up.gif' border='0' align='top' width='15' height='7' alt='"+ PMT_DTP_TIME_BUTTON_INCREMENT +"' title='"+PMT_DTP_TIME_BUTTON_INCREMENT +"'/></td>" +
- "</tr>" +
- "<tr>" +
- "<td width='15' align='right' role='button' class='clsToolbarButton' onmouseover='buttonOver(this)' onmouseout='buttonOut(this)' onmousedown='buttonOver(this)' onclick='timePicker" + sPromptId + ".timeDown()' ondblclick='timePicker" + sPromptId + ".timeDown()'><img id='btnTimeDown" + sPromptId + "' src='" + sSkin + "/prompting/images/icon_time_down.gif' border='0' align='top' width='15' height='7' alt='" + PMT_DTP_TIME_BUTTON_DECREMENT + "' title='" + PMT_DTP_TIME_BUTTON_DECREMENT + "'/></td>" +
- "</tr>" +
- "</table>" +
- "</td>" +
- "</tr>" +
- "</table>" +
- "</td>" +
- "</tr>" +
- "</table>" +
- "</div>";
- renderPromptControlHTML("selectTime" + sPromptId, HTMLOut);
- var JSOut = K_PRMT_sEMPTY;
- if (bInline)
- {
- JSOut += "this.clockDisplay" + sPromptId + " = new CClock(document.getElementById('clock" + sPromptId + "'), null, 'clockDisplay" + sPromptId + "', " + oProperties.mode + ", " + bShowSecondHand + ", '" + getCVId(oProperties) + "');";
- }
- var sCVObj = getCVInstance(oProperties);
- JSOut += "this.timePicker" + sPromptId + " = new CTimePicker(" + oSubmitField + ", " + oFormField + ", " + oHours + ", " + oMinutes + ", " + oSeconds + ", " + oMilliseconds + ", " + oAMPM + ", " + oImgTest + ", " + clockBox + ", document.getElementById('editBox" + sPromptId + "'), 'timePicker" + sPromptId + "', " + oProperties.type + ", " + oProperties.display + ", " + bInline + ", '" + timeZone + "', '" + hrFormat + "', '" + minFormat + "', '" + secFormat + "', " + oProperties.mode + ", '" + clockObject + "', '" + oProperties.defaultValue + "', " + oProperties.required + ", '" + oProperties.submitType + "', '" + getCVId(oProperties) + "', '"+ sPromptId +"');" +
- sCVObj + "preProcessControlArray = " + sCVObj + "preProcessControlArray.concat('timePicker" + sPromptId + "');";
-
- executePromptControlJS(JSOut);
- }
- function genSelectTimeMultipleHTML(s_PromptId, s_FormName, s_ParameterName, s_SubmitType, s_DefaultValue, s_SelectUI, s_TimeZone, s_HourFormat, s_MinuteFormat, s_SecondFormat, i_Type, i_Display, i_Mode, b_Required, b_SuppressDisabled, b_HideAdornments, b_SuppressExtraPromptNames, b_Inline, s_Style)
- {
- var oProperties = s_PromptId;
- if (arguments.length > 1 || typeof oProperties != K_PRMT_sOBJECT)
- {
- oProperties = {
- id: s_PromptId,
- formName: s_FormName,
- parameterName: s_ParameterName,
- submitType: s_SubmitType,
- defaultValue: s_DefaultValue,
- selectUI: s_SelectUI,
- timeZone: s_TimeZone,
- hourFormat: s_HourFormat,
- minuteFormat: s_MinuteFormat,
- secondFormat: s_SecondFormat,
- type: i_Type,
- display: i_Display,
- mode: i_Mode,
- required: b_Required,
- suppressDisabled: b_SuppressDisabled,
- hideAdornments: b_HideAdornments,
- suppressExtraPromptNames: b_SuppressExtraPromptNames,
- inline: b_Inline,
- style: s_Style
- };
- }
- var sPromptId = oProperties.id;
- if (!verifyPromptId(sPromptId)) {
- return;
- }
-
- var sSkin = (typeof getPromptSkin != K_PRMT_sUNDEFINED ? getPromptSkin() : K_PRMT_sDEFAULTSKIN);
- var sFormName = oProperties.formName;
- if (!sFormName) {
- sFormName = "forms[0]";
- }
- var sParamName = "p_" + oProperties.parameterName;
- if (oProperties.suppressExtraPromptNames) {
- sParamName = sParamName.substring(1);
- }
- var formElementName = sParamName;
- if (oProperties.submitType == K_PRMT_sXML) {
- formElementName = "_oLstTM_" + sPromptId;
- }
- var HTMLOut = K_PRMT_sEMPTY;
- if (oProperties.submitType == K_PRMT_sXML) {
- HTMLOut += genHiddenInputHTML(sFormName, jsEncodeStr(sParamName), K_PRMT_sEMPTY);
- }
- HTMLOut +=
- "<div class='clsFieldSet' style='"+cssParser(oProperties.style,gsCSS_DEFAULT_STYLE)+"'>" +
- "<table cellpadding='0' role='presentation' cellspacing='0' border='0' class='clsPromptComponent' style='"+cssParser(oProperties.style,"visibility")+"'>" +
- "<tr>" +
- "<td colspan='2'><img src='" + sSkin + "/prompting/images/spacer.gif' alt='' width='1' height='1'/></td>" +
- "<td class='clsControlLabel pc'>";
- if (!oProperties.hideAdornments && oProperties.required)
- {
- HTMLOut +=
- "<img src='" + sSkin + "/prompting/images/icon_required.gif' class='clsErrorRequired' align='top' height='10' width='10' border='0'/>";
- }
- HTMLOut +=
- PMT_UIM_CHOICES +
- "</td>" +
- "</tr>" +
- "<tr>" +
-
- "<td valign='top' id='selectTimeSingle" + sPromptId + "'> </td>" +
- "<td valign='top' class='clsButtonLeftRightPadding' style=\"padding-left:15px\">" +
- "<table border='0' cellpadding='2' cellspacing='0'>" +
- "<tr>" +
- "<td id='getInsertButton" + sPromptId + "'> </td>" +
- "</tr>" +
- "<tr>" +
- "<td id='getRemoveButton" + sPromptId + "'> </td>" +
- "</tr>" +
- "<tr>" +
- "<td><img src='" + sSkin + "/prompting/images/spacer.gif' alt='' width='90' height='1'/></td>" +
- "</tr>" +
- "</table>" +
- "</td>" +
- "<td valign='top'>" +
- "<table border='0' cellspacing='0' cellpadding='0' width='100%'>" +
- "<tr>" +
- "<td>" +
- "<select name='" + formElementName + "' style='"+cssParser(oProperties.style,"font,color,text,height")+"' class='clsChoicesListbox pv' multiple='multiple' size='7' onmouseup=\"setTimeout('multipleTimePicker" + sPromptId + ".checkInsertRemove()', 100);\" onkeyup='multipleTimePicker" + sPromptId + ".catchDeleteKey(event.keyCode)'></select>" +
- "</td>" +
- "</tr>" +
- "<tr>" +
- "<td>" +
- "<div id='multipleTextFeedback" + sPromptId + "' class='clsFeedbackWidget'>" +
- "<img name='sizer" + sPromptId + "' src='" + sSkin + "/prompting/images/spacer.gif' alt='' width='100%' height='3'/>" +
- "</div>" +
- "</td>" +
- "</tr>" +
- "<tr>" +
- "<td align='right'>" +
- "<a href='javascript:multipleTimePicker" + sPromptId + ".selectAll()' class='clsLink pl'>" + PMT_UIM_SELECTALL + "</a>" +
- " " +
- "<a href='javascript:multipleTimePicker" + sPromptId + ".deSelectAll()' class='clsLink pl'>" + PMT_UIM_DESELECTALL + "</a>" +
- "</td>" +
- "</tr>" +
- "</table>" +
- "</td>" +
- "</tr>" +
- "</table>" +
- "</div>";
- renderPromptControlHTML("selectTime" + sPromptId, HTMLOut);
- var sCVObj = getCVInstance(oProperties);
- var JSOut = "genSelectTimeSingleHTML(" + generatePromptProperties(oProperties, {
- id: "Single" + sPromptId,
- formName: sFormName,
- defaultValue: K_PRMT_sEMPTY,
- required: false,
- suppressDisabled: true,
- style: cssParser(oProperties.style,"visibility"),
- suppressExtraPromptNames: true})+ ");" +
- "genInsertButtonHTML('" + sPromptId + "', 'multipleTimePicker" + sPromptId + ".insert()', 'insertButton" + sPromptId + "');" +
- "genRemoveButtonHTML('" + sPromptId + "', 'multipleTimePicker" + sPromptId + ".remove()', 'removeButton" + sPromptId + "');" +
- "this.multipleTimePicker" + sPromptId + " = new CMultipleTimePicker(timePickerSingle" + sPromptId + ", document.forms['" + sFormName + "'].elements['" + formElementName + "'], document.forms['" + sFormName + "'].elements['" + sParamName + "'], " + oProperties.required + ", '" + oProperties.submitType + "', document.getElementById('multipleTextFeedback" + sPromptId + "'), document.sizer" + sPromptId + ", document.getElementById('insertButton" + sPromptId + "'), document.getElementById('removeButton" + sPromptId + "'), '" + getCVId(oProperties) + "');" +
- sCVObj + "preProcessControlArray = " + sCVObj + "preProcessControlArray.concat('multipleTimePicker" + sPromptId + "');" +
- sCVObj + "multipleObserverArray = " + sCVObj + "multipleObserverArray.concat('multipleTimePicker" + sPromptId + "');";
- executePromptControlJS(JSOut);
- }
- function genSelectTimeRangeHTML(s_PromptId, s_FormName, s_ParameterName, s_SubmitType, s_StartTime, s_EndTime, s_SelectUI, s_TimeZone, s_HourFormat, s_MinuteFormat, s_SecondFormat, i_Type, i_Display, i_Mode, i_InitialState, b_Required, b_SuppressDisabled, b_HideAdornments, b_SuppressExtraPromptNames, s_Style)
- {
- var oProperties = s_PromptId;
- if (arguments.length > 1 || typeof oProperties != K_PRMT_sOBJECT)
- {
- oProperties = {
- id: s_PromptId,
- formName: s_FormName,
- parameterName: s_ParameterName,
- submitType: s_SubmitType,
- startTime: s_StartTime,
- endTime: s_EndTime,
- selectUI: s_SelectUI,
- timeZone: s_TimeZone,
- hourFormat: s_HourFormat,
- minuteFormat: s_MinuteFormat,
- secondFormat: s_SecondFormat,
- type: i_Type,
- display: i_Display,
- mode: i_Mode,
- initialState: i_InitialState,
- required: b_Required,
- suppressDisabled: b_SuppressDisabled,
- hideAdornments: b_HideAdornments,
- suppressExtraPromptNames: b_SuppressExtraPromptNames,
- style: s_Style
- };
- }
- var sPromptId = oProperties.id;
- if (!verifyPromptId(sPromptId)) {
- return;
- }
-
- var sSkin = (typeof getPromptSkin != K_PRMT_sUNDEFINED ? getPromptSkin() : K_PRMT_sDEFAULTSKIN);
- var sFormName = oProperties.formName;
- if (!sFormName) {
- sFormName = "forms[0]";
- }
- var sParamName = "p_" + oProperties.parameterName;
- if (oProperties.suppressExtraPromptNames) {
- sParamName = sParamName.substring(1);
- }
- var HTMLOut = K_PRMT_sEMPTY;
- if (oProperties.submitType == K_PRMT_sXML) {
- HTMLOut += genHiddenInputHTML(sFormName, jsEncodeStr(sParamName), K_PRMT_sEMPTY);
- }
- HTMLOut +=
- "<div class='clsFieldSet' style='"+cssParser(oProperties.style,gsCSS_DEFAULT_STYLE)+"'>" +
- "<table border='0' cellspacing='0' cellpadding='1' class='clsPromptComponent' style='"+cssParser(oProperties.style,"visibility")+"'>" +
- "<tr>" +
- "<td class='clsControlLabel pc' colspan='2' nowrap='nowrap'>" + PMT_RNG_FROM + "</td>" +
- "</tr>" +
- "<tr>" +
- "<td nowrap='nowrap'> </td>" +
- "<td nowrap='nowrap' onClick='range" + sPromptId + ".fromGotFocus();' onkeyup='range" + sPromptId + ".fromCheckRadioState(event.keyCode);' onkeypress='range" + sPromptId + ".fromKeyPress(event.keyCode);'>" +
- "<table cellpadding='0' cellspacing='0'>" +
- "<tr>";
- if (!oProperties.required)
- {
- HTMLOut +=
- "<td valign='top'>" +
- "<input name='fromValue" + sPromptId + "' type='radio' onclick='range" + sPromptId + ".rangeNotify()'>" +
- "</td>" +
- "<td>" +
- "<img width='10' alt='' src='" + sSkin + "/prompting/images/spacer.gif'/>" +
- "</td>";
- }
-
- HTMLOut +=
- "<td id='selectTimerange_from" + sPromptId + "'> </td>" +
- "</tr>" +
- "</table>" +
- "</td>" +
- "</tr>";
- if (!oProperties.required)
- {
- HTMLOut +=
- "<tr onclick=\"document.forms['" + sFormName + "'].elements['fromValue" + sPromptId + "'][1].checked=true;range" + sPromptId + ".rangeNotify()\">" +
- "<td nowrap='nowrap'>" +
- "<img src='" + sSkin + "/prompting/images/spacer.gif' height='1' width='5'/>" +
- "</td>" +
- "<td class='clsReadOnlyText'>" +
- "<input value='lowest' name='fromValue" + sPromptId + "' type='radio' checked='true'>" +
- "<img width='10' alt='' src='" + sSkin + "/prompting/images/spacer.gif'/>" + PMT_RNG_EARLIEST_TIME +
- "</td>" +
- "</tr>";
- }
- HTMLOut +=
- "<tr>" +
- "<td nowrap='nowrap' colspan='2'> </td>" +
- "</tr>" +
- "<tr>" +
- "<td class='clsControlLabel pc' colspan='2' nowrap='nowrap'>" + PMT_RNG_TO + "</td>" +
- "</tr>" +
- "<tr>" +
- "<td nowrap='nowrap'> </td>" +
- "<td nowrap='nowrap' onClick='range" + sPromptId + ".toGotFocus();' onkeyup='range" + sPromptId + ".toCheckRadioState(event.keyCode);' onkeypress='range" + sPromptId + ".toKeyPress(event.keyCode);'>" +
- "<table cellpadding='0' cellspacing='0'>" +
- "<tr>";
- if (!oProperties.required)
- {
- HTMLOut +=
- "<td valign='top'>" +
- "<input name='toValue" + sPromptId + "' type='radio' onclick='range" + sPromptId + ".rangeNotify()'>" +
- "</td>" +
- "<td>" +
- "<img width='10' alt='' src='" + sSkin + "/prompting/images/spacer.gif'/>" +
- "</td>";
- }
-
- HTMLOut +=
- "<td valign='top' id='selectTimerange_to" + sPromptId + "'></td>" +
- "</tr>" +
- "</table>" +
- "</td>" +
- "</tr>";
- if (!oProperties.required)
- {
- HTMLOut +=
- "<tr onclick=\"document.forms['" + sFormName + "'].elements['toValue" + sPromptId + "'][1].checked=true;range" + sPromptId + ".rangeNotify()\">" +
- "<td nowrap='nowrap'>" +
- "<img src='" + sSkin + "/prompting/images/spacer.gif' height='1' width='5'/>" +
- "</td>" +
- "<td class='clsReadOnlyText'>" +
- "<input value='highest' name='toValue" + sPromptId + "' type='radio' checked='true' onclick='range" + sPromptId + ".rangeNotify()'>" +
- "<img width='10' alt='' src='" + sSkin + "/prompting/images/spacer.gif'/>" + PMT_RNG_LATEST_TIME +
- "</td>" +
- "</tr>";
- }
- HTMLOut +=
- "</table>" +
- "</div>";
- renderPromptControlHTML("selectTime" + sPromptId, HTMLOut);
- var JSOut = "genSelectTimeSingleHTML(" + generatePromptProperties(oProperties, {
- id: "range_from" + sPromptId,
- formName: sFormName,
- parameterName: "range_from" + oProperties.parameterName,
- defaultValue: oProperties.startTime,
- suppressDisabled: true,
- style: cssParser(oProperties.style,"visibility"),
- suppressExtraPromptNames: true}) + ");" +
- "genSelectTimeSingleHTML(" + generatePromptProperties(oProperties, {
- id: "range_to" + sPromptId,
- formName: sFormName,
- parameterName: "range_to" + oProperties.parameterName,
- defaultValue: oProperties.endTime,
- style: cssParser(oProperties.style,"visibility"),
- suppressDisabled: true,
- suppressExtraPromptNames: true}) + ");";
- if (oProperties.required)
- {
- JSOut += "this.range" + sPromptId + " = new CRange(document.forms['" + sFormName + "'].elements['" + sParamName + "'], null, timePickerrange_from" + sPromptId + ", null, null, timePickerrange_to" + sPromptId + ", null, 'time', true, '" + oProperties.submitType + "', null, '" + getCVId(oProperties) + "');";
- }
- else
- {
- JSOut += "this.range" + sPromptId + " = new CRange(document.forms['" + sFormName + "'].elements['" + sParamName + "'], document.forms['" + sFormName + "'].elements['fromValue" + sPromptId + "'][0], timePickerrange_from" + sPromptId + ",null, document.forms['" + sFormName + "'].elements['toValue" + sPromptId + "'][0], timePickerrange_to" + sPromptId + ", null, 'datetime', false, '" + oProperties.submitType + "', " + oProperties.initialState + ", '" + getCVId(oProperties) + "');";
- }
- var sCVObj = getCVInstance(oProperties);
- JSOut += sCVObj + "preProcessControlArray = " + sCVObj + "preProcessControlArray.concat('range" + sPromptId + "');" +
- sCVObj + "rangeObserverArray = " + sCVObj + "rangeObserverArray.concat('range" + sPromptId + "');";
- executePromptControlJS(JSOut);
- }
- function genSelectTimeRangeMultipleHTML(s_PromptId, s_FormName, s_ParameterName, s_SubmitType, s_StartTime, s_EndTime, s_SelectUI, s_TimeZone, s_HourFormat, s_MinuteFormat, s_SecondFormat, i_Type, i_Display, i_Mode, i_InitialState, b_Required, b_SuppressDisabled, b_HideAdornments, b_SuppressExtraPromptNames, s_Style)
- {
- var oProperties = s_PromptId;
- if (arguments.length > 1 || typeof oProperties != K_PRMT_sOBJECT)
- {
- oProperties = {
- id: s_PromptId,
- formName: s_FormName,
- parameterName: s_ParameterName,
- submitType: s_SubmitType,
- startTime: s_StartTime,
- endTime: s_EndTime,
- selectUI: s_SelectUI,
- timeZone: s_TimeZone,
- hourFormat: s_HourFormat,
- minuteFormat: s_MinuteFormat,
- secondFormat: s_SecondFormat,
- type: i_Type,
- display: i_Display,
- mode: i_Mode,
- initialState: i_InitialState,
- required: b_Required,
- suppressDisabled: b_SuppressDisabled,
- hideAdornments: b_HideAdornments,
- suppressExtraPromptNames: b_SuppressExtraPromptNames,
- style: s_Style
- };
- }
- var sPromptId = oProperties.id;
- if (!verifyPromptId(sPromptId)) {
- return;
- }
-
- var sSkin = (typeof getPromptSkin != K_PRMT_sUNDEFINED ? getPromptSkin() : K_PRMT_sDEFAULTSKIN);
- var sFormName = oProperties.formName;
- if (!sFormName) {
- sFormName = "forms[0]";
- }
- var sParamName = "p_" + oProperties.parameterName;
- if (oProperties.suppressExtraPromptNames) {
- sParamName = sParamName.substring(1);
- }
- var formElementName = sParamName;
- if (oProperties.submitType == K_PRMT_sXML) {
- formElementName = "_oLstTRM_" + sPromptId;
- }
- var HTMLOut = K_PRMT_sEMPTY;
- if (oProperties.submitType == K_PRMT_sXML) {
- HTMLOut += genHiddenInputHTML(sFormName, jsEncodeStr(sParamName), K_PRMT_sEMPTY);
- }
- HTMLOut +=
- "<div class='clsFieldSet' style='"+cssParser(oProperties.style,gsCSS_DEFAULT_STYLE)+"'>" +
- "<table cellpadding='0' cellspacing='0' border='0' class='clsPromptComponent' style='"+cssParser(oProperties.style,"visibility")+"'>" +
- "<tr>" +
-
- "<td valign='top' id='selectTimer_" + sPromptId + "'> </td>" +
- "<td valign='top' class='clsButtonLeftRightPadding'>" +
- "<table border='0' cellpadding='0' cellspacing='0'>" +
- "<tr>" +
- "<td><img src='" + sSkin + "/prompting/images/spacer.gif' alt='' width='1' height='16'/></td>" +
- "</tr>" +
- "</table>" +
- "<table border='0' cellpadding='2' cellspacing='0'>" +
- "<tr>" +
- "<td id='getInsertButton" + sPromptId + "'> </td>" +
- "</tr>" +
- "<tr>" +
- "<td id='getRemoveButton" + sPromptId + "'> </td>" +
- "</tr>" +
- "<tr>" +
- "<td><img src='" + sSkin + "/prompting/images/spacer.gif' alt='' width='90' height='1'/></td>" +
- "</tr>" +
- "</table>" +
- "</td>" +
- "<td valign='top'>" +
- "<table border='0' cellspacing='0' cellpadding='0' width='100%'>" +
- "<tr>" +
- "<td class='clsControlLabel pc'>";
- if (oProperties.required)
- {
- HTMLOut +=
- "<img src='" + sSkin + "/prompting/images/icon_required.gif' class='clsErrorRequired' align='top' height='10' width='10' border='0'/>";
- }
- HTMLOut +=
- PMT_UIM_CHOICES +
- "</td>" +
- "</tr>" +
- "<tr>" +
- "<td>" +
- "<select name='" + formElementName + "' style='"+cssParser(oProperties.style,"font,text,color,height")+"' class='clsChoicesListbox pv' multiple='multiple' size='7' onmouseup=\"setTimeout('multipleRange" + sPromptId + ".checkInsertRemove()', 100);\" onkeyup='multipleRange" + sPromptId + ".catchDeleteKey(event.keyCode)'></select>" +
- "</td>" +
- "</tr>" +
- "<tr>" +
- "<td>" +
- "<div id='multipleRangeFeedback" + sPromptId + "' class='clsFeedbackWidget'>" +
- "<img name='sizer" + sPromptId + "' src='" + sSkin + "/prompting/images/spacer.gif' alt='' width='100%' height='3'/>" +
- "</div>" +
- "</td>" +
- "</tr>" +
- "<tr>" +
- "<td align='right'>" +
- "<a href='javascript:multipleRange" + sPromptId + ".selectAll()' class='clsLink pl'>" + PMT_UIM_SELECTALL + "</a>" +
- " " +
- "<a href='javascript:multipleRange" + sPromptId + ".deSelectAll()' class='clsLink pl'>" + PMT_UIM_DESELECTALL + "</a>" +
- "</td>" +
- "</tr>" +
- "</table>" +
- "</td>" +
- "</tr>" +
- "</table>" +
- "</div>";
- renderPromptControlHTML("selectTime" + sPromptId, HTMLOut);
- var sCVObj = getCVInstance(oProperties);
- var JSOut = "genSelectTimeRangeHTML(" + generatePromptProperties(oProperties, {
- id: "r_" + sPromptId,
- formName: sFormName,
- parameterName: "r_" + oProperties.parameterName,
- style: cssParser(oProperties.style,"visibility"),
- suppressExtraPromptNames: true}) + ");" +
- "genInsertButtonHTML('" + sPromptId + "', 'multipleRange" + sPromptId + ".insertChoiceList()', 'insertButton" + sPromptId + "');" +
- "genRemoveButtonHTML('" + sPromptId + "', 'multipleRange" + sPromptId + ".removeChoiceList()', 'removeButton" + sPromptId + "');" +
- "this.multipleRange" + sPromptId + " = new CMultipleRange(ranger_" + sPromptId + ", document.forms['" + sFormName + "'].elements['" + formElementName + "'], document.forms['" + sFormName + "'].elements['" + sParamName + "'], " + oProperties.required + ", '" + oProperties.submitType + "', document.getElementById('multipleRangeFeedback" + sPromptId + "'), document.sizer" + sPromptId + ", '" + sPromptId + "', document.getElementById('insertButton" + sPromptId + "'), document.getElementById('removeButton" + sPromptId + "'), '" + getCVId(oProperties) + "');" +
- sCVObj + "preProcessControlArray = " + sCVObj + "preProcessControlArray.concat('multipleRange" + sPromptId + "');" +
- sCVObj + "multipleObserverArray = " + sCVObj + "multipleObserverArray.concat('multipleRange" + sPromptId + "');" +
- "multipleRange" + sPromptId + ".initChoiceList();";
- executePromptControlJS(JSOut);
- }
- function genSelectDateTimeHTML(sPromptId, sFormName, sParameterName, sSubmitType, sDefaultDate, sDefaultTime, sStartOfWeek, sCalendar, sSelectUI, sInputOrder, sFirstDate, sLastDate, sTimeZone, sHourFormat, sMinuteFormat, sSecondFormat, iDateTime, iType, iDisplay, iMode, iInitialState, bRequired, bHideAdornments, bSuppressDisabled, bXSDFormat, bMulti, bRange, sStyle, sSelectDateEditBoxStyle, sSelectDateYearsStyle, sSelectDateMonthsStyle, sSelectDateDaysOfWeekStyle, sSelectDateDaysStyle, sEndDate, sEndTime, bSuppressExtraPromptNames)
- {
- var oProperties = sPromptId;
- if (arguments.length > 1 || typeof oProperties != K_PRMT_sOBJECT)
- {
- oProperties = {
- id: sPromptId,
- formName: sFormName,
- parameterName: sParameterName,
- submitType: sSubmitType,
- defaultDate: sDefaultDate,
- defaultTime: sDefaultTime,
- startOfWeek: sStartOfWeek,
- calendar: sCalendar,
- selectUI: sSelectUI,
- inputOrder: sInputOrder,
- firstDate: sFirstDate,
- lastDate: sLastDate,
- timeZone: sTimeZone,
- hourFormat: sHourFormat,
- minuteFormat: sMinuteFormat,
- secondFormat: sSecondFormat,
- dateTime: iDateTime,
- type: iType,
- display: iDisplay,
- mode: iMode,
- initialState: iInitialState,
- required: bRequired,
- hideAdornments: bHideAdornments,
- suppressDisabled: bSuppressDisabled,
- xSDFormat: bXSDFormat,
- multi: bMulti,
- range: bRange,
- style: sStyle,
- selectDateEditBoxStyle: sSelectDateEditBoxStyle,
- selectDateYearsStyle: sSelectDateYearsStyle,
- selectDateMonthsStyle: sSelectDateMonthsStyle,
- selectDateDaysOfWeekStyle: sSelectDateDaysOfWeekStyle,
- selectDateDaysStyle: sSelectDateDaysStyle,
- endDate: sEndDate,
- endTime: sEndTime,
- suppressExtraPromptNames: bSuppressExtraPromptNames
- };
- }
- if (oProperties.multi)
- {
- if (!oProperties.range) {
- genSelectDateTimeMultipleHTML(oProperties);
- }
- else {
- genSelectDateTimeRangeMultipleHTML(oProperties);
- }
- }
- else
- {
- if (oProperties.range) {
- genSelectDateTimeRangeHTML(oProperties);
- }
- else {
- genSelectDateTimeSingleHTML(oProperties);
- }
- }
- }
- function genSelectDateTimeSingleHTML(s_PromptId, s_FormName, s_ParameterName, s_SubmitType, s_DefaultDate, s_DefaultTime, s_StartOfWeek, s_Calendar, s_SelectUI, s_InputOrder, s_FirstDate, s_LastDate, s_TimeZone, s_HourFormat, s_MinuteFormat, s_SecondFormat, i_DateTime, i_Type, i_Display, i_Mode, b_Required, b_HideAdornments, b_SuppressDisabled, b_XSDFormat, s_Style, s_SelectDateEditBoxStyle, s_SelectDateYearsStyle, s_SelectDateMonthsStyle, s_SelectDateDaysOfWeekStyle, s_SelectDateDaysStyle, b_SuppressExtraPromptNames)
- {
- var oProperties = s_PromptId;
- if (arguments.length > 1 || typeof oProperties != K_PRMT_sOBJECT)
- {
- oProperties = {
- id: s_PromptId,
- formName: s_FormName,
- parameterName: s_ParameterName,
- submitType: s_SubmitType,
- defaultDate: s_DefaultDate,
- defaultTime: s_DefaultTime,
- startOfWeek: s_StartOfWeek,
- calendar: s_Calendar,
- selectUI: s_SelectUI,
- inputOrder: s_InputOrder,
- firstDate: s_FirstDate,
- lastDate: s_LastDate,
- timeZone: s_TimeZone,
- hourFormat: s_HourFormat,
- minuteFormat: s_MinuteFormat,
- secondFormat: s_SecondFormat,
- dateTime: i_DateTime,
- type: i_Type,
- display: i_Display,
- mode: i_Mode,
- required: b_Required,
- hideAdornments: b_HideAdornments,
- suppressDisabled: b_SuppressDisabled,
- xSDFormat: b_XSDFormat,
- style: s_Style,
- selectDateEditBoxStyle: s_SelectDateEditBoxStyle,
- selectDateYearsStyle: s_SelectDateYearsStyle,
- selectDateMonthsStyle: s_SelectDateMonthsStyle,
- selectDateDaysOfWeekStyle: s_SelectDateDaysOfWeekStyle,
- selectDateDaysStyle: s_SelectDateDaysStyle,
- suppressExtraPromptNames: b_SuppressExtraPromptNames
- };
- }
- var sPromptId = oProperties.id;
- if (!verifyPromptId(sPromptId)) {
- return;
- }
-
- var sSkin = (typeof getPromptSkin != K_PRMT_sUNDEFINED ? getPromptSkin() : K_PRMT_sDEFAULTSKIN);
- var sFormName = oProperties.formName;
- if (!sFormName) {
- sFormName = "forms[0]";
- }
- var sParamName = "p_" + oProperties.parameterName;
- if (oProperties.suppressExtraPromptNames) {
- sParamName = sParamName.substring(1);
- }
- if (oProperties.selectUI == "editBox") {
- oProperties.selectDateUI = "editBox";
- }
- else {
- oProperties.selectDateUI = "calendar";
- }
- var sSelectTimeUI = "clock";
- if (oProperties.selectUI == "editBox") {
- sSelectTimeUI = "editBox";
- }
- var oErrorImg = "document." + sFormName + ".imgTest" + sPromptId;
- if (oProperties.hideAdornments) {
- oErrorImg = null;
- }
- var formElementName = sParamName;
- if (oProperties.submitType == K_PRMT_sXML) {
- formElementName = "_oLstDTS_" + sPromptId;
- }
- var HTMLOut = genHiddenInputHTML(sFormName, jsEncodeStr(formElementName), K_PRMT_sEMPTY);
- if (oProperties.submitType == K_PRMT_sXML) {
- HTMLOut += genHiddenInputHTML(sFormName, jsEncodeStr(sParamName), K_PRMT_sEMPTY);
- }
- HTMLOut +=
- "<div class='clsFieldSet' style='"+cssParser(oProperties.style, gsCSS_DEFAULT_STYLE)+"'>" +
- "<table cellpadding='0' cellspacing='0' border='0' class='clsPromptComponent' style='"+cssParser(oProperties.style,"visibility")+"'>" +
- "<tr>";
- if (!oProperties.required && !oProperties.suppressDisabled)
- {
- HTMLOut +=
- "<td valign='top'>" +
- "<input type='checkbox' value='anyValue' name='chkAnyValue" + sPromptId + "' onclick='selectDateTime" + sPromptId + ".toggleDisable(this.checked)' checked='checked'>" +
- "</td>";
- }
- if (!oProperties.hideAdornments && oProperties.required)
- {
- HTMLOut +=
- "<td valign='top'>" +
- "<table cellpadding='0' cellspacing='0' border='0' height='20'>" +
- "<tr>" +
- "<td><img src='" + sSkin + "/prompting/images/icon_required.gif' class='clsErrorRequired' align='bottom' height='10' width='10' border='0'/></td>" +
- "</tr>" +
- "<tr>" +
- "<td><img id='imgTest" + sPromptId + "' name='imgTest" + sPromptId + "' class='clsErrorRequired' src='" + sSkin + "/prompting/images/error_timed_small_off.gif' align='bottom' height='10' width='10' border='0'/></td>" +
- "</tr>" +
- "</table>" +
- "</td>";
- }
- HTMLOut +=
- "<td valign='top'>" +
- "<table border='0' cellpadding='0' cellspacing='0' class='clsBoundingBox pdt'>";
- if (oProperties.selectUI == "editBox")
- {
- HTMLOut +=
- "<tr>" +
-
- "<td valign='top'><img src='" + sSkin + "/prompting/images/spacer.gif' height='1' width='5'/><div id='selectDate" + sPromptId + "'> </div></td>" +
- "</tr>" +
- "<tr>" +
- "<td valign='top'><img src='" + sSkin + "/prompting/images/spacer.gif' height='1' width='5'/><div id='selectTime" + sPromptId + "'> </div></td>" +
- "</tr>";
- }
- else
- {
- HTMLOut +=
- "<tr>" +
-
- "<td valign='top'><img src='" + sSkin + "/prompting/images/spacer.gif' height='1' width='5'/><div id='selectDate" + sPromptId + "'> </div></td>" +
- "<td valign='top'><img src='" + sSkin + "/prompting/images/spacer.gif' height='1' width='5'/><div id='selectTime" + sPromptId + "' > </div></td>" +
- "</tr>";
- }
- HTMLOut +=
- "</table>" +
- "</td>" +
- "</tr>" +
- "</table>" +
- "</div>";
- renderPromptControlHTML("selectDateTime" + sPromptId, HTMLOut);
- var JSOut = K_PRMT_sEMPTY;
- if (oProperties.selectUI == 'editBox')
- {
- JSOut = "genSelectDateSingleHTML(" + generatePromptProperties(oProperties, {
- id: sPromptId,
- formName: sFormName,
- parameterName: "D_" + oProperties.parameterName,
- prmtDefaultValue: '-1',
- defaultValue: K_PRMT_sEMPTY,
- selectDateUI: 'editBox',
- style: cssParser(oProperties.style,"visibility"),
- required: false,
- suppressDisabled: true,
- suppressExtraPromptNames: true}) + ");" +
- "genSelectTimeSingleHTML(" + generatePromptProperties(oProperties, {
- id: sPromptId,
- formName: sFormName,
- parameterName: "T_" + oProperties.parameterName,
- defaultValue: oProperties.defaultTime,
- required: false,
- style: cssParser(oProperties.style,"visibility"),
- suppressDisabled: true,
- suppressExtraPromptNames: true}) + ");";
- }
- else
- {
- JSOut = "genSelectDateSingleHTML(" + generatePromptProperties(oProperties, {
- id: sPromptId,
- formName: sFormName,
- parameterName: "D_" + oProperties.parameterName,
- prmtDefaultValue: '-1',
- defaultValue: K_PRMT_sEMPTY,
- required: false,
- suppressDisabled: true,
- style: cssParser(oProperties.style,"visibility"),
- suppressExtraPromptNames: true}) + ");" +
- "genSelectTimeSingleHTML(" + generatePromptProperties(oProperties, {
- id: sPromptId,
- formName: sFormName,
- parameterName: "T_" + oProperties.parameterName,
- defaultValue: oProperties.defaultTime,
- required: false,
- suppressDisabled: true,
- hideAdornments: true,
- style: cssParser(oProperties.style,"visibility"),
- suppressExtraPromptNames: true}) + ");";
- }
- var sCVObj = getCVInstance(oProperties);
- JSOut += "this.selectDateTime" + sPromptId + " = new CDateTime(pickerControl" + sPromptId + ", timePicker" + sPromptId + ", document.forms['" + sFormName + "'].elements['" + sParamName + "'], document.forms['" + sFormName + "'].elements['" + formElementName + "'], " + oProperties.required + ", '" + oProperties.submitType + "', '" + oProperties.defaultDate + "', " + oProperties.xSDFormat + ", '" + getCVId(oProperties) + "');" +
- sCVObj + "preProcessControlArray = " + sCVObj + "preProcessControlArray.concat('selectDateTime" + sPromptId + "');";
- executePromptControlJS(JSOut);
- }
- function genSelectDateTimeMultipleHTML(s_PromptId, s_FormName, s_ParameterName, s_SubmitType, s_DefaultDate, s_DefaultTime, s_StartOfWeek, s_Calendar, s_SelectUI, s_InputOrder, s_FirstDate, s_LastDate, s_TimeZone, s_HourFormat, s_MinuteFormat, s_SecondFormat, i_DateTime, i_Type, i_Display, i_Mode, b_Required, b_HideAdornments, b_SuppressDisabled, b_XSDFormat, s_Style, s_SelectDateEditBoxStyle, s_SelectDateYearsStyle, s_SelectDateMonthsStyle, s_SelectDateDaysOfWeekStyle, s_SelectDateDaysStyle, b_SuppressExtraPromptNames)
- {
- var oProperties = s_PromptId;
- if (arguments.length > 1 || typeof oProperties != K_PRMT_sOBJECT)
- {
- oProperties = {
- id: s_PromptId,
- formName: s_FormName,
- parameterName: s_ParameterName,
- submitType: s_SubmitType,
- defaultDate: s_DefaultDate,
- defaultTime: s_DefaultTime,
- startOfWeek: s_StartOfWeek,
- calendar: s_Calendar,
- selectUI: s_SelectUI,
- inputOrder: s_InputOrder,
- firstDate: s_FirstDate,
- lastDate: s_LastDate,
- timeZone: s_TimeZone,
- hourFormat: s_HourFormat,
- minuteFormat: s_MinuteFormat,
- secondFormat: s_SecondFormat,
- dateTime: i_DateTime,
- type: i_Type,
- display: i_Display,
- mode: i_Mode,
- required: b_Required,
- hideAdornments: b_HideAdornments,
- suppressDisabled: b_SuppressDisabled,
- xSDFormat: b_XSDFormat,
- style: s_Style,
- selectDateEditBoxStyle: s_SelectDateEditBoxStyle,
- selectDateYearsStyle: s_SelectDateYearsStyle,
- selectDateMonthsStyle: s_SelectDateMonthsStyle,
- selectDateDaysOfWeekStyle: s_SelectDateDaysOfWeekStyle,
- selectDateDaysStyle: s_SelectDateDaysStyle,
- suppressExtraPromptNames: b_SuppressExtraPromptNames
- };
- }
- var sPromptId = oProperties.id;
- if (!verifyPromptId(sPromptId)) {
- return;
- }
-
- var sSkin = (typeof getPromptSkin != K_PRMT_sUNDEFINED ? getPromptSkin() : K_PRMT_sDEFAULTSKIN);
- var sFormName = oProperties.formName;
- if (!sFormName) {
- sFormName = "forms[0]";
- }
- var sParamName = "p_" + oProperties.parameterName;
- if (oProperties.suppressExtraPromptNames) {
- sParamName = sParamName.substring(1);
- }
- var formElementName = sParamName;
- if (oProperties.submitType == K_PRMT_sXML) {
- formElementName = "_oLstDTM_" + sPromptId;
- }
- var HTMLOut = K_PRMT_sEMPTY;
- if (oProperties.submitType == K_PRMT_sXML) {
- HTMLOut += genHiddenInputHTML(sFormName, jsEncodeStr(sParamName), K_PRMT_sEMPTY);
- }
- HTMLOut +=
- "<div class='clsFieldSet' style='"+cssParser(oProperties.style, gsCSS_DEFAULT_STYLE)+"'>" +
- "<table cellpadding='0' cellspacing='0' border='0' class='clsPromptComponent' style='"+cssParser(oProperties.style,"visibility")+"'>" +
- "<tr>" +
- "<td colspan='2'><img src='" + sSkin + "/prompting/images/spacer.gif' alt='' width='1' height='1'/></td>" +
- "<td class='clsControlLabel pc'>";
- if (!oProperties.hideAdornments && oProperties.required)
- {
- HTMLOut +=
- "<img src='" + sSkin + "/prompting/images/icon_required.gif' class='clsErrorRequired' align='top' height='10' width='10' border='0'/>";
- }
- HTMLOut +=
- PMT_UIM_CHOICES +
- "</td>" +
- "</tr>" +
- "<tr>" +
-
- "<td valign='top' id='selectDateTimeSingle" + sPromptId + "'> </td>" +
- "<td valign='top' align='center' class='clsButtonLeftRightPadding'>" +
- "<table border='0' cellpadding='2' cellspacing='0'>" +
- "<tr>" +
- "<td id='getInsertButton" + sPromptId + "'> </td>" +
- "</tr>" +
- "<tr>" +
- "<td id='getRemoveButton" + sPromptId + "'> </td>" +
- "</tr>" +
- "<tr>" +
- "<td><img src='" + sSkin + "/prompting/images/spacer.gif' alt='' width='90' height='1'/></td>" +
- "</tr>" +
- "</table>" +
- "</td>" +
- "<td valign='top'>" +
- "<table border='0' cellspacing='0' cellpadding='0' width='100%'>" +
- "<tr>" +
- "<td>" +
- "<select name='" + formElementName + "' style='"+cssParser(oProperties.style,"font,text,color,height")+"' class='clsChoicesListbox pv' multiple='multiple' size='7' onmouseup=\"setTimeout('multipleDateTimePicker" + sPromptId + ".checkInsertRemove()', 100);\" onkeyup='multipleDateTimePicker" + sPromptId + ".catchDeleteKey(event.keyCode)'></select>" +
- "</td>" +
- "</tr>" +
- "<tr>" +
- "<td><div id='multipleFeedback" + sPromptId + "' class='clsFeedbackWidget'><img name='sizer" + sPromptId + "' src='" + sSkin + "/prompting/images/spacer.gif' alt='' width='100%' height='3'/></div></td>" +
- "</tr>" +
- "<tr>" +
- "<td align='right'>" +
- "<a href='javascript:multipleDateTimePicker" + sPromptId + ".selectAll()' class='clsLink pl'>" + PMT_UIM_SELECTALL + "</a>" +
- " " +
- "<a href='javascript:multipleDateTimePicker" + sPromptId + ".deSelectAll()' class='clsLink pl'>" + PMT_UIM_DESELECTALL + "</a>" +
- "</td>" +
- "</tr>" +
- "</table>" +
- "</td>" +
- "</tr>" +
- "</table>" +
- "</div>";
- renderPromptControlHTML("selectDateTime" + sPromptId, HTMLOut);
- var sCVObj = getCVInstance(oProperties);
- var JSOut = "genSelectDateTimeSingleHTML(" + generatePromptProperties(oProperties, {
- id: "Single" + sPromptId,
- formName: sFormName,
- parameterName: "DT_" + oProperties.parameterName,
- defaultDate: K_PRMT_sEMPTY,
- defaultTime: K_PRMT_sEMPTY,
- required: false,
- suppressDisabled: true,
- style:cssParser(oProperties.style,"visibility"),
- hideAdornments: true,
- suppressExtraPromptNames: true}) + ");" +
- "genInsertButtonHTML('" + sPromptId + "', 'multipleDateTimePicker" + sPromptId + ".insert()', 'insertButton" + sPromptId + "');" +
- "genRemoveButtonHTML('" + sPromptId + "', 'multipleDateTimePicker" + sPromptId + ".remove()', 'removeButton" + sPromptId + "');" +
- "this.multipleDateTimePicker" + sPromptId + "= new CMultipleDateTimePicker(selectDateTimeSingle" + sPromptId + ", document.forms['" + sFormName + "'].elements['" + formElementName + "'], document.forms['" + sFormName + "'].elements['" + sParamName + "'], " + oProperties.required + ", '" + oProperties.submitType + "', document.getElementById('multipleFeedback" + sPromptId + "'), document.sizer" + sPromptId + ", document.getElementById('insertButton" + sPromptId + "'), document.getElementById('removeButton" + sPromptId + "'), '" + getCVId(oProperties) + "');" +
- sCVObj + "preProcessControlArray = " + sCVObj + "preProcessControlArray.concat('multipleDateTimePicker" + sPromptId + "');" +
- sCVObj + "multipleObserverArray = " + sCVObj + "multipleObserverArray.concat('multipleDateTimePicker" + sPromptId + "');";
- executePromptControlJS(JSOut);
- }
- function genSelectDateTimeRangeHTML(s_PromptId, s_FormName, s_ParameterName, s_SubmitType, s_DefaultDate, s_DefaultTime, s_StartOfWeek, s_Calendar, s_SelectUI, s_InputOrder, s_FirstDate, s_LastDate, s_TimeZone, s_HourFormat, s_MinuteFormat, s_SecondFormat, i_DateTime, i_Type, i_Display, i_Mode, i_InitialState, b_Required, b_HideAdornments, b_SuppressDisabled, b_XSDFormat, s_Style, s_SelectDateEditBoxStyle, s_SelectDateYearsStyle, s_SelectDateMonthsStyle, s_SelectDateDaysOfWeekStyle, s_SelectDateDaysStyle, s_EndDate, s_EndTime, b_SuppressExtraPromptNames)
- {
- var oProperties = s_PromptId;
- if (arguments.length > 1 || typeof oProperties != K_PRMT_sOBJECT)
- {
- oProperties = {
- id: s_PromptId,
- formName: s_FormName,
- parameterName: s_ParameterName,
- submitType: s_SubmitType,
- defaultDate: s_DefaultDate,
- defaultTime: s_DefaultTime,
- startOfWeek: s_StartOfWeek,
- calendar: s_Calendar,
- selectUI: s_SelectUI,
- inputOrder: s_InputOrder,
- firstDate: s_FirstDate,
- lastDate: s_LastDate,
- timeZone: s_TimeZone,
- hourFormat: s_HourFormat,
- minuteFormat: s_MinuteFormat,
- secondFormat: s_SecondFormat,
- dateTime: i_DateTime,
- type: i_Type,
- display: i_Display,
- mode: i_Mode,
- initialState: i_InitialState,
- required: b_Required,
- hideAdornments: b_HideAdornments,
- suppressDisabled: b_SuppressDisabled,
- xSDFormat: b_XSDFormat,
- style: s_Style,
- selectDateEditBoxStyle: s_SelectDateEditBoxStyle,
- selectDateYearsStyle: s_SelectDateYearsStyle,
- selectDateMonthsStyle: s_SelectDateMonthsStyle,
- selectDateDaysOfWeekStyle: s_SelectDateDaysOfWeekStyle,
- selectDateDaysStyle: s_SelectDateDaysStyle,
- endDate: s_EndDate,
- endTime: s_EndTime,
- suppressExtraPromptNames: b_SuppressExtraPromptNames
- };
- }
- var sPromptId = oProperties.id;
- if (!verifyPromptId(sPromptId)) {
- return;
- }
-
- var sSkin = (typeof getPromptSkin != K_PRMT_sUNDEFINED ? getPromptSkin() : K_PRMT_sDEFAULTSKIN);
- var sFormName = oProperties.formName;
- if (!sFormName) {
- sFormName = "forms[0]";
- }
- var sParamName = "p_" + oProperties.parameterName;
- if (oProperties.suppressExtraPromptNames) {
- sParamName = sParamName.substring(1);
- }
- var HTMLOut = K_PRMT_sEMPTY;
- if (oProperties.submitType == K_PRMT_sXML) {
- HTMLOut += genHiddenInputHTML(sFormName, jsEncodeStr(sParamName), K_PRMT_sEMPTY);
- }
- HTMLOut +=
- "<div class='clsFieldSet' style='"+cssParser(oProperties.style, gsCSS_DEFAULT_STYLE)+"'>" +
- "<table cellpadding='0' cellspacing='0' border='0' class='clsPromptComponent' style='"+cssParser(oProperties.style,"visibility")+"'>" +
- "<tr>" +
- "<td class='clsControlLabel pc' colspan='2' nowrap='nowrap'>" + PMT_RNG_FROM + "</td>" +
- "</tr>" +
- "<tr>" +
- "<td nowrap='nowrap'> </td>" +
- "<td class='clsControlLabel pc' nowrap='nowrap' onClick='range" + sPromptId + ".fromGotFocus();' onkeyup='range" + sPromptId + ".fromCheckRadioState(event.keyCode);' onkeypress='range" + sPromptId + ".fromKeyPress(event.keyCode);'>" +
- "<table cellpadding='0' cellspacing='0'>" +
- "<tr>";
- if (!oProperties.required)
- {
- HTMLOut +=
- "<td valign='top'><input name='fromValue" + sPromptId + "' type='radio' onclick='range" + sPromptId + ".rangeNotify()'></td>";
- }
-
- HTMLOut +=
- "<td id='selectDateTimerange_from" + sPromptId + "' style='width:400px;'> </td>" +
- "</tr>" +
- "</table>" +
- "</td>" +
- "</tr>";
- if (!oProperties.required)
- {
- HTMLOut +=
- "<tr>" +
- "<td nowrap='nowrap'>" +
- "<img src='" + sSkin + "/prompting/images/spacer.gif' height='1' width='10'/>" +
- "</td>" +
- "<td class='clsReadOnlyText' onclick=\"document.forms['" + sFormName + "'].elements['fromValue" + sPromptId + "'][1].checked=true;range" + sPromptId + ".rangeNotify()\">" +
- "<input value='lowest' name='fromValue" + sPromptId + "' type='radio' checked='true'>" +
- "<img width='10' alt='' src='" + sSkin + "/prompting/images/spacer.gif'/>" + PMT_RNG_EARLIEST_DATE +
- "</td>" +
- "</tr>";
- }
- HTMLOut +=
- "<tr>" +
- "<td nowrap='nowrap' colspan='2'> </td>" +
- "</tr>" +
- "<tr>" +
- "<td class='clsControlLabel pc' colspan='2' nowrap='nowrap'>" + PMT_RNG_TO + "</td>" +
- "</tr>" +
- "<tr>" +
- "<td nowrap='nowrap'> </td>" +
- "<td nowrap='nowrap' onClick='range" + sPromptId + ".toGotFocus();' onkeyup='range" + sPromptId + ".toCheckRadioState(event.keyCode);' onkeypress='range" + sPromptId + ".toKeyPress(event.keyCode);'>" +
- "<table cellpadding='0' cellspacing='0'>" +
- "<tr>";
- if (!oProperties.required)
- {
- HTMLOut +=
- "<td valign='top'><input name='toValue" + sPromptId + "' type='radio' onclick='range" + sPromptId + ".rangeNotify()'></td>";
- }
-
- HTMLOut +=
- "<td id='selectDateTimerange_to" + sPromptId + "'> </td>" +
- "</tr>" +
- "</table>" +
- "</td>" +
- "</tr>";
- if (!oProperties.required)
- {
- HTMLOut +=
- "<tr>" +
- "<td nowrap='nowrap'>" +
- "<img src='" + sSkin + "/prompting/images/spacer.gif' height='1' width='10'/>" +
- "</td>" +
- "<td class='clsReadOnlyText' onclick=\"document.forms['" + sFormName + "'].elements['toValue" + sPromptId + "'][1].checked=true;range" + sPromptId + ".rangeNotify()\">" +
- "<input value='highest' name='toValue" + sPromptId + "' type='radio' checked='true'>" +
- "<img width='10' alt='' src='" + sSkin + "/prompting/images/spacer.gif'/>" + PMT_RNG_LATEST_DATE +
- "</td>" +
- "</tr>";
- }
- HTMLOut +=
- "</table>" +
- "</div>";
- renderPromptControlHTML("selectDateTime" + sPromptId, HTMLOut);
- var JSOut = "genSelectDateTimeSingleHTML(" + generatePromptProperties(oProperties, {
- id: "range_from" + sPromptId,
- formName: sFormName,
- parameterName: "range_from" + oProperties.parameterName,
- submitType: K_PRMT_sEMPTY,
- suppressDisabled: true,
- style: cssParser(oProperties.style,"visibility"),
- suppressExtraPromptNames: true}) + ");" +
- "genSelectDateTimeSingleHTML(" + generatePromptProperties(oProperties, {
- id: "range_to" + sPromptId,
- formName: sFormName,
- parameterName: "range_to" + oProperties.parameterName,
- submitType: K_PRMT_sEMPTY,
- defaultDate: oProperties.endDate,
- defaultTime: oProperties.endTime,
- suppressDisabled: true,
- style: cssParser(oProperties.style,"visibility"),
- suppressExtraPromptNames: true}) + ");";
- if (oProperties.required)
- {
- JSOut += "this.range" + sPromptId + " = new CRange(document.forms['" + sFormName + "'].elements['" + sParamName + "'], null, selectDateTimerange_from" + sPromptId + ", null, null, selectDateTimerange_to" + sPromptId + ", null, 'datetime', true, '" + oProperties.submitType + "', null, '" + getCVId(oProperties) + "');";
- }
- else
- {
- JSOut += "this.range" + sPromptId + " = new CRange(document.forms['" + sFormName + "'].elements['" + sParamName + "'], document.forms['" + sFormName + "'].elements['fromValue" + sPromptId + "'][0], selectDateTimerange_from" + sPromptId + ", null, document.forms['" + sFormName + "'].elements['toValue" + sPromptId + "'][0], selectDateTimerange_to" + sPromptId + ", null, 'datetime', false, '" + oProperties.submitType + "', " + oProperties.initialState + ", '" + getCVId(oProperties) + "');";
- }
- var sCVObj = getCVInstance(oProperties);
- JSOut += sCVObj + "preProcessControlArray = " + sCVObj + "preProcessControlArray.concat('range" + sPromptId + "');" +
- sCVObj + "rangeObserverArray = " + sCVObj + "rangeObserverArray.concat('range" + sPromptId + "');";
- executePromptControlJS(JSOut);
- }
- function genSelectDateTimeRangeMultipleHTML(s_PromptId, s_FormName, s_ParameterName, s_SubmitType, s_DefaultDate, s_DefaultTime, s_StartOfWeek, s_Calendar, s_SelectUI, s_InputOrder, s_FirstDate, s_LastDate, s_TimeZone, s_HourFormat, s_MinuteFormat, s_SecondFormat, i_DateTime, i_Type, i_Display, i_Mode, i_InitialState, b_Required, b_HideAdornments, b_SuppressDisabled, b_XSDFormat, s_Style, s_SelectDateEditBoxStyle, s_SelectDateYearsStyle, s_SelectDateMonthsStyle, s_SelectDateDaysOfWeekStyle, s_SelectDateDaysStyle, s_EndDate, s_EndTime, b_SuppressExtraPromptNames)
- {
- var oProperties = s_PromptId;
- if (arguments.length > 1 || typeof oProperties != K_PRMT_sOBJECT)
- {
- oProperties = {
- id: s_PromptId,
- formName: s_FormName,
- parameterName: s_ParameterName,
- submitType: s_SubmitType,
- defaultDate: s_DefaultDate,
- defaultTime: s_DefaultTime,
- startOfWeek: s_StartOfWeek,
- calendar: s_Calendar,
- selectUI: s_SelectUI,
- inputOrder: s_InputOrder,
- firstDate: s_FirstDate,
- lastDate: s_LastDate,
- timeZone: s_TimeZone,
- hourFormat: s_HourFormat,
- minuteFormat: s_MinuteFormat,
- secondFormat: s_SecondFormat,
- dateTime: i_DateTime,
- type: i_Type,
- display: i_Display,
- mode: i_Mode,
- initialState: i_InitialState,
- required: b_Required,
- hideAdornments: b_HideAdornments,
- suppressDisabled: b_SuppressDisabled,
- xSDFormat: b_XSDFormat,
- style: s_Style,
- selectDateEditBoxStyle: s_SelectDateEditBoxStyle,
- selectDateYearsStyle: s_SelectDateYearsStyle,
- selectDateMonthsStyle: s_SelectDateMonthsStyle,
- selectDateDaysOfWeekStyle: s_SelectDateDaysOfWeekStyle,
- selectDateDaysStyle: s_SelectDateDaysStyle,
- endDate: s_EndDate,
- endTime: s_EndTime,
- suppressExtraPromptNames: b_SuppressExtraPromptNames
- };
- }
- var sPromptId = oProperties.id;
- if (!verifyPromptId(sPromptId)) {
- return;
- }
-
- var sSkin = (typeof getPromptSkin != K_PRMT_sUNDEFINED ? getPromptSkin() : K_PRMT_sDEFAULTSKIN);
- var sFormName = oProperties.formName;
- if (!sFormName) {
- sFormName = "forms[0]";
- }
- var sParamName = "p_" + oProperties.parameterName;
- if (oProperties.suppressExtraPromptNames) {
- sParamName = sParamName.substring(1);
- }
- var formElementName = sParamName;
- if (oProperties.submitType == K_PRMT_sXML) {
- formElementName = "_oLstDTRM_" + sPromptId;
- }
- var HTMLOut = K_PRMT_sEMPTY;
- if (oProperties.submitType == K_PRMT_sXML) {
- HTMLOut += genHiddenInputHTML(sFormName, jsEncodeStr(sParamName), K_PRMT_sEMPTY);
- }
- HTMLOut +=
- "<div class='clsFieldSet' style='"+cssParser(oProperties.style, gsCSS_DEFAULT_STYLE)+"'>" +
- "<table cellpadding='0' cellspacing='0' border='0' class='clsPromptComponent' style='"+cssParser(oProperties.style,"visibility")+"'>" +
- "<tr>" +
-
- "<td valign='top' id='selectDateTimeRange" + sPromptId + "'> </td>" +
- "<td valign='top' align='center' class='clsButtonLeftRightPadding'>" +
- "<table border='0' cellpadding='0' cellspacing='0'>" +
- "<tr>" +
- "<td><img src='" + sSkin + "/prompting/images/spacer.gif' alt='' width='1' height='16'/></td>" +
- "</tr>" +
- "</table>" +
- "<table border='0' cellpadding='2' cellspacing='0'>" +
- "<tr>" +
- "<td id='getInsertButton" + sPromptId + "'> </td>" +
- "</tr>" +
- "<tr>" +
- "<td id='getRemoveButton" + sPromptId + "'> </td>" +
- "</tr>" +
- "<tr>" +
- "<td><img src='" + sSkin + "/prompting/images/spacer.gif' alt='' width='90' height='1'/></td>" +
- "</tr>" +
- "</table>" +
- "</td>" +
- "<td valign='top'>" +
- "<table border='0' cellspacing='0' cellpadding='0' width='100%'>" +
- "<tr>" +
- "<td class='clsControlLabel pc'>";
- if (oProperties.required)
- {
- HTMLOut +=
- "<img src='" + sSkin + "/prompting/images/icon_required.gif' class='clsErrorRequired' align='top' height='10' width='10' border='0'/>";
- }
- HTMLOut +=
- PMT_UIM_CHOICES +
- "</td>" +
- "</tr>" +
- "<tr>" +
- "<td>" +
- "<select name='" + formElementName + "' style='"+cssParser(oProperties.style,"font,text,color,height")+"' class='clsChoicesListbox pv' multiple='multiple' size='7' onmouseup=\"setTimeout('multipleRange" + sPromptId + ".checkInsertRemove()', 100);\" onkeyup='multipleRange" + sPromptId + ".catchDeleteKey(event.keyCode)'></select>" +
- "</td>" +
- "</tr>" +
- "<tr>" +
- "<td><div id='multipleRangeFeedback" + sPromptId + "' class='clsFeedbackWidget'><img name='sizer" + sPromptId + "' src='" + sSkin + "/prompting/images/spacer.gif' alt='' width='100%' height='3'/></div></td>" +
- "</tr>" +
- "<tr>" +
- "<td align='right'>" +
- "<a href='javascript:multipleRange" + sPromptId + ".selectAll()' class='clsLink pl'>" + PMT_UIM_SELECTALL + "</a>" +
- " " +
- "<a href='javascript:multipleRange" + sPromptId + ".deSelectAll()' class='clsLink pl'>" + PMT_UIM_DESELECTALL + "</a>" +
- "</td>" +
- "</tr>" +
- "</table>" +
- "</td>" +
- "</tr>" +
- "</table>" +
- "</div>";
- renderPromptControlHTML("selectDateTime" + sPromptId, HTMLOut);
- var sCVObj = getCVInstance(oProperties);
- var JSOut = "genSelectDateTimeRangeHTML(" + generatePromptProperties(oProperties, {
- id: "Range" + sPromptId,
- formName: sFormName,
- parameterName: "r_" + oProperties.parameterName,
- style: cssParser(oProperties.style,"visibility"),
- suppressExtraPromptNames: true }) + ");" +
- "genInsertButtonHTML('" + sPromptId + "', 'multipleRange" + sPromptId + ".insertChoiceList()', 'insertButton" + sPromptId + "');" +
- "genRemoveButtonHTML('" + sPromptId + "', 'multipleRange" + sPromptId + ".removeChoiceList()', 'removeButton" + sPromptId + "');" +
- "this.multipleRange" + sPromptId + " = new CMultipleRange(rangeRange" + sPromptId + ", document.forms['" + sFormName + "'].elements['" + formElementName + "'], document.forms['" + sFormName + "'].elements['" + sParamName + "'], " + oProperties.required + ", '" + oProperties.submitType + "', document.getElementById('multipleRangeFeedback" + sPromptId + "'), document.sizer" + sPromptId + ", '" + sPromptId + "', document.getElementById('insertButton" + sPromptId + "'), document.getElementById('removeButton" + sPromptId + "'), '" + getCVId(oProperties) + "');" +
- sCVObj + "preProcessControlArray = " + sCVObj + "preProcessControlArray.concat('multipleRange" + sPromptId + "');" +
- sCVObj + "multipleObserverArray = " + sCVObj + "multipleObserverArray.concat('multipleRange" + sPromptId + "');" +
- "multipleRange" + sPromptId + ".initChoiceList();";
- executePromptControlJS(JSOut);
- }
|