diff --git a/addons/counter/counter.addon.php b/addons/counter/counter.addon.php
index 73d2b8bce..fc2bed4ae 100644
--- a/addons/counter/counter.addon.php
+++ b/addons/counter/counter.addon.php
@@ -13,7 +13,8 @@
**/
// called_position가 before_module_init 이고 module이 admin이 아닐 경우
- if($called_position == 'before_module_init' && $this->module != 'admin') {
- Context::addJsFile('./modules/counter/tpl/js/counter.js');
+ if($called_position == 'before_module_init' && !$GLOBALS['__counter_addon_called__']) {
+ if($this->module != 'admin') Context::addJsFile('./modules/counter/tpl/js/counter.js');
+ $GLOBALS['__counter_addon_called__'] = true;
}
?>
diff --git a/common/js/common.js b/common/js/common.js
index 665d5d040..5c45e85ab 100644
--- a/common/js/common.js
+++ b/common/js/common.js
@@ -26,6 +26,7 @@ String.prototype.getQuery = function(key) {
String.prototype.setQuery = function(key, val) {
var idx = this.indexOf('?');
var uri = this;
+ uri = uri.replace(/#$/,'');
if(idx != -1) {
uri = this.substr(0, idx);
var query_string = this.substr(idx+1, this.length);
@@ -499,8 +500,13 @@ function setMemberMenuObjCursor() {
}
// 날자 선택 (달력 열기)
-function open_calendar(fo_id, day_str) {
+function open_calendar(fo_id, day_str, callback_func) {
if(typeof(day_str)=="undefined") day_str = "";
- var url = "./common/tpl/calendar.php?fo_id="+fo_id+"&day_str="+day_str;
+
+ var url = "./common/tpl/calendar.php?";
+ if(fo_id) url+="fo_id="+fo_id;
+ if(day_str) url+="&day_str="+day_str;
+ if(callback_func) url+="&callback_func="+callback_func;
+
popopen(url, 'Calendar');
}
diff --git a/common/tpl/calendar.php b/common/tpl/calendar.php
index f03a3f562..b56bb6edb 100644
--- a/common/tpl/calendar.php
+++ b/common/tpl/calendar.php
@@ -4,6 +4,7 @@
$method = $_REQUEST['method'];
$fo_id = $_REQUEST['fo_id'];
+ $callback_func = $_REQUEST['callback_func'];
$day_str = $_REQUEST['day_str'];
if($day_str && strlen($day_str)) {
@@ -59,7 +60,7 @@