tinyMCEPopup.requireLangPack(); function init() { tinyMCEPopup.resizeToInnerSize(); document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table'); document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor'); var inst = tinyMCEPopup.editor; var dom = inst.dom; var trElm = dom.getParent(inst.selection.getStart(), "tr"); var formObj = document.forms[0]; var st = dom.parseStyle(dom.getAttrib(trElm, "style")); // Get table row data var rowtype = trElm.parentNode.nodeName.toLowerCase(); var align = dom.getAttrib(trElm, 'align'); var valign = dom.getAttrib(trElm, 'valign'); var height = trimSize(getStyle(trElm, 'height', 'height')); var className = dom.getAttrib(trElm, 'class'); var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor')); var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");; var id = dom.getAttrib(trElm, 'id'); var lang = dom.getAttrib(trElm, 'lang'); var dir = dom.getAttrib(trElm, 'dir'); // Setup form addClassesToList('class', 'table_row_styles'); TinyMCE_EditableSelects.init(); formObj.bgcolor.value = bgcolor; formObj.backgroundimage.value = backgroundimage; formObj.height.value = height; formObj.id.value = id; formObj.lang.value = lang; formObj.style.value = dom.serializeStyle(st); selectByValue(formObj, 'align', align); selectByValue(formObj, 'valign', valign); selectByValue(formObj, 'class', className, true, true); 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() { var inst = tinyMCEPopup.editor, dom = inst.dom, trElm, tableElm, formObj = document.forms[0]; var action = getSelectValue(formObj, 'action'); tinyMCEPopup.restoreSelection(); trElm = dom.getParent(inst.selection.getStart(), "tr"); tableElm = dom.getParent(inst.selection.getStart(), "table"); inst.execCommand('mceBeginUndoLevel'); switch (action) { case "row": updateRow(trElm); break; case "all": var rows = tableElm.getElementsByTagName("tr"); for (var i=0; i