issue 2514 apply layout configuration at communication module

git-svn-id: http://xe-core.googlecode.com/svn/branches/luminous@11498 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
chschy 2012-09-25 07:34:54 +00:00
parent e8f11ff2b8
commit 94a37407c4
4 changed files with 29 additions and 2 deletions

View file

@ -26,6 +26,14 @@
$tpl_path = sprintf('%sskins/%s', $this->module_path, $skin);
}
$this->setTemplatePath($tpl_path);
$oLayoutModel = &getModel('layout');
$layout_info = $oLayoutModel->getLayout($this->communication_config->layout_srl);
if($layout_info)
{
$this->module_info->layout_srl = $this->communication_config->layout_srl;
$this->setLayoutPath($layout_info->path);
}
}
/**
@ -81,6 +89,7 @@
* @return void|Object (void : success, Object : fail)
**/
function dispCommunicationNewMessage() {
$this->setLayoutPath('./common/tpl/');
$this->setLayoutFile('popup_layout');
// Error appears if not logged-in
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
@ -108,6 +117,7 @@
* @return void|Object (void : success, Object : fail)
**/
function dispCommunicationSendMessage() {
$this->setLayoutPath('./common/tpl/');
$this->setLayoutFile("popup_layout");
$oCommunicationModel = &getModel('communication');
$oMemberModel = &getModel('member');
@ -201,6 +211,7 @@
* @return void|Object (void : success, Object : fail)
**/
function dispCommunicationAddFriend() {
$this->setLayoutPath('./common/tpl/');
$this->setLayoutFile("popup_layout");
// error appears if not logged-in
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
@ -226,6 +237,7 @@
* @return void|Object (void : success, Object : fail)
**/
function dispCommunicationAddFriendGroup() {
$this->setLayoutPath('./common/tpl/');
$this->setLayoutFile("popup_layout");
// error apprears if not logged-in
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');