\
\
\
" + i18n["Description"] + " \
\
\
\
\
\
\
\
" + i18n["Spacing and padding"] + " \
\
\
\
\
\
\
Frame and borders \
\
\
\
\
\
\
\
\
";
var st_prop = TableOperations.createStyleFieldset(dialog.doc, dialog.editor, table);
var p = dialog.doc.getElementById("--HA-style");
p.appendChild(st_prop);
var st_layout = TableOperations.createStyleLayoutFieldset(dialog.doc, dialog.editor, table);
p = dialog.doc.getElementById("--HA-layout");
p.appendChild(st_layout);
dialog.modal = true;
dialog.addButtons("ok", "cancel");
dialog.showAtElement(dialog.editor._iframe, "c");
});
};
// this function requires the file PopupDiv/PopupWin to be loaded from browser
TableOperations.prototype.dialogRowCellProperties = function(cell) {
var i18n = TableOperations.I18N;
// retrieve existing values
var element = this.getClosest(cell ? "td" : "tr");
var table = this.getClosest("table");
// this.editor.selectNodeContents(element);
// this.editor.updateToolbar();
var dialog = new PopupWin(this.editor, i18n[cell ? "Cell Properties" : "Row Properties"], function(dialog, params) {
TableOperations.processStyle(params, element);
for (var i in params) {
var val = params[i];
switch (i) {
case "f_align":
element.align = val;
break;
case "f_char":
element.ch = val;
break;
case "f_valign":
element.vAlign = val;
break;
}
}
// various workarounds to refresh the table display (Gecko,
// what's going on?! do not disappoint me!)
dialog.editor.forceRedraw();
dialog.editor.focusEditor();
dialog.editor.updateToolbar();
var save_collapse = table.style.borderCollapse;
table.style.borderCollapse = "collapse";
table.style.borderCollapse = "separate";
table.style.borderCollapse = save_collapse;
},
// this function gets called when the dialog needs to be initialized
function (dialog) {
var f_align = element.align;
var f_valign = element.vAlign;
var f_char = element.ch;
function selected(val) {
return val ? " selected" : "";
};
// dialog contents
dialog.content.style.width = "400px";
dialog.content.innerHTML = " \