mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-26 14:49:56 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@842 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
30278672bc
commit
4ea882e869
143 changed files with 0 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>
|
||||
131
modules/editor/components/naver_map/tpl/popup.css
Normal file
131
modules/editor/components/naver_map/tpl/popup.css
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
@charset "utf-8";
|
||||
.editor_window {
|
||||
width:700px;
|
||||
clear:both;
|
||||
}
|
||||
|
||||
.error_window {
|
||||
width:700px;
|
||||
}
|
||||
|
||||
.error_text {
|
||||
padding:20px;
|
||||
color:#444444;
|
||||
border:10px solid #DDDDDD;
|
||||
font-size:9pt;
|
||||
line-height:200%;
|
||||
}
|
||||
|
||||
.editor_title {
|
||||
font-size:10pt;
|
||||
font-weight:bold;
|
||||
clear:both;
|
||||
height:20px;
|
||||
background-color:#555555;
|
||||
color:#EFEFEF;
|
||||
vertical-align:middle;
|
||||
padding-top:5px;
|
||||
border-bottom:1px solid #000000;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.address_box {
|
||||
float:left;
|
||||
width:250px;
|
||||
border:1px solid #EEEEEE;
|
||||
padding:5px;
|
||||
margin:5px;
|
||||
}
|
||||
|
||||
|
||||
.input_address {
|
||||
width:200px;
|
||||
border:1px solid #AAAAAA;
|
||||
height:12px;
|
||||
font-size:9pt;
|
||||
}
|
||||
|
||||
.address_button {
|
||||
margin-top:4px;
|
||||
background-color:#AAAAAA;
|
||||
border:1px solid #333333;
|
||||
color:#FFFFFF;
|
||||
height:16px;
|
||||
font-size:9pt;
|
||||
}
|
||||
|
||||
.about_address {
|
||||
font-size:8pt;
|
||||
color:#AAAAAA;
|
||||
margin-top:3px;
|
||||
}
|
||||
|
||||
.address_list_box {
|
||||
border:1px solid #DDDDDD;
|
||||
padding:5px;
|
||||
float:left;
|
||||
width:250px;
|
||||
height:288px;
|
||||
margin:5px;
|
||||
font-size:9pt;
|
||||
color:#AAAAAA;
|
||||
overflow:auto;
|
||||
}
|
||||
|
||||
.address_list_box A {
|
||||
color:#888888;
|
||||
line-height:15px;
|
||||
}
|
||||
|
||||
.map_scale_box {
|
||||
float:left;
|
||||
width:250px;
|
||||
border:1px solid #EEEEEE;
|
||||
padding:5px;
|
||||
margin:5px;
|
||||
}
|
||||
|
||||
.map_scale_header {
|
||||
float:left;
|
||||
font-size:9pt;
|
||||
width:60px;
|
||||
}
|
||||
|
||||
.map_scale_body {
|
||||
width:180px;
|
||||
float:left;
|
||||
margin-left:5px;
|
||||
font-size:9pt;
|
||||
}
|
||||
|
||||
.input_map_size {
|
||||
width:30px;
|
||||
border:1px solid #EEEEEE;
|
||||
height:12px;
|
||||
font-size:9pt;
|
||||
}
|
||||
|
||||
.map_display {
|
||||
float:right;
|
||||
width:410px;
|
||||
height:410px;
|
||||
margin:5px 5px 0px 6px;
|
||||
}
|
||||
|
||||
.editor_button_area {
|
||||
width:100%;
|
||||
border-top:1px solid #AAAAAA;
|
||||
text-align:center;
|
||||
background-color:#EEEEEE;
|
||||
padding:0px 0px 2px 0px;
|
||||
clear:both;
|
||||
height:25px;
|
||||
}
|
||||
|
||||
.editor_button {
|
||||
margin-top:4px;
|
||||
background-color:#FFFFFF;
|
||||
border:1px solid #AAAAAA;
|
||||
height:18px;
|
||||
font-size:9pt;
|
||||
}
|
||||
35
modules/editor/components/naver_map/tpl/popup.html
Normal file
35
modules/editor/components/naver_map/tpl/popup.html
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<!--%import("popup.js")-->
|
||||
<!--%import("popup.css")-->
|
||||
<!--%import("../lang")-->
|
||||
|
||||
<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="" />
|
||||
|
||||
<div class="editor_window">
|
||||
<div class="editor_title">{$component_info->title} ver. {$component_info->version} <a href="#" onclick="winopen('./?module=editor&act=viewComponentInfo&component_name={$component_info->component_name}','ComponentInfo','left=10,top=10,width=10,height=10,resizable=no,scrollbars=no,toolbars=no');return false;"><img src="../../../tpl/images/about_component.gif" title="{$lang->about_component}" alt="{$lang->about_component}" class="about_component_icon" border="0" /></a></div>
|
||||
|
||||
<div class="map_display"><iframe name="display_map" id="display_map" frameBorder="0" style="width:400px;height:400px;border:0px;margin:5px;" src="./?module=editor&component=naver_map&act=procCall&method=displayMap&width=400&height=400"></iframe></div>
|
||||
|
||||
<div class="address_box">
|
||||
<input type="text" class="input_address" id="address" value="" /><input type="submit" value="{$lang->cmd_search}" class="address_button" onclick="search_address();return false;"/>
|
||||
<div class="about_address">{$lang->about_address}</div>
|
||||
</div>
|
||||
|
||||
<div class="address_list_box" id="address_list">{$lang->about_address_use}</div>
|
||||
|
||||
<div class="map_scale_box">
|
||||
<div class="map_scale_header">{$lang->map_width}</div>
|
||||
<div class="map_scale_body"><input type="text" class="input_map_size" id="map_width" value="640" />px</div>
|
||||
|
||||
<div class="map_scale_header">{$lang->map_height}</div>
|
||||
<div class="map_scale_body"><input type="text" class="input_map_size" id="map_height" value="480" />px</div>
|
||||
</div>
|
||||
|
||||
<div class="editor_button_area">
|
||||
<input type="button" value="{$lang->cmd_insert}" class="editor_button" onclick="insertNaverMap()" />
|
||||
<input type="button" value="{$lang->cmd_close}" class="editor_button" onclick="window.close();" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
111
modules/editor/components/naver_map/tpl/popup.js
Normal file
111
modules/editor/components/naver_map/tpl/popup.js
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
/**
|
||||
* popup으로 열렸을 경우 부모창의 위지윅에디터에 select된 멀티미디어 컴포넌트 코드를 체크하여
|
||||
* 있으면 가져와서 원하는 곳에 삽입
|
||||
**/
|
||||
function getNaverMap() {
|
||||
// 부모 위지윅 에디터에서 선택된 영역이 있는지 확인
|
||||
if(typeof(opener)=="undefined") return;
|
||||
|
||||
var node = opener.editorPrevNode;
|
||||
if(!node || node.nodeName != "DIV") 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-6;
|
||||
xGetElementById("map_height").value = height-6;
|
||||
}
|
||||
|
||||
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;
|
||||
if(!width) width = 640;
|
||||
|
||||
var height = xGetElementById("map_height").value;
|
||||
if(!height) height= 480;
|
||||
|
||||
var text = "<div editor_component=\"naver_map\" class=\"editor_component_output\" address=\""+address+"\" x=\""+x+"\" y=\""+y+"\" width=\""+width+"\" height=\""+height+"\" style=\"width:"+width+"px;height:"+height+"px;\" marker=\""+marker+"\"></div>";
|
||||
|
||||
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', 'procCall', 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