calcDateTimeUnits.xts 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. BI and PM: qs
  5. (C) Copyright IBM Corp. 2001, 2017
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!--
  9. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  10. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  11. -->
  12. <!--
  13. Used for year, month, week, day, hour, minute, second
  14. -->
  15. <xts:morphlet version="1.0" xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/QSRVUITextPL.xml,messages/portal.xml,messages/portalRL.xml" requiredCapability="canUseQueryStudio">
  16. <xts:block id="page" type="exec" mode="output" processor="XSLT" mimeType="text/html">
  17. <!-- get the debug logic sheet -->
  18. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  19. <!-- get the new theme stuff -->
  20. <!-- apply the following logicsheets in order -->
  21. <xts:logicsheet path="qs/logicsheets/calc_theme.xsl"/>
  22. <xts:logicsheet path="logicsheets/portal.xsl"/>
  23. <xts:logicsheet path="qs/logicsheets/dialogs.xsl"/>
  24. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  25. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  26. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  27. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  28. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  29. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  30. <!-- apply the form logic -->
  31. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  32. <xsl:stylesheet version="1.0"
  33. xmlns:clcdlg="test_calculationDlg"
  34. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  35. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  36. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  37. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  38. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  39. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  40. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  41. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  42. xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/"
  43. xmlns:qsdlg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/qs/dialog/"
  44. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  45. exclude-result-prefixes="clcdlg xsl xts lyt pf dp df cp cf dbg qsdlg xtsext">
  46. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  47. <!-- add any theme variables -->
  48. <df:variables/>
  49. <pf:variables/>
  50. <!-- start the output -->
  51. <xsl:template match="/root">
  52. <dp:page>
  53. <dp:script>
  54. <script type="text/javascript">
  55. <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/layout.js</xsl:attribute>
  56. <xsl:text/>//<xsl:text/>
  57. </script>
  58. <script type="text/javascript">
  59. <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/classes/CDialogManager.js</xsl:attribute>
  60. <xsl:text/>//<xsl:text/>
  61. </script>
  62. <script type="text/javascript">
  63. <xsl:attribute name="src"><xsl:value-of select="$webRoot"/>/qs/classes/CWindowManager.js</xsl:attribute>
  64. <xsl:text/>//<xsl:text/>
  65. </script>
  66. <script type="text/javascript">&lt;!--
  67. var goDialogManager = new CDialogManager();
  68. <clcdlg:jvs/>
  69. var cf = getConfigFrame();
  70. var calcType = cf.dlgGlobalGetParm('xxCalcType');
  71. var calcParentIds = new Array();
  72. function execute()
  73. {
  74. var before_col_id = cf.dlgGlobalGetParm('xxInsBeforeColid');
  75. var calcOp = document.f.calcList.options[document.f.calcList.selectedIndex].value; //year, month, week, day, hour, minute, second
  76. var calcExpr = "";
  77. var cType = -1;
  78. var cUsage = 2;
  79. var listSeparator = goDialogManager.getMiniQueryManager().getListSeparator();
  80. switch (calcOp)
  81. {
  82. case "year":
  83. calcExpr = "extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ")";
  84. break;
  85. case "month":
  86. /////////*** temporary ***//////////
  87. calcOp += "Year";
  88. calcExpr = "extract(month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ")";
  89. break;
  90. /////////*** temporary ***//////////
  91. switch (document.f.unitType.options[document.f.unitType.options.selectedIndex].value)
  92. {
  93. case "month":
  94. calcOp += "Year";
  95. calcExpr = "extract(month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ")";
  96. break;
  97. default:
  98. calcOp += "Name";
  99. calcExpr = "if (extract(month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") = 1) then ('Jan.') else if (extract(month from "
  100. + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") = 2) then ('Feb.') else if (extract(month from "
  101. + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") = 3) then ('Mar.') else if (extract(month from "
  102. + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") = 4) then ('Apr.') else if (extract(month from "
  103. + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") = 5) then ('May') else if (extract(month from "
  104. + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") = 6) then ('June') else if (extract(month from "
  105. + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") = 7) then ('July') else if (extract(month from "
  106. + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") = 8) then ('Aug.') else if (extract(month from "
  107. + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") = 9) then ('Sep.') else if (extract(month from "
  108. + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") = 10) then ('Oct.') else if (extract(month from "
  109. + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") = 11) then ('Nov.') else ('Dec.')";
  110. cType = 62;
  111. cUsage = 7;
  112. break;
  113. }
  114. break;
  115. case "week":
  116. calcExpr = "_week_of_year(" + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ")";
  117. break;
  118. case "day":
  119. switch (document.f.unitType.options[document.f.unitType.options.selectedIndex].value)
  120. {
  121. case "week":
  122. calcOp += "Week";
  123. calcExpr = "_day_of_week(" + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + listSeparator + " " + document.f.firstOfWeek.options[document.f.firstOfWeek.options.selectedIndex].value + ")";
  124. break;
  125. case "name":
  126. calcOp += "Name";
  127. calcExpr = "if (Mod(floor(extract(day from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") + (extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") - floor((14 - extract (month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12)) + ((extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") - floor((14 - extract (month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12))/4) - ((extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") - floor((14 - extract (month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12))/100) + ((extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") - floor((14 - extract (month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12))/400) +floor(31*(extract(month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value
  128. + ") + 12 * floor((14 - extract(month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12) - 2)/12)),7) = 0) then ('Sunday') else if (Mod(floor(extract(day from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") + (extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") - floor((14 - extract (month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12)) + ((extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") - floor((14 - extract (month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12))/4) - ((extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") - floor((14 - extract (month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12))/100) + ((extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") - floor((14 - extract (month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12))/400) +floor(31*(extract(month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") + 12 * floor((14 - extract(month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12) - 2)/12)),7) = 1) then ('Monday') else if (Mod(floor(extract(day from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") + (extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value
  129. + ") - floor((14 - extract (month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12)) + ((extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") - floor((14 - extract (month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12))/4) - ((extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") - floor((14 - extract (month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12))/100) + ((extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") - floor((14 - extract (month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12))/400) +floor(31*(extract(month from "
  130. + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") + 12 * floor((14 - extract(month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12) - 2)/12)),7) = 2) then ('Tuesday') else if (Mod(floor(extract(day from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") + (extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") - floor((14 - extract (month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12)) + ((extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") - floor((14 - extract (month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value
  131. + "))/12))/4) - ((extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") - floor((14 - extract (month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12))/100) + ((extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") - floor((14 - extract (month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12))/400) +floor(31*(extract(month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") + 12 * floor((14 - extract(month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12) - 2)/12)),7) = 3) then ('Wednesday') else if (Mod(floor(extract(day from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") + (extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") - floor((14 - extract (month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12)) + ((extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value
  132. + ") - floor((14 - extract (month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12))/4) - ((extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") - floor((14 - extract (month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12))/100) + ((extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") - floor((14 - extract (month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12))/400) +floor(31*(extract(month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") + 12 * floor((14 - extract(month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12) - 2)/12)),7) = 4) then ('Thursday') else if (Mod(floor(extract(day from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") + (extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") - floor((14 - extract (month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12)) + ((extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") - floor((14 - extract (month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12))/4) - ((extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") - floor((14 - extract (month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12))/100) + ((extract(year from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") - floor((14 - extract (month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value
  133. + "))/12))/400) +floor(31*(extract(month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ") + 12 * floor((14 - extract(month from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + "))/12) - 2)/12)),7) = 5) then ('Friday') else ('Saturday')";
  134. cType = 62;
  135. cUsage = 7;
  136. break;
  137. case "month":
  138. calcOp += "Month";
  139. calcExpr = "extract(day from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ")";
  140. break;
  141. case "year":
  142. calcOp += "Year";
  143. calcExpr = "_day_of_year(" + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ")";
  144. break;
  145. case "first":
  146. calcOp += "First";
  147. calcExpr = "_first_of_month(" + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ")";
  148. if (calcType == "date")
  149. cType = 50;
  150. else
  151. cType = 52;
  152. break;
  153. default:
  154. calcOp += "Last";
  155. calcExpr = "_last_of_month(" + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ")";
  156. if (calcType == "date")
  157. cType = 50;
  158. else
  159. cType = 52;
  160. break;
  161. }
  162. break;
  163. case "hour":
  164. calcExpr = "extract(hour from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ")";
  165. break;
  166. case "minute":
  167. calcExpr = "extract(minute from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ")";
  168. break;
  169. default:
  170. calcExpr = "extract(second from " + document.f.repSel.options[document.f.repSel.options.selectedIndex].value + ")";
  171. break;
  172. }
  173. if (calcType == "date")
  174. calcOp += "Date";
  175. else if (calcType == "time")
  176. calcOp += "Time";
  177. else
  178. calcOp += "DateTime";
  179. var calcName = getCalcName();
  180. getConfigFrame().addCalcColumn(before_col_id, calcExpr, calcExpr, calcName, "none", calcOp, "none", "none", cType, cUsage, "none", -1, "none", calcParentIds);
  181. }
  182. function generateName(withQuotes)
  183. {
  184. var calcName = document.f.calcList.options[document.f.calcList.selectedIndex].value; //year, month, week, day, hour, minute, second
  185. var column = document.f.repSel.options[document.f.repSel.options.selectedIndex].text;
  186. switch (calcName)
  187. {
  188. case "year":
  189. calcName = "<xts:string id="CALCULATION_YEAR_EQUATION" encode="javascript"/>";
  190. break;
  191. case "month":
  192. /////////*** temporary ***//////////
  193. calcName = "<xts:string id="CALCULATION_MONTH_EQUATION" encode="javascript"/>";
  194. break;
  195. /////////*** temporary ***//////////
  196. if (document.f.unitType)
  197. {
  198. switch (document.f.unitType.options[document.f.unitType.options.selectedIndex].value)
  199. {
  200. case "month":
  201. calcName = "<xts:string id="CALCULATION_MONTH_EQUATION" encode="javascript"/>";
  202. break;
  203. default:
  204. calcName = "<xts:string id="CALCULATION_NAME_OF_MONTH_EQUATION" encode="javascript"/>";
  205. break;
  206. }
  207. }
  208. else
  209. calcName = "";
  210. break;
  211. case "week":
  212. calcName = "<xts:string id="CALCULATION_WEEK_EQUATION" encode="javascript"/>";
  213. break;
  214. case "day":
  215. if (document.f.unitType)
  216. {
  217. switch (document.f.unitType.options[document.f.unitType.options.selectedIndex].value)
  218. {
  219. case "week":
  220. calcName = "<xts:string id="CALCULATION_DAY_OF_WEEK_EQUATION" encode="javascript"/>";
  221. break;
  222. case "name":
  223. calcName = "<xts:string id="CALCULATION_NAME_OF_DAY_WEEK_EQUATION" encode="javascript"/>";
  224. break;
  225. case "month":
  226. calcName = "<xts:string id="CALCULATION_DAY_OF_MONTH_EQUATION" encode="javascript"/>";
  227. break;
  228. case "year":
  229. calcName = "<xts:string id="CALCULATION_DAY_OF_YEAR_EQUATION" encode="javascript"/>";
  230. break;
  231. case "first":
  232. calcName = "<xts:string id="CALCULATION_FIRST_OF_MONTH_EQUATION" encode="javascript"/>";
  233. break;
  234. default:
  235. calcName = "<xts:string id="CALCULATION_LAST_OF_MONTH_EQUATION" encode="javascript"/>";
  236. break;
  237. }
  238. }
  239. else
  240. calcName = "";
  241. break;
  242. case "hour":
  243. calcName = "<xts:string id="CALCULATION_HOUR_EQUATION" encode="javascript"/>";
  244. break;
  245. case "minute":
  246. calcName = "<xts:string id="CALCULATION_MINUTE_EQUATION" encode="javascript"/>";
  247. break;
  248. default:
  249. calcName = "<xts:string id="CALCULATION_SECOND_EQUATION" encode="javascript"/>";
  250. break;
  251. }
  252. calcName = stringReplace (calcName, "\\^0", column);
  253. return calcName;
  254. }
  255. function checkWeek()
  256. {
  257. if ((document.f.unitType)&amp;&amp;(document.f.firstOfWeek)&amp;&amp;(document.f.unitType.options[document.f.unitType.options.selectedIndex].value == "week"))
  258. document.getElementById("dayNumberOfWeek").style.display = "inline";
  259. else if (document.f.firstOfWeek)
  260. document.getElementById("dayNumberOfWeek").style.display = "none";
  261. }
  262. function init()
  263. {
  264. attachMouseEvents();
  265. for (var i = 0; i &lt; cf.dlgGlobalSize('xxCalcParentIds'); i++)
  266. {
  267. var id = cf.dlgGlobalGetParmAt('xxCalcParentIds', i);
  268. calcParentIds[i] = id[0];
  269. }
  270. // populate selected columns menu
  271. for (var i = 0; i &lt; cf.dlgGlobalSize('xxColInfo'); i++)
  272. {
  273. var label = cf.dlgGlobalGetParmAt('xxColInfo', i);
  274. document.f.repSel.options[document.f.repSel.options.length] = new Option(label[0], label[1]);
  275. }
  276. var validCalcs = new Array();
  277. for (var i = 0; i &lt; cf.dlgGlobalSize('xxValidCalcItem'); i++)
  278. validCalcs[validCalcs.length] = cf.dlgGlobalGetParmAt('xxValidCalcItem', i);
  279. populateCalculationList(calcType, validCalcs);
  280. // select calculation
  281. document.f.calcList.selectedIndex = cf.dlgGlobalGetParm('xxCalcTypeIdx');
  282. getConfigFrame().cfgSet("CALCULATION_REFRESH", true);
  283. loadHint();
  284. setGlobals(calcType, false);
  285. addInsert();
  286. checkWeek();
  287. if (cf.dlgGlobalGetParm('xxDialogType') == 'CALCULATION_DAY')
  288. document.getElementById("displayCalcDay").style.display = "inline";
  289. // **** TEMPORARY ****
  290. //else if (cf.dlgGlobalGetParm('xxDialogType') == 'CALCULATION_MONTH')
  291. // document.getElementById("displayCalcMonth").style.display = "inline";
  292. }
  293. function redrawHint()
  294. {
  295. setTimeout(loadHint, 10);
  296. }
  297. //--&gt;</script>
  298. </dp:script>
  299. <form style="margin:0px" name="f" method="POST" onsubmit="execute();return false;">
  300. <table border="0" cellspacing="0" cellpadding="0" height="100%" width="100%">
  301. <tr>
  302. <td width="100%" height="0%">
  303. <!-- dialog header -->
  304. <clcdlg:basic_header/>
  305. </td>
  306. </tr>
  307. <tr>
  308. <td width="100%" height="100%" valign="top">
  309. <lyt:layout style="2" border="no">
  310. <lyt:section>
  311. <clcdlg:calculations/>
  312. <dp:input>
  313. <dp:section1>
  314. <xts:string id="CALCULATION_REP_ITEM"/>
  315. </dp:section1>
  316. <dp:section2>
  317. <select name="repSel" size="1" style="width:260" onChange="javascript:loadHint();"/>
  318. </dp:section2>
  319. </dp:input>
  320. <div id="displayCalcDay" style="display:none">
  321. <dp:input>
  322. <dp:section1>
  323. <xts:string id="CALCULATION_CREATE_DISPLAY"/>
  324. </dp:section1>
  325. <dp:section2>
  326. <select name="unitType" size="1" style="width:260" onChange="javascript:loadHint();checkWeek();">
  327. <!--
  328. /////////*** temporary ***//////////
  329. <option value="name"><xts:string id="CALCULATION_NAME_OF_DAY_OF_WEEK"/></option>
  330. /////////*** temporary ***//////////
  331. -->
  332. <option value="week">
  333. <xts:string id="CALCULATION_DAY_OF_WEEK"/>
  334. </option>
  335. <option value="month">
  336. <xts:string id="CALCULATION_DAY_OF_MONTH"/>
  337. </option>
  338. <option value="first">
  339. <xts:string id="CALCULATION_FIRST_OF_MONTH"/>
  340. </option>
  341. <option value="last">
  342. <xts:string id="CALCULATION_LAST_OF_MONTH"/>
  343. </option>
  344. <option value="year">
  345. <xts:string id="CALCULATION_DAY_OF_YEAR"/>
  346. </option>
  347. </select>
  348. </dp:section2>
  349. </dp:input>
  350. <div id="dayNumberOfWeek">
  351. <dp:input>
  352. <dp:section1>
  353. <xts:string id="CALCULATION_FIRST_DAY_OF_WEEK"/>
  354. </dp:section1>
  355. <dp:section2>
  356. <select name="firstOfWeek" size="1" style="width:260" onChange="javascript:loadHint();">
  357. <option value="7">
  358. <xts:string id="CALCULATION_SUNDAY"/>
  359. </option>
  360. <option value="1">
  361. <xts:string id="CALCULATION_MONDAY"/>
  362. </option>
  363. <option value="2">
  364. <xts:string id="CALCULATION_TUESDAY"/>
  365. </option>
  366. <option value="3">
  367. <xts:string id="CALCULATION_WEDNESDAY"/>
  368. </option>
  369. <option value="4">
  370. <xts:string id="CALCULATION_THURSDAY"/>
  371. </option>
  372. <option value="5">
  373. <xts:string id="CALCULATION_FRIDAY"/>
  374. </option>
  375. <option value="6">
  376. <xts:string id="CALCULATION_SATURDAY"/>
  377. </option>
  378. </select>
  379. </dp:section2>
  380. </dp:input>
  381. </div>
  382. </div>
  383. <!--
  384. /////////*** temporary ***//////////
  385. <div id="displayCalcMonth" style="display:none">
  386. <dp:input>
  387. <dp:section1><xts:string id="CALCULATION_CREATE_DISPLAY"/></dp:section1>
  388. <dp:section2>
  389. <select name="unitType" size="1" style="width:260" onChange="javascript:loadHint();">
  390. <option value="name"><xts:string id="CALCULATION_NAME_OF_MONTH_OF_YEAR"/></option>
  391. <option value="month"><xts:string id="CALCULATION_MONTH_OF_YEAR"/></option>
  392. </select>
  393. </dp:section2>
  394. </dp:input>
  395. </div>
  396. /////////*** temporary ***//////////
  397. -->
  398. </lyt:section>
  399. <lyt:section>
  400. <clcdlg:calc_hint/>
  401. </lyt:section>
  402. </lyt:layout>
  403. </td>
  404. </tr>
  405. <tr>
  406. <td width="100%" height="0%">
  407. <!-- Use default buttons [ OK = execute() and CANCEL = hideDialogFrame() ] -->
  408. <clcdlg:buttons/>
  409. </td>
  410. </tr>
  411. <!-- <dbg:dumpxml select="/"/> -->
  412. </table>
  413. </form>
  414. </dp:page>
  415. </xsl:template>
  416. </xsl:stylesheet>
  417. </xts:block>
  418. </xts:morphlet>