home *** CD-ROM | disk | FTP | other *** search
/ PC User 2002 August / Disc 1 / PCU0802CD1.iso / software / apps / files / dwmx.exe / Disk1 / data1.cab / Configuration_En / Commands / TemplateParams.js < prev    next >
Encoding:
JavaScript  |  2002-05-22  |  14.8 KB  |  541 lines

  1. //  Copyright 2001 Macromedia, Inc. All rights reserved.
  2.  
  3.  
  4.  
  5. //form fields:
  6.  
  7. //Background - multiple list listing background colors
  8.  
  9. //Text - multiple list listing text colors. Contents change when new Background item picked.
  10.  
  11.  
  12.  
  13. // ******************* GLOBALS **********************
  14.  
  15.  
  16.  
  17. var helpDoc = MM.HELP_templateProperties;
  18.  
  19.  
  20.  
  21. //This is the data passed into the dialog, and this is used to return data as well. If declared in C, this 
  22.  
  23. //object would look something like this: 
  24.  
  25. //struct { 
  26.  
  27. //        values;                         //Set of all the template parameters that can be changed 
  28.  
  29. //                                        //in this dialog. This is an object where the attributes
  30.  
  31. //                                        //are the names of the params, and the values 
  32.  
  33. //                                        //are the param values.
  34.  
  35. //        types;                            //The types for all the params in the dialog. This is an
  36.  
  37. //                                        //object, the attributes are the template attributes, and 
  38.  
  39. //                                        //the values are either "boolean", "number", "color" , "text", "URL"
  40.  
  41. //                                        // NOTE: 'CHOICES' IS NOT CURRENTLY SUPPORTED
  42.  
  43. //        passthrough;                    //object containing a boolean for each attribute, whether it is passthrough or not.
  44.  
  45. //        returnValue;                    //passed in as -1, set to 1 for success, 0 for cancel. 
  46.  
  47. //        };
  48.  
  49.  
  50.  
  51. var dialogData = null;
  52.  
  53. var isFake = false; //Used for debugging 
  54.  
  55.  
  56.  
  57. var PLATFORM = navigator.platform;
  58.  
  59.  
  60.  
  61. //I cache the DOM objects for the layers, so I don't have to search for them all the time. 
  62.  
  63. var boolControlLayer = null; 
  64.  
  65. var numberControlLayer = null; 
  66.  
  67. var colorControlLayer = null; 
  68.  
  69. var textControlLayer = null; 
  70.  
  71. var linkControlLayer = null; 
  72.  
  73. var noControlLayer = null; 
  74.  
  75. var passthroughSpan = null; 
  76.  
  77. var passthroughSpanHTML = null; 
  78.  
  79.  
  80.  
  81.  
  82.  
  83. var targetLayer = null; 
  84.  
  85.  
  86.  
  87. //This is the currently visible control layer. 
  88.  
  89. var curVisibleLayer = null;
  90.  
  91.  
  92.  
  93. var errorPending = false; 
  94.  
  95.  
  96.  
  97.  
  98.  
  99. // ******************* API **********************
  100.  
  101.  
  102.  
  103. //--------------------------------------------------------------------
  104.  
  105. // FUNCTION:
  106.  
  107. //   commandButtons
  108.  
  109. //
  110.  
  111. // DESCRIPTION:
  112.  
  113. //   The list of buttons to display on the right of the dialog,
  114.  
  115. //   along with the functions to call when they are pressed.
  116.  
  117. //
  118.  
  119. // ARGUMENTS:
  120.  
  121. //   none
  122.  
  123. //
  124.  
  125. // RETURNS:
  126.  
  127. //   javascript array
  128.  
  129. //--------------------------------------------------------------------
  130.  
  131.  
  132.  
  133. function commandButtons()
  134.  
  135. {
  136.  
  137.     return new Array(MM.BTN_OK,     "cmdOK();",
  138.  
  139.                    MM.BTN_Cancel, "cmdCancel()",
  140.  
  141.                    MM.BTN_Help,   "displayHelp();");
  142.  
  143. }
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151. function isDomRequired() {return true;} 
  152.  
  153.  
  154.  
  155. //Just grab the first argument and stuff it into a global. 
  156.  
  157. function receiveArguments()
  158.  
  159.     {        
  160.  
  161.     dialogData = dw.getDocumentDOM().getTemplateParameters();
  162.  
  163.     }
  164.  
  165.  
  166.  
  167.  
  168.  
  169. function canAcceptCommand()
  170.  
  171.     {    
  172.  
  173.     var curDOM = dw.getDocumentDOM(); 
  174.  
  175.     
  176.  
  177.     if (curDOM == null)
  178.  
  179.         return false; 
  180.  
  181.         
  182.  
  183.     return (curDOM.getAttachedTemplate().length > 0);
  184.  
  185.     } //canAcceptCommand
  186.  
  187.     
  188.  
  189. function cmdOK()
  190.  
  191.     {
  192.  
  193.     if (!isFake)
  194.  
  195.         {
  196.  
  197.         var curDOM = dw.getDocumentDOM();
  198.  
  199.         curDOM.disableLocking();
  200.  
  201.         if (!curDOM.setTemplateParameters(dialogData))
  202.  
  203.             return; 
  204.  
  205.         }
  206.  
  207.         
  208.  
  209.     if (errorPending)
  210.  
  211.         return; 
  212.  
  213.         
  214.  
  215.     dialogData.returnValue = 1; 
  216.  
  217.     window.close();
  218.  
  219.     } //cmdOK
  220.  
  221.  
  222.  
  223.  
  224.  
  225. function cmdCancel()
  226.  
  227.     {
  228.  
  229.       dialogData.returnValue = 0; 
  230.  
  231.       window.close();
  232.  
  233.     } //cmdCancel
  234.  
  235.  
  236.  
  237.     
  238.  
  239.  
  240.  
  241. //***************** LOCAL FUNCTIONS  ******************
  242.  
  243.     
  244.  
  245. function initializeUI()
  246.  
  247.     {
  248.  
  249.     errorPending = false; 
  250.  
  251.     if (dialogData == null)
  252.  
  253.         {
  254.  
  255.         window.close(); 
  256.  
  257.         //alert(MSG_CantRun); 
  258.  
  259.         return; 
  260.  
  261.         }
  262.  
  263.         
  264.  
  265.     //Find the layer objects. 
  266.  
  267.     boolControlLayer = findObject("booleanControls", null);     
  268.  
  269.     numberControlLayer = findObject("numberControls", null); 
  270.  
  271.     colorControlLayer = findObject("colorControls", null); 
  272.  
  273.     textControlLayer = findObject("textControls", null); 
  274.  
  275.     linkControlLayer = findObject("linkControls", null); 
  276.  
  277.     noControlLayer = findObject("noControls", null); 
  278.  
  279.  
  280.  
  281.     passthroughSpan = findObject("passthroughSpan", null); 
  282.  
  283.   
  284.  
  285.   // find the table
  286.  
  287.   var tableObj = findObject("mainTable");
  288.  
  289.   if (dw.isOSX()){
  290.  
  291.     tableObj.setAttribute("height","300");
  292.  
  293.   }
  294.  
  295.     
  296.  
  297.     if (passthroughSpanHTML == null) 
  298.  
  299.         passthroughSpanHTML = passthroughSpan.innerHTML; 
  300.  
  301.     
  302.  
  303.     targetLayer = findObject("visibleSpan", null);
  304.  
  305.     curVisibleLayer = noControlLayer; 
  306.  
  307.     
  308.  
  309.       SetupTree();
  310.  
  311.       SetupControls();
  312.  
  313.   window.resizeToContents(); 
  314.  
  315.       //FixControlLayers(null);
  316.  
  317.     } //initializeUI
  318.  
  319.  
  320.  
  321.  
  322.  
  323. function adjustButtons()
  324.  
  325. {
  326.  
  327.   var theStyle;
  328.  
  329.   if (PLATFORM=="Win32")
  330.  
  331.   {
  332.  
  333.     theStyle=document.okLayer.getAttribute("STYLE");
  334.  
  335.     theStyle=theStyle.replace(/left:\w*;/,LEFT_LAYER).replace(/top:\w*;/,TOP_LAYER);
  336.  
  337.     document.okLayer.setAttribute("STYLE", theStyle);
  338.  
  339.     theStyle=document.cancelLayer.getAttribute("STYLE");
  340.  
  341.     theStyle=theStyle.replace(/left:\w*;/,RIGHT_LAYER).replace(/top:\w*;/,TOP_LAYER);
  342.  
  343.     document.cancelLayer.setAttribute("STYLE", theStyle);
  344.  
  345.   }
  346.  
  347. }
  348.  
  349.  
  350.  
  351. //Add the 'categories' tag to the string stream
  352.  
  353. function AddCategoriesToTreeStream(theStream)
  354.  
  355.     {
  356.  
  357.     theStream.push("<mm:treecolumn name='", LABEL_NameCol, "' value='", LABEL_NameCol, "'  width='200'/>"); 
  358.  
  359.     theStream.push("<mm:treecolumn name='", LABEL_ValueCol, "' value='", LABEL_ValueCol, "' width='130'/>"); 
  360.  
  361.     } //AddCategoriesToTreeString
  362.  
  363.     
  364.  
  365.     
  366.  
  367. //Add the treenode for this category to the innerHTML string for the tree node
  368.  
  369. function OpenCatNode(labelString, theStream)
  370.  
  371.     {
  372.  
  373.     theStream.push("<mm:treenode selected value = '",labelString,"' id=-1 state='expanded'>");
  374.  
  375.     } //AddCatNodeToString
  376.  
  377.     
  378.  
  379. function CloseCatNode(theStream)
  380.  
  381.     {
  382.  
  383.     theStream.push("</mm:treenode>");
  384.  
  385.     }
  386.  
  387.  
  388.  
  389. function GetVisibleValueString(paramName)
  390.  
  391.     {
  392.  
  393.     if (dialogData == null)
  394.  
  395.         return "";
  396.  
  397.         
  398.  
  399.     if (dialogData.passthrough[paramName])
  400.  
  401.         return LABEL_Passthrough; 
  402.  
  403.         
  404.  
  405.     if (dialogData.types[paramName] == "boolean")
  406.  
  407.         {
  408.  
  409.         var paramValue = dialogData.values[paramName]; 
  410.  
  411.         return (paramValue == "true") ? LABEL_TRUE : LABEL_FALSE; 
  412.  
  413.         }
  414.  
  415.         
  416.  
  417.     return dialogData.values[paramName];
  418.  
  419.     } //GetVisibleValueString
  420.  
  421.     
  422.  
  423.     
  424.  
  425. //Add the string for a single node in the tree. Should look something like: 
  426.  
  427. //<mm:treenode  value = "Conditional 1|<Not Resolved>" paramName="some name" valueType="number" ></mm:treenode> 
  428.  
  429. function AddParamNode(paramName, theStream, selected)
  430.  
  431.     {    
  432.  
  433.     //var selectedString = selected ? "selected" : ""; 
  434.  
  435.     var selectedString = ""; 
  436.  
  437.     
  438.  
  439.     theStream.push("<mm:treenode  value = '", paramName,  "|", GetVisibleValueString(paramName),  
  440.  
  441.                       "' paramName='", paramName, "' valueType='", dialogData.types[paramName], "' ", selectedString , " ></mm:treenode>"); 
  442.  
  443.     } //AddParamNode
  444.  
  445.     
  446.  
  447.     
  448.  
  449. //Build and insert the inner HTML for the tree control
  450.  
  451. function SetupTree()
  452.  
  453.     {    
  454.  
  455.     var theStream = new Array();
  456.  
  457.     theStream.push("");
  458.  
  459.      
  460.  
  461.     AddCategoriesToTreeStream(theStream);
  462.  
  463.     
  464.  
  465.     var i; 
  466.  
  467.     var count = 0; 
  468.  
  469.     
  470.  
  471.     //Sort the list of params alphabetically. 
  472.  
  473.     var paramNames = new Array(); 
  474.  
  475.     for (i in dialogData.values)
  476.  
  477.         paramNames.push(i); 
  478.  
  479.     paramNames.sort();
  480.  
  481.     
  482.  
  483.     //Add them to the tree
  484.  
  485.     for (i=0; i<paramNames.length; i++)
  486.  
  487.         {
  488.  
  489.         AddParamNode(paramNames[i], theStream, count==0);    
  490.  
  491.         count++;
  492.  
  493.         }
  494.  
  495.     
  496.  
  497.     if (count == 0)
  498.  
  499.         theStream.push("<mm:treenode  value = '" + LABEL_NoParams + " | '     paramName='bar' valueType='none' ></mm:treenode>");
  500.  
  501.             
  502.  
  503.     //var theTree = findObject("theTreeControl", null); 
  504.  
  505.     var theTree = dwscripts.findDOMObject("theTreeControl", null); 
  506.  
  507.     theTree.innerHTML = theStream.join(""); 
  508.  
  509.     } //SetupTree
  510.  
  511.     
  512.  
  513.  
  514.  
  515.     
  516.  
  517. //Everything is off unless on
  518.  
  519. function FixControlLayers(selectedTreeNode)
  520.  
  521.     {        
  522.  
  523.     if (selectedTreeNode == null || selectedTreeNode.valueType == 'none')
  524.  
  525.         {                    
  526.  
  527.         targetLayer.innerHTML = noControlLayer.innerHTML; 
  528.  
  529.         curVisibleLayer = noControlLayer;     
  530.  
  531.         passthroughSpan.innerHTML = ""; 
  532.  
  533.         return;     
  534.  
  535.         }
  536.  
  537.     
  538.  
  539.     passthroughSpan.innerHTML = passthroughSpanHTML;
  540.  
  541.     if (dialogData.passthrough[selectedTreeNode.paramName])
  542.  
  543.         {
  544.  
  545.         targetLayer.innerHTML = LABEL_Passthrough; 
  546.  
  547.         document.theForm.passthroughCheck.checked = true; 
  548.  
  549.         curVisibleLayer = noControlLayer;
  550.  
  551.         return;      
  552.  
  553.         }
  554.  
  555.         
  556.  
  557.     var newActiveLayer = noControlLayer; 
  558.  
  559.     document.theForm.passthroughCheck.checked = false; 
  560.  
  561.  
  562.  
  563.     switch (selectedTreeNode.valueType)
  564.  
  565.         {
  566.  
  567.         case "boolean":
  568.  
  569.             newActiveLayer = boolControlLayer;  break;
  570.  
  571.         case "number":
  572.  
  573.             newActiveLayer = numberControlLayer;  break;
  574.  
  575.         case "color":
  576.  
  577.             newActiveLayer = colorControlLayer; break;
  578.  
  579.         case "text":
  580.  
  581.             newActiveLayer = textControlLayer;  break;
  582.  
  583.         case "link":
  584.  
  585.         case "URL":
  586.  
  587.             newActiveLayer = linkControlLayer; break;
  588.  
  589.         }
  590.  
  591.         
  592.  
  593.     if (curVisibleLayer != newActiveLayer)
  594.  
  595.         {
  596.  
  597.         targetLayer.innerHTML = newActiveLayer.innerHTML; 
  598.  
  599.         curVisibleLayer = newActiveLayer; 
  600.  
  601.         }        
  602.  
  603.     
  604.  
  605.     //Customize the string for the selected value
  606.  
  607.     var showString = selectedTreeNode.paramName; 
  608.  
  609.     if (selectedTreeNode.valueType == "boolean")
  610.  
  611.         showString = errMsg(LABEL_Show, selectedTreeNode.paramName);
  612.  
  613.         
  614.  
  615.     var labelSpan = findObject("propLabel", null); 
  616.  
  617.     if (labelSpan != null)
  618.  
  619.         labelSpan.innerHTML = showString; 
  620.  
  621. } //FixControlLayers
  622.  
  623.         
  624.  
  625.  
  626.  
  627. //Move the values currently stored in this parameter into the controls for it's type. 
  628.  
  629. function MoveValuesToControl(selectedNode)
  630.  
  631.     {
  632.  
  633.     if (selectedNode == null || selectedNode.valueType == 'none')
  634.  
  635.         return; 
  636.  
  637.     
  638.  
  639.     var attrName = selectedNode.paramName; 
  640.  
  641.     if (dialogData.passthrough[attrName])
  642.  
  643.         return; //No controls in this case 
  644.  
  645.         
  646.  
  647.     var controlName = ""; 
  648.  
  649.     var controlObj = null;
  650.  
  651.     switch (selectedNode.valueType)
  652.  
  653.         {
  654.  
  655.         case "boolean": controlName = "booleanCheck";     break;
  656.  
  657.         case "number":     controlName = "numberField";     break; 
  658.  
  659.         case "color":     controlName = "colorField";      break;
  660.  
  661.         case "text":     controlName = "textField";          break;    
  662.  
  663.         
  664.  
  665.         case "link":     
  666.  
  667.         case "URL":     
  668.  
  669.             controlName = "linkField";      break;
  670.  
  671.         }
  672.  
  673.     
  674.  
  675.     if (controlName == "")
  676.  
  677.         return; 
  678.  
  679.         
  680.  
  681.     //Select the control...
  682.  
  683.     var controlObj = findObject(controlName, null); 
  684.  
  685.     
  686.  
  687.     if (controlObj != null)
  688.  
  689.         {
  690.  
  691.         
  692.  
  693.         //If this is a text control, move the focus into it. 
  694.  
  695.         if (controlName == "booleanCheck")    
  696.  
  697.             controlObj.checked = (dialogData.values[attrName] == "true");
  698.  
  699.         else
  700.  
  701.             {
  702.  
  703.             controlObj.value = dialogData.values[attrName];
  704.  
  705.             if (typeof controlObj["focus"] != "undefined")
  706.  
  707.                   controlObj.focus(); //set focus on textbox
  708.  
  709.                   
  710.  
  711.             if (typeof controlObj["select"] != "undefined")
  712.  
  713.                   controlObj.select(); //set insertion point into textbox
  714.  
  715.             }
  716.  
  717.             
  718.  
  719.         if (selectedNode.valueType == "color")
  720.  
  721.             {
  722.  
  723.             controlObj = findObject("colorPicker", null); 
  724.  
  725.             if (controlObj != null)
  726.  
  727.                 controlObj.value = dialogData.values[attrName];
  728.  
  729.             }
  730.  
  731.         }
  732.  
  733.  
  734.  
  735.     } //MoveValuesToControl
  736.  
  737.     
  738.  
  739.         
  740.  
  741.     
  742.  
  743. // changes the 'resolve' popup to show the possibilities for the current node
  744.  
  745. function SetupControls()
  746.  
  747.     {
  748.  
  749.     var theTree = findObject("theTreeControl", null); 
  750.  
  751.     
  752.  
  753.     var selectedTreeNode = theTree.selectedNodes[0];    
  754.  
  755.     FixControlLayers(selectedTreeNode);
  756.  
  757.     MoveValuesToControl(selectedTreeNode);
  758.  
  759.     
  760.  
  761.     if (selectedTreeNode)
  762.  
  763.         selectedTreeNode.selected = true; //some bug in the tree control...
  764.  
  765.     } //SetupControls
  766.  
  767.  
  768.  
  769.  
  770.  
  771. //Once the user picks an entry from the list, store it back in the dialogData object
  772.  
  773. function StoreNodeValue()
  774.  
  775.     {
  776.  
  777.     var selectedNode = findObject("theTreeControl", null).selectedNodes[0];
  778.  
  779.     if (selectedNode == null)
  780.  
  781.         return false; 
  782.  
  783.         
  784.  
  785.     var controlObj = null; 
  786.  
  787.     var attrName = selectedNode.paramName; 
  788.  
  789.     
  790.  
  791.     switch (selectedNode.valueType)
  792.  
  793.         {
  794.  
  795.         case "boolean":
  796.  
  797.             {
  798.  
  799.             controlObj = findObject("booleanCheck", null);         
  800.  
  801.             var isChecked = false; 
  802.  
  803.             if (typeof    controlObj.checked == "string")
  804.  
  805.                 isChecked = (controlObj.checked == "true"); 
  806.  
  807.             else
  808.  
  809.                 isChecked = controlObj.checked; 
  810.  
  811.                 
  812.  
  813.             if (controlObj != null)
  814.  
  815.                 dialogData.values[attrName] = isChecked ? "true" :  "false";
  816.  
  817.             break;
  818.  
  819.             }
  820.  
  821.             
  822.  
  823.         case "number":
  824.  
  825.             {
  826.  
  827.             controlObj = findObject("numberField", null); 
  828.  
  829.             if (controlObj != null)
  830.  
  831.                 {
  832.  
  833.                 var controlValue = controlObj.value; 
  834.  
  835.                 if (isNaN(controlValue))
  836.  
  837.                     {
  838.  
  839.                     if (errorPending)
  840.  
  841.                         return false;  
  842.  
  843.  
  844.  
  845.                     alert(MSG_isNAN);
  846.  
  847.                     errorPending = true; 
  848.  
  849.  
  850.  
  851.                     return false; 
  852.  
  853.                     }
  854.  
  855.                 dialogData.values[attrName] = controlObj.value;
  856.  
  857.                 }
  858.  
  859.                 
  860.  
  861.             break;
  862.  
  863.             }
  864.  
  865.  
  866.  
  867.         case "color":
  868.  
  869.             {
  870.  
  871.             controlObj = findObject("colorField", null); 
  872.  
  873.             if (controlObj != null)
  874.  
  875.                 dialogData.values[attrName] = controlObj.value;
  876.  
  877.             break;
  878.  
  879.             }
  880.  
  881.             
  882.  
  883.         case "text":
  884.  
  885.             {
  886.  
  887.             controlObj = findObject("textField", null); 
  888.  
  889.             if (controlObj != null)
  890.  
  891.                 dialogData.values[attrName] = controlObj.value;
  892.  
  893.             break;
  894.  
  895.             }
  896.  
  897.             
  898.  
  899.         case "URL":
  900.  
  901.         case "link":
  902.  
  903.             {
  904.  
  905.             controlObj = findObject("linkField", null); 
  906.  
  907.             if (controlObj != null)
  908.  
  909.                 dialogData.values[attrName] = controlObj.value;
  910.  
  911.             break;
  912.  
  913.             }
  914.  
  915.         }
  916.  
  917.         
  918.  
  919.     errorPending = false;     
  920.  
  921.     dialogData.passthrough[attrName] = document.theForm.passthroughCheck.checked;
  922.  
  923.     
  924.  
  925.     var newNodeString = attrName + "|" + GetVisibleValueString(attrName); 
  926.  
  927.     selectedNode.value = newNodeString; 
  928.  
  929.     return true; 
  930.  
  931.     } //StoreNodeValue
  932.  
  933.     
  934.  
  935.     
  936.  
  937.     
  938.  
  939. //Called when one of the controls changes, this either resets the popup menu to reflect the current 
  940.  
  941. //selected node, or stores the resolution in the tree and data store
  942.  
  943. function updateUI(itemName)
  944.  
  945.     {
  946.  
  947.       switch(itemName)
  948.  
  949.           {
  950.  
  951.           case "theTreeControl":
  952.  
  953.               {
  954.  
  955.             SetupControls();
  956.  
  957.  
  958.  
  959.             break;
  960.  
  961.               }
  962.  
  963.               
  964.  
  965.         case "colorField": 
  966.  
  967.           case "colorPicker":
  968.  
  969.               {              
  970.  
  971.               //If the user types into the color field, move the data into the colorPicker field, 
  972.  
  973.               //and then store the value. 
  974.  
  975.             var fieldObj = findObject("colorField", null); 
  976.  
  977.             var pickerObj = findObject("colorPicker", null); 
  978.  
  979.             
  980.  
  981.             if (fieldObj != null && pickerObj != null)
  982.  
  983.                 {
  984.  
  985.                 if (itemName == "colorField")
  986.  
  987.                     pickerObj.value = fieldObj.value; 
  988.  
  989.                 else
  990.  
  991.                     {
  992.  
  993.                     //alert("setting field to " + pickerObj.value);
  994.  
  995.                     fieldObj.value = pickerObj.value; 
  996.  
  997.                     }
  998.  
  999.                 }
  1000.  
  1001.                 
  1002.  
  1003.             StoreNodeValue();
  1004.  
  1005.             break; 
  1006.  
  1007.               }
  1008.  
  1009.           
  1010.  
  1011.           case "boolCheck":
  1012.  
  1013.           case "textField":
  1014.  
  1015.           case "linkField": 
  1016.  
  1017.           case "numberField": 
  1018.  
  1019.               {
  1020.  
  1021.               StoreNodeValue();
  1022.  
  1023.             break;
  1024.  
  1025.               }
  1026.  
  1027.         
  1028.  
  1029.         case "passthroughCheck": 
  1030.  
  1031.             {
  1032.  
  1033.             var selectedNode = findObject("theTreeControl", null).selectedNodes[0];
  1034.  
  1035.             if (selectedNode == null)
  1036.  
  1037.                 return; 
  1038.  
  1039.                                 
  1040.  
  1041.             var attrName = selectedNode.paramName; 
  1042.  
  1043.             var isPassthrough = document.theForm.passthroughCheck.checked; 
  1044.  
  1045.             dialogData.passthrough[attrName] = isPassthrough;
  1046.  
  1047.             
  1048.  
  1049.             var newNodeString = attrName + "|" + GetVisibleValueString(attrName); 
  1050.  
  1051.             selectedNode.value = newNodeString; 
  1052.  
  1053.  
  1054.  
  1055.             FixControlLayers(selectedNode);
  1056.  
  1057.                         
  1058.  
  1059.             //Pull the old values out.
  1060.  
  1061.             if (!isPassthrough)
  1062.  
  1063.                 MoveValuesToControl(selectedNode);
  1064.  
  1065.  
  1066.  
  1067.             break; 
  1068.  
  1069.             }
  1070.  
  1071.                 
  1072.  
  1073.           } //switch
  1074.  
  1075.     } //updateUI
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.