mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-05 18:12:17 +09:00
이미지/URL링크, 컬러피커 제거
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6101 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
072cdbffb4
commit
029c14db45
44 changed files with 0 additions and 1294 deletions
Binary file not shown.
|
Before Width: | Height: | Size: 359 B |
Binary file not shown.
|
Before Width: | Height: | Size: 382 B |
Binary file not shown.
|
Before Width: | Height: | Size: 379 B |
Binary file not shown.
|
Before Width: | Height: | Size: 368 B |
|
|
@ -1,10 +0,0 @@
|
|||
@charset "utf-8";
|
||||
@import url(../../../../../modules/admin/tpl/css/admin.css);
|
||||
|
||||
.image_align {
|
||||
margin:0px 0px 5px 0px;
|
||||
float:left;
|
||||
width:200px;
|
||||
}
|
||||
|
||||
li {list-style:none; float:left; margin-right:.5em;}
|
||||
|
|
@ -1,93 +0,0 @@
|
|||
<!--%import("popup.js")-->
|
||||
<!--%import("popup.css")-->
|
||||
<!--%import("../lang")-->
|
||||
|
||||
<div id="popHeader">
|
||||
<h3 class="xeAdmin">{$component_info->title} ver. {$component_info->version}</h3>
|
||||
</div>
|
||||
|
||||
<form action="./" method="get" onSubmit="return false" id="fo">
|
||||
|
||||
<div id="popBody">
|
||||
<table cellspacing="0" class="rowTable">
|
||||
<col width="100" />
|
||||
<col />
|
||||
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->image_url}</div></th>
|
||||
<td><input type="text" id="image_url" value="{url_decode($manual_url)}" onblur="getImageScale();" class="inputTypeText w400" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->image_scale}</div></th>
|
||||
<td>
|
||||
<ul>
|
||||
<li><input type="text" id="width" value="0" size="4" class="inputTypeText" onblur="setScale('width');return false;" />px </li>
|
||||
<li><input type="text" id="height" value="0" size="4" class="inputTypeText" onblur="setScale('height');return false;" />px </li>
|
||||
<li><a href="#" onclick="getImageScale(); return false;" class="button"><span>{$lang->cmd_get_scale}</span></a></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><div>URL</div></th>
|
||||
<td><input type="text" id="link_url" value="" class="inputTypeText w400"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->urllink_open_window}</div></th>
|
||||
<td><input type="checkbox" id="open_window" value="Y" /> {$lang->about_url_link_open_window}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->image_alt}</div></th>
|
||||
<td><input type="text" id="image_alt" value="" class="inputTypeText w400"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->image_align}</div></th>
|
||||
<td>
|
||||
<div class="image_align">
|
||||
<input type="radio" name="align" value="" id="align_normal" checked="checked"/>
|
||||
<label for="align_normal">
|
||||
<img src="./images/align_normal.gif" alt="{$lang->image_align_normal}" />
|
||||
{$lang->image_align_normal}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="image_align">
|
||||
<input type="radio" name="align" value="left" id="align_left" />
|
||||
<label for="align_left">
|
||||
<img src="./images/align_left.gif" alt="{$lang->image_align_left}" />
|
||||
{$lang->image_align_left}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="image_align">
|
||||
<input type="radio" name="align" value="middle" id="align_middle" />
|
||||
<label for="align_middle">
|
||||
<img src="./images/align_middle.gif" alt="{$lang->image_align_middle}" />
|
||||
{$lang->image_align_middle}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="image_align">
|
||||
<input type="radio" name="align" value="right" id="align_right" />
|
||||
<label for="align_right">
|
||||
<img src="./images/align_right.gif" alt="{$lang->image_align_right}" />
|
||||
{$lang->image_align_right}
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<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">
|
||||
<a href="#" onclick="insertImage()" class="button black strong"><span>{$lang->cmd_insert}</span></a>
|
||||
<a href="#" onclick="winopen('./?module=editor&act=dispEditorComponentInfo&component_name={$component_info->component_name}','ComponentInfo','left=10,top=10,width=10,height=10,resizable=no,scrollbars=no,toolbars=no');return false;" class="button"><span>{$lang->about_component}</span></a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
|
@ -1,156 +0,0 @@
|
|||
/**
|
||||
* popup으로 열렸을 경우 부모창의 위지윅에디터에 select된 이미지가 있는지 체크하여
|
||||
* 있으면 가져와서 원하는 곳에 삽입
|
||||
**/
|
||||
|
||||
var orig_width = 0;
|
||||
var orig_height = 0;
|
||||
function getImage() {
|
||||
// 부모 위지윅 에디터에서 선택된 영역이 있는지 확인
|
||||
if(typeof(opener)=="undefined") return;
|
||||
|
||||
// url이 미리 입력되어 있을 경우 scale구해줌
|
||||
if(xGetElementById("image_url").value) {
|
||||
getImageScale();
|
||||
return;
|
||||
}
|
||||
|
||||
// 부모 위지윅 에디터에서 선택된 영역이 있으면 처리
|
||||
var node = opener.editorPrevNode;
|
||||
if(!node || node.nodeName != "IMG") {
|
||||
return;
|
||||
}
|
||||
var src = node.getAttribute("src");
|
||||
var border = node.style.borderWidth ?
|
||||
node.style.borderWidth.match("[0-9]+") : node.getAttribute("border");
|
||||
var align = node.style.cssFloat ?
|
||||
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);
|
||||
orig_width = width;
|
||||
orig_height = height;
|
||||
var link_url = node.getAttribute("link_url");
|
||||
var open_window = node.getAttribute("open_window");
|
||||
|
||||
xGetElementById("image_url").value = src;
|
||||
xGetElementById("image_alt").value = alt;
|
||||
|
||||
if(link_url) {
|
||||
link_url = link_url.replace(/<([^>]*)>/ig,'').replace(/</ig,'<').replace(/>/ig,'>').replace(/&/ig,'&');
|
||||
xGetElementById('link_url').value = link_url;
|
||||
}
|
||||
if(open_window == 'Y') xGetElementById('open_window').checked = "true";
|
||||
|
||||
switch(align) {
|
||||
case 'left' : xGetElementById("align_left").checked = true; break;
|
||||
case 'middle' : xGetElementById("align_middle").checked = true; break;
|
||||
case 'right' : xGetElementById("align_right").checked = true; break;
|
||||
default : xGetElementById("align_normal").checked = true; break;
|
||||
}
|
||||
|
||||
if(margin) {
|
||||
xGetElementById('image_margin').value = margin;
|
||||
}
|
||||
|
||||
if(border) {
|
||||
xGetElementById("image_border").value = border;
|
||||
}
|
||||
|
||||
xGetElementById("width").value = width;
|
||||
xGetElementById("height").value = height;
|
||||
|
||||
}
|
||||
|
||||
function getImageScale() {
|
||||
var url = xGetElementById("image_url").value;
|
||||
if(!url) return;
|
||||
|
||||
var img = new Image();
|
||||
img.src = url;
|
||||
|
||||
xGetElementById("width").value = img.width;
|
||||
xGetElementById("height").value = img.height;
|
||||
|
||||
orig_width = img.width;
|
||||
orig_height = img.height;
|
||||
}
|
||||
function insertImage(obj) {
|
||||
if(typeof(opener)=="undefined") return;
|
||||
|
||||
var link_url = xGetElementById('link_url').value;
|
||||
if(link_url) link_url = link_url.replace(/&/ig,'&').replace(/</ig,'<').replace(/>/ig,'>');
|
||||
var open_window = 'N';
|
||||
if(xGetElementById('open_window').checked) open_window = 'Y';
|
||||
|
||||
var url = xGetElementById("image_url").value;
|
||||
var alt = xGetElementById("image_alt").value;
|
||||
var align = "";
|
||||
if(xGetElementById("align_normal").checked==true) align = "";
|
||||
else if(xGetElementById("align_left").checked==true) align = "float: left";
|
||||
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;
|
||||
|
||||
if(!url) {
|
||||
window.close();
|
||||
return;
|
||||
}
|
||||
|
||||
url = url.replace(request_uri,'');
|
||||
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(align || border || margin){
|
||||
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);
|
||||
|
||||
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
|
||||
|
||||
opener.editorReplaceHTML(iframe_obj, text);
|
||||
opener.editorFocus(opener.editorPrevSrl);
|
||||
|
||||
window.close();
|
||||
}
|
||||
|
||||
xAddEventListener(window, "load", getImage);
|
||||
|
||||
function setScale(type) {
|
||||
switch(type) {
|
||||
case 'width' :
|
||||
if(!orig_height) return;
|
||||
var n_width = xGetElementById('width').value;
|
||||
var p = n_width/orig_width;
|
||||
var n_height = parseInt(orig_height * p,10);
|
||||
xGetElementById('height').value = n_height;
|
||||
break;
|
||||
case 'height' :
|
||||
if(!orig_width) return;
|
||||
var n_height = xGetElementById('height').value;
|
||||
var p = n_height/orig_height;
|
||||
var n_width = parseInt(orig_width * p,10);
|
||||
xGetElementById('width').value = n_width;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue