mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-22 20:59:55 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@684 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
d3fa10eee2
commit
1bbcb0e477
4 changed files with 36 additions and 12 deletions
|
|
@ -16,8 +16,8 @@
|
||||||
$lang->table_border = "외곽선 굵기";
|
$lang->table_border = "외곽선 굵기";
|
||||||
$lang->table_inner_border = "구분선 굵기";
|
$lang->table_inner_border = "구분선 굵기";
|
||||||
|
|
||||||
$lang->cell_width = "셀 가로크기 ";
|
$lang->cell_width = "가로크기 ";
|
||||||
$lang->cell_height = "셀 세로 크기 ";
|
$lang->cell_height = "세로 크기 ";
|
||||||
|
|
||||||
$lang->table_border_color = "외곽선 색";
|
$lang->table_border_color = "외곽선 색";
|
||||||
$lang->table_bg_color = "배경 색";
|
$lang->table_bg_color = "배경 색";
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
.editor_window {
|
.editor_window {
|
||||||
width:620px;
|
width:680px;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
width:90px;
|
width:80px;
|
||||||
float:left;
|
float:left;
|
||||||
text-align:right;
|
text-align:right;
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.body {
|
.body {
|
||||||
width:80px;
|
width:120px;
|
||||||
float:left;
|
float:left;
|
||||||
text-align:left;
|
text-align:left;
|
||||||
margin:5px 10px 5px 5px;
|
margin:5px 10px 5px 5px;
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,11 @@
|
||||||
|
|
||||||
<div class="item_area">
|
<div class="item_area">
|
||||||
<div class="header">{$lang->table_width} :</div>
|
<div class="header">{$lang->table_width} :</div>
|
||||||
<div class="body"><input type="text" class="table_input" id="width" value="600" />px</div>
|
<div class="body">
|
||||||
|
<input type="text" class="table_input" id="width" value="100" />
|
||||||
|
<input type="radio" name="width_unit" id="width_unit_percent" checked="true" /><label for="width_unit_percent">%</label>
|
||||||
|
<input type="radio" name="width_unit" id="width_unit_pixel" /><label for="width_unit_pixel">px</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="header">{$lang->table_cellspacing} :</div>
|
<div class="header">{$lang->table_cellspacing} :</div>
|
||||||
<div class="body"><input type="text" class="table_input" id="cellspacing" value="0" />px</div>
|
<div class="body"><input type="text" class="table_input" id="cellspacing" value="0" />px</div>
|
||||||
|
|
@ -46,7 +50,11 @@
|
||||||
<div id="cell_attribute" style="display:none">
|
<div id="cell_attribute" style="display:none">
|
||||||
<div class="item_area">
|
<div class="item_area">
|
||||||
<div class="header">{$lang->cell_width} :</div>
|
<div class="header">{$lang->cell_width} :</div>
|
||||||
<div class="body"><input type="text" class="table_input" id="cell_width" value="0" />px</div>
|
<div class="body">
|
||||||
|
<input type="text" class="table_input" id="cell_width" value="0" />
|
||||||
|
<input type="radio" name="cell_width_unit" id="cell_width_unit_percent" checked="true" /><label for="cell_width_unit_percent">%</label>
|
||||||
|
<input type="radio" name="cell_width_unit" id="cell_width_unit_pixel" /><label for="cell_width_unit_pixel">px</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="header">{$lang->cell_height} :</div>
|
<div class="header">{$lang->cell_height} :</div>
|
||||||
<div class="body"><input type="text" class="table_input" id="cell_height" value="0" />px</div>
|
<div class="body"><input type="text" class="table_input" id="cell_height" value="0" />px</div>
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,8 @@ function doSelectOption(type) {
|
||||||
xGetElementById("table_option").style.display = "block";
|
xGetElementById("table_option").style.display = "block";
|
||||||
xGetElementById("cell_attribute").style.display = "block";
|
xGetElementById("cell_attribute").style.display = "block";
|
||||||
|
|
||||||
var cell_width = selected_node.style.width.replace(/px$/,'');
|
var cell_width = selected_node.style.width.replace(/(px|\%)$/,'');
|
||||||
|
var cell_width_unit = selected_node.style.width.replace(/^([0-9]+)/,'');
|
||||||
var cell_height = selected_node.style.height.replace(/px$/,'');
|
var cell_height = selected_node.style.height.replace(/px$/,'');
|
||||||
|
|
||||||
var border_color = selected_node.style.borderColor.replace(/^#/,'');
|
var border_color = selected_node.style.borderColor.replace(/^#/,'');
|
||||||
|
|
@ -45,6 +46,8 @@ function doSelectOption(type) {
|
||||||
if(!bg_color) bg_color = "FFFFFF";
|
if(!bg_color) bg_color = "FFFFFF";
|
||||||
|
|
||||||
xGetElementById("cell_width").value = cell_width?cell_width:0;
|
xGetElementById("cell_width").value = cell_width?cell_width:0;
|
||||||
|
if(cell_width_unit=="px") xGetElementById("cell_width_unit_pixel").checked = "true";
|
||||||
|
else xGetElementById("cell_width_unit_percent").value = "true";
|
||||||
xGetElementById("cell_height").value = cell_height?cell_height:0;
|
xGetElementById("cell_height").value = cell_height?cell_height:0;
|
||||||
|
|
||||||
xGetElementById("border_color_input").value = border_color;
|
xGetElementById("border_color_input").value = border_color;
|
||||||
|
|
@ -66,7 +69,11 @@ function doSelectOption(type) {
|
||||||
else {
|
else {
|
||||||
xGetElementById("col_row_area").style.display = "none";
|
xGetElementById("col_row_area").style.display = "none";
|
||||||
|
|
||||||
var width = xWidth(table_obj);
|
var width = table_obj.width.replace(/\%/,'');
|
||||||
|
var width_unit = table_obj.width.replace(/^([0-9]+)/,'');
|
||||||
|
if(!width_unit) xGetElementById("width_unit_pixel").checked = "true";
|
||||||
|
else xGetElementById("width_unit_percent").value = "true";
|
||||||
|
|
||||||
var border = table_obj.style.borderLeftWidth.replace(/px$/,'');
|
var border = table_obj.style.borderLeftWidth.replace(/px$/,'');
|
||||||
if(!border) border = 0;
|
if(!border) border = 0;
|
||||||
var inner_border = table_obj.getAttribute("border");
|
var inner_border = table_obj.getAttribute("border");
|
||||||
|
|
@ -129,6 +136,9 @@ function insertTable() {
|
||||||
if(!rows_count) rows_count = 1;
|
if(!rows_count) rows_count = 1;
|
||||||
|
|
||||||
var width = parseInt(xGetElementById("width").value,10);
|
var width = parseInt(xGetElementById("width").value,10);
|
||||||
|
var width_unit = "%";
|
||||||
|
if(xGetElementById("width_unit_pixel").checked) width_unit = "";
|
||||||
|
|
||||||
var border = parseInt(xGetElementById("border").value,10);
|
var border = parseInt(xGetElementById("border").value,10);
|
||||||
var inner_border = parseInt(xGetElementById("inner_border").value,10);
|
var inner_border = parseInt(xGetElementById("inner_border").value,10);
|
||||||
var cellspacing = parseInt(xGetElementById("cellspacing").value,10);
|
var cellspacing = parseInt(xGetElementById("cellspacing").value,10);
|
||||||
|
|
@ -140,7 +150,7 @@ function insertTable() {
|
||||||
if(bg_color.length!=6) bg_color = "FFFFFF";
|
if(bg_color.length!=6) bg_color = "FFFFFF";
|
||||||
|
|
||||||
var text = "";
|
var text = "";
|
||||||
text += "<table width=\""+width+"\" border=\""+inner_border+"\" cellspacing=\""+cellspacing+"\" cellpadding=\""+cellpadding+"\" ";
|
text += "<table width=\""+width+width_unit+"\" border=\""+inner_border+"\" cellspacing=\""+cellspacing+"\" cellpadding=\""+cellpadding+"\" ";
|
||||||
if(border>0) text += " style=\"border:"+border+"px solid #"+border_color+";background-color:#"+bg_color+"\" ";
|
if(border>0) text += " style=\"border:"+border+"px solid #"+border_color+";background-color:#"+bg_color+"\" ";
|
||||||
text +=">";
|
text +=">";
|
||||||
|
|
||||||
|
|
@ -161,6 +171,8 @@ function insertTable() {
|
||||||
// 테이블 수정일 경우
|
// 테이블 수정일 경우
|
||||||
} else if(xGetElementById("table_attribute_select").checked && table_obj) {
|
} else if(xGetElementById("table_attribute_select").checked && table_obj) {
|
||||||
var width = parseInt(xGetElementById("width").value,10);
|
var width = parseInt(xGetElementById("width").value,10);
|
||||||
|
var width_unit = "%";
|
||||||
|
if(xGetElementById("width_unit_pixel").checked) width_unit = "px";
|
||||||
var border = parseInt(xGetElementById("border").value,10);
|
var border = parseInt(xGetElementById("border").value,10);
|
||||||
var inner_border = parseInt(xGetElementById("inner_border").value,10);
|
var inner_border = parseInt(xGetElementById("inner_border").value,10);
|
||||||
var cellspacing = parseInt(xGetElementById("cellspacing").value,10);
|
var cellspacing = parseInt(xGetElementById("cellspacing").value,10);
|
||||||
|
|
@ -171,7 +183,9 @@ function insertTable() {
|
||||||
var bg_color = xGetElementById("bg_color_input").value;
|
var bg_color = xGetElementById("bg_color_input").value;
|
||||||
if(bg_color.length!=6) bg_color = "FFFFFF";
|
if(bg_color.length!=6) bg_color = "FFFFFF";
|
||||||
|
|
||||||
table_obj.style.width = width+"px";
|
table_obj.style.width = width+width_unit;
|
||||||
|
if(width_unit=="px") table_obj.setAttribute("width", width);
|
||||||
|
else table_obj.setAttribute("width", width+width_unit);
|
||||||
table_obj.setAttribute("border", inner_border);
|
table_obj.setAttribute("border", inner_border);
|
||||||
table_obj.setAttribute("cellspacing", cellspacing);
|
table_obj.setAttribute("cellspacing", cellspacing);
|
||||||
table_obj.setAttribute("cellpadding", cellpadding);
|
table_obj.setAttribute("cellpadding", cellpadding);
|
||||||
|
|
@ -181,12 +195,14 @@ function insertTable() {
|
||||||
// cell의 수정일 경우
|
// cell의 수정일 경우
|
||||||
} if(xGetElementById("cell_attribute_select").checked && selected_node) {
|
} if(xGetElementById("cell_attribute_select").checked && selected_node) {
|
||||||
var cell_width = parseInt(xGetElementById("cell_width").value,10);
|
var cell_width = parseInt(xGetElementById("cell_width").value,10);
|
||||||
|
var cell_width_unit = "%";
|
||||||
|
if(xGetElementById("cell_width_unit_pixel").checked) cell_width_unit = "px";
|
||||||
var cell_height = parseInt(xGetElementById("cell_height").value,10);
|
var cell_height = parseInt(xGetElementById("cell_height").value,10);
|
||||||
|
|
||||||
var bg_color = xGetElementById("bg_color_input").value;
|
var bg_color = xGetElementById("bg_color_input").value;
|
||||||
if(bg_color.length!=6) bg_color = "FFFFFF";
|
if(bg_color.length!=6) bg_color = "FFFFFF";
|
||||||
|
|
||||||
selected_node.style.width = cell_width+"px";
|
selected_node.style.width = cell_width+cell_width_unit;
|
||||||
selected_node.style.height = cell_height+"px";
|
selected_node.style.height = cell_height+"px";
|
||||||
selected_node.style.backgroundColor = "#"+bg_color;
|
selected_node.style.backgroundColor = "#"+bg_color;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue