diff --git a/modules/ncenterlite/ncenterlite.controller.php b/modules/ncenterlite/ncenterlite.controller.php index 7c4ff255b..eaf70b213 100644 --- a/modules/ncenterlite/ncenterlite.controller.php +++ b/modules/ncenterlite/ncenterlite.controller.php @@ -274,15 +274,30 @@ class ncenterliteController extends ncenterlite return $output; } } + $this->setMessage('success_updated'); - if (Context::get('success_return_url')) + if(Context::get('is_popup') != 'Y') { - $this->setRedirectUrl(Context::get('success_return_url')); + if (Context::get('success_return_url')) + { + $this->setRedirectUrl(Context::get('success_return_url')); + } + else + { + $this->setRedirectUrl(getNotEncodedUrl('act', 'dispNcenterliteUnsubscribeList', 'member_srl', $this->user->member_srl)); + } } else { - $this->setRedirectUrl(getNotEncodedUrl('act', 'dispNcenterliteUnsubscribeList', 'member_srl', $this->user->member_srl)); + if (Context::get('success_return_url')) + { + $this->setRedirectUrl(Context::get('success_return_url')); + } + else + { + $this->setRedirectUrl(getNotEncodedUrl('act', 'dispNcenterliteUnsubscribeList', 'target_srl', $obj->target_srl, 'unsubscribe_type', $obj->unsubscribe_type)); + } } } @@ -1083,11 +1098,21 @@ class ncenterliteController extends ncenterlite if(Mobile::isFromMobilePhone()) { $this->template_path = sprintf('%sm.skins/%s/', $this->module_path, $config->mskin); - if(!is_dir($this->template_path) || !$config->mskin) + if(!$config->mskin) { $config->mskin = 'default'; $this->template_path = sprintf('%sm.skins/%s/', $this->module_path, $config->mskin); } + // If use to same PC skin set. + else if ($config->mskin === '/USE_RESPONSIVE/') + { + $this->template_path = sprintf('%sskins/%s/', $this->module_path, $config->skin); + if(!$config->skin) + { + $config->skin = 'default'; + $this->template_path = sprintf('%sskins/%s/', $this->module_path, $config->skin); + } + } } else { @@ -1099,14 +1124,14 @@ class ncenterliteController extends ncenterlite } } + $oTemplateHandler = TemplateHandler::getInstance(); + $result = $oTemplateHandler->compile($this->template_path, 'ncenterlite.html'); $this->_addFile(); - $html = $this->_getTemplate(); - $output_display = $html . $output_display; + $output_display = $result . $output_display; } function triggerAddMemberMenu() { - $oNcenterliteModel = getModel('ncenterlite'); $oMemberController = getController('member'); $config = NcenterliteModel::getConfig(); @@ -1147,16 +1172,9 @@ class ncenterliteController extends ncenterlite Context::loadFile(array($this->template_path . 'ncenterlite.css', '', '', 100)); } - $oNcenterliteModel = getModel('ncenterlite'); $config = NcenterliteModel::getConfig(); - if(!Mobile::isFromMobilePhone()) - { - if($config->colorset && file_exists(FileHandler::getRealPath($this->template_path . 'ncenterlite.' . $config->colorset . '.css'))) - { - Context::loadFile(array($this->template_path . 'ncenterlite.' . $config->colorset . '.css', '', '', 100)); - } - } - elseif(Mobile::isFromMobilePhone()) + + if(Mobile::isFromMobilePhone() && $config->mskin !== '/USE_RESPONSIVE/') { if($config->mcolorset && file_exists(FileHandler::getRealPath($this->template_path . 'ncenterlite.' . $config->mcolorset . '.css'))) { @@ -1167,32 +1185,20 @@ class ncenterliteController extends ncenterlite Context::loadFile(array('./common/js/xe.min.js', 'head', '', -100000)); Context::loadFile(array($this->template_path . 'ncenterlite.mobile.css', '', '', 100)); } + else + { + if($config->colorset && file_exists(FileHandler::getRealPath($this->template_path . 'ncenterlite.' . $config->colorset . '.css'))) + { + Context::loadFile(array($this->template_path . 'ncenterlite.' . $config->colorset . '.css', '', '', 100)); + } + } + if($config->zindex) { Context::set('ncenterlite_zindex', ' style="z-index:' . $config->zindex . ';" '); } } - function _getTemplate() - { - $oNcenterModel = getModel('ncenterlite'); - $config = $oNcenterModel->getConfig(); - - $oTemplateHandler = TemplateHandler::getInstance(); - - if(Mobile::isFromMobilePhone()) - { - $path = sprintf('%sm.skins/%s/', $this->module_path, $config->mskin); - } - else - { - $path = sprintf('%sskins/%s/', $this->module_path, $config->skin); - } - $result = $oTemplateHandler->compile($path, 'ncenterlite.html'); - - return $result; - } - function updateNotifyRead($notify, $member_srl) { $args = new stdClass(); diff --git a/modules/ncenterlite/ncenterlite.model.php b/modules/ncenterlite/ncenterlite.model.php index 1e5c2edd0..729bab8b4 100644 --- a/modules/ncenterlite/ncenterlite.model.php +++ b/modules/ncenterlite/ncenterlite.model.php @@ -282,13 +282,13 @@ class ncenterliteModel extends ncenterlite $v->text = $this->getNotificationText($v); $v->ago = $this->getAgo($v->regdate); $v->url = getUrl('','act','procNcenterliteRedirect', 'notify', $v->notify); - if($v->target_type === $this->_TYPE_VOTED && $config->anonymous_voter === 'Y') + if(($v->target_type === $this->_TYPE_VOTED && $config->anonymous_voter === 'Y') || ($v->target_type === $this->_TYPE_SCRAPPED && $config->anonymous_scrap === 'Y')) { $v->target_member_srl = $member_srl; $v->target_nick_name = lang('anonymous'); $v->target_user_id = $v->target_email_address = 'anonymous'; } - if($v->target_member_srl) + if($v->target_member_srl && ($v->target_type !== $this->_TYPE_VOTED || $v->target_type !== $this->_TYPE_SCRAPPED)) { $profileImage = $oMemberModel->getProfileImage($v->target_member_srl); $v->profileImage = $profileImage->src; @@ -315,6 +315,9 @@ class ncenterliteModel extends ncenterlite $tmp = $this->getMyNotifyList($member_srl, $page); foreach($tmp->data as $key => $obj) { + unset($tmp->data[$key]->target_email_address); + unset($tmp->data[$key]->target_user_id); + unset($tmp->data[$key]->target_member_srl); $tmp->data[$key]->url = str_replace('&', '&', $obj->url); } diff --git a/modules/ncenterlite/ncenterlite.view.php b/modules/ncenterlite/ncenterlite.view.php index 519f6eccb..b04b83f3a 100644 --- a/modules/ncenterlite/ncenterlite.view.php +++ b/modules/ncenterlite/ncenterlite.view.php @@ -144,6 +144,8 @@ class ncenterliteView extends ncenterlite function dispNcenterliteInsertUnsubscribe() { + $this->setLayoutFile('popup_layout'); + /** @var ncenterliteModel $oNcenterliteModel */ $oNcenterliteModel = getModel('ncenterlite'); $target_srl = Context::get('target_srl'); diff --git a/modules/ncenterlite/skins/default/unsubscribe.html b/modules/ncenterlite/skins/default/unsubscribe.html index 5e00723ae..f1ee35cb8 100644 --- a/modules/ncenterlite/skins/default/unsubscribe.html +++ b/modules/ncenterlite/skins/default/unsubscribe.html @@ -1,10 +1,5 @@ -
- -
-

{$XE_VALIDATOR_MESSAGE}

-
@@ -18,46 +13,50 @@ -
-
- + + +
+

{$lang->ncenterlite_cmd_unsubscribe_settings}

+
+ +
+
+

+ {$type} +

+

+ + {escape($unsubscribeData->text, false)} + + {escape($text, false)} + +

+
+
+ +
+ +
-

- {$type} -

-
-
-
- -
-

- - {escape($unsubscribeData->text, false)} - - {escape($text, false)} - -

-
-
- -
- -
-
-
-
-
- -
+
+ +
- + diff --git a/modules/ncenterlite/skins/default/unsubscribeList.html b/modules/ncenterlite/skins/default/unsubscribeList.html index 5ff6b8ec5..65257455d 100644 --- a/modules/ncenterlite/skins/default/unsubscribeList.html +++ b/modules/ncenterlite/skins/default/unsubscribeList.html @@ -36,6 +36,7 @@ + -
-
- + + +
+

{$lang->ncenterlite_cmd_unsubscribe_settings}

+
+ +
+
+

+ {$type} +

+

+ + {escape($unsubscribeData->text, false)} + + {escape($text, false)} + +

+
+
+ +
+ +
-

- {$type} -

-
-
-
- -
-

- - {escape($unsubscribeData->text, false)} - - {escape($text, false)} - -

-
-
- -
- -
-
-
-
-
- -
+
+ + - + diff --git a/modules/ncenterlite/skins/default_bottom/unsubscribeList.html b/modules/ncenterlite/skins/default_bottom/unsubscribeList.html index a92eb739a..00dfa4ff8 100644 --- a/modules/ncenterlite/skins/default_bottom/unsubscribeList.html +++ b/modules/ncenterlite/skins/default_bottom/unsubscribeList.html @@ -36,6 +36,7 @@ +