function init() { tinyMCEPopup.resizeToInnerSize(); document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); var inst = tinyMCE.selectedInstance; var trElm = tinyMCE.getParentElement(inst.getFocusElement(), "tr"); var formObj = document.forms[0]; var st = tinyMCE.parseStyle(tinyMCE.getAttrib(trElm, "style")); // Get table row data var rowtype = trElm.parentNode.nodeName.toLowerCase(); var align = tinyMCE.getAttrib(trElm, 'align'); var valign = tinyMCE.getAttrib(trElm, 'valign'); var height = trimSize(getStyle(trElm, 'height', 'height')); var className = tinyMCE.getVisualAidClass(tinyMCE.getAttrib(trElm, 'class'), false); var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor')); var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");; var id = tinyMCE.getAttrib(trElm, 'id'); var lang = tinyMCE.getAttrib(trElm, 'lang'); var dir = tinyMCE.getAttrib(trElm, 'dir'); // Setup form addClassesToList('class', 'table_row_styles'); formObj.bgcolor.value = bgcolor; formObj.backgroundimage.value = backgroundimage; formObj.height.value = height; formObj.id.value = id; formObj.lang.value = lang; formObj.style.value = tinyMCE.serializeStyle(st); selectByValue(formObj, 'align', align); selectByValue(formObj, 'valign', valign); selectByValue(formObj, 'class', className); selectByValue(formObj, 'rowtype', rowtype); selectByValue(formObj, 'dir', dir); // Resize some elements if (isVisible('backgroundimagebrowser')) document.getElementById('backgroundimage').style.width = '180px'; updateColor('bgcolor_pick', 'bgcolor'); } function updateAction() { tinyMCEPopup.restoreSelection(); var inst = tinyMCE.selectedInstance; var trElm = tinyMCE.getParentElement(inst.getFocusElement(), "tr"); var tableElm = tinyMCE.getParentElement(inst.getFocusElement(), "table"); var formObj = document.forms[0]; var action = getSelectValue(formObj, 'action'); inst.execCommand('mceBeginUndoLevel'); switch (action) { case "row": updateRow(trElm); break; case "all": var rows = tableElm.getElementsByTagName("tr"); for (var i=0; i