BVB Source Codes

Pcook CMS bubble guest v3.0 SDCMS version Show table_editCell.htm Source code

Return Download Pcook CMS bubble guest v3.0 SDCMS version: download table_editCell.htm Source code - Download Pcook CMS bubble guest v3.0 SDCMS version Source code - Type:.htm
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  4. <link href="../style/editor.css" rel="stylesheet" type="text/css">
  5. <script>
  6.   var sLangDir=window.opener.oUtil.langDir;
  7.   document.write("<scr"+"ipt src='../language/"+sLangDir+"/table_editCell.js'></scr"+"ipt>");
  8. </script>
  9. <script language="JavaScript" src="color_picker.js"></script>
  10. <script>writeTitle()</script>
  11. <script language="JavaScript" src="table.js"></script>
  12. <script>
  13. var dialogArgument=['window.opener', 'window.opener'];
  14. var activeModalWin;
  15.  
  16. document.onclick=hideAll;
  17.  
  18. function hideAll()
  19.     {
  20.     oColor1.hide();
  21.     }
  22.    
  23. function modelessDialogShow(url,width,height)
  24.     {
  25.     var left = screen.availWidth/2 - width/2;
  26.     var top = screen.availHeight/2 - height/2;
  27.     window.open(url, "", "dependent=yes,width="+width+"px,height="+height+",left="+left+",top="+top);
  28.     }
  29.    
  30. function modalDialogShow(url,width,height)
  31.     {
  32.     var left = screen.availWidth/2 - width/2;
  33.     var top = screen.availHeight/2 - height/2;
  34.     activeModalWin = window.open(url, "", "width="+width+"px,height="+height+",left="+left+",top="+top);
  35.     window.onfocus = function(){if (activeModalWin.closed == false){activeModalWin.focus();};};
  36.        
  37.     }
  38.    
  39. function tabClick(n)
  40.     {    
  41.     var tab1 = document.getElementById("tab1");
  42.     var tab2 = document.getElementById("tab2");
  43.     var tab3 = document.getElementById("tab3");
  44.     var divAutoFit = document.getElementById("divAutoFit");
  45.     var divProperties = document.getElementById("divProperties");
  46.     var divStyle = document.getElementById("divStyle");
  47.    
  48.     tab1.removeAttribute("style");
  49.     tab2.removeAttribute("style");
  50.     tab3.removeAttribute("style");
  51.    
  52.     tab1.style.cursor  = "pointer";
  53.     tab1.style.padding = "6px";
  54.     tab2.style.cursor  = "pointer";
  55.     tab2.style.padding = "6px";
  56.     tab3.style.cursor  = "pointer";
  57.     tab3.style.padding = "6px";
  58.     switch(n)
  59.         {
  60.         case 1:        
  61.             tab1.style.border="#D6D6E2 2px solid";
  62.             tab1.style.borderBottom="none";
  63.             tab1.style.background="#F2F1F8";
  64.             tab1.style.cursor="";
  65.            
  66.             tab2.style.border="#D6D6E2 2px solid";
  67.             tab2.style.borderLeft="none";
  68.             tab2.style.background="#E9E8F2";
  69.             tab2.style.cursor="pointer";
  70.            
  71.             tab3.style.border="#D6D6E2 2px solid";
  72.             tab3.style.borderLeft="none";
  73.             tab3.style.background="#E9E8F2";
  74.             tab3.style.cursor="pointer";              
  75.            
  76.            
  77.             divAutoFit.style.display="block"
  78.             divProperties.style.display="none"
  79.             divStyle.style.display="none"  
  80.                        
  81.             break;
  82.         case 2:
  83.             tab1.style.border="#D6D6E2 2px solid";
  84.             tab1.style.borderRight="none";
  85.             tab1.style.background="#E9E8F2";
  86.             tab1.style.cursor="pointer";
  87.            
  88.             tab2.style.border="#D6D6E2 2px solid";
  89.             tab2.style.borderBottom="none";
  90.             tab2.style.background="#F2F1F8";
  91.             tab2.style.cursor="";  
  92.            
  93.             tab3.style.border="#D6D6E2 2px solid";
  94.             tab3.style.borderLeft="none";
  95.             tab3.style.background="#E9E8F2";
  96.             tab3.style.cursor="pointer";                  
  97.            
  98.             divAutoFit.style.display="none"
  99.             divProperties.style.display="block"
  100.             divStyle.style.display="none"              
  101.                    
  102.             break;
  103.         case 3:        
  104.             tab1.style.border="#D6D6E2 2px solid";
  105.             tab1.style.borderRight="none";
  106.             tab1.style.background="#E9E8F2";
  107.             tab1.style.cursor="pointer";
  108.            
  109.             tab2.style.border="#D6D6E2 2px solid";
  110.             tab2.style.borderRight="none";
  111.             tab2.style.background="#E9E8F2";
  112.             tab2.style.cursor="pointer";
  113.            
  114.             tab3.style.border="#D6D6E2 2px solid";
  115.             tab3.style.borderBottom="none";
  116.             tab3.style.background="#F2F1F8";
  117.             tab3.style.cursor="";              
  118.  
  119.             divAutoFit.style.display="none"
  120.             divProperties.style.display="none"
  121.             divStyle.style.display="block"
  122.                                    
  123.             break;              
  124.         }
  125.     }  
  126.  
  127. /************************
  128.     COMMON
  129. ************************/
  130.  
  131. function GetElement(oElement,sMatchTag)
  132.     {
  133.     while (oElement!=null&&oElement.tagName!=sMatchTag)
  134.        {
  135.        if(oElement.tagName=="BODY")return null;
  136.         oElement=oElement.parentNode;
  137.         }
  138.     return oElement;
  139.     }
  140.    
  141. function doWindowFocus()
  142.     {
  143.     window.opener.oUtil.onSelectionChanged=new Function("realTime()");
  144.     }
  145.    
  146. function bodyOnLoad()
  147.     {  
  148.     tabClick(1);
  149.     window.onfocus=doWindowFocus;  
  150.     window.opener.oUtil.onSelectionChanged=new Function("realTime()");
  151.    
  152.     realTime();
  153.     }
  154.    
  155. function realTime()
  156.     {
  157.     var oEditor=window.opener.oUtil.oEditor;
  158.     var oSel=oEditor.getSelection();
  159.    
  160.     var oTable = window.opener.getSelectedElement(oSel);
  161.     var oTD = GetElement(oTable,"TD")
  162.     if (oTD == null) return;
  163.     oTable = GetElement(oTable,"TABLE")
  164.     if (oTable == null) return;    
  165.    
  166.     var divPreview = document.getElementById("divPreview");
  167.     var inpWidth = document.getElementById("inpWidth");
  168.     var inpHeight = document.getElementById("inpHeight");
  169.    
  170.     var inpAutoFit1 = document.getElementsByName("inpAutoFit1");
  171.     var inpAutoFit2 = document.getElementsByName("inpAutoFit2");
  172.  
  173.     var inpAutoFitMeasure1 = document.getElementById("inpAutoFitMeasure1");
  174.     var inpAutoFitMeasure2 = document.getElementById("inpAutoFitMeasure2");
  175.    
  176.     var inpCSSText = document.getElementById("inpCSSText");
  177.     var inpAlign = document.getElementById("inpAlign");
  178.     var inpVAlign = document.getElementById("inpVAlign");
  179.     var inpWhtSpace = document.getElementById("inpWhtSpace");
  180.     var inpBackgroundColor = document.getElementById("inpBackgroundColor");
  181.     var inpPaddingLeft = document.getElementById("inpPaddingLeft");
  182.     var inpPaddingTop = document.getElementById("inpPaddingTop");
  183.     var inpPaddingRight = document.getElementById("inpPaddingRight");
  184.     var inpPaddingBottom = document.getElementById("inpPaddingBottom");
  185.    
  186.     divPreview.style.cssText=oTD.style.cssText; //PREVIEW
  187.  
  188.     //AUTOFIT
  189.     inpWidth.value=="";//reset
  190.     if(oTD.style.width == "")inpAutoFit1[0].checked=true;
  191.     else
  192.         {
  193.         if(oTD.style.width.substr(oTD.style.width.length-2,2)=="px")
  194.             {
  195.             inpAutoFit1[1].checked=true;            
  196.             inpAutoFitMeasure1.value = "px";
  197.             inpWidth.value = oTD.style.width.substr(0,oTD.style.width.length-2);
  198.             }      
  199.         if(oTD.style.width.substr(oTD.style.width.length-1,1)=="%")
  200.             {
  201.             inpAutoFit1[1].checked=true;
  202.             inpAutoFitMeasure1.value = "%";
  203.             inpWidth.value = oTD.style.width.substr(0,oTD.style.width.length-1)
  204.             }
  205.         }
  206.    
  207.     inpHeight.value=="";//reset
  208.     if(oTD.style.height == "")inpAutoFit2[0].checked=true;
  209.     else
  210.         {
  211.         if(oTD.style.height.substr(oTD.style.height.length-2,2)=="px")
  212.             {
  213.             inpAutoFit2[1].checked=true;            
  214.             inpAutoFitMeasure2.value = "px";
  215.             inpHeight.value = oTD.style.height.substr(0,oTD.style.height.length-2);
  216.             }      
  217.         if(oTD.style.height.substr(oTD.style.height.length-1,1)=="%")
  218.             {
  219.             inpAutoFit2[1].checked=true;
  220.             inpAutoFitMeasure2.value = "%";
  221.             inpHeight.value = oTD.style.height.substr(0,oTD.style.height.length-1)
  222.             }
  223.         }  
  224.        
  225.     //STYLE
  226.     inpCSSText.value = oTD.style.cssText
  227.    
  228.     //PROPERTIES
  229.     /**** Align ****/   //=>OK
  230.     if(oTD.style.textAlign=="")
  231.         {
  232.         if(oTD.align!="")
  233.             {
  234.             inpAlign.value=oTD.align;
  235.             divPreview.style.textAlign=oTD.align; //PREVIEW (not standard)
  236.             }
  237.         else
  238.             {//Not Set
  239.             inpAlign.value="";
  240.             }
  241.         }
  242.     else
  243.         {
  244.         inpAlign.value=oTD.style.textAlign;
  245.         }
  246.    
  247.     /**** Vertical Align ****/   //=>OK
  248.     if(oTD.style.verticalAlign=="")
  249.         {
  250.         if(oTD.vAlign!="")
  251.             {
  252.             inpVAlign.value=oTD.vAlign;
  253.             divPreview.style.verticalAlign=oTD.vAlign; //PREVIEW (not standard)
  254.             }
  255.         else
  256.             {//Not Set
  257.             inpVAlign.value = "";
  258.             }
  259.         }
  260.     else
  261.         {
  262.         inpVAlign.value=oTD.style.verticalAlign;
  263.         }  
  264.  
  265.     /**** No Wrap (White Space) ****/   //=>OK
  266.     if(oTD.style.whiteSpace=="")
  267.         {
  268.         if(oTD.noWrap)
  269.             {
  270.             inpWhtSpace.value="nowrap";
  271.             divPreview.style.whiteSpace="nowrap"; //PREVIEW (not standard)
  272.             }
  273.         else
  274.             {
  275.             inpWhtSpace.value="";
  276.             }
  277.         }
  278.     else
  279.         {
  280.         inpWhtSpace.value=oTD.style.whiteSpace;
  281.         }
  282.  
  283.     /**** background ****/   //=>OK (harus lebih dulu dari background color)
  284.     if(oTD.style.background=="")
  285.         {
  286.         if(oTD.background)
  287.             {
  288.             divPreview.style.background="url('"+oTD.background+"')"; //PREVIEW (not standard)
  289.             }
  290.         else
  291.             {
  292.             divPreview.style.background=""
  293.             }
  294.         }
  295.     else
  296.         {
  297.         divPreview.style.background=oTD.style.background;
  298.         }  
  299.        
  300.     /**** backgroundColor ****/   //=>OK
  301.     if(oTD.style.backgroundColor=="")
  302.         {
  303.         if(oTD.bgColor)
  304.             {
  305.             inpBackgroundColor.style.backgroundColor=oTD.bgColor;
  306.             divPreview.style.backgroundColor=oTD.bgColor; //PREVIEW (not standard)
  307.             }
  308.         else
  309.             {
  310.             inpBackgroundColor.style.backgroundColor="";
  311.             }
  312.         }
  313.     else
  314.         {
  315.         inpBackgroundColor.style.backgroundColor=oTD.style.backgroundColor;
  316.         }
  317.    
  318.     /**** Padding (default: selalu ketambahan px kalo satuan gak diset) ****/   //=>OK
  319.     //Berkaitan dgn "Not Available"
  320.     if(oTD.style.paddingLeft!="")
  321.         {
  322.         if(oTD.style.paddingLeft.substr(oTD.style.paddingLeft.length-2,2)!="px") inpPaddingLeft.value="na";
  323.         else inpPaddingLeft.value = oTD.style.paddingLeft.substring(0,oTD.style.paddingLeft.length-2);
  324.         }
  325.     else inpPaddingLeft.value="";
  326.    
  327.     if(oTD.style.paddingRight!="")
  328.         {
  329.         if(oTD.style.paddingRight.substr(oTD.style.paddingRight.length-2,2)!="px") inpPaddingRight.value="na";
  330.         else inpPaddingRight.value = oTD.style.paddingRight.substring(0,oTD.style.paddingRight.length-2);
  331.         }
  332.     else inpPaddingRight.value="";
  333.    
  334.     if(oTD.style.paddingTop!="")
  335.         {
  336.         if(oTD.style.paddingTop.substr(oTD.style.paddingTop.length-2,2)!="px") inpPaddingTop.value="na";
  337.         else inpPaddingTop.value = oTD.style.paddingTop.substring(0,oTD.style.paddingTop.length-2);
  338.         }
  339.     else inpPaddingTop.value="";
  340.    
  341.     if(oTD.style.paddingBottom!="")
  342.         {
  343.         if(oTD.style.paddingBottom.substr(oTD.style.paddingBottom.length-2,2)!="px") inpPaddingBottom.value="na";
  344.         else inpPaddingBottom.value = oTD.style.paddingBottom.substring(0,oTD.style.paddingBottom.length-2);
  345.         }
  346.     else inpPaddingBottom.value="";
  347.     }
  348.    
  349. function refresh()
  350.     {
  351.    
  352.     var divPreview = document.getElementById("divPreview");
  353.     var inpWidth = document.getElementById("inpWidth");
  354.     var inpHeight = document.getElementById("inpHeight");
  355.    
  356.     var inpAutoFit1 = document.getElementsByName("inpAutoFit1");
  357.     var inpAutoFit2 = document.getElementsByName("inpAutoFit2");
  358.    
  359.     var inpAutoFitMeasure1 = document.getElementById("inpAutoFitMeasure1");
  360.     var inpAutoFitMeasure2 = document.getElementById("inpAutoFitMeasure2");
  361.    
  362.     var inpCSSText = document.getElementById("inpCSSText");
  363.     var inpAlign = document.getElementById("inpAlign");
  364.     var inpVAlign = document.getElementById("inpVAlign");
  365.     var inpWhtSpace = document.getElementById("inpWhtSpace");
  366.     var inpBackgroundColor = document.getElementById("inpBackgroundColor");
  367.     var inpPaddingLeft = document.getElementById("inpPaddingLeft");
  368.     var inpPaddingTop = document.getElementById("inpPaddingTop");
  369.     var inpPaddingRight = document.getElementById("inpPaddingRight");
  370.     var inpPaddingBottom = document.getElementById("inpPaddingBottom");
  371.    
  372.     divPreview.style.textAlign=inpAlign.value;
  373.     divPreview.style.verticalAlign=inpVAlign.value;
  374.     divPreview.style.whiteSpace=inpWhtSpace.value;
  375.  
  376.     //Berkaitan dgn "Not Available"
  377.     if(inpPaddingLeft.value!="na") divPreview.style.paddingLeft = inpPaddingLeft.value; //by default satuanya pixel
  378.     if(inpPaddingRight.value!="na") divPreview.style.paddingRight = inpPaddingRight.value;
  379.     if(inpPaddingTop.value!="na") divPreview.style.paddingTop = inpPaddingTop.value;
  380.     if(inpPaddingBottom.value!="na") divPreview.style.paddingBottom = inpPaddingBottom.value;
  381.  
  382.     //Tdk bisa seperti ini: (akan menghapus backgroundImage)
  383.     //divPreview.style.backgroundColor=inpBackgroundColor.style.backgroundColor;
  384.  
  385.     //Harus spt ini:
  386.     if(divPreview.style.backgroundImage!=""&&
  387.        inpBackgroundColor.style.backgroundColor=="")
  388.        divPreview.style.background = divPreview.style.backgroundImage+" "+ divPreview.style.backgroundRepeat + " "+divPreview.style.backgroundPosition;
  389.     else if(divPreview.style.backgroundImage==""&&
  390.        inpBackgroundColor.style.backgroundColor!="")
  391.        divPreview.style.backgroundColor=inpBackgroundColor.style.backgroundColor;
  392.     else if(divPreview.style.backgroundImage==""&&
  393.        inpBackgroundColor.style.backgroundColor=="")
  394.        divPreview.style.background="";
  395.     else
  396.         divPreview.style.background = divPreview.style.backgroundImage+" " + inpBackgroundColor.style.backgroundColor + " " + divPreview.style.backgroundRepeat + " "+divPreview.style.backgroundPosition;
  397.     }
  398.    
  399. function doApply()
  400.     {
  401.     var oEditor=window.opener.oUtil.oEditor;
  402.     var oSel=oEditor.getSelection();
  403.    
  404.     var oTable = window.opener.getSelectedElement(oSel);
  405.     var oTD = GetElement(oTable,"TD")
  406.     if (oTD == null) return;
  407.     oTable = GetElement(oTable,"TABLE")
  408.     if (oTable == null) return;    
  409.    
  410.     var borderCol = oTable.style.borderCollapse;
  411.     oTable.style.borderCollapse = "";
  412.  
  413.     var inpApplyTo = document.getElementById("inpApplyTo");
  414.        
  415.     window.opener.oUtil.obj.saveForUndo();
  416.    
  417.     if(inpApplyTo.value=="Current Cell")
  418.         {
  419.         format(oTD)
  420.         }
  421.     if(inpApplyTo.value=="Current Row")
  422.         {
  423.         var arrCells=rowOperation(true,false,false,false);
  424.         for (var i=0;i<arrCells.length;i++)
  425.            {
  426.            format(oTable.rows[arrCells[i][0]].cells[arrCells[i][1]])
  427.            }
  428.        }
  429.    if(inpApplyTo.value=="Current Column")
  430.        {
  431.        var arrCells=colOperation(true,false,false,false);
  432.        for (var i=0;i<arrCells.length;i++)
  433.            {          
  434.            format(oTable.rows[arrCells[i][0]].cells[arrCells[i][1]])
  435.            }
  436.        }
  437.  if(inpApplyTo.value=="Whole Table")
  438.    {
  439.    for(var i=0;i<oTable.rows.length;i++)  
  440.      {
  441.      var oRow = oTable.rows[i];
  442.      for(var j=0;j<oRow.cells.length;j++)
  443.        {
  444.        var oCell=oRow.cells[j];
  445.        format(oCell);
  446.        }
  447.      }
  448.    }
  449.    
  450.    oTable.style.borderCollapse = borderCol;
  451.    
  452.    realTime();
  453.    }
  454.    
  455. function format(oTD)
  456.    {
  457.    var divPreview = document.getElementById("divPreview");
  458.    var inpWidth = document.getElementById("inpWidth");
  459.    var inpHeight = document.getElementById("inpHeight");
  460.    
  461.    var inpAutoFit1 = document.getElementsByName("inpAutoFit1");
  462.    var inpAutoFit2 = document.getElementsByName("inpAutoFit2");
  463.    
  464.    var inpAutoFitMeasure1 = document.getElementById("inpAutoFitMeasure1");
  465.    var inpAutoFitMeasure2 = document.getElementById("inpAutoFitMeasure2");
  466.    
  467.    var inpCSSText = document.getElementById("inpCSSText");
  468.    var inpAlign = document.getElementById("inpAlign");
  469.    var inpVAlign = document.getElementById("inpVAlign");
  470.    var inpWhtSpace = document.getElementById("inpWhtSpace");
  471.    var inpBackgroundColor = document.getElementById("inpBackgroundColor");
  472.    var inpPaddingLeft = document.getElementById("inpPaddingLeft");
  473.    var inpPaddingTop = document.getElementById("inpPaddingTop");
  474.    var inpPaddingRight = document.getElementById("inpPaddingRight");
  475.    var inpPaddingBottom = document.getElementById("inpPaddingBottom");
  476.    var trigger1 = document.getElementById("trigger1");
  477.    
  478.    //STYLE
  479.     oTD.style.cssText = inpCSSText.value;
  480.    
  481.     var divStyle = document.getElementById("divStyle");
  482.     if(divStyle.style.display=="block")return;
  483.    
  484.    //AUTOFIT
  485.    if(inpAutoFit1[0].checked==true) oTD.style.width="";
  486.    else
  487.        {
  488.        if(inpWidth.value!="") oTD.style.width=inpWidth.value+inpAutoFitMeasure1.value;
  489.        else oTD.style.width="";
  490.        }
  491.    if(inpAutoFit2[0].checked==true) oTD.style.height="";
  492.    else
  493.        {
  494.        trigger1.innerHTML="";
  495.        if(inpHeight.value!="") oTD.style.height=inpHeight.value+inpAutoFitMeasure2.value;
  496.        else oTD.style.height="";
  497.        }
  498.    
  499.    //PROPERTIES
  500.    oTD.style.textAlign=inpAlign.value;
  501.    oTD.style.verticalAlign=inpVAlign.value;    
  502.    oTD.style.whiteSpace=inpWhtSpace.value;
  503.    
  504.    //Berkaitan dgn "Not Available"
  505.    if(inpPaddingLeft.value!="na") oTD.style.paddingLeft = inpPaddingLeft.value; //by default satuanya pixel
  506.    if(inpPaddingRight.value!="na") oTD.style.paddingRight = inpPaddingRight.value;
  507.    if(inpPaddingTop.value!="na") oTD.style.paddingTop = inpPaddingTop.value;
  508.    if(inpPaddingBottom.value!="na") oTD.style.paddingBottom = inpPaddingBottom.value;
  509.  
  510.  
  511.    if(divPreview.style.background=="none transparent scroll repeat 0% 0%"||
  512.        divPreview.style.background=="")
  513.        {
  514.        oTD.style.background=""
  515.        
  516.        //Clean~~~
  517.        sTmpStyle=oTD.style.cssText
  518.        
  519.        sTmpStyle=sTmpStyle.replace(/BACKGROUND: none transparent scroll repeat 0% 0%;/,"")
  520.        sTmpStyle=sTmpStyle.replace(/BACKGROUND: none transparent scroll repeat 0% 0%/,"")
  521.  
  522.        sTmpStyle=sTmpStyle.replace(/BACKGROUND-POSITION: 0% 0%;/,"")
  523.        sTmpStyle=sTmpStyle.replace(/BACKGROUND-POSITION: 0% 0%/,"")
  524.        sTmpStyle=sTmpStyle.replace(/BACKGROUND-ATTACHMENT: scroll;/,"")
  525.        sTmpStyle=sTmpStyle.replace(/BACKGROUND-ATTACHMENT: scroll/,"")
  526.        sTmpStyle=sTmpStyle.replace(/BACKGROUND-IMAGE: none;/,"")
  527.        sTmpStyle=sTmpStyle.replace(/BACKGROUND-IMAGE: none/,"")
  528.        sTmpStyle=sTmpStyle.replace(/BACKGROUND-REPEAT: repeat;/,"")
  529.        sTmpStyle=sTmpStyle.replace(/BACKGROUND-REPEAT: repeat/,"")
  530.  
  531.        oTD.style.cssText=sTmpStyle
  532.        //~~~~~~~
  533.        }
  534.    else
  535.        {
  536.        oTD.style.backgroundImage=divPreview.style.backgroundImage;
  537.        oTD.style.backgroundRepeat=divPreview.style.backgroundRepeat;
  538.        oTD.style.backgroundPosition=divPreview.style.backgroundPosition;
  539.        oTD.style.backgroundColor=inpBackgroundColor.style.backgroundColor;
  540.  
  541.        }
  542.    
  543.    //Border & Shading
  544.    if(divPreview.style.borderLeftWidth=="" || divPreview.style.borderLeftWidth==0) oTD.style.borderLeft="";
  545.    else oTD.style.borderLeft=divPreview.style.borderLeft;
  546.        
  547.    if(divPreview.style.borderRightWidth=="" || divPreview.style.borderRightWidth==0) oTD.style.borderRight="";
  548.    else oTD.style.borderRight=divPreview.style.borderRight;
  549.        
  550.    if(divPreview.style.borderTopWidth=="" || divPreview.style.borderTopWidth==0) oTD.style.borderTop="";
  551.    else oTD.style.borderTop=divPreview.style.borderTop;
  552.        
  553.    if(divPreview.style.borderBottomWidth=="" || divPreview.style.borderBottomWidth==0) oTD.style.borderBottom="";
  554.    else oTD.style.borderBottom=divPreview.style.borderBottom;      
  555.  
  556.    //Clean
  557.    sTmpStyle=oTD.style.cssText
  558.    sTmpStyle=sTmpStyle.replace(/BORDER-RIGHT: medium none;/,"")
  559.    sTmpStyle=sTmpStyle.replace(/BORDER-RIGHT: medium none/,"")
  560.    sTmpStyle=sTmpStyle.replace(/BORDER-TOP: medium none;/,"")
  561.    sTmpStyle=sTmpStyle.replace(/BORDER-TOP: medium none/,"")
  562.    sTmpStyle=sTmpStyle.replace(/BORDER-LEFT: medium none;/,"")
  563.    sTmpStyle=sTmpStyle.replace(/BORDER-LEFT: medium none/,"")
  564.    sTmpStyle=sTmpStyle.replace(/BORDER-BOTTOM: medium none;/,"")
  565.    sTmpStyle=sTmpStyle.replace(/BORDER-BOTTOM: medium none/,"")    
  566.    oTD.style.cssText=sTmpStyle
  567.  
  568.    //Text Formatting
  569.    if(divPreview.style.fontFamily!="") oTD.style.fontFamily=divPreview.style.fontFamily;
  570.    else
  571.        {
  572.        oTD.style.cssText = oTD.style.cssText.replace("FONT-FAMILY: ; ","");
  573.        oTD.style.cssText = oTD.style.cssText.replace("FONT-FAMILY: ","");
  574.        }
  575.        
  576.    if(divPreview.style.fontSize!="") oTD.style.fontSize=divPreview.style.fontSize;
  577.    else
  578.        {
  579.        oTD.style.cssText = oTD.style.cssText.replace("FONT-SIZE: ; ","");
  580.        oTD.style.cssText = oTD.style.cssText.replace("FONT-SIZE: ","");
  581.        }
  582.        
  583.    oTD.style.fontStyle=divPreview.style.fontStyle;//
  584.    oTD.style.fontWeight=divPreview.style.fontWeight;//
  585.    oTD.style.fontVariant=divPreview.style.fontVariant;//
  586.    oTD.style.textDecoration=divPreview.style.textDecoration;//
  587.    oTD.style.verticalAlign=divPreview.style.verticalAlign;//
  588.    oTD.style.textTransform=divPreview.style.textTransform;//
  589.    oTD.style.color=divPreview.style.color;
  590.  
  591.    oTD.style.letterSpacing=divPreview.style.letterSpacing;
  592.    oTD.style.wordSpacing=divPreview.style.wordSpacing;
  593.    if(oTD.style.letterSpacing=="")
  594.        {
  595.        oTD.style.letterSpacing=0
  596.        oTD.style.cssText = oTD.style.cssText.replace("LETTER-SPACING: 0px; ","");
  597.        oTD.style.cssText = oTD.style.cssText.replace("LETTER-SPACING: 0px","");
  598.        }
  599.    if(oTD.style.wordSpacing=="")
  600.        {
  601.        oTD.style.wordSpacing=0
  602.        oTD.style.cssText = oTD.style.cssText.replace("WORD-SPACING: 0px; ","");
  603.        oTD.style.cssText = oTD.style.cssText.replace("WORD-SPACING: 0px","");      
  604.        }  
  605.    }
  606. </script>
  607. </head>
  608. <body onload="loadTxt();bodyOnLoad()" style="overflow:hidden;">
  609.  
  610. <table width=100% height=100% align=center cellpadding=0 cellspacing=0>
  611. <tr>
  612. <td valign=top style="padding-top:15px;padding-left:13px;padding-right:13px;padding-bottom:0px;height:100%">
  613.  
  614.     <table cellpadding=0 cellspacing=0 style="width:100%;" ID="Table2">
  615.     <tr>
  616.     <td id=tab1 style="cursor:pointer;padding:6px;border:#D6D6E2 2px solid;border-bottom:none" onclick="tabClick(1)" nowrap><b><span id=txtLang name=txtLang>AutoFit</span></b></td>
  617.     <td id=tab2 style="cursor:pointer;padding:6px;border:#D6D6E2 2px solid;border-left:none" onclick="tabClick(2)" nowrap><b><span id=txtLang name=txtLang>Properties</span></b></td>
  618.     <td id=tab3 style="cursor:pointer;padding:6px;border:#D6D6E2 2px solid;border-left:none" onclick="tabClick(3)" nowrap><b><span id=txtLang name=txtLang>Style</span></b></td>
  619.     <td style="border-bottom:#D6D6E2 2px solid;" width=100%>&nbsp;</td>
  620.     </tr>
  621.     </table>    
  622.    
  623.  
  624.     <table cellpadding=0 cellspacing=0 style="border:#D6D6E2 2px solid;border-top:none;border-collapse:collapse;width:100%;height:285;background:#F2F1F8;" ID="Table1">
  625.     <tr>
  626.     <td style="padding:7;" valign=top height=100%>
  627.  
  628.     <!-- AUTOFIT -->
  629.     <div id=divAutoFit style="display:block;">
  630.         <div style="margin-bottom:7px;margin-top:3px;"><span id=txtLang name=txtLang>Width</span>:</div>
  631.         <input type="radio" class=inpRdo name="inpAutoFit1"><span id=txtLang name=txtLang>AutoFit to contents</span><br>
  632.         <input type="radio" class=inpRdo name="inpAutoFit1"><span id=txtLang name=txtLang>Fixed cell width</span>:  
  633.         <input type="text" name="inpWidth" id="inpWidth" size=3 onblur="document.getElementsByName('inpAutoFit1')[1].checked=true" class="inpTxt">
  634.         <select ID="inpAutoFitMeasure1" name="inpAutoFitMeasure1" class="inpSel">
  635.             <option value="px" id="optLang" name="optLang">pixels</option>
  636.             <option value="%" id="optLang" name="optLang">percent</option>
  637.         </select>
  638.        
  639.         <br><br>
  640.        
  641.         <div style="margin-bottom:7px;margin-top:3px;"><span id=txtLang name=txtLang>Height</span>:</div>
  642.         <input type="radio" class=inpRdo name="inpAutoFit2"><span id=txtLang name=txtLang>AutoFit to contents</span><br>
  643.         <input type="radio" class=inpRdo name="inpAutoFit2"><span id=txtLang name=txtLang>Fixed cell height</span>:
  644.         <input type="text" name="inpHeight" id="inpHeight" size=3 onblur="document.getElementsByName('inpAutoFit2')[1].checked=true" class="inpTxt">
  645.         <select ID="inpAutoFitMeasure2" name="inpAutoFitMeasure2" class="inpSel">
  646.             <option value="px" id="optLang" name="optLang">pixels</option>
  647.             <option value="%" id="optLang" name="optLang">percent</option>
  648.         </select>
  649.         <br>
  650.         <span id=trigger1></span>
  651.     </div>
  652.  
  653.  
  654.     <!-- PROPERTIES -->
  655.     <div id="divProperties" style="display:none;">
  656.    
  657.         <table border=0>
  658.         <tr>
  659.             <td nowrap>
  660.                 <span id=txtLang name=txtLang>Text Alignment</span>:&nbsp;
  661.             </td>
  662.             <td>
  663.                 <select name="inpVAlign" id="inpVAlign" onchange="refresh()" style="width:100%" class="inpSel">
  664.                     <option value="" id="optLang" name="optLang">not set</option>
  665.                     <option value="top" id="optLang" name="optLang" selected>top</option>
  666.                     <option value="middle" id="optLang" name="optLang">middle</option>
  667.                     <option value="bottom" id="optLang" name="optLang">bottom</option>
  668.                     <option value="baseline" id="optLang" name="optLang">baseline</option>
  669.                     <option value="sub" id="optLang" name="optLang">sub</option>
  670.                     <option value="super" id="optLang" name="optLang">super</option>
  671.                     <option value="text-top" id="optLang" name="optLang">text-top</option>
  672.                     <option value="text-bottom" id="optLang" name="optLang">text-bottom</option></select>
  673.             </td>
  674.             <td>
  675.                 <select name="inpAlign" id="inpAlign" onchange="refresh()" class="inpSel">
  676.                     <option value="" id="optLang" name="optLang">not set</option>
  677.                     <option value="left" id="optLang" name="optLang" selected>left</option>
  678.                     <option value="center" id="optLang" name="optLang">center</option>
  679.                     <option value="right" id="optLang" name="optLang">right</option>
  680.                     <option value="justify" id="optLang" name="optLang">justify</option></select>
  681.             </td>
  682.         </tr>
  683.         <tr>
  684.             <td style="padding-top:3px">
  685.                 <span id=txtLang name=txtLang>Padding</span>            
  686.             </td>
  687.             <td nowrap>
  688.                 <table cellpadding=2 cellspacing=0>
  689.                 <tr>
  690.                 <td nowrap><span id=txtLang name=txtLang>Left</span>:</td>
  691.                 <td><input type="text" name="inpPaddingLeft" id="inpPaddingLeft" size=3 onblur="refresh()" class="inpTxt"></td>
  692.                 <td> px</td>
  693.                 <td>&nbsp;&nbsp;</td>
  694.                 <td nowrap align=right><span id=txtLang name=txtLang>Right</span>:</td>
  695.                 <td><input type="text" name="inpPaddingRight" id="inpPaddingRight" size=3 onblur="refresh()" class="inpTxt"></td>
  696.                 <td> px</td>
  697.                 </tr>
  698.                 <tr>
  699.                 <td nowrap><span id=txtLang name=txtLang>Top</span>:</td>
  700.                 <td><input type="text" name="inpPaddingTop" id="inpPaddingTop" size=3 onblur="refresh()" class="inpTxt"></td>
  701.                 <td> px</td>
  702.                 <td>&nbsp;&nbsp;</td>
  703.                 <td nowrap align=right><span id=txtLang name=txtLang>Bottom</span>:</td>
  704.                 <td><input type="text"  name="inpPaddingBottom" id="inpPaddingBottom" size=3 onblur="refresh()" class="inpTxt"></td>
  705.                 <td> px</td>
  706.                 </tr>
  707.                 </table>
  708.             </td>
  709.             <td style="width:100%">&nbsp;</td>
  710.         </tr>
  711.        
  712.         <tr>
  713.             <td>
  714.                 <span id=txtLang name=txtLang>White Space</span>:&nbsp;
  715.             </td>
  716.             <td>
  717.                 <select name="inpWhtSpace" id="inpWhtSpace" onchange="refresh()" style="width:100%" class="inpSel">
  718.                     <option value="" id="optLang" name="optLang" selected>Not Set</option>
  719.                     <option value="nowrap" id="optLang" name="optLang">No Wrap</option>
  720.                     <option value="pre" id="optLang" name="optLang">pre</option>
  721.                     <option value="normal" id="optLang" name="optLang">Normal</option></select>
  722.             </td>
  723.             <td></td>
  724.         </tr>
  725.        
  726.         <tr>
  727.             <td>
  728.                 <span id=txtLang name=txtLang>Background</span>:&nbsp;
  729.             </td>
  730.             <td>
  731.                 <span style="background:#ffffff"><span id="inpBackgroundColor" style="border:gray 1px solid;width:20;margin-right:3;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span>
  732.                 <input type=button name=btnPick id=btnPick value=Pick onclick="dialogArgument=['window.opener', 'window.opener'];oColor1.show(this);event.cancelBubble=true;" class="inpBtn" onmouseover="this.className='inpBtnOver';" onmouseout="this.className='inpBtnOut'">
  733.                
  734.                 <script>
  735.                 var oColor1 = new ColorPicker("oColor1");
  736.                 oColor1.onPickColor = new Function("document.getElementById('inpBackgroundColor').style.backgroundColor=oColor1.color;refresh()");
  737.                 oColor1.onRemoveColor = new Function("document.getElementById('inpBackgroundColor').style.backgroundColor='';refresh()");
  738.                 oColor1.align="left";
  739.                 oColor1.txtCustomColors=getTxt("Custom Colors");
  740.                 oColor1.txtMoreColors=getTxt("More Colors...");
  741.                 oColor1.RENDER();
  742.                
  743.                 </script>  
  744.                
  745.                 <input type="button" name=btnImage id=btnImage value="Image" onclick="modalDialogShow('image_background.htm?divPreview', 380, 150);;refresh()" class="inpBtn" onmouseover="this.className='inpBtnOver';" onmouseout="this.className='inpBtnOut'">
  746.             </td>
  747.             <td>&nbsp;</td>
  748.         </tr>
  749.  
  750.         <tr>
  751.             <td colspan=3>
  752.                 <div style="margin-bottom:5px;margin-top:5px;">
  753.                 <span id=txtLang name=txtLang>Preview</span>:</div>
  754.                 <table cellpadding=0 cellspacing=0>
  755.                 <tr>
  756.                 <td>
  757.                 <div style="overflow:auto;border:#999999 1px solid;width:360px;height:70px;background:#ffffff;padding:3px" valign=middle align=center>
  758.                     <table cellSpacing=0 cellPadding=0>
  759.                     <tr><td id=divPreview style="border:#000000 1px solid;width:50px;height:50px;">Text 123</td></tr>
  760.                     </table>
  761.                 </div>
  762.                 </td>
  763.                 </tr>
  764.                 </table>
  765.             </td>
  766.         </tr>
  767.         </table>
  768.  
  769.         <input type="button" name=btnText id=btnText value=" Text Formatting " style="width:140px;margin-top:5;margin-bottom:5;"
  770.            onclick="dialogArgument=['window.opener.opener', 'window.opener.document.getElementById(\'divPreview\')'];modalDialogShow('text2.htm', 525, 432)" class="inpBtn" onmouseover="this.className='inpBtnOver';" onmouseout="this.className='inpBtnOut'">
  771.         <input type="button" name=btnBorder id=btnBorder value=" Border Style " style="width:140px;margin-top:5;margin-bottom:5;"
  772.            onclick="dialogArgument=['window.opener', 'window.opener.document.getElementById(\'divPreview\')'];modalDialogShow('border.htm', 460, 260)" class="inpBtn" onmouseover="this.className='inpBtnOver';" onmouseout="this.className='inpBtnOut'">
  773.  
  774.     </div>
  775.  
  776.  
  777.     <!-- CSS -->
  778.     <div id="divStyle" style="display:none;">
  779.         <div style="margin-bottom:9px;margin-top:3px;">
  780.         <span id=txtLang name=txtLang>CSS Text</span>: <br>
  781.         <textarea name="inpCSSText" id="inpCSSText" style="width:100%;height:200;font-family:verdana;font-size:10px" class="inpTxt"></textarea>
  782.         </div>  
  783.     </div>
  784.  
  785.     </td>
  786.     </tr>
  787.     <tr>
  788.     <td style="padding-right:8px;padding-bottom:8px">
  789.  
  790.         <table align=right cellpadding=0 cellspacing=0>
  791.         <tr>
  792.         <td><span id=txtLang name=txtLang>Apply to</span>:&nbsp;</td>
  793.         <td>
  794.             <select name=inpApplyTo id=inpApplyTo class="inpSel">
  795.             <option value="Current Cell" id="optLang" name="optLang" selected>Current Cell</option>
  796.             <option value="Current Row" id="optLang" name="optLang">Current Row</option>
  797.             <option value="Current Column" id="optLang" name="optLang">Current Column</option>
  798.             <!--<option value="Odd Row">Odd Row</option>
  799.            <option value="Even Row">Even Row</option>
  800.            <option value="Odd Column">Odd Column</option>
  801.            <option value="Even Column">Even Column</option>-->
  802.             <option value="Whole Table" id="optLang" name="optLang">Whole Table</option>
  803.             </select>
  804.         </td>
  805.         </tr>
  806.         </table>
  807.  
  808.     </td>
  809.     </tr>
  810.     </table>
  811.  
  812. </td>
  813. </tr>
  814. <tr>
  815. <td class="dialogFooter" style="padding:13px;padding-top:7px;padding-bottom:7px;" align="right">
  816.     <input type="button" name=btnCancel id=btnCancel value="cancel" onclick="self.close()" class="inpBtn" onmouseover="this.className='inpBtnOver';" onmouseout="this.className='inpBtnOut'">
  817.     <input type="button" name=btnApply id=btnApply value="apply" onclick="doApply();window.focus();" class="inpBtn" onmouseover="this.className='inpBtnOver';" onmouseout="this.className='inpBtnOut'">
  818.     <input type="button" name=btnOk id=btnOk value=" ok " onclick="doApply();self.close()" class="inpBtn" onmouseover="this.className='inpBtnOver';" onmouseout="this.className='inpBtnOut'">
  819. </td>
  820. </tr>
  821. </table>
  822.  
  823. </body>
  824. </html>
downloadtable_editCell.htm Source code - Download Pcook CMS bubble guest v3.0 SDCMS version Source code
Related Source Codes/Software:
Oo 126 CMS movie site system - This procedure ASP + ACC/ASP + SQL, using new kern... 2016-09-21
IDC sales web site - Beautiful IDC sales web site source code 2016-09-21
NPOINT virtual host v1.7.0 formal version management system - The system main function is introduced 2016-09-21
Classified information network business in suzhou - Overall module: classification of supply and deman... 2016-09-21
Jie Yang v0.6.3 article system - System functions: 1, the system settings A confi... 2016-09-21
Age design website information management system SDCMS v1.1 SP1 - SDCMS is designed to build the information managem... 2016-09-21
Age design website information management system SDCMS v1.1 SP1 - SDCMS is designed to build the information managem... 2016-09-21
C9 v2.1.1 static post system - Program USES ASP + ACC structure design and develo... 2016-09-21
Imitation green download station perfect version - Before increased | software home page, on the basi... 2016-09-21
Subdomain hosting edition v1.9 s taobao, pat - The background site admin 2016-09-21
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top