123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- BI and PM: qs
- (C) Copyright IBM Corp. 2001, 2017
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <xts:morphlet resolverBase="prompting" version="1.0" xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/QSRVUITextPL.xml,messages/portal.xml,messages/portalRL.xml" requiredCapability="canUseQueryStudio">
- <xts:block id="format" type="exec" mode="output" processor="XSLT" mimeType="text/html" dependency="getAdvancedServerSettings">
- <!-- get the debug logic sheet -->
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <!-- get the new theme stuff -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="qs/logicsheets/dialogs.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <!-- apply the form logic -->
- <xts:logicsheet path="logicsheets/formlogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
- xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
- xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
- xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
- xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/"
- xmlns:qsdlg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/qs/dialog/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="xsl xts lyt pf dp df cp cf dbg qsdlg xtsext">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
- <!-- Default variables (like skin) and prompt variables -->
- <qsdlg:variables/>
- <qsdlg:promptVariables/>
- <!-- Prompt Control XSL include -->
- <xsl:include href="p_include.xsl"/>
- <!-- add any theme variables -->
- <df:variables/>
- <pf:variables/>
- <!-- start the output -->
- <xsl:template match="/root">
- <dp:page>
- <dp:script>
- <xsl:call-template name="getPromptCommonIncludes"/>
- <xsl:call-template name="gettextBoxIncludes">
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptContentLocale" select="$contentLocale"/>
- </xsl:call-template>
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='xxCustomType'] = '2'">
- <!-- date -->
- <xsl:call-template name="getselectDateIncludes">
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptContentLocale" select="$contentLocale"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="/root/env/param[@name='xxCustomType'] = '3'">
- <!-- time -->
- <xsl:call-template name="getselectTimeIncludes">
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptContentLocale" select="$contentLocale"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="/root/env/param[@name='xxCustomType'] = '4'">
- <!-- interval -->
- <xsl:call-template name="getintervalFieldIncludes">
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptContentLocale" select="$contentLocale"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="/root/env/param[@name='xxCustomType'] = '5'">
- <!-- datetime -->
- <xsl:call-template name="getselectDateTimeIncludes">
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptContentLocale" select="$contentLocale"/>
- </xsl:call-template>
- </xsl:when>
- </xsl:choose>
- <link href="{$qsdlgskin}/qs/QSRVDialog.css" type="text/css" rel="stylesheet"/>
- <script type="text/javascript">
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/layout.js</xsl:attribute>
- <xsl:text/>//<xsl:text/>
- </script>
- <script type="text/javascript">
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/dialogs/customizeRangesDialog.js</xsl:attribute>
- <xsl:text/>//<xsl:text/>
- </script>
- <script type="text/javascript">
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/classes/CDialogManager.js</xsl:attribute>
- <xsl:text/>//<xsl:text/>
- </script>
- <script type="text/javascript">
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/classes/CWindowManager.js</xsl:attribute>
- <xsl:text/>//<xsl:text/>
- </script>
- <script type="text/javascript">
- var gsCustomGroups = "<xsl:value-of select="xtsext:javascriptencode(string(/root/configurationVars/configuration/property[@name='RSVP.QS.FORCE.CUSTOM.GROUPS.VARCHAR']))"/>";
-
- var goDialogManager = new CDialogManager();
- var customRangeValues = new Array();
- var customRangeNames = new Array();
- var customRangeDisplay = new Array();
- var cf = getConfigFrame();
- var advClosedSize = 500;
- var advOpenSize = 534;
- var initialRangeSelectSize = null;
- function stringReplace (origString, valToReplace, newString)
- {
- var strRegExp = new RegExp();
- strRegExp.compile(valToReplace, "g");
- return origString.replace(strRegExp, newString);
- }
- function customTypeChange()
- {
- var customType = document.f.customizationType.value;
- if (customType == 0)
- {
- if (cf.dlgGlobalGetParm('xxExistingCol') == 'group')
- goDialogManager.getFeatureManager().launchFeature('CustomGroups');
- else
- cf.loadCustomGroups();
- }
- }
- function execute()
- {
- var before_col_id = cf.dlgGlobalGetParm('xxInsBeforeColId');
- var calcOp = "none";
- var calcName = "<xts:string id="CUSTOMIZE_VALUES_NEW_COLUMN_LABEL" encode="javascript"/>";
- var colName = cf.dlgGlobalGetParm('xxColumnName');
- if (cf.dlgGlobalGetParm('xxCustomType') == '0')
- calcOp = "rangeString";
- else if (cf.dlgGlobalGetParm('xxCustomType') == '1')
- calcOp = "rangeNumber";
- else if (cf.dlgGlobalGetParm('xxCustomType') == '2')
- calcOp = "rangeDate";
- else if (cf.dlgGlobalGetParm('xxCustomType') == '3')
- calcOp = "rangeTime";
- else if (cf.dlgGlobalGetParm('xxCustomType') == '4')
- calcOp = "rangeInterval";
- else if (cf.dlgGlobalGetParm('xxCustomType') == '5')
- calcOp = "rangeDateTime";
- var calcExpr = buildCustomRangesCalcExpression();
- if (calcExpr != "")
- {
- //figure out the rest
- if (document.f.calc_label_text.value != "")
- calcName = document.f.calc_label_text.value;
- else
- calcName = stringReplace (calcName, "\\^0", colName);
- if (cf.dlgGlobalGetParm('xxExistingCol') != null)
- {
- var cmd = cf.generateReplaceExpressionCmd(calcExpr, calcExpr, calcOp);
- cmd += ";" + cf.generateNcCmd(cf.dlgGlobalGetParm('xxColumnIndex'), calcName)
- cf.sendCmd(cmd, "", true);
- }
- else
- cf.addCalcColumn(before_col_id, calcExpr, calcExpr, calcName, "none", calcOp, "none", "none", 62, 7, "none", -1, "none"); //calcBy,calcBase,calcFormat="none",calculationType=62,usage=7,regularAgg="none",promptType=-1,detailAgg="none"
- }
- else
- cf.hideDialogFrame();
- }
- function CMultipleRange_insertWithLabel(label, useVal)
- {
- var sInsertUse;
- var sInsertDisplay;
- if (typeof useVal != "undefined")
- {
- sInsertUse = useVal.replace(/''/g, "'");
- var rangeLiteral = new CRangeLiteral(useVal.replace(/''/g, "'"), label.replace(/''/g, "'"));
- var rangeType = rangeLiteral.getFilterType();
- if (cf.dlgGlobalGetParm('xxCustomType') == '1')
- {
- <!-- numeric -->
- var formattedNumber = 0;
- switch (rangeType)
- {
- case 0: //equal to
- formattedNumber = sFormatNumber(rangeLiteral.getFirstValue());
- rangeLiteral = new CRangeLiteral(formattedNumber, label);
- break;
- case 1: //greater than
- formattedNumber = sFormatNumber(rangeLiteral.getFirstValue());
- rangeLiteral = new CRangeLiteral(formattedNumber + ":", label);
- break;
- case 2: //less than
- formattedNumber = sFormatNumber(rangeLiteral.getSecondValue());
- rangeLiteral = new CRangeLiteral(":" + formattedNumber, label);
- break;
- case 3: //in range
- formattedNumber = sFormatNumber(rangeLiteral.getFirstValue());
- var formattedNumber2 = sFormatNumber(rangeLiteral.getSecondValue());
- rangeLiteral = new CRangeLiteral(formattedNumber + " : " + formattedNumber2, label);
- break;
- default:
- return;
- }
- }
- else if (cf.dlgGlobalGetParm('xxCustomType') == '2')
- {
- <!-- date -->
- var formattedDate = 0;
- switch (rangeType)
- {
- case 0: //equal to
- formattedDate = formatDate(rangeLiteral.getFirstValue())
- rangeLiteral = new CRangeLiteral(formattedDate, label);
- break;
- case 1: //greater than
- formattedDate = formatDate(rangeLiteral.getFirstValue())
- rangeLiteral = new CRangeLiteral(formattedDate + ":", label);
- break;
- case 2: //less than
- formattedDate = formatDate(rangeLiteral.getSecondValue())
- rangeLiteral = new CRangeLiteral(":" + formattedDate, label);
- break;
- case 3: //in range
- formattedDate = formatDate(rangeLiteral.getFirstValue())
- var formattedDate2 = formatDate(rangeLiteral.getSecondValue())
- rangeLiteral = new CRangeLiteral(formattedDate + " : " + formattedDate2, label);
- break;
- default:
- return;
- }
- }
- else if (cf.dlgGlobalGetParm('xxCustomType') == '3')
- {
- <!-- time -->
- var formattedTime = 0;
- switch (rangeType)
- {
- case 0: //equal to
- formattedTime = formatTime(rangeLiteral.getFirstValue());
- rangeLiteral = new CRangeLiteral(formattedTime, label);
- break;
- case 1: //greater than
- formattedTime = formatTime(rangeLiteral.getFirstValue());
- rangeLiteral = new CRangeLiteral(formattedTime + ":", label);
- break;
- case 2: //less than
- formattedTime = formatTime(rangeLiteral.getSecondValue());
- rangeLiteral = new CRangeLiteral(":" + formattedTime, label);
- break;
- case 3: //in range
- formattedTime = formatTime(rangeLiteral.getFirstValue());
- var formattedTime2 = formatTime(rangeLiteral.getSecondValue());
- rangeLiteral = new CRangeLiteral(formattedTime + " : " + formattedTime2, label);
- break;
- default:
- return;
- }
- }
- else if (cf.dlgGlobalGetParm('xxCustomType') == '5')
- {
- <!-- datetime -->
- var formattedDate = 0;
- var formattedTime = 0;
- switch (rangeType)
- {
- case 0: //equal to
- formattedDate = formatDate(rangeLiteral.getFirstValue().substring(0, rangeLiteral.getFirstValue().indexOf(" ")))
- formattedTime = formatTime(rangeLiteral.getFirstValue().substr(rangeLiteral.getFirstValue().indexOf(" ") + 1));
- rangeLiteral = new CRangeLiteral(formattedDate + " " + formattedTime, label);
- break;
- case 1: //greater than
- formattedDate = formatDate(rangeLiteral.getFirstValue().substring(0, rangeLiteral.getFirstValue().indexOf(" ")))
- formattedTime = formatTime(rangeLiteral.getFirstValue().substr(rangeLiteral.getFirstValue().indexOf(" ") + 1));
- rangeLiteral = new CRangeLiteral(formattedDate + " " + formattedTime + ":", label);
- break;
- case 2: //less than
- formattedDate = formatDate(rangeLiteral.getSecondValue().substring(0, rangeLiteral.getSecondValue().indexOf(" ")))
- formattedTime = formatTime(rangeLiteral.getSecondValue().substr(rangeLiteral.getSecondValue().indexOf(" ") + 1));
- rangeLiteral = new CRangeLiteral(":" + formattedDate + " " + formattedTime, label);
- break;
- case 3: //in range
- formattedDate = formatDate(rangeLiteral.getFirstValue().substring(0, rangeLiteral.getFirstValue().indexOf(" ")))
- var formattedDate2 = formatDate(rangeLiteral.getSecondValue().substring(0, rangeLiteral.getSecondValue().indexOf(" ")))
- formattedTime = formatTime(rangeLiteral.getFirstValue().substr(rangeLiteral.getFirstValue().indexOf(" ") + 1));
- var formattedTime2 = formatTime(rangeLiteral.getSecondValue().substr(rangeLiteral.getSecondValue().indexOf(" ") + 1));
- rangeLiteral = new CRangeLiteral(formattedDate + " " + formattedTime + " : " + formattedDate2 + " " + formattedTime2, label);
- break;
- default:
- return;
- }
- }
- sInsertDisplay = rangeLiteral.getFormatValue();
- }
- else
- {
- sInsertUse = this.m_oRangeControl.sGetValue();
- sInsertDisplay = this.m_oRangeControl.sGetFormatValue();
- }
- if ((sInsertUse) && (sInsertDisplay) && (label != ""))
- {
- for (var i = 0; i < customRangeValues.length; i++)
- {
- if (customRangeValues[i] == sInsertUse)
- return
- }
- customRangeNames[customRangeNames.length] = label.replace(/''/g, "'");
- customRangeValues[customRangeValues.length] = sInsertUse;
- customRangeDisplay[customRangeDisplay.length] = sInsertDisplay;
- sInsertDisplay = "'" + label.replace(/''/g, "'") + "': " + sInsertDisplay;
- this.m_oLstChoices.options[this.m_oLstChoices.options.length] = new Option(sInsertDisplay, sInsertUse, false, false);
- }
- this.checkData();
- //resize the list to fit the data if required
- this.resizeList();
- }
- function formatTime(unformattedTime)
- {
- var dTest = dParseTime(unformattedTime);
- return getFormatTime(dTest,2);
- }
- function formatDate(unformattedDate)
- {
- var dTest = dParseDate(unformattedDate, 'YMD');
- return getFormatDate(dTest, 0, g_dateOrder);
- }
- //remove selections from the list of choices
- function CMultipleRange_removeFromList()
- {
- sl = this.m_oLstChoices.selectedIndex;
- if (sl != -1)
- {
- var i = 0;
- while (i < this.m_oLstChoices.options.length)
- {
- if (this.m_oLstChoices.options[i].selected == true)
- {
- this.m_oLstChoices.options[i] = null;
- var tmpArray1 = new Array();
- var tmpArray2 = new Array();
- var tmpArray3 = new Array();
- for (var j = 0; j < i; j++)
- {
- tmpArray1[j] = customRangeNames[j];
- tmpArray2[j] = customRangeValues[j];
- tmpArray3[j] = customRangeDisplay[j];
- }
- for (var j = i; j < customRangeNames.length - 1; j++)
- {
- tmpArray1[j] = customRangeNames[j + 1];
- tmpArray2[j] = customRangeValues[j + 1];
- tmpArray3[j] = customRangeDisplay[j + 1];
- }
- customRangeNames = tmpArray1;
- customRangeValues = tmpArray2;
- customRangeDisplay = tmpArray3;
- }
- else
- i++;
- }
- }
- this.checkData();
- //resize the list to fit the data if required
- this.resizeList();
- if (document.all)
- checkOverflowOnSelect();
- }
- function CMultipleRange_up()
- {
- this.moveUpDown(true);
- }
- function CMultipleRange_down()
- {
- this.moveUpDown(false);
- }
- function CMultipleRange_moveUpDown(up)
- {
- var selectedVals = new Array();
- var i;
- for (i = 0; i < this.m_oLstChoices.options.length; i++)
- {
- if (this.m_oLstChoices.options[i].selected == true)
- selectedVals[i] = true;
- }
- if ((selectedVals.length == 0)||(up && (selectedVals[0] == true))||(!up && ((selectedVals.length - 1) == (customRangeNames.length - 1))))
- return;
- while (this.m_oLstChoices.options.length)
- this.m_oLstChoices.options[0] = null;
- if (up)
- {
- for (i = 0; i < customRangeNames.length; i++)
- {
- var sInsertDisplay = "'" + customRangeNames[i] + "': " + customRangeDisplay[i];
- if (selectedVals[i] == true)
- {
- var sInsertDisplayUp = "'" + customRangeNames[i - 1] + "': " + customRangeDisplay[i - 1];
- this.m_oLstChoices.options[this.m_oLstChoices.options.length - 1] = new Option(sInsertDisplay, customRangeValues[i], false, false);
- this.m_oLstChoices.options[this.m_oLstChoices.options.length - 1].selected = true;
- this.m_oLstChoices.options[this.m_oLstChoices.options.length] = new Option(sInsertDisplayUp, customRangeValues[i - 1], false, false);
- var tmp = customRangeNames[i - 1];
- customRangeNames[i - 1] = customRangeNames[i];
- customRangeNames[i] = tmp;
- tmp = customRangeValues[i - 1];
- customRangeValues[i - 1] = customRangeValues[i];
- customRangeValues[i] = tmp;
- tmp = customRangeDisplay[i - 1];
- customRangeDisplay[i - 1] = customRangeDisplay[i];
- customRangeDisplay[i] = tmp;
- continue;
- }
- this.m_oLstChoices.options[this.m_oLstChoices.options.length] = new Option(sInsertDisplay, customRangeValues[i], false, false);
- }
- }
- else
- {
- for (i = customRangeNames.length - 1; i >= 0; i--)
- {
- if (selectedVals[i] == true)
- {
- var tmp = customRangeNames[i + 1];
- customRangeNames[i + 1] = customRangeNames[i];
- customRangeNames[i] = tmp;
- tmp = customRangeValues[i + 1];
- customRangeValues[i + 1] = customRangeValues[i];
- customRangeValues[i] = tmp;
- tmp = customRangeDisplay[i + 1];
- customRangeDisplay[i + 1] = customRangeDisplay[i];
- customRangeDisplay[i] = tmp;
- }
- }
- var sInsertDisplay = "'" + customRangeNames[0] + "': " + customRangeDisplay[0];
- this.m_oLstChoices.options[this.m_oLstChoices.options.length] = new Option(sInsertDisplay, customRangeValues[0], false, false);
- for (i = 1; i < customRangeNames.length; i++)
- {
- var sInsertDisplay = "'" + customRangeNames[i] + "': " + customRangeDisplay[i];
- this.m_oLstChoices.options[this.m_oLstChoices.options.length] = new Option(sInsertDisplay, customRangeValues[i], false, false);
- if (selectedVals[i - 1] == true)
- this.m_oLstChoices.options[this.m_oLstChoices.options.length - 1].selected = true;
- }
- }
- }
- function addValue()
- {
- if (textBoxrange_name.isValid())
- {
- var customType = cf.dlgGlobalGetParm('xxCustomType');
- var b = false;
- if ((customType == '0' || customType == '1') && textBoxrange_fromcustomRange.isValid() && textBoxrange_tocustomRange.isValid())
- b = true;
- else if (customType == '2' && pickerControlrange_fromcustomRange.isValid() && pickerControlrange_tocustomRange.isValid())
- b = true; // date
- else if (customType == '3' && timePickerrange_fromcustomRange.isValid() && timePickerrange_tocustomRange.isValid())
- b = true; // time
- else if (customType == '4' && intervalControlrange_fromcustomRange.isValid() && intervalControlrange_tocustomRange.isValid())
- b = true; // interval
- else if (customType == '5' && selectDateTimerange_fromcustomRange.isValid() && selectDateTimerange_tocustomRange.isValid())
- b = true;
- if ((textBoxrange_name.sGetValue() != '') && b)
- {
- multipleRangeCustomRange.insertWithLabel(textBoxrange_name.sGetValue())
- if (document.all)
- checkOverflowOnSelect();
- }
- }
- }
- function init()
- {
- attachMouseEvents();
- if (initialRangeSelectSize == null)
- initialRangeSelectSize = document.f._oLstChoicescustomRange.offsetWidth;
- if (cf.dlgGlobalGetParm('xxCustomType') == '0' || (cf.dlgGlobalGetParm('xxCustomType') == '1' && cf.dlgGlobalGetParm('xxIsMeasure') != '1'))
- document.f.customizationType.options[document.f.customizationType.options.length] = new Option("<xts:string id="CUSTOMIZE_VALUES_OPTION_INDIVIDUAL_GROUPS" encode="javascript"/>", 0);
- document.f.customizationType.options[document.f.customizationType.options.length] = new Option("<xts:string id="CUSTOMIZE_VALUES_OPTION_RANGES" encode="javascript"/>", 1);
- document.f.customizationType.options[document.f.customizationType.options.length - 1].selected = "true";
- if (cf.dlgGlobalGetParm('xxCVColumnName') != null)
- document.f.calc_label_text.value = cf.dlgGlobalGetParm('xxCVColumnName');
- if (cf.dlgGlobalGetParm('xxCustomType') == '3' || cf.dlgGlobalGetParm('xxCustomType') == '5')
- {
- var parentForm = document.f;
- var x = document.createElement("input");
- x.type = "hidden";
- x.name = "timeselector";
- parentForm.appendChild(x);
- advClosedSize = 577;
- advOpenSize = 577;
- }
- for (var i = 0; i < cf.dlgGlobalSize('xxExistingRanges'); i++)
- {
- var ranges = cf.dlgGlobalGetParmAt('xxExistingRanges', i);
- multipleRangeCustomRange.insertWithLabel(ranges[0], ranges[1]);
- }
- if (cf && cf.showDialogFrame)
- cf.showDialogFrame(advClosedSize);
- textBoxrange_name.m_oForm.focus();
- if (cf.dlgGlobalGetParm('xxExistingRemainingGroup') == false)
- document.f.remaining_values_options[1].checked = true
- else
- {
- if (cf.dlgGlobalGetParm('xxExistingRemainingGroup') == null)
- document.f.remaining_values_options[0].checked = true;
- else
- {
- document.f.range_name_text.value = cf.dlgGlobalGetParm('xxExistingRemainingGroup');
- document.f.remaining_values_options[2].checked = true;
- }
- }
- showHideApplyRemaining(false);
- }
- function showHideApplyRemaining(show)
- {
- var remainingValuesRow = document.getElementById("remainingValuesRow");
- var applyRemainingImg = document.getElementById("applyRemainingImg");
- var individualValuesText = document.getElementById("individualValuesText");
- var noRangeNameText = document.getElementById("noRangeNameText");
- var rangeNameText = document.getElementById("rangeNameText");
- var isReload = (typeof show != "undefined" && show == "reload");
- if ((!isReload) && (remainingValuesRow.style.display == "none" || (typeof show != "undefined" && show == true)))
- {
- if (document.all)
- remainingValuesRow.style.display = "inline";
- else
- remainingValuesRow.style.display = "table-row";
- applyRemainingImg.src = "<xsl:value-of select="xtsext:javascriptencode(string($qsdlgskin))"/>/prompting/images/prompt_option_collapse.gif";
- individualValuesText.style.display = "none";
- noRangeNameText.style.display = "none";
- rangeNameText.style.display = "none";
- cf.showDialogFrame(advOpenSize);
- }
- else
- {
- if (isReload)
- {
- individualValuesText.style.display = "none";
- noRangeNameText.style.display = "none";
- rangeNameText.style.display = "none";
- }
- else
- {
- remainingValuesRow.style.display = "none";
- applyRemainingImg.src = "<xsl:value-of select="xtsext:javascriptencode(string($qsdlgskin))"/>/prompting/images/prompt_option_expand.gif";
- }
- var doAction = ((isReload && (remainingValuesRow.style.display == "none")) || !isReload);
- if (document.f.remaining_values_options[0].checked == true)
- {
- if (doAction)
- {
- if (document.all)
- individualValuesText.style.display = "inline";
- else
- individualValuesText.style.display = "table-row";
- }
- }
- else if (document.f.remaining_values_options[1].checked == true || (document.f.remaining_values_options[2].checked == true && document.f.range_name_text.value == ""))
- {
- document.f.remaining_values_options[1].checked = true;
- if (doAction)
- {
- if (document.all)
- noRangeNameText.style.display = "inline";
- else
- noRangeNameText.style.display = "table-row";
- }
- }
- else
- {
- if (doAction)
- {
- if (document.all)
- rangeNameText.style.display = "inline";
- else
- rangeNameText.style.display = "table-row";
- }
- var rnv = document.getElementById("rangeNameValue")
- var rnvChild = stringReplace ("<xts:string id="CUSTOMIZE_VALUES_RANGE_NAME" encode="javascript"/>", "\\^0", document.f.range_name_text.value);
- while (rnv.hasChildNodes())
- rnv.removeChild(rnv.firstChild);
- rnv.appendChild(document.createTextNode(rnvChild));
- }
- if (doAction)
- cf.showDialogFrame(advClosedSize);
- }
- }
- function checkOverflowOnSelect()
- {
- var selectObj = document.f._oLstChoicescustomRange;
- selectObj.style.width = "100%"; //We need to do this because IE doesn't resize this properly to auto unless first set to 100%
- selectObj.style.width = "auto";
- if (selectObj.offsetWidth <= initialRangeSelectSize)
- {
- selectObj.style.width = "100%";
- initialRangeSelectSize = selectObj.offsetWidth; //We need to do this because for some reason, this isn't always calculated properly in the init()
- }
- }
- </script>
- <script type="text/javascript">
- <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/dialogs/executeButton.js</xsl:attribute>
- <xsl:text/>//<xsl:text/>
- </script>
- </dp:script>
- <form style="margin:0px" name="f" method="POST" onsubmit="return false;">
- <table border="0" cellspacing="0" cellpadding="0" height="100%" width="100%">
- <tr>
- <td width="100%" height="0%">
- <!-- dialog header -->
- <dp:header help="false">
- <!-- header titles -->
- <dp:title>
- <xts:string id="CUSTOMIZE_VALUES_TITLE"/>
- </dp:title>
- <!-- close link for the header -->
- <dp:close>
- <a href="javascript:getConfigFrame().hideDialogFrame()">
- <dp:closeMarker/>
- </a>
- </dp:close>
- <!-- description (hint text) -->
- <dp:description>
- <xts:string id="CUSTOMIZE_VALUES_DESCRIPTION"/>
- </dp:description>
- </dp:header>
- </td>
- </tr>
- <tr>
- <td width="100%" height="100%" valign="top">
- <!-- layout -->
- <lyt:layout style="1" border="no">
- <lyt:section>
- <table>
- <tr>
- <td>
- <img src="{$qsdlgskin}/prompting/images/icon_required.gif" border="0" height="10" width="10"/>
- </td>
- <td class="dialogHintText">
- <xts:string id="CUSTOMIZE_VALUES_REQUIRED_FIELD"/>
- </td>
- </tr>
- <tr>
- <td>
- <img src="{$qsdlgskin}/prompting/images/error_timed_on.gif" border="0" height="10" width="10"/>
- </td>
- <td class="dialogHintText">
- <xts:string id="CUSTOMIZE_VALUES_NOTHING_SELECTED"/>
- </td>
- </tr>
- </table>
- <dp:input>
- <dp:section1>
- <xts:string id="CUSTOMIZE_VALUES_TYPE"/>
- </dp:section1>
- <dp:section2>
- <select name="customizationType" onChange="javascript:setTimeout(customTypeChange, 10);" style="width:260px;"/>
- </dp:section2>
- </dp:input>
- </lyt:section>
- <lyt:section>
- <dp:section1>
- <TABLE cellpadding="0" cellspacing="0" border="0" width="100%">
- <TR>
- <TD valign="top" width="45%">
- <TABLE border="0" cellspacing="0" cellpadding="0" width="100%">
- <tr>
- <TD colspan="2" class="clsControlLabel">
- <xts:string id="CUSTOMIZE_RANGE_APPLY_RULES"/>
- </TD>
- </tr>
- <TR>
- <TD colspan="2">
- <SELECT name="_oLstChoicescustomRange" style="width:100%;" multiple="multiple" size="10"/>
- </TD>
- </TR>
- <TR>
- <TD nowrap="nowrap">
- <A href="javascript:multipleRangeCustomRange.up()" class="clsLink"><xts:string id="CUSTOMIZE_RANGE_UP"/></A>
- <A style="margin-left:10px;margin-right:10px;" href="javascript:multipleRangeCustomRange.down()" class="clsLink"><xts:string id="CUSTOMIZE_RANGE_DOWN"/></A>
- </TD>
- <TD align="right" nowrap="nowrap">
- <A style="margin-right:10px;" href="javascript:multipleRangeCustomRange.selectAll()" class="clsLink"><xts:string id="DIALOG_SELECT_ALL"/></A>
- <A style="margin-right:10px;" href="javascript:multipleRangeCustomRange.deSelectAll()" class="clsLink"><xts:string id="DIALOG_DESELECT_ALL"/></A>
- <A href="javascript:multipleRangeCustomRange.removeFromList()" class="clsLink"><xts:string id="CUSTOMIZE_VALUES_DELETE"/></A>
- </TD>
- </TR>
- <tr>
- <td colspan="2">
- <IMG src="{$qsdlgskin}/prompting/images/spacer.gif" height="10" width="1"/>
- </td>
- </tr>
- <TR>
- <TD valign="top" colspan="2">
- <table border="0" cellspacing="0" cellpadding="0" width="100%">
- <tr>
- <td class="formText" colspan="2">
- <a style="padding-right:5px;" href="javascript:void(0);" onmousedown="showHideApplyRemaining()" onmouseover="window.status='';return true;" onmouseout="window.status='';return true;"><xts:string id="CUSTOMIZE_VALUES_ALL_REMAINING_VALUES"/></a>
- <a href="javascript:void(0);" onmousedown="showHideApplyRemaining()" onmouseover="window.status='';return true;" onmouseout="window.status='';return true;">
- <img id="applyRemainingImg" border="0">
- <xsl:attribute name="src"><xsl:value-of select="$qsdlgskin"/>/prompting/images/prompt_option_expand.gif</xsl:attribute>
- </img>
- </a>
- </td>
- </tr>
- <tr id="individualValuesText" style="display:none">
- <td class="formText" colspan="2">
- <xts:string id="CUSTOMIZE_VALUES_USE_INDIVIDUAL_VALUES"/>
- </td>
- </tr>
- <tr id="noRangeNameText" style="display:none">
- <td class="formText" colspan="2">
- <xts:string id="CUSTOMIZE_VALUES_DO_NOT_SHOW_RANGE_NAME"/>
- </td>
- </tr>
- <tr id="rangeNameText" style="display:none">
- <td id="rangeNameValue" class="formText" colspan="2">
- <xts:string id="CUSTOMIZE_VALUES_RANGE_NAME"/>
- </td>
- </tr>
- <tr id="remainingValuesRow">
- <td>
- <dp:choice>
- <dp:section1>
- <input type="radio" name="remaining_values_options" value="individual_values" checked="true"/>
- </dp:section1>
- <dp:section2>
- <xts:string id="CUSTOMIZE_VALUES_USE_INDIVIDUAL_VALUES"/>
- </dp:section2>
- <dp:section1>
- <input type="radio" name="remaining_values_options" value="do_not_show"/>
- </dp:section1>
- <dp:section2>
- <xts:string id="CUSTOMIZE_VALUES_DO_NOT_SHOW_RANGE_NAME"/>
- </dp:section2>
- <dp:section1>
- <input type="radio" name="remaining_values_options" value="range_name"/>
- </dp:section1>
- <dp:section2>
- <xts:string id="CUSTOMIZE_VALUES_NEW_RANGE_NAME"/>
- </dp:section2>
- <dp:section3>
- <input style="width:200px;" type="text" name="range_name_text" onClick="javascript:document.f.remaining_values_options[2].checked = true;" onKeyPress="javascript:document.f.remaining_values_options[2].checked = true;"/>
- </dp:section3>
- </dp:choice>
- </td>
- </tr>
- </table>
- </TD>
- </TR>
- </TABLE>
- </TD>
- <TD valign="top" align="center" width="10%" height="100%">
- <TABLE border="0" cellpadding="2" cellspacing="0" height="100%">
- <tr>
- <td align="center" valign="top" height="100%">
- <table cellpadding="0" cellspacing="0" border="0" onClick="addValue()" style="margin-top:100px">
- <tr>
- <td id="insertButton" align="center" valign="middle" class="clsDialogButton" onmouseover="document.getElementById('insertButton').className='clsDialogButtonOver';window.status='';return true;" onmouseout="document.getElementById('insertButton').className='clsDialogButton';window.status='';return true;">
- <IMG src="{$qsdlgskin}/prompting/images/remove.gif" border="0" height="16" width="16" align="top">
- <xsl:attribute name="title"><xts:string id="CUSTOMIZE_RANGE_INSERT_TIP"/></xsl:attribute>
- </IMG>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </TABLE>
- </TD>
- <TD valign="top">
- <table cellpadding="0" cellspacing="0">
- <tr>
- <td class="clsControlLabel" nowrap="nowrap">
- <xts:string id="CUSTOMIZE_RANGE_CREATE_RANGE"/>
- </td>
- </tr>
- <tr>
- <td style="border:1px solid #cccccc;padding:5px;">
- <table cellpadding="0" cellspacing="0">
- <tr>
- <td class="clsControlLabel">
- <xts:string id="CUSTOMIZE_RANGE_TEXT_LABEL"/>
- </td>
- </tr>
- <tr>
- <td>
- <xsl:call-template name="getTextBox">
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptFormName" select="$promptFormName"/>
- <xsl:with-param name="promptRequired" select="'true'"/>
- <xsl:with-param name="promptId" select="'range_name'"/>
- <xsl:with-param name="promptHideText" select="'false'"/>
- <xsl:with-param name="promptMultiLine" select="'false'"/>
- <xsl:with-param name="promptParameter" select="'parameterValue'"/>
- <xsl:with-param name="promptStyle" select="'width:235px'"/>
- <xsl:with-param name="promptSubmitType" select="'NO_SUBMIT'"/>
- <xsl:with-param name="promptForceOuterDivWidth" select="'true'"/>
- </xsl:call-template>
- </td>
- </tr>
- <tr>
- <td>
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='xxCustomType'] = '0'">
- <xsl:call-template name="getTextBox">
- <xsl:with-param name="promptRange" select="'true'"/>
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptFormName" select="$promptFormName"/>
- <xsl:with-param name="promptRequired" select="'false'"/>
- <xsl:with-param name="promptId" select="'customRange'"/>
- <xsl:with-param name="promptHideText" select="'false'"/>
- <xsl:with-param name="promptMultiLine" select="'false'"/>
- <xsl:with-param name="promptParameter" select="'parameterRange'"/>
- <xsl:with-param name="promptSubmitType" select="'NO_SUBMIT'"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="/root/env/param[@name='xxCustomType'] = '1'">
- <xsl:call-template name="getTextBox">
- <xsl:with-param name="promptRange" select="'true'"/>
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptFormName" select="$promptFormName"/>
- <xsl:with-param name="promptRequired" select="'false'"/>
- <xsl:with-param name="promptId" select="'customRange'"/>
- <xsl:with-param name="promptHideText" select="'false'"/>
- <xsl:with-param name="promptMultiLine" select="'false'"/>
- <xsl:with-param name="promptParameter" select="'parameterRange'"/>
- <xsl:with-param name="promptDataType" select="'number'"/>
- <xsl:with-param name="promptMaxLength" select="'15'"/>
- <xsl:with-param name="promptSubmitType" select="'NO_SUBMIT'"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="/root/env/param[@name='xxCustomType'] = '2'">
- <xsl:call-template name="getSelectDate">
- <xsl:with-param name="promptRange" select="'true'"/>
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptFormName" select="$promptFormName"/>
- <xsl:with-param name="promptRequired" select="'false'"/>
- <xsl:with-param name="promptId" select="'customRange'"/>
- <xsl:with-param name="promptStartOfWeek" select="'Sunday'"/>
- <xsl:with-param name="promptCalendar" select="'Gregorian'"/>
- <xsl:with-param name="promptParameter" select="'parameterRange'"/>
- <xsl:with-param name="promptInputOrder" select="'YMD'"/>
- <xsl:with-param name="promptDateTime" select="'false'"/>
- <xsl:with-param name="promptMultiSelect" select="'false'"/>
- <xsl:with-param name="suppressDisabled" select="'true'"/>
- <xsl:with-param name="promptSelectUI" select="'editBox'"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="/root/env/param[@name='xxCustomType'] = '3'">
- <xsl:call-template name="getSelectTime">
- <xsl:with-param name="promptRange" select="'true'"/>
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptFormName" select="$promptFormName"/>
- <xsl:with-param name="promptRequired" select="'false'"/>
- <xsl:with-param name="promptId" select="'customRange'"/>
- <xsl:with-param name="promptParameter" select="'parameterRange'"/>
- <xsl:with-param name="promptType" select="0"/>
- <xsl:with-param name="promptDisplay" select="1"/>
- <xsl:with-param name="promptInline" select="'false'"/>
- <xsl:with-param name="promptHourFormat" select="'hh'"/>
- <xsl:with-param name="promptMinuteFormat" select="'mm'"/>
- <xsl:with-param name="promptSecondFormat" select="'ss'"/>
- <xsl:with-param name="promptMultiSelect" select="'false'"/>
- <xsl:with-param name="suppressDisabled" select="'true'"/>
- <xsl:with-param name="promptSelectUI" select="'editBox'"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="/root/env/param[@name='xxCustomType'] = '4'">
- <xsl:call-template name="getSelectInterval">
- <xsl:with-param name="promptRange" select="'true'"/>
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptFormName" select="$promptFormName"/>
- <xsl:with-param name="promptRequired" select="'false'"/>
- <xsl:with-param name="promptId" select="'customRange'"/>
- <xsl:with-param name="promptShowMilliSeconds" select="'true'"/>
- <xsl:with-param name="suppressDisabled" select="'true'"/>
- <xsl:with-param name="promptShowSeconds" select="'true'"/>
- <xsl:with-param name="promptParameter" select="'parameterRange'"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="/root/env/param[@name='xxCustomType'] = '5'">
- <xsl:call-template name="getSelectDateTime">
- <xsl:with-param name="promptRange" select="'true'"/>
- <xsl:with-param name="promptLocale" select="$promptLocale"/>
- <xsl:with-param name="promptFormName" select="$promptFormName"/>
- <xsl:with-param name="promptRequired" select="'false'"/>
- <xsl:with-param name="promptId" select="'customRange'"/>
- <xsl:with-param name="promptStartOfWeek" select="'Sunday'"/>
- <xsl:with-param name="promptCalendar" select="'Gregorian'"/>
- <xsl:with-param name="promptParameter" select="'parameterRange'"/>
- <xsl:with-param name="promptInputOrder" select="'YMD'"/>
- <xsl:with-param name="promptDateTime" select="'false'"/>
- <xsl:with-param name="promptMultiSelect" select="'false'"/>
- <xsl:with-param name="suppressDisabled" select="'true'"/>
- <xsl:with-param name="promptXSDFormat" select="'false'"/>
- <xsl:with-param name="promptSelectUI" select="'editBox'"/>
- </xsl:call-template>
- </xsl:when>
- </xsl:choose>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <div style="height:7px;"/>
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td class="formLabel">
- <xts:string id="CUSTOMIZE_VALUES_LABEL_NAME"/>
- </td>
- </tr>
- <tr>
- <td>
- <input style="width:260px;" type="text" name="calc_label_text">
- <xsl:if test="/root/system/param[@name='disableEnterKeyAutoSubmit'] != 'true'">
- <xsl:attribute name="onKeyUp">javascript:if (event.keyCode == 13) execute();</xsl:attribute>
- </xsl:if>
- </input>
- </td>
- </tr>
- </table>
- </TD>
- </TR>
- </TABLE>
- <SCRIPT language="javascript" type="text/javascript">
- CMultipleRange.prototype.insertWithLabel = CMultipleRange_insertWithLabel;
- CMultipleRange.prototype.up = CMultipleRange_up;
- CMultipleRange.prototype.down = CMultipleRange_down;
- CMultipleRange.prototype.moveUpDown = CMultipleRange_moveUpDown;
- CMultipleRange.prototype.removeFromList = CMultipleRange_removeFromList;
- var multipleRangeCustomRange = new CMultipleRange(rangecustomRange, document.forms["f"].elements["_oLstChoicescustomRange"], document.forms["f"].elements["p_parameterFromcustomRange"], false, '', document.getElementById("multipleRangeFeedbackcustomRange"), document.getElementById("sizercustomRange"), "CustomRange", null, null);
- preProcessControlArray = preProcessControlArray.concat('multipleRangeCustomRange');
- </SCRIPT>
- </dp:section1>
- </lyt:section>
- </lyt:layout>
- </td>
- </tr>
- <tr>
- <td width="100%" height="0%">
- <qsdlg:defaultButtons/>
- </td>
- </tr>
- <!-- <dbg:dumpxml select="/"/> -->
- </table>
- </form>
- </dp:page>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="getAdvancedServerSettings" mode="interpret" processor="XML" type="exec" mandatory="false">
- <xts:sequence>
- <xts:append>
- <configurationVars>
- <xts:function name="getConfiguration">
- <xts:param name="RSVP.QS.FORCE.CUSTOM.GROUPS.VARCHAR"/>
- </xts:function>
- </configurationVars>
- </xts:append>
- </xts:sequence>
- </xts:block>
- </xts:morphlet>
|