mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-25 06:09:55 +09:00
삭제
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2327 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
commit
8326004cb2
2773 changed files with 91485 additions and 0 deletions
10
modules/editor/components/naver_map/tpl/error.html
Normal file
10
modules/editor/components/naver_map/tpl/error.html
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<!--%import("popup.css")-->
|
||||
<!--%import("../lang")-->
|
||||
<div class="error_window">
|
||||
<div class="error_text">
|
||||
{nl2br($lang->msg_no_apikey)}
|
||||
</div>
|
||||
<div class="editor_button_area">
|
||||
<input type="button" value="{$lang->cmd_close}" onclick="window.close();" class="editor_button" />
|
||||
</div>
|
||||
</div>
|
||||
BIN
modules/editor/components/naver_map/tpl/navermap_component.gif
Normal file
BIN
modules/editor/components/naver_map/tpl/navermap_component.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 528 B |
11
modules/editor/components/naver_map/tpl/popup.css
Normal file
11
modules/editor/components/naver_map/tpl/popup.css
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
@charset "utf-8";
|
||||
@import url(../../../../../../modules/admin/tpl/css/admin.css);
|
||||
|
||||
.search { border:1px solid #DDDDDD; padding:5px; }
|
||||
#address { width:100px; }
|
||||
.about_address { clear:both; color:#DDDDDD; }
|
||||
|
||||
.address_list_box { color:#AAAAAA; margin-top:1em; clear:both;}
|
||||
.address_list_box a { color:#AAAAAA; }
|
||||
|
||||
#display_map { width:400px; height:400px; border:0px; border:1px solid #DDDDDD; margin-left:10px; }
|
||||
57
modules/editor/components/naver_map/tpl/popup.html
Normal file
57
modules/editor/components/naver_map/tpl/popup.html
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
<!--%import("popup.js")-->
|
||||
<!--%import("popup.css")-->
|
||||
<!--%import("../lang")-->
|
||||
|
||||
<div id="popHeadder">
|
||||
<h1>{$component_info->title} ver. {$component_info->version}</h1>
|
||||
</div>
|
||||
|
||||
<div id="popBody">
|
||||
|
||||
<table border="0">
|
||||
<col width="190" />
|
||||
<col />
|
||||
<tr valign="top">
|
||||
<td>
|
||||
<div class="search">
|
||||
<form action="./" method="get" onSubmit="search_address(); return false;" id="fo">
|
||||
<input type="hidden" id="map_x" name="x" value="" />
|
||||
<input type="hidden" id="map_y" name="x" value="" />
|
||||
<input type="hidden" id="marker" name="marker_1" value="" />
|
||||
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td><input type="text" class="inputTypeText" id="address" value="" /></td>
|
||||
<td><span class="button"><input type="submit" value="{$lang->cmd_search}" /></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="about_address">{$lang->about_address}</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="address_list_box" id="address_list">{$lang->about_address_use}</div>
|
||||
|
||||
<table cellspacing="0" class="tableType5 gap1">
|
||||
<tr>
|
||||
<th scope="row">{$lang->map_width}</th>
|
||||
<td><input type="text" class="inputTypeText" size="3" id="map_width" value="400" />px</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->map_height}</th>
|
||||
<td><input type="text" class="inputTypeText" size="3" id="map_height" value="300" />px</td>
|
||||
</table>
|
||||
</td>
|
||||
<td>
|
||||
<iframe name="display_map" id="display_map" frameBorder="0" src="./?module=editor&component=naver_map&act=procEditorCall&method=displayMap&width=400&height=400"></iframe>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="popFooter" class="tCenter">
|
||||
<a href="#" onclick="insertNaverMap()" class="button"><span>{$lang->cmd_insert}</span></a>
|
||||
<a href="#" onclick="window.close(); return false;" class="button"><span>{$lang->cmd_close}</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>
|
||||
108
modules/editor/components/naver_map/tpl/popup.js
Normal file
108
modules/editor/components/naver_map/tpl/popup.js
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
/**
|
||||
* popup으로 열렸을 경우 부모창의 위지윅에디터에 select된 멀티미디어 컴포넌트 코드를 체크하여
|
||||
* 있으면 가져와서 원하는 곳에 삽입
|
||||
**/
|
||||
function getNaverMap() {
|
||||
// 부모 위지윅 에디터에서 선택된 영역이 있는지 확인
|
||||
if(typeof(opener)=="undefined") return;
|
||||
|
||||
var node = opener.editorPrevNode;
|
||||
if(!node || node.nodeName != "IMG") return;
|
||||
|
||||
var x = node.getAttribute("x");
|
||||
var y = node.getAttribute("y");
|
||||
var width = xWidth(node);
|
||||
var height = xHeight(node);
|
||||
var address = node.getAttribute("address");
|
||||
|
||||
if(x&&y) {
|
||||
xGetElementById("map_x").value = x;
|
||||
xGetElementById("map_y").value = y;
|
||||
moveMap(x,y,3);
|
||||
}
|
||||
if(address) {
|
||||
xGetElementById("address").value = address;
|
||||
search_address(address);
|
||||
}
|
||||
|
||||
xGetElementById("map_width").value = width-4;
|
||||
xGetElementById("map_height").value = height-4;
|
||||
}
|
||||
|
||||
function insertNaverMap(obj) {
|
||||
if(typeof(opener)=="undefined") return;
|
||||
|
||||
var x = xGetElementById("map_x").value;
|
||||
var y = xGetElementById("map_y").value;
|
||||
var marker = xGetElementById("marker").value;
|
||||
var address = xGetElementById("address").value;
|
||||
|
||||
var width = xGetElementById("map_width").value;
|
||||
var height = xGetElementById("map_height").value;
|
||||
|
||||
var text = "<img src=\"./common/tpl/images/blank.gif\" editor_component=\"naver_map\" address=\""+address+"\" x=\""+x+"\" y=\""+y+"\" width=\""+width+"\" height=\""+height+"\" style=\"width:"+width+"px;height:"+height+"px;border:2px dotted #3CBC2f;background:url(./modules/editor/components/naver_map/tpl/navermap_component.gif) no-repeat center;\" marker=\""+marker+"\" />";
|
||||
|
||||
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", getNaverMap);
|
||||
|
||||
/* 네이버의 map openapi로 주소에 따른 좌표를 요청 */
|
||||
function search_address(selected_address) {
|
||||
if(typeof(selected_address)=="undefined") selected_address = null;
|
||||
var address = xGetElementById("address").value;
|
||||
if(!address) return;
|
||||
var params = new Array();
|
||||
params['component'] = "naver_map";
|
||||
params['address'] = address;
|
||||
params['method'] = "search_address";
|
||||
|
||||
var response_tags = new Array('error','message','address_list');
|
||||
exec_xml('editor', 'procEditorCall', params, complete_search_address, response_tags, selected_address);
|
||||
}
|
||||
|
||||
function moveMap(x,y,scale) {
|
||||
if(typeof(scale)=="undefined") scale = 3;
|
||||
display_map.moveMap(x,y,scale);
|
||||
}
|
||||
|
||||
function mapClicked(pos) {
|
||||
xGetElementById("map_x").value = pos.x;
|
||||
xGetElementById("map_y").value = pos.y;
|
||||
}
|
||||
|
||||
var naver_address_list = new Array();
|
||||
function complete_search_address(ret_obj, response_tags, selected_address) {
|
||||
var address_list = ret_obj['address_list'];
|
||||
if(!address_list) return;
|
||||
|
||||
naver_address_list = new Array();
|
||||
|
||||
var html = "";
|
||||
var address_list = address_list.split("\n");
|
||||
for(var i=0;i<address_list.length;i++) {
|
||||
var item = address_list[i].split(",");
|
||||
|
||||
naver_address_list[naver_address_list.length] = item;
|
||||
html += "<a href='#' onclick=\"moveMap('"+item[0]+"','"+item[1]+"');return false;\">"+item[2]+"</a><br />";
|
||||
}
|
||||
|
||||
var list_zone = xGetElementById("address_list");
|
||||
xInnerHtml(list_zone, html);
|
||||
}
|
||||
|
||||
/* 마커 표시 */
|
||||
var marker_count = 1;
|
||||
function addMarker(pos) {
|
||||
if(marker_count>10) return;
|
||||
xGetElementById("marker").value += '|@|'+pos;
|
||||
marker_count++;
|
||||
return true;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue