#17641849 이미지 마진 설정 가능하게, Feed에서 에디터 컴포넌트 코드 치환

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5380 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
misol 2009-01-16 06:06:14 +00:00
parent 098d763755
commit a7a5b73d7a
13 changed files with 48 additions and 24 deletions

View file

@ -49,6 +49,7 @@
$link_url = $xml_obj->attrs->link_url;
$open_window = $xml_obj->attrs->open_window;
$style = $xml_obj->attrs->style;
$margin = (int)$xml_obj->attrs->margin;
if(!$alt) {
$tmp_arr = explode('/',$src);
@ -64,6 +65,10 @@
$attr_output[] = "alt=\"".$alt."\"";
$attr_output[] = "title=\"".$alt."\"";
}
if($margin) {
$style = preg_replace('/margin[: 0-9a-z]+\;/i','', $style);
$style .= 'margin:'.$margin.'px;';
}
if($align) $attr_output[] = "align=\"".$align."\"";
if(preg_match("/\.png$/i",$src)) $attr_output[] = "class=\"iePngFix\"";
@ -72,7 +77,7 @@
if($height) $attr_output[] = 'height="'.$height.'"';
if($border) $attr_output[] = 'border="'.$border.'"';
$code = sprintf("<img %s style=\"%s\" />", implode(" ",$attr_output), $style);
$code = sprintf("<img %s style=\"%s\" />", implode(' ',$attr_output), $style);
if($link_url) {
if($open_window =='Y') $code = sprintf('<a href="%s" onclick="window.open(this.href);return false;">%s</a>', $link_url, $code);

View file

@ -15,6 +15,7 @@
$lang->image_align_right = "Right of Article";
$lang->image_border = "Border Thickness";
$lang->urllink_url = "URL";
$lang->image_margin = 'Image Margin';
$lang->about_url_link_open_window = "Make the link to open as a new window";
$lang->cmd_get_scale = "Get Image Size";

View file

@ -15,6 +15,7 @@
$lang->image_align_right = "Derecho de articulo";
$lang->image_border = "Grosor de Fronteras";
$lang->urllink_url = "URL";
$lang->image_margin = 'Image Margin';
$lang->about_url_link_open_window = "Hacer el vinculo para abrir una nueva ventana";
$lang->cmd_get_scale = "Obtener tamano de la imagen";

View file

@ -14,6 +14,7 @@
$lang->image_align_middle = "中央揃え";
$lang->image_align_right = "右揃え";
$lang->image_border = "ボーダー";
$lang->image_margin = 'Image Margin';
$lang->urllink_open_window = "新しいウィンドウで開く";
$lang->about_url_link_open_window = "チェックすると、リンクをクリックした時に新しいウィンドウで開きます。";

View file

@ -5,18 +5,19 @@
* @brief 위지윅에디터(editor) 모듈 > 이미지링크(image_link) 컴포넌트의 언어팩
**/
$lang->image_url = "이미지 경로";
$lang->image_alt = "설명 입력";
$lang->image_scale = "이미지크기";
$lang->image_align = "정렬 방법 ";
$lang->image_align_normal = "한 문단을 차지";
$lang->image_align_left = "글의 왼쪽으로";
$lang->image_align_middle = "가운데";
$lang->image_align_right = "글의 우측으로";
$lang->image_border = "경계선 두께";
$lang->image_url = '이미지 경로';
$lang->image_alt = '설명 입력';
$lang->image_scale = '이미지크기';
$lang->image_align = '정렬 방법';
$lang->image_align_normal = '한 문단을 차지';
$lang->image_align_left = '글의 왼쪽으로';
$lang->image_align_middle = '가운데';
$lang->image_align_right = '글의 우측으로';
$lang->image_border = '경계선 두께';
$lang->image_margin = '바깥 여백';
$lang->urllink_open_window = "새창열기";
$lang->about_url_link_open_window = "선택하시면 링크 선택시 새창으로 열립니다";
$lang->urllink_open_window = '새창열기';
$lang->about_url_link_open_window = '선택하시면 링크 선택시 새창으로 열립니다';
$lang->cmd_get_scale = "크기 구하기";
$lang->cmd_get_scale = '크기 구하기';
?>

View file

@ -15,6 +15,7 @@
$lang->image_align_right = "Право";
$lang->image_border = "Толщина рамки";
$lang->urllink_url = "URL";
$lang->image_margin = 'Image Margin';
$lang->about_url_link_open_window = "Создайте ссылку для открытия в новом окне";
$lang->cmd_get_scale = "Получить размер изображения";

View file

@ -15,6 +15,7 @@
$lang->image_align_right = "内容右侧";
$lang->image_border = "边框粗细";
$lang->urllink_url = "URL";
$lang->image_margin = 'Image Margin';
$lang->about_url_link_open_window = "将在新窗口中打开链接。";
$lang->cmd_get_scale = "获得图片大小";

View file

@ -15,6 +15,7 @@
$lang->image_align_right = "靠右";
$lang->image_border = "邊框粗細";
$lang->urllink_url = "網址";
$lang->image_margin = 'Image Margin';
$lang->about_url_link_open_window = "開啟連結於新視窗。";
$lang->cmd_get_scale = "取得圖片大小";

View file

@ -79,6 +79,10 @@
<th scope="row"><div>{$lang->image_border}</div></th>
<td><input type="text" id="image_border" value="0" size="2" class="inputTypeText" />px</td>
</tr>
<tr>
<th scope="row"><div>{$lang->image_margin}</div></th>
<td><input type="text" id="image_margin" value="0" size="2" class="inputTypeText" />px</td>
</tr>
</table>
</div>
<div id="popFooter" class="tCenter">

View file

@ -27,6 +27,8 @@ function getImage() {
node.style.cssFloat : node.style.styleFloat;
if(!align) align = node.style.verticalAlign?
node.style.verticalAlign : node.getAttribute("align");
var margin = node.style.margin ?
node.style.margin.match("[0-9]+") : node.getAttribute("margin");
var alt = node.getAttribute("alt");
var width = xWidth(node);
var height = xHeight(node);
@ -51,6 +53,10 @@ function getImage() {
default : xGetElementById("align_normal").checked = true; break;
}
if(margin) {
xGetElementById('image_margin').value = margin;
}
xGetElementById("image_border").value = border;
xGetElementById("width").value = width;
@ -87,6 +93,7 @@ function insertImage(obj) {
else if(xGetElementById("align_middle").checked==true) align = "vertical-align: middle";
else if(xGetElementById("align_right").checked==true) align = "float: right";
var border = parseInt(xGetElementById("image_border").value,10);
var margin = parseInt(xGetElementById("image_margin").value,10);
var width = xGetElementById("width").value;
var height = xGetElementById("height").value;
@ -97,18 +104,21 @@ function insertImage(obj) {
}
url = url.replace(request_uri,'');
var text = "<img editor_component=\"image_link\" src=\""+url+"\" ";
var text = "<img editor_component=\"image_link\" src=\""+url+"\"";
if(alt) text+= " alt=\""+alt+"\"";
if(width) text+= " width=\""+width+"\" ";
if(height) text+= " height=\""+height+"\" ";
if(link_url) text+= " link_url=\""+link_url+"\" ";
if(open_window=='Y') text+= " open_window=\"Y\" ";
if(width) text+= " width=\""+width+"\"";
if(height) text+= " height=\""+height+"\"";
if(link_url) text+= " link_url=\""+link_url+"\"";
if(open_window=='Y') text+= " open_window=\"Y\"";
if(align || border){
text+= " style=\"";
if(align) text+= align+"; ";
if(border) text+= "border: solid "+border+"px; ";
if(margin) text+= "margin: "+margin+"px; ";
text+= "\" ";
}
if(border) text+= " border=\""+border+"\""
if(margin) text+= " margin=\""+margin+"\""
text+= " />";
opener.editorFocus(opener.editorPrevSrl);