\
\
\
" + HTMLArea._lc("Description", "TableOperations") + " \
\
\
\
\
\
\
\
" + HTMLArea._lc("Spacing and padding", "TableOperations") + " \
\
"+// \
// " + HTMLArea._lc("Width", "TableOperations") + ": \
// \
// \
// " + HTMLArea._lc("percent", "TableOperations") + " \
// " + HTMLArea._lc("pixels", "TableOperations") + " \
// " + HTMLArea._lc("Align", "TableOperations") + ": \
// \
// " + HTMLArea._lc("Left", "TableOperations") + " \
// " + HTMLArea._lc("Center", "TableOperations") + " \
// " + HTMLArea._lc("Right", "TableOperations") + " \
// \
// \
// \
" \
" + HTMLArea._lc("Spacing", "TableOperations") + ": \
" + HTMLArea._lc("Padding", "TableOperations") + ":\
" + HTMLArea._lc("pixels", "TableOperations") + "\
\
\
\
\
\
\
\
\
Frame and borders \
\
\
" + HTMLArea._lc("Borders", "TableOperations") + ": \
" + HTMLArea._lc("pixels", "TableOperations") + " \
\
\
" + HTMLArea._lc("Frames", "TableOperations") + ": \
\
\
" + HTMLArea._lc("No sides", "TableOperations") + " \
" + HTMLArea._lc("The top side only", "TableOperations") + " \
" + HTMLArea._lc("The bottom side only", "TableOperations") + " \
" + HTMLArea._lc("The top and bottom sides only", "TableOperations") + " \
" + HTMLArea._lc("The right and left sides only", "TableOperations") + " \
" + HTMLArea._lc("The left-hand side only", "TableOperations") + " \
" + HTMLArea._lc("The right-hand side only", "TableOperations") + " \
" + HTMLArea._lc("All four sides", "TableOperations") + " \
\
\
\
\
" + HTMLArea._lc("Rules", "TableOperations") + ": \
\
\
" + HTMLArea._lc("No rules", "TableOperations") + " \
" + HTMLArea._lc("Rules will appear between rows only", "TableOperations") + " \
" + HTMLArea._lc("Rules will appear between columns only", "TableOperations") + " \
" + HTMLArea._lc("Rules will appear between all rows and columns", "TableOperations") + " \
\
\
\
\
\
\
\
\
\
\
\
";
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) {
// 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, cell ? HTMLArea._lc("Cell Properties", "TableOperations") : HTMLArea._lc("Row Properties", "TableOperations"), function(dialog, params) {
TableOperations.processStyle(params, element);
for (var i in params) {
if(typeof params[i] == 'function') continue;
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 = " \
" + HTMLArea._lc(cell ? "Cell Properties" : "Row Properties", "TableOperations") + "
\