Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

555 lines
19 KiB

  1. function DoNothing()
  2. {
  3. // Stub
  4. }
  5. //******************************
  6. // BUILD TASKPAD BUTTON FUNCTION
  7. //******************************
  8. function BuildTaskpadButtons( iPageStyle )
  9. {
  10. var szNextButton;
  11. for( var i = 0; i <= giTotalButtons; i++ ) {
  12. szNextButton = GetNextButton( iPageStyle, i );
  13. divSymbolContainer.insertAdjacentHTML ( 'BeforeEnd', szNextButton );
  14. }
  15. }
  16. //**************************
  17. // GET NEXT BUTTON FUNCTIONS
  18. //**************************
  19. function GetNextButton( iPageStyle, theIndex )
  20. {
  21. // Calculate the column & row placement of the button
  22. // based on its index
  23. var theColumn = theIndex % giTotalColumns; // mod returns column
  24. var theRow = Math.floor( theIndex / giTotalColumns ); // division returns row
  25. // Multiply row & column by offset base to determine relative placement
  26. // of button in percentage terms.
  27. switch( iPageStyle )
  28. {
  29. case CON_TASKPAD_STYLE_VERTICAL1:
  30. // Vertical layout with 2 listviews
  31. var iLeftLoc = theColumn * 52; // columns are 52% apart in this layout
  32. var iTopLoc = theRow * 25; // rows are 25% apart in this layout
  33. break;
  34. case CON_TASKPAD_STYLE_HORIZONTAL1:
  35. // Horizontal layout with 1 listview
  36. var iLeftLoc = theColumn * 25; // columns are 25% apart in this layout
  37. var iTopLoc = theRow * 52; // rows are 52% apart in this layout
  38. break;
  39. case CON_TASKPAD_STYLE_NOLISTVIEW:
  40. // Buttons-only layout (no listview)
  41. var iLeftLoc = theColumn * 25; // columns are 25% apart in this layout
  42. var iTopLoc = theRow * 25; // rows are 25% apart in this layout
  43. break;
  44. }
  45. // Get the HTML for the button
  46. var szFormattedBtn;
  47. szFormattedBtn = GetButtonHTML(gaiBtnObjectType[theIndex], theIndex, iLeftLoc, iTopLoc)
  48. return szFormattedBtn;
  49. }
  50. //*************************
  51. // GET BUTTON HTML FUNCTION
  52. //*************************
  53. function GetButtonHTML(iBtnType, theIndex, iLeftLoc, iTopLoc)
  54. {
  55. // Build up the HTML for the button
  56. var szBtnHTML = '';
  57. switch( iBtnType )
  58. {
  59. case CON_TASK_DISPLAY_TYPE_SYMBOL: // EOT-based symbol | font
  60. szBtnHTML += '<DIV class=divSymbol id=divSymbol_' + theIndex + ' style=\"LEFT: ' + iLeftLoc + '%; TOP: ' + iTopLoc + '%\">\n';
  61. szBtnHTML += '<TABLE border=0 cellPadding=0 cellSpacing=0 frame=none rules=none width=100%>\n';
  62. szBtnHTML += '<TBODY>\n';
  63. szBtnHTML += '<TR>\n';
  64. szBtnHTML += '<TD align=middle class=tdSymbol id=tdSymbol_' + theIndex + ' noWrap vAlign=top>';
  65. szBtnHTML += '<SPAN class=clsSymbolBtn id=spanSymbol_' + theIndex + ' ';
  66. szBtnHTML += 'style=\"COLOR: windowtext; FONT-FAMILY: Webdings; FONT-SIZE: 68px; FONT-WEIGHT: normal\" TaskpadButton>';
  67. szBtnHTML += '<!--Insert Here--></SPAN></TD></TR>\n';
  68. szBtnHTML += '<TR>\n';
  69. szBtnHTML += '<TD align=middle class=tdSymbol id=tdSymbol_' + theIndex + ' vAlign=top width=100%>';
  70. szBtnHTML += '<A class=clsSymbolBtn href=\"\" id=anchorCaption_' + theIndex + ' ';
  71. szBtnHTML += 'style=\"COLOR: windowtext; FONT-SIZE: 18px; TEXT-DECORATION: none\" TaskpadButton>';
  72. szBtnHTML += '<!--Insert Here--></A></TD></TR></TBODY></TABLE></DIV><!--divSymbol_' + theIndex + '-->\n';
  73. break;
  74. case CON_TASK_DISPLAY_TYPE_VANILLA_GIF: // (GIF) index 0 is transparent
  75. case CON_TASK_DISPLAY_TYPE_CHOCOLATE_GIF: // (GIF) index 1 is transparent
  76. szBtnHTML += '<DIV class=divSymbol id=divSymbol_' + theIndex + ' style=\"LEFT: ' + iLeftLoc + '%; TOP: ' + iTopLoc + '%\">\n';
  77. szBtnHTML += '<TABLE border=0 cellPadding=0 cellSpacing=0 frame=none rules=none width=100%>\n';
  78. szBtnHTML += '<TBODY>\n';
  79. szBtnHTML += '<TR>\n';
  80. szBtnHTML += '<TD align=middle class=tdSymbol id=tdSymbol_' + theIndex + ' noWrap vAlign=top>';
  81. szBtnHTML += '<IMG class=clsTaskBtn height=250 id=imgTaskBtn_' + theIndex + ' src=\"\" ';
  82. szBtnHTML += 'style=\"FILTER: mask(color=000000); HEIGHT: 66px; WIDTH: 66px\" width=250 TaskpadButton></TD></TR>\n';
  83. szBtnHTML += '<TR>\n';
  84. szBtnHTML += '<TD align=middle class=tdSymbol id=tdAnchor_' + theIndex + ' vAlign=top width=100% TaskpadButton>';
  85. szBtnHTML += '<A class=clsSymbolBtn href=\"\" id=anchorCaption_' + theIndex + ' ';
  86. szBtnHTML += 'style=\"FONT-SIZE: 18px\" TaskpadButton>';
  87. szBtnHTML += '<!--Insert Here--></A></TD></TR></TBODY></TABLE></DIV><!--divSymbol_' + theIndex + '-->\n';
  88. break;
  89. case CON_TASK_DISPLAY_TYPE_BITMAP: // non-transparent raster image
  90. szBtnHTML += '<DIV class=divSymbol id=divSymbol_' + theIndex + ' style=\"LEFT: ' + iLeftLoc + '%; TOP: ' + iTopLoc + '%\">\n';
  91. szBtnHTML += '<TABLE border=0 cellPadding=0 cellSpacing=0 frame=none rules=none width=100%>\n';
  92. szBtnHTML += '<TBODY>\n';
  93. szBtnHTML += '<TR>\n';
  94. szBtnHTML += '<TD align=middle class=tdSymbol id=tdSymbol_' + theIndex + ' noWrap vAlign=top>';
  95. szBtnHTML += '<IMG class=clsTaskBtn height=250 id=imgTaskBtn_' + theIndex + ' src=\"\" ';
  96. szBtnHTML += 'style=\"HEIGHT: 66px; WIDTH: 66px\" width=250 TaskpadButton></TD></TR>\n';
  97. szBtnHTML += '<TR>\n';
  98. szBtnHTML += '<TD align=middle class=tdSymbol id=tdSymbol_' + theIndex + ' vAlign=top width=100%>';
  99. szBtnHTML += '<A class=clsSymbolBtn href=\"\" id=anchorCaption_' + theIndex + ' ';
  100. szBtnHTML += 'style=\"FONT-SIZE: 18px\" TaskpadButton>';
  101. szBtnHTML += '<!--Insert Here--></A></TD></TR></TBODY></TABLE></DIV><!--divSymbol_' + theIndex + '-->\n';
  102. break;
  103. }
  104. return szBtnHTML;
  105. }
  106. //********************************
  107. // COMMON BUTTON BUILDING FUNCTION
  108. //********************************
  109. function InsertButtonBitmaps()
  110. {
  111. for( var i = 0; i <= giTotalButtons; i++ ) {
  112. switch( gaiBtnObjectType[i] )
  113. {
  114. case CON_TASK_DISPLAY_TYPE_VANILLA_GIF: // (GIF) index 0 is transparent
  115. case CON_TASK_DISPLAY_TYPE_CHOCOLATE_GIF: // (GIF) index 1 is transparent
  116. case CON_TASK_DISPLAY_TYPE_BITMAP: // non-transparent raster image
  117. document.all('imgTaskBtn_' + i).src = gaszBtnOffBitmap[i];
  118. break;
  119. }
  120. }
  121. }
  122. function InsertFontFamilyAndString()
  123. {
  124. for( var i = 0; i <= giTotalButtons; i++ ) {
  125. if( typeof( gaszFontFamilyName[i] ) == 'string' ) {
  126. document.all('spanSymbol_' + i).style.fontFamily = gaszFontFamilyName[i];
  127. document.all('spanSymbol_' + i).innerText = gaszSymbolString[i];
  128. }
  129. }
  130. }
  131. function InsertCaptionText()
  132. {
  133. // Insert caption text for each taskpad button
  134. for( var i = 0; i <= giTotalButtons; i++ ) {
  135. document.all('anchorCaption_' + i).innerHTML = gaszBtnCaptions[i];
  136. }
  137. }
  138. function EnableGrayscaleFilter()
  139. {
  140. for( var i = 0; i <= giTotalButtons; i++ ) {
  141. // Grayscale filter only applies to raster-based images
  142. if( gaiBtnObjectType[i] == CON_TASK_DISPLAY_TYPE_BITMAP ) {
  143. // Grayscale filter only applies if gaszBtnOverBitmap[i] is undefined
  144. if ( typeof( gaszBtnOverBitmap[i] ) == 'undefined' ) {
  145. document.all( 'imgTaskBtn_' + i ).style.filter = 'gray';
  146. }
  147. }
  148. }
  149. }
  150. function InsertTaskpadText()
  151. {
  152. // Insert text for taskpad title, description, and watermark
  153. // Use insertAdjacentText('AfterBegin') for divTitle so that we
  154. // don't blow out the contained divAbout element
  155. divTitle.insertAdjacentText('AfterBegin', gszTaskpadTitle);
  156. // Use innerHTML for elements below to support formatting (e.g. <br>)
  157. divDescription.innerHTML = gszTaskpadDescription;
  158. // Use innerText for stand-alone elements
  159. // Watermark (e.g. Background) - uses inner HTML
  160. var objWatermark = MMCCtrl.GetBackground( szHash );
  161. if( objWatermark != null ) {
  162. // Keep track of the watermark display object type
  163. giWatermarkObjectType = objWatermark.DisplayObjectType;
  164. switch (giWatermarkObjectType) {
  165. default:
  166. alert ("skipping due to background.DisplayObjectType == " + background.DisplayObjectType);
  167. break; // skip
  168. case 1: // MMC_TASK_DISPLAY_TYPE_SYMBOL
  169. str = "";
  170. str += "<SPAN STYLE=\"position:absolute; top:20%; left:0; z-index:-20; font-family:";
  171. str += objWatermark.FontFamilyName;
  172. str += "; \">";
  173. str += objWatermark.SymbolString;
  174. str += "</SPAN>";
  175. tdWatermark.innerHTML = str;
  176. break;
  177. case 2: // MMC_TASK_DISPLAY_TYPE_VANILLA_GIF, // (GIF) index 0 is transparent
  178. tdWatermark.innerHTML = "<IMG SRC=\"" +
  179. objWatermark.MouseOffBitmap +
  180. "\" STYLE=\"position:absolute; filter:alpha(opacity=20); left:0%; top:75%; overflow:hidden;\">";
  181. break;
  182. case 3: // MMC_TASK_DISPLAY_TYPE_CHOCOLATE_GIF, // (GIF) index 1 is transparent
  183. tdWatermark.innerHTML = "<IMG SRC=\"" +
  184. objWatermark.MouseOffBitmap +
  185. "\" STYLE=\"position:absolute; filter:alpha(opacity=20); left:0%; top:75%; overflow:hidden;\">";
  186. break;
  187. case 4: // MMC_TASK_DISPLAY_TYPE_BITMAP // non-transparent raster
  188. tdWatermark.innerHTML = "<IMG SRC=\"" +
  189. objWatermark.MouseOffBitmap +
  190. "\" STYLE=\"position:absolute; filter:alpha(opacity=20); left:0%; top:75%; overflow:hidden;\">";
  191. break;
  192. }
  193. }
  194. }
  195. function SetupListview()
  196. {
  197. if( gbShowLVTitle == true ) {
  198. // if gbShowLVTitle is true, add strings to listview
  199. tdLVTitle.innerText = gszLVTitle;
  200. // Determine if author really wants to show the listview button
  201. if( gbHasLVButton == true ) {
  202. anchorLVButton_0.innerText = gszLVBtnCaption;
  203. }
  204. // If not, hide it
  205. else {
  206. divLVButton_0.style.visibility = 'hidden';
  207. }
  208. }
  209. else {
  210. // gbShowLVTitle is false, so nothing has been specified for a listview header or button;
  211. // hide these elements and let the listview occupy 100% of its parent's height
  212. divLVTitle.style.visibility= 'hidden';
  213. divLV.style.top = '0%';
  214. divLV.style.height = '100%';
  215. }
  216. }
  217. //***************************************
  218. // BUTTON HIGHLIGHT/UNHIGHLIGHT FUNCTIONS
  219. //***************************************
  220. function HighlightButton(szBtnIndex)
  221. {
  222. // Determine button type
  223. switch( gaiBtnObjectType[szBtnIndex] )
  224. {
  225. case 1: // Symbol
  226. document.all( 'spanSymbol_' + szBtnIndex ).style.color = 'highlight';
  227. break;
  228. case 2: // GIF Vanilla
  229. case 3: // GIF Chocolate
  230. document.all( 'imgTaskBtn_' + szBtnIndex ).filters.mask.color = SysColorX.RGBHighlight;
  231. break;
  232. case 4: // Raster
  233. if( typeof( gaszBtnOverBitmap[szBtnIndex] ) == 'string' ) {
  234. // Use SRC swapping if an "OverBitmap" is specified
  235. document.all( 'imgTaskBtn_' + szBtnIndex ).src = gaszBtnOverBitmap[szBtnIndex];
  236. }
  237. else {
  238. // Otherwise, toggle from grayscale to color for single bitmap
  239. document.all( 'imgTaskBtn_' + szBtnIndex ).filters[0].enabled = 0;
  240. }
  241. break;
  242. default:
  243. alert( 'Unrecognized image format for button index ' + szBtnIndex );
  244. break;
  245. }
  246. document.all( 'anchorCaption_' + szBtnIndex ).style.color = 'highlight';
  247. document.all( 'anchorCaption_' + szBtnIndex ).style.textDecoration = 'underline';
  248. // Keep track of tooltip index and display tooltip
  249. giTooltipIndex = szBtnIndex;
  250. // Show the tooltip after latency period specified by giTooltipLatency
  251. gTooltipTimer = window.setTimeout( 'TaskpadTooltipShow()', giTooltipLatency, 'jscript' );
  252. }
  253. function UnhighlightButton()
  254. {
  255. if( typeof( gszLastBtn ) != 'undefined' ) {
  256. // Determine button type
  257. switch( gaiBtnObjectType[gszLastBtn] )
  258. {
  259. case 1: // Symbol
  260. document.all( 'spanSymbol_' + gszLastBtn ).style.color = 'windowtext';
  261. break;
  262. case 2: // GIF Vanilla
  263. case 3: // GIF Chocolate
  264. document.all( 'imgTaskBtn_' + gszLastBtn ).filters.mask.color = SysColorX.RGBwindowtext;
  265. break;
  266. case 4: // Raster
  267. if( typeof( gaszBtnOverBitmap[gszLastBtn] ) == 'string' ) {
  268. // Use SRC swapping if an "OverBitmap" is specified
  269. document.all( 'imgTaskBtn_' + gszLastBtn ).src = gaszBtnOffBitmap[gszLastBtn];
  270. }
  271. else {
  272. // Otherwise, toggle from color to grayscale for single bitmap
  273. document.all( 'imgTaskBtn_' + gszLastBtn ).filters[0].enabled = 1;
  274. }
  275. break;
  276. default:
  277. alert( 'Unrecognized image format for index ' + gszLastBtn );
  278. break;
  279. }
  280. document.all( 'anchorCaption_' + gszLastBtn ).style.color = 'windowtext';
  281. document.all( 'anchorCaption_' + gszLastBtn ).style.textDecoration = 'none';
  282. TaskpadTooltipHide();
  283. }
  284. }
  285. function IsStillOverButton()
  286. {
  287. // Purpose: Determines if a mouseover or mouseout event
  288. // was fired over the same button (indicating that the pointer
  289. // is still over the button and that highlighting/unhighlighting
  290. // should be ignored.
  291. //
  292. // Returns true if and only if:
  293. // * both fromElement and toElement are not null;
  294. // * both elements contain a user-defined "TaskpadButton" attribute;
  295. // * both element IDs match.
  296. var fromX = window.event.fromElement;
  297. var toX = window.event.toElement;
  298. // Trap case where mouse pointer appeared over a button out of nowhere,
  299. // (e.g. as a result of switching focus from another app).
  300. if( (fromX != null) && (toX != null) ) {
  301. // return true if moving within elements of a single button
  302. if( (fromX.getAttribute('TaskpadButton') != null) == (toX.getAttribute('TaskpadButton') != null) ) {
  303. if( GetElementIndex(fromX.id) == GetElementIndex(toX.id) ) {
  304. return true;
  305. }
  306. }
  307. }
  308. return false;
  309. }
  310. //******************
  311. // TOOLTIP FUNCTIONS
  312. //******************
  313. function LoadTooltipPointer()
  314. {
  315. divTooltipPointer.innerText = L_gszTooltipPointer_StaticText;
  316. }
  317. function TaskpadTooltipShow()
  318. {
  319. // DEBUG NOTE: This function only works correctly for vertical layouts; I need to implement separate
  320. // functions for horizontal and link layouts.
  321. // Load in appropriate tooltip text from the module-level string array
  322. tdTooltip.innerHTML = gaszBtnTooltips[giTooltipIndex];
  323. //***************************
  324. // Calc Y (vertical) location
  325. //***************************
  326. var iYLoc = document.all('divSymbol_' + giTooltipIndex).offsetTop;
  327. iYLoc += divSymbolContainer.offsetTop;
  328. iYLoc -= tblTooltip.offsetHeight;
  329. // Subtract scrollTop to account for container div scrolling
  330. iYLoc -= divSymbolContainer.scrollTop;
  331. // RETROFIT HACK BELOW...
  332. switch( gaiBtnObjectType[giTooltipIndex] )
  333. {
  334. case 1: // Symbol
  335. // Offset the top by an additional fixed-constant size of the symbol fontSize
  336. iYLoc -= (GetPixelSize(document.all('spanSymbol_' + giTooltipIndex).style.fontSize) * L_ConstTooltipOffsetBottom_Number);
  337. break;
  338. case 2: // GIF Vanilla
  339. case 3: // GIF Chocolate
  340. case 4: // Raster
  341. iYLoc -= ((document.all('imgTaskBtn_' + giTooltipIndex).offsetHeight) * L_ConstTooltipOffsetBottom_Number);
  342. break;
  343. default:
  344. // Stub
  345. break;
  346. }
  347. // Position the tooltip vertically
  348. divTooltip.style.pixelTop = iYLoc;
  349. iYLoc += tblTooltip.offsetHeight - (GetPixelSize(divTooltipPointer.style.fontSize) / L_ConstTooltipPointerOffsetBottom_Number);
  350. // Position the tooltip pointer vertically
  351. divTooltipPointer.style.pixelTop = iYLoc;
  352. //*****************************
  353. // Calc X (horizontal) location
  354. //*****************************
  355. var iSymbolLeft = document.all('divSymbol_' + giTooltipIndex).offsetLeft;
  356. var iSymbolWidth = document.all('divSymbol_' + giTooltipIndex).offsetWidth;
  357. var iTooltipWidth = document.all('divTooltip').offsetWidth;
  358. // Center the tooltip horizontally w/ respect to its symbol
  359. var iXLoc;
  360. if( iSymbolWidth >= iTooltipWidth) {
  361. // Symbol is wider than tooltip
  362. iXLoc = ( (iSymbolWidth - iTooltipWidth) / 2) + iSymbolLeft;
  363. }
  364. else {
  365. // Tooltip is wider than symbol
  366. iXLoc = ( (iTooltipWidth - iSymbolWidth) / 2) + iSymbolLeft;
  367. }
  368. iXLoc += divSymbolContainer.style.pixelLeft;
  369. // Position the tooltip horizontally
  370. divTooltip.style.left = iXLoc;
  371. iXLoc += (iTooltipWidth / 2) - ( GetPixelSize(divTooltipPointer.style.fontSize) / 2 );
  372. // Position the tooltip pointer horizontally
  373. divTooltipPointer.style.pixelLeft = iXLoc;
  374. // Show the tooltip & pointer
  375. divTooltip.style.visibility = 'visible';
  376. divTooltipPointer.style.visibility = 'visible';
  377. }
  378. function TaskpadTooltipHide()
  379. {
  380. divTooltip.style.visibility = 'hidden';
  381. divTooltipPointer.style.visibility = 'hidden';
  382. window.clearTimeout(gTooltipTimer);
  383. //Empty the innerHTML, which causes the height to collapse
  384. tdTooltip.innerHTML = '';
  385. }
  386. //****************
  387. // RESIZE FUNCTION
  388. //****************
  389. function ResizeTaskpadElements( iTaskpadStyle )
  390. {
  391. var iSmallerDimension = GetSmallerDimension();
  392. // Title & description
  393. divTitle.style.fontSize = iSmallerDimension * L_ConstTitleText_Number;
  394. divDescription.style.fontSize = iSmallerDimension * L_ConstDescriptionText_Number;
  395. // Watermark
  396. // TODO: NEED TO IMPLEMENT FULL SUPPORT FOR WATERMARK IN ALL ITS FLAVORS
  397. switch( iTaskpadStyle )
  398. {
  399. case CON_TASKPAD_STYLE_VERTICAL1:
  400. tdWatermark.style.fontSize = iSmallerDimension * L_ConstWatermarkVerticalText_Number;
  401. break;
  402. case CON_TASKPAD_STYLE_HORIZONTAL1:
  403. tdWatermark.style.fontSize = iSmallerDimension * L_ConstWatermarkHorizontalText_Number;
  404. break;
  405. case CON_TASKPAD_STYLE_NOLISTVIEW:
  406. tdWatermark.style.fontSize = iSmallerDimension * L_ConstWatermarkNoListviewText_Number;
  407. break;
  408. }
  409. // Tooltips
  410. tblTooltip.style.fontSize = iSmallerDimension * L_ConstTooltipText_Number;
  411. divTooltipPointer.style.fontSize = iSmallerDimension * L_ConstTooltipPointerText_Number;
  412. // Listview elements
  413. if( iTaskpadStyle != CON_TASKPAD_STYLE_NOLISTVIEW ) {
  414. tdLVButton_0.style.fontSize = iSmallerDimension * L_ConstLVButtonText_Number;
  415. tdLVTitle.style.fontSize = iSmallerDimension * L_ConstLVTitleText_Number;
  416. }
  417. // Apply multipliers to symbol text
  418. for( var i = 0; i <= giTotalButtons; i++ ) {
  419. // All buttons have an anchor caption
  420. document.all( 'anchorCaption_' + i ).style.fontSize = iSmallerDimension * L_ConstSpanAnchorText_Number;
  421. // Determine button type (either symbol- or image-based)
  422. switch( gaiBtnObjectType[i] )
  423. {
  424. case 1: // Symbol
  425. document.all( 'spanSymbol_' + i ).style.fontSize = iSmallerDimension * L_ConstSpanSymbolSize_Number;
  426. break;
  427. case 2: // GIF Vanilla
  428. case 3: // GIF Chocolate
  429. case 4: // Raster
  430. document.all( 'imgTaskBtn_' + i ).style.width = iSmallerDimension * L_ConstTaskButtonBitmapSize_Number;
  431. document.all( 'imgTaskBtn_' + i ).style.height = iSmallerDimension * L_ConstTaskButtonBitmapSize_Number;
  432. break;
  433. default:
  434. alert( 'Unrecognized image format for index ' + i );
  435. }
  436. }
  437. }
  438. //******************
  439. // UTILITY FUNCTIONS
  440. //******************
  441. function SynchColorsToSystem( iType )
  442. {
  443. // Get derived colors
  444. document.body.style.backgroundColor = SysColorX.GetHalfLightHex( 'buttonface', 'CSS' );
  445. if( giTaskpadStyle != CON_TASKPAD_STYLE_NOLISTVIEW ) {
  446. divLVTitle.style.backgroundColor = SysColorX.GetQuarterLightHex( 'buttonshadow', 'CSS' );
  447. }
  448. // TODO: NEED TO IMPLEMENT FULL SUPPORT FOR WATERMARK IN ALL ITS FLAVORS
  449. tdWatermark.style.color = SysColorX.GetQuarterLightHex( 'buttonface', 'CSS' );
  450. divDescription.style.color = SysColorX.GetQuarterLightHex( 'graytext', 'CSS' );
  451. // Use CSS system constants for other colors
  452. divTitle.style.color = 'graytext';
  453. divTitle.style.borderColor = 'graytext';
  454. // Special case the taskpad type
  455. switch( iType )
  456. {
  457. case CON_TASKPAD_STYLE_VERTICAL1:
  458. case CON_TASKPAD_STYLE_HORIZONTAL1:
  459. divLVContainerTop.style.backgroundColor = 'window';
  460. break;
  461. case CON_TASKPAD_STYLE_NOLISTVIEW:
  462. // Stub
  463. break;
  464. }
  465. }