From 790412cd63e4d4c912028f92f1d72c998709f353 Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 2 Apr 2007 03:45:30 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/trunk@875 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- .../components/naver_map/naver_map.class.php | 8 ++++++++ .../components/naver_map/tpl/images/blank.gif | Bin 43 -> 0 bytes modules/editor/components/naver_map/tpl/popup.js | 4 +--- 3 files changed, 9 insertions(+), 3 deletions(-) delete mode 100644 modules/editor/components/naver_map/tpl/images/blank.gif diff --git a/modules/editor/components/naver_map/naver_map.class.php b/modules/editor/components/naver_map/naver_map.class.php index 7fc665613..5cbef6022 100644 --- a/modules/editor/components/naver_map/naver_map.class.php +++ b/modules/editor/components/naver_map/naver_map.class.php @@ -103,6 +103,14 @@ $marker = $xml_obj->attrs->marker; $width = $xml_obj->attrs->width; $height = $xml_obj->attrs->height; + $style = $xml_obj->attrs->style; + + if(!$width || !$height) { + preg_match_all('/([0-9]+)/i',$style,$matches); + $width = $matches[0][0]; + $height = $matches[0][1]; + } + $body_code = sprintf('
', $width, $height, Context::getRequestUri(), $width, $height, $x, $y, $marker, $width, $height); return $body_code; } diff --git a/modules/editor/components/naver_map/tpl/images/blank.gif b/modules/editor/components/naver_map/tpl/images/blank.gif deleted file mode 100644 index 35d42e808f0a8017b8d52a06be2f8fec0b466a66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 43 scmZ?wbhEHbWMp7uXkcLY|NlP&1B2pE7Dgb&paUX6G7L;iE{qJ;0LZEa`2YX_ diff --git a/modules/editor/components/naver_map/tpl/popup.js b/modules/editor/components/naver_map/tpl/popup.js index 4114a7de9..8a56776c9 100644 --- a/modules/editor/components/naver_map/tpl/popup.js +++ b/modules/editor/components/naver_map/tpl/popup.js @@ -7,7 +7,7 @@ function getNaverMap() { if(typeof(opener)=="undefined") return; var node = opener.editorPrevNode; - if(!node || node.nodeName != "DIV") return; + if(!node || node.nodeName != "IMG") return; var x = node.getAttribute("x"); var y = node.getAttribute("y"); @@ -38,10 +38,8 @@ function insertNaverMap(obj) { 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 = "";