📄 edittable.php
字号:
document.getElementById('tbl_tr').setAttribute("align",document.getElementById('tr_align').value);
document.getElementById('tbl_tr').style.backgroundColor = document.getElementById('tr_bgcolor').value;
//cell
document.getElementById('tbl_td').setAttribute("vAlign",document.getElementById('td_valign').value);
document.getElementById('tbl_td').setAttribute("align",document.getElementById('td_align').value);
document.getElementById('tbl_td').style.backgroundColor = document.getElementById('td_bgcolor').value;
document.getElementById('tbl_td').setAttribute('background', document.getElementById('cellBackground').value);
}
//-->
</script>
</head>
<body onLoad="initiate(); hideLoadMessage();">
<?php include('./includes/load_message.php'); ?>
<div class="dialog_content" align="center">
<form id="edit_table_form" name="edit_table_form" style="display:inline" onSubmit="return apply();">
<table id="tab_table" width="422" border="0" cellspacing="0" cellpadding="2">
<tr>
<td id="tbar1" class="tbuttonUpLeft" align="center" onClick="on_enter_cell()"><nobr>
<?php echo $lang['this_cell']; ?> </nobr></td>
<td id="tbar2" class="tbuttonRight" align="center" onClick="on_enter_row()"><nobr>
<?php echo $lang['this_row']; ?> </nobr></td>
<td id="tbar3" class="tbuttonDown" align="center" onClick="on_enter_table()"><nobr>
<?php echo $lang['this_table']; ?> </nobr></td>
<td width="100%" style="border-bottom: 2px solid threedhighlight"> </td>
</tr>
</table>
<div id="tab_one">
<table width="420" border="0" cellpadding="0" cellspacing="3" height="243">
<tr>
<td>
<!---Cell properties----->
<fieldset class="fieldsetLine">
<legend><?php echo $lang['cell_size']; ?></legend>
<table width="100%" border="0" cellpadding="0" cellspacing="5">
<tr>
<td width="140"><?php echo $lang['cell_width']; ?></td>
<td> <input type="text" name="td_width" id="td_width" size="6" value="" onChange="updateStyle()"></td>
</tr>
<tr>
<td width="140"><?php echo $lang['cell_height']; ?></td>
<td> <input type="text" name="td_height" id="td_height" size="6" value="" onChange="updateStyle()"></td>
</tr>
</table>
</fieldset>
<fieldset class="fieldsetLine">
<legend><?php echo $lang['text_alignment']; ?></legend>
<table width="100%" border="0" cellpadding="0" cellspacing="5">
<tr>
<td width="140"><?php echo $lang['vertical_alignment']; ?> </td>
<td> <select class="text" name="td_valign" id="td_valign" style="width:100" onChange="updateStyle()">
<option value=""><?php echo $lang['default']; ?></option>
<option value="top"><?php echo $lang['top']; ?></option>
<option value="middle"><?php echo $lang['middle']; ?></option>
<option value="bottom"><?php echo $lang['bottom']; ?></option>
<option value="baseline"><?php echo $lang['base_line']; ?></option>
</select> </td>
</tr>
<tr>
<td width="140"><?php echo $lang['horizontal_alignment']; ?></td>
<td> <select class="text" name="td_align" id="td_align" style="width:100" onChange="updateStyle()">
<option value=""><?php echo $lang['default']; ?></option>
<option value="left"><?php echo $lang['left']; ?></option>
<option value="center"><?php echo $lang['center']; ?></option>
<option value="right"><?php echo $lang['right']; ?></option>
</select> </td>
</tr>
</table>
</fieldset>
<fieldset class="fieldsetLine">
<legend><?php echo $lang['borders']; ?></legend>
<table width="100%" border="0" cellpadding="0" cellspacing="5">
<tr>
<td width="140"><?php echo $lang['background_color']; ?></td>
<td width="260"> <button class="colordisplay" type="button" onClick="colordialog(4);">
<div id="tdbgchosencolor"> </div>
<?php echo $lang['choose']; ?></button>
<input type="hidden" name="td_bgcolor" id="td_bgcolor" value="" onChange="updateStyle()">
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2"> <table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><?php echo $lang['background_image']; ?> <input type="text" style="width:225px" name="cellBackground" id="cellBackground" onChange="updateStyle()"></td>
<td> <script type="text/javascript">
<!--//
if (obj.imagewindow == 'image.php') {
document.write('<button class="chooseImage" type="button" onClick="open_image_window(\'cell\')"><img src="<?php echo WP_WEB_DIRECTORY; ?>images/choose_image.gif" width="18" height="15" alt=""></button>')
}
//-->
</script> </td>
</tr>
</table></td>
</tr>
</table>
</fieldset></td>
</tr>
</table>
</div>
<div id="tab_two">
<table width="420" border="0" cellpadding="0" cellspacing="3">
<tr>
<td>
<!---Row properties----->
<fieldset class="fieldsetLine">
<legend><?php echo $lang['text_alignment']; ?></legend>
<table width="100%" border="0" cellpadding="0" cellspacing="5">
<tr>
<td width="140"><?php echo $lang['vertical_alignment']; ?> </td>
<td> <select class="text" name="tr_valign" id="tr_valign" style="width:100" onChange="updateStyle()">
<option value=""><?php echo $lang['default']; ?></option>
<option value="top"><?php echo $lang['top']; ?></option>
<option value="middle"><?php echo $lang['middle']; ?></option>
<option value="bottom"><?php echo $lang['bottom']; ?></option>
<option value="baseline"><?php echo $lang['base_line']; ?></option>
</select> </td>
</tr>
<tr>
<td width="140"><?php echo $lang['horizontal_alignment']; ?></td>
<td> <select class="text" name="tr_align" id="tr_align" style="width:100" onChange="updateStyle()">
<option value=""><?php echo $lang['default']; ?></option>
<option value="left"><?php echo $lang['left']; ?></option>
<option value="center"><?php echo $lang['center']; ?></option>
<option value="right"><?php echo $lang['right']; ?></option>
</select> </td>
</tr>
</table>
</fieldset>
<fieldset class="fieldsetLine">
<legend><?php echo $lang['borders']; ?></legend>
<table width="100%" border="0" cellpadding="0" cellspacing="5">
<tr>
<td width="140"><?php echo $lang['background_color']; ?></td>
<td width="260"> <button class="colordisplay" type="button" onClick="colordialog(3);">
<div id="trbgchosencolor"> </div>
<?php echo $lang['choose']; ?></button>
<input type="hidden" name="tr_bgcolor" id="tr_bgcolor" value="" onChange="updateStyle()">
</td>
</tr>
</table>
</fieldset></td>
</tr>
</table>
</div>
<div id="tab_three">
<table width="420" border="0" cellpadding="0" cellspacing="3" height="243">
<tr>
<td>
<!---Table properties----->
<fieldset class="fieldsetLine">
<legend><?php echo $lang['spacing_and_padding']; ?></legend>
<table width="100%" border="0" cellpadding="0" cellspacing="5">
<tr>
<td width="20%"><?php echo $lang['cell_spacing']; ?></td>
<td width="30%"> <input type="text" name="table_cellspacing" id="table_cellspacing" size="4" onChange="updateStyle()"></td>
<td width="20%"><?php echo $lang['cell_padding']; ?></td>
<td> <input type="text" name="table_cellpadding" id="table_cellpadding" size="4" onChange="updateStyle()">
</td>
</tr>
</table>
</fieldset>
<fieldset class="fieldsetLine">
<legend><?php echo $lang['table_size']; ?></legend>
<table width="100%" border="0" cellpadding="0" cellspacing="3">
<tr>
<td width="20%"><?php echo $lang['table_width']; ?> </td>
<td width="30%"> <input type="text" name="table_width" id="table_width" size="6">
</td>
<td width="20%"><?php echo $lang['table_height']; ?> </td>
<td> <input type="text" name="table_height" id="table_height" size="6">
</td>
</tr>
</table>
</fieldset>
<fieldset class="fieldsetLine">
<legend><?php echo $lang['alignment']; ?></legend>
<table width="100%" border="0" cellpadding="0" cellspacing="3">
<tr>
<td width="140"><?php echo $lang['align_on_page']; ?></td>
<td> <select class="text" name="table_align" id="table_align" style="width:100" onChange="updateStyle()">
<option value=""><?php echo $lang['default']; ?></option>
<option value="left"><?php echo $lang['left']; ?></option>
<option value="center"><?php echo $lang['center']; ?></option>
<option value="right"><?php echo $lang['right']; ?></option>
</select> </td>
</tr>
</table>
</fieldset>
<fieldset class="fieldsetLine">
<legend><?php echo $lang['borders']; ?></legend>
<table width="100%" border="0" cellpadding="0" cellspacing="3">
<tr>
<td width="20%"><?php echo $lang['border_size']; ?> </td>
<td> <input type="text" name="table_border" id="table_border" size="4" onChange="updateStyle()"></td>
<td width="20%"><?php echo $lang['border_collapse']; ?></td>
<td><input type="checkbox" name="collapse" id="collapse" value="ON" onClick="updateStyle()">
</td>
</tr>
<tr>
<td width="20%"><?php echo $lang['background_color']; ?></td>
<td> <button class="colordisplay" type="button" onClick="colordialog(2);">
<div id="tablebgchosencolor"> </div>
<?php echo $lang['choose']; ?> </button>
<input type="hidden" name="table_bgcolor" id="table_bgcolor" value="" onChange="updateStyle()">
</td>
<td width="20%"><?php echo $lang['border_color']; ?></td>
<td> <button class="colordisplay" type="button" onClick="colordialog(1);">
<div id="tableborderchosencolor"> </div>
<?php echo $lang['choose']; ?></button>
<input type="hidden" name="table_bordercolor" id="table_bordercolor" value="" onChange="updateStyle()">
</td>
</tr>
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td colspan="4"> <table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><?php echo $lang['background_image']; ?> <input type="text" style="width:225px" name="tableBackground" id="tableBackground" onChange="updateStyle()"></td>
<td> <script type="text/javascript">
<!--//
if (obj.imagewindow == 'image.php') {
document.write('<button class="chooseImage" type="button" onClick="open_image_window(\'table\')"><img src="<?php echo WP_WEB_DIRECTORY; ?>images/choose_image.gif" width="18" height="15" alt=""></button>')
}
//-->
</script></td>
</tr>
</table></td>
</tr>
</table>
</fieldset></td>
</tr>
</table>
</div>
<div style="position:absolute;top:325; left:5; width:420px; " id="botm">
<table border="0" cellpadding="2" cellspacing="0" height="40" width="420">
<tr>
<td><?php echo $lang['style_preview']; ?> <br>
<div id="tbl_background" class="previewWindow" style="background-color:#FFFFFF; overflow:hidden; height: 120px"><table width="100%" height="120" cellpadding="0" cellspacing="0">
<tr>
<td> <table cellspacing="0" cellpadding="3" border="0" height="90">
<tr>
<td width="33%"> </td>
</tr>
<tr>
<td width="34%" valign="bottom"><?php echo $lang['row']; ?></td>
</tr>
</table></td>
<td width="100%" valign="middle"> <table cellspacing="0" cellpadding="3" height="90" width="95%" id="tbl" border="0">
<tr>
<td width="34%"> </td>
<td width="33%"> </td>
<td width="33%"> </td>
</tr>
<tr id="tbl_tr">
<td width="34%"> </td>
<td width="33%" id="tbl_td"><?php echo $lang['cell']; ?></td>
<td width="33%"> </td>
</tr>
</table></td>
</tr>
</table></div></td>
</tr>
<tr>
<td align="center" height="100%" class="text" width="100%"> <button type="submit"><?php echo $lang['apply']; ?></button>
<button type="button" onClick="window.close();"><?php echo $lang['cancel']; ?></button></td>
</tr>
</table>
</div>
</form>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -