mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Revert "Mobile communication module"
This commit is contained in:
parent
be1f2ef0a5
commit
307faa8f0e
14 changed files with 86 additions and 433 deletions
|
|
@ -25,6 +25,13 @@ if(!$logged_info|| isCrawler())
|
|||
* */
|
||||
if($this->module != 'member' && $called_position == 'before_module_init')
|
||||
{
|
||||
// Load a language file from the communication module
|
||||
Context::loadLang(_XE_PATH_ . 'modules/communication/lang');
|
||||
// Add menus on the member login information
|
||||
$oMemberController = getController('member');
|
||||
$oMemberController->addMemberMenu('dispCommunicationFriend', 'cmd_view_friend');
|
||||
$oMemberController->addMemberMenu('dispCommunicationMessages', 'cmd_view_message_box');
|
||||
|
||||
$flag_file = _XE_PATH_ . 'files/member_extra_info/new_message_flags/' . getNumberingPath($logged_info->member_srl) . $logged_info->member_srl;
|
||||
if($addon_info->use_alarm != 'N' && file_exists($flag_file))
|
||||
{
|
||||
|
|
@ -38,5 +45,40 @@ if($this->module != 'member' && $called_position == 'before_module_init')
|
|||
Context::addHtmlFooter("<script type=\"text/javascript\">jQuery(function(){ xeNotifyMessage('{$text}','{$new_message_count}'); });</script>");
|
||||
}
|
||||
}
|
||||
elseif($this->act == 'getMemberMenu' && $called_position == 'before_module_proc')
|
||||
{
|
||||
$member_srl = Context::get('target_srl');
|
||||
$oCommunicationModel = getModel('communication');
|
||||
|
||||
// Add a feature to display own message box.
|
||||
if($logged_info->member_srl == $member_srl)
|
||||
{
|
||||
$mid = Context::get('cur_mid');
|
||||
$oMemberController = getController('member');
|
||||
// Add your own viewing Note Template
|
||||
$oMemberController->addMemberPopupMenu(getUrl('', 'mid', $mid, 'act', 'dispCommunicationMessages'), 'cmd_view_message_box', '', 'self');
|
||||
// Display a list of friends
|
||||
$oMemberController->addMemberPopupMenu(getUrl('', 'mid', $mid, 'act', 'dispCommunicationFriend'), 'cmd_view_friend', '', 'self');
|
||||
// If not, Add menus to send message and to add friends
|
||||
}
|
||||
else
|
||||
{
|
||||
// Get member information
|
||||
$oMemberModel = getModel('member');
|
||||
$target_member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl);
|
||||
if(!$target_member_info->member_srl)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$oMemberController = getController('member');
|
||||
// Add a menu for sending message
|
||||
if($logged_info->is_admin == 'Y' || $target_member_info->allow_message == 'Y' || ($target_member_info->allow_message == 'F' && $oCommunicationModel->isFriend($member_srl)))
|
||||
$oMemberController->addMemberPopupMenu(getUrl('', 'mid', Context::get('cur_mid'), 'act', 'dispCommunicationSendMessage', 'receiver_srl', $member_srl), 'cmd_send_message', '', 'popup');
|
||||
// Add a menu for listing friends (if a friend is new)
|
||||
if(!$oCommunicationModel->isAddedFriend($member_srl))
|
||||
$oMemberController->addMemberPopupMenu(getUrl('', 'mid', Context::get('cur_mid'), 'act', 'dispCommunicationAddFriend', 'target_srl', $member_srl), 'cmd_add_friend', '', 'popup');
|
||||
}
|
||||
}
|
||||
/* End of file member_communication.addon.php */
|
||||
/* Location: ./addons/member_communication/member_communication.addon.php */
|
||||
|
|
|
|||
|
|
@ -23,66 +23,41 @@ class communicationAdminController extends communication
|
|||
*/
|
||||
function procCommunicationAdminInsertConfig()
|
||||
{
|
||||
// Get the configuration information
|
||||
$oModuleModel = getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('communication');
|
||||
|
||||
// get the default information
|
||||
$args = Context::gets('able_module', 'skin', 'colorset', 'editor_skin', 'sel_editor_colorset', 'mskin', 'mcolorset', 'layout_srl', 'mlayout_srl', 'grant_write_default','grant_write_group');
|
||||
$args = Context::gets('skin', 'colorset', 'editor_skin', 'sel_editor_colorset', 'mskin', 'mcolorset', 'layout_srl', 'mlayout_srl', 'grant_write_default','grant_write_group');
|
||||
$args->editor_colorset = $args->sel_editor_colorset;
|
||||
unset($args->sel_editor_colorset);
|
||||
|
||||
//if module IO config is on
|
||||
if($args->able_module === 'Y')
|
||||
if(!$args->skin)
|
||||
{
|
||||
// Re-install triggers, if it was disabled.
|
||||
if($config->able_module == 'N')
|
||||
{
|
||||
$this->moduleUpdate();
|
||||
}
|
||||
|
||||
$args->editor_colorset = $args->sel_editor_colorset;
|
||||
unset($args->sel_editor_colorset);
|
||||
|
||||
if(!$args->skin)
|
||||
{
|
||||
$args->skin = 'default';
|
||||
}
|
||||
|
||||
if(!$args->colorset)
|
||||
{
|
||||
$args->colorset = 'white';
|
||||
}
|
||||
|
||||
if(!$args->editor_skin)
|
||||
{
|
||||
$args->editor_skin = 'default';
|
||||
}
|
||||
|
||||
if(!$args->mskin)
|
||||
{
|
||||
$args->mskin = 'default';
|
||||
}
|
||||
|
||||
if(!$args->layout_srl)
|
||||
{
|
||||
$args->layout_srl = NULL;
|
||||
}
|
||||
|
||||
$oCommunicationModel = getModel('communication');
|
||||
$args->grant_write = $oCommunicationModel->getGrantArray($args->grant_write_default, $args->grant_write_group);
|
||||
unset($args->grant_write_default);
|
||||
unset($args->grant_write_group);
|
||||
$args->skin = 'default';
|
||||
}
|
||||
else
|
||||
|
||||
if(!$args->colorset)
|
||||
{
|
||||
//module IO config is OFF, Other settings will not be modified.
|
||||
$config->able_module = 'N';
|
||||
$args = $config;
|
||||
|
||||
// Delete Triggers
|
||||
$oModuleController = getController('module');
|
||||
$oModuleController->deleteModuleTriggers('communication');
|
||||
$args->colorset = 'white';
|
||||
}
|
||||
|
||||
if(!$args->editor_skin)
|
||||
{
|
||||
$args->editor_skin = 'default';
|
||||
}
|
||||
|
||||
if(!$args->mskin)
|
||||
{
|
||||
$args->mskin = 'default';
|
||||
}
|
||||
|
||||
if(!$args->layout_srl)
|
||||
{
|
||||
$args->layout_srl = NULL;
|
||||
}
|
||||
|
||||
$oCommunicationModel = getModel('communication');
|
||||
$args->grant_write = $oCommunicationModel->getGrantArray($args->grant_write_default, $args->grant_write_group);
|
||||
unset($args->grant_write_default);
|
||||
unset($args->grant_write_group);
|
||||
|
||||
// create the module module Controller object
|
||||
$oModuleController = getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('communication', $args);
|
||||
|
|
|
|||
|
|
@ -8,10 +8,6 @@
|
|||
*/
|
||||
class communication extends ModuleObject
|
||||
{
|
||||
var $triggers = array(
|
||||
array('member.getMemberMenu', 'communication', 'controller', 'triggerBeforeMemberPopupMenu', 'before'),
|
||||
array('moduleHandler.init', 'communication', 'controller', 'triggerAddMemberMenu', 'after')
|
||||
);
|
||||
|
||||
/**
|
||||
* Implement if additional tasks are necessary when installing
|
||||
|
|
@ -19,32 +15,8 @@ class communication extends ModuleObject
|
|||
*/
|
||||
function moduleInstall()
|
||||
{
|
||||
$oModuleModel = getModel('module');
|
||||
$oModuleController = getController('module');
|
||||
|
||||
// Create triggers
|
||||
foreach($this->triggers as $trigger)
|
||||
{
|
||||
if(!$oModuleModel->getTrigger($trigger[0], $trigger[1], $trigger[2], $trigger[3], $trigger[4]))
|
||||
{
|
||||
$oModuleController->insertTrigger($trigger[0], $trigger[1], $trigger[2], $trigger[3], $trigger[4]);
|
||||
}
|
||||
}
|
||||
|
||||
// Create a temporary file storage for one new private message notification
|
||||
FileHandler::makeDir('./files/member_extra_info/new_message_flags');
|
||||
|
||||
// Save Default Config.
|
||||
$config = new stdClass;
|
||||
$config->able_module = 'Y';
|
||||
$config->skin = 'default';
|
||||
$config->colorset = 'white';
|
||||
$config->editor_skin = 'default';
|
||||
$communication_config->mskin = 'default';
|
||||
$communication_config->grant_write = array('default_grant'=>'member');
|
||||
|
||||
// Save configurations
|
||||
$oModuleController->insertModuleConfig('communication', $config);
|
||||
return new Object();
|
||||
}
|
||||
|
||||
|
|
@ -60,7 +32,6 @@ class communication extends ModuleObject
|
|||
}
|
||||
|
||||
$oModuleModel = getModel('module');
|
||||
$oModuleController = getController('module');
|
||||
$config = $oModuleModel->getModuleConfig('message');
|
||||
|
||||
if($config->skin)
|
||||
|
|
@ -75,17 +46,6 @@ class communication extends ModuleObject
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// check if module is abled
|
||||
if($config->able_module != 'N')
|
||||
{
|
||||
// Check triggers
|
||||
foreach($this->triggers as $trigger)
|
||||
{
|
||||
if(!$oModuleModel->getTrigger($trigger[0], $trigger[1], $trigger[2], $trigger[3], $trigger[4])) return true;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -101,7 +61,6 @@ class communication extends ModuleObject
|
|||
}
|
||||
|
||||
$oModuleModel = getModel('module');
|
||||
$oModuleController = getController('module');
|
||||
$config = $oModuleModel->getModuleConfig('message');
|
||||
if(!is_object($config))
|
||||
{
|
||||
|
|
@ -122,16 +81,7 @@ class communication extends ModuleObject
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create triggers
|
||||
foreach($this->triggers as $trigger)
|
||||
{
|
||||
if(!$oModuleModel->getTrigger($trigger[0], $trigger[1], $trigger[2], $trigger[3], $trigger[4]))
|
||||
{
|
||||
$oModuleController->insertTrigger($trigger[0], $trigger[1], $trigger[2], $trigger[3], $trigger[4]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
|
|
@ -141,19 +91,9 @@ class communication extends ModuleObject
|
|||
*/
|
||||
function recompileCache()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
function moduleUninstall()
|
||||
{
|
||||
$oModuleController = getController('module');
|
||||
|
||||
foreach($this->triggers as $trigger)
|
||||
{
|
||||
$oModuleController->deleteTrigger($trigger[0], $trigger[1], $trigger[2], $trigger[3], $trigger[4]);
|
||||
}
|
||||
return new Object();
|
||||
}
|
||||
}
|
||||
/* End of file communication.class.php */
|
||||
/* Location: ./modules/comment/communication.class.php */
|
||||
|
|
|
|||
|
|
@ -775,81 +775,6 @@ class communicationController extends communication
|
|||
return executeQuery('communication.setMessageReaded', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create communication module menu on the member menu
|
||||
* @param int $message_srl
|
||||
* @return Object
|
||||
*/
|
||||
public function triggerAddMemberMenu()
|
||||
{
|
||||
// Stop if non-logged-in user is
|
||||
$logged_info = Context::get('logged_info');
|
||||
if(!$logged_info|| isCrawler())
|
||||
{
|
||||
return new Object();
|
||||
}
|
||||
|
||||
$oCommunicationModel = getModel('communication');
|
||||
$config = $oCommunicationModel->getConfig();
|
||||
|
||||
if($config->able_module === 'Y')
|
||||
{
|
||||
$oMemberController = getController('member');
|
||||
$oMemberController->addMemberMenu('dispCommunicationFriend', 'cmd_view_friend');
|
||||
$oMemberController->addMemberMenu('dispCommunicationMessages', 'cmd_view_message_box');
|
||||
}
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create communication module menu on the member popup menu
|
||||
* @param int $message_srl
|
||||
* @return Object
|
||||
*/
|
||||
public function triggerBeforeMemberPopupMenu()
|
||||
{
|
||||
// Stop if non-logged-in user is
|
||||
$logged_info = Context::get('logged_info');
|
||||
if(!$logged_info|| isCrawler())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$member_srl = Context::get('target_srl');
|
||||
$oCommunicationModel = getModel('communication');
|
||||
|
||||
// Add a feature to display own message box.
|
||||
if($logged_info->member_srl == $member_srl)
|
||||
{
|
||||
$mid = Context::get('cur_mid');
|
||||
$oMemberController = getController('member');
|
||||
// Add your own viewing Note Template
|
||||
$oMemberController->addMemberPopupMenu(getUrl('', 'mid', $mid, 'act', 'dispCommunicationMessages'), 'cmd_view_message_box', '', 'self');
|
||||
// Display a list of friends
|
||||
$oMemberController->addMemberPopupMenu(getUrl('', 'mid', $mid, 'act', 'dispCommunicationFriend'), 'cmd_view_friend', '', 'self');
|
||||
// If not, Add menus to send message and to add friends
|
||||
}
|
||||
else
|
||||
{
|
||||
// Get member information
|
||||
$oMemberModel = getModel('member');
|
||||
$target_member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl);
|
||||
if(!$target_member_info->member_srl)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$oMemberController = getController('member');
|
||||
// Add a menu for sending message
|
||||
if($logged_info->is_admin == 'Y' || $target_member_info->allow_message == 'Y' || ($target_member_info->allow_message == 'F' && $oCommunicationModel->isFriend($member_srl)))
|
||||
$oMemberController->addMemberPopupMenu(getUrl('', 'mid', Context::get('cur_mid'), 'act', 'dispCommunicationSendMessage', 'receiver_srl', $member_srl), 'cmd_send_message', '', 'popup');
|
||||
// Add a menu for listing friends (if a friend is new)
|
||||
if(!$oCommunicationModel->isAddedFriend($member_srl))
|
||||
$oMemberController->addMemberPopupMenu(getUrl('', 'mid', Context::get('cur_mid'), 'act', 'dispCommunicationAddFriend', 'target_srl', $member_srl), 'cmd_add_friend', '', 'popup');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/* End of file communication.controller.php */
|
||||
/* Location: ./modules/comment/communication.controller.php */
|
||||
|
|
|
|||
|
|
@ -182,73 +182,6 @@ class communicationMobile extends communicationView
|
|||
$this->setTemplateFile('send_message');
|
||||
}
|
||||
|
||||
/**
|
||||
* display Add a friend
|
||||
* @return void|Object (void : success, Object : fail)
|
||||
*/
|
||||
function dispCommunicationAddFriend()
|
||||
{
|
||||
// error appears if not logged-in
|
||||
if(!Context::get('is_logged'))
|
||||
{
|
||||
return $this->stop('msg_not_logged');
|
||||
}
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
$target_srl = Context::get('target_srl');
|
||||
|
||||
if(!$target_srl)
|
||||
{
|
||||
return $this->stop('msg_invalid_request');
|
||||
}
|
||||
|
||||
// get information of the member
|
||||
$oMemberModel = getModel('member');
|
||||
$oCommunicationModel = getModel('communication');
|
||||
$communication_info = $oMemberModel->getMemberInfoByMemberSrl($target_srl);
|
||||
|
||||
if($communication_info->member_srl != $target_srl)
|
||||
{
|
||||
return $this->stop('msg_invalid_request');
|
||||
}
|
||||
|
||||
Context::set('target_info', $communication_info);
|
||||
|
||||
// get a group list
|
||||
$friend_group_list = $oCommunicationModel->getFriendGroups();
|
||||
Context::set('friend_group_list', $friend_group_list);
|
||||
|
||||
$this->setTemplateFile('add_friend');
|
||||
}
|
||||
|
||||
/**
|
||||
* display add a group of friends
|
||||
* @return void|Object (void : success, Object : fail)
|
||||
*/
|
||||
function dispCommunicationAddFriendGroup()
|
||||
{
|
||||
// error apprears if not logged-in
|
||||
if(!Context::get('is_logged'))
|
||||
{
|
||||
return $this->stop('msg_not_logged');
|
||||
}
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// change to edit mode when getting the group_srl
|
||||
$friend_group_srl = Context::get('friend_group_srl');
|
||||
if($friend_group_srl)
|
||||
{
|
||||
$oCommunicationModel = getModel('communication');
|
||||
$friend_group = $oCommunicationModel->getFriendGroupInfo($friend_group_srl);
|
||||
if($friend_group->friend_group_srl == $friend_group_srl)
|
||||
{
|
||||
Context::set('friend_group', $friend_group);
|
||||
}
|
||||
}
|
||||
|
||||
$this->setTemplateFile('add_friend_group');
|
||||
}
|
||||
}
|
||||
/* End of file communication.mobile.php */
|
||||
/* Location: ./modules/comment/communication.mobile.php */
|
||||
|
|
|
|||
|
|
@ -51,16 +51,12 @@ class communicationModel extends communication
|
|||
{
|
||||
$communication_config->mskin = 'default';
|
||||
}
|
||||
|
||||
|
||||
if(!$communication_config->grant_write)
|
||||
{
|
||||
$communication_config->grant_write = array('default_grant'=>'member');
|
||||
}
|
||||
|
||||
if(!$communication_config->able_module)
|
||||
{
|
||||
$communication_config->able_module = 'Y';
|
||||
}
|
||||
return $communication_config;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,28 +10,6 @@
|
|||
<value xml:lang="tr"><![CDATA[İletişim]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Thông báo]]></value>
|
||||
</item>
|
||||
<item name="communication_io">
|
||||
<value xml:lang="ko"><![CDATA[커뮤니케이션 모듈 켜기]]></value>
|
||||
<value xml:lang="en"><![CDATA[Communication module On]]></value>
|
||||
<value xml:lang="jp"><![CDATA[Communication module On]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[Communication module On]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[Communication module On]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Communication module On]]></value>
|
||||
<value xml:lang="es"><![CDATA[Communication module On]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Communication module On]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Communication module On]]></value>
|
||||
</item>
|
||||
<item name="about_communication_io">
|
||||
<value xml:lang="ko"><![CDATA[체크 하면 커뮤니케이션 모듈 기능을 켤 수 있습니다. 커뮤니케이션 모듈 기능을 끌 경우, 커뮤니케이션 모듈의 모든 트리거가 삭제됩니다. 커뮤니케이션 기록은 유지되지만 새로 기록 되지는 않습니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Communication module can be on or off. If you OFF this module, every triggers will be deleted from database and will not be called by XE Core. Communication record would be preserved.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[Communication module can be on or off. If you OFF this module, every triggers will be deleted from database and will not be called by XE Core. Communication record would be preserved.]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[Communication module can be on or off. If you OFF this module, every triggers will be deleted from database and will not be called by XE Core. Communication record would be preserved.]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[Communication module can be on or off. If you OFF this module, every triggers will be deleted from database and will not be called by XE Core. Communication record would be preserved.]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Communication module can be on or off. If you OFF this module, every triggers will be deleted from database and will not be called by XE Core. Communication record would be preserved.]]></value>
|
||||
<value xml:lang="es"><![CDATA[Communication module can be on or off. If you OFF this module, every triggers will be deleted from database and will not be called by XE Core. Communication record would be preserved.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Communication module can be on or off. If you OFF this module, every triggers will be deleted from database and will not be called by XE Core. Communication record would be preserved.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Communication module can be on or off. If you OFF this module, every triggers will be deleted from database and will not be called by XE Core. Communication record would be preserved.]]></value>
|
||||
</item>
|
||||
<item name="about_communication">
|
||||
<value xml:lang="ko"><![CDATA[회원 간의 쪽지나 친구 관리 등 커뮤니케이션 기능을 수행합니다. 이 기능을 사용하려면 [설치된 애드온] > [커뮤니케이션] 애드온을 활성화 하세요.]]></value>
|
||||
<value xml:lang="en"><![CDATA[This module is used for communication between members, such as exchanging messages or mamaging friends.]]></value>
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
<load target="./css/mcommunication.css" />
|
||||
<load target="./js/communication.js" />
|
||||
<div class="hx h2">
|
||||
<h2>{$lang->cmd_add_friend}</h2>
|
||||
</div>
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/communication/m.skins/default/add_friend/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form ruleset="addFriend" action="./" method="post" class="ff">
|
||||
<input type="hidden" name="module" value="communication" />
|
||||
<input type="hidden" name="act" value="procCommunicationAddFriend" />
|
||||
<input type="hidden" name="target_srl" value="{$target_info->member_srl}" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/communication/m.skins/default/add_friend/1" />
|
||||
<ul>
|
||||
<li>
|
||||
<label for="nickname" class="control-label">{$lang->nick_name}</label>
|
||||
<input id="nickname" name="nickname" type="text" disabled="disabled" value="{htmlspecialchars($target_info->nick_name, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}"/>
|
||||
</li>
|
||||
<li>
|
||||
<label for="friend_group_srl">{$lang->friend_group}</label>
|
||||
<select name="friend_group_srl" id="friend_group_srl">
|
||||
<option value="">{$lang->default_friend_group}</option>
|
||||
<option loop="$friend_group_list => $key,$val" value="{$val->friend_group_srl}">{$val->title}</option>
|
||||
</select>
|
||||
<a href="{getUrl('act','dispCommunicationAddFriendGroup')}" class="btn" onclick="popopen(this.href);return false;">{$lang->cmd_add_friend_group}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="bna" style="border-top:0;padding:0">
|
||||
<input type="submit" value="{$lang->cmd_add_friend}" class="btn btn-inverse" />
|
||||
</div>
|
||||
</form>
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
<load target="./css/mcommunication.css" />
|
||||
<load target="./js/communication.js" />
|
||||
<div class="hx h2">
|
||||
<h2>
|
||||
<!--@if($friend_group->friend_group_srl)-->
|
||||
{$lang->cmd_rename_friend_group}
|
||||
<!--@else-->
|
||||
{$lang->cmd_add_friend_group}
|
||||
<!--@end-->
|
||||
</h2>
|
||||
</div>
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/communication/skins/default/add_friend_group/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form ruleset="addFriendGroup" action="./" method="post" class="ff">
|
||||
<input type="hidden" name="module" value="communication" />
|
||||
<input type="hidden" name="act" value="procCommunicationAddFriendGroup" />
|
||||
<input type="hidden" name="friend_group_srl" value="{$friend_group->friend_group_srl}" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/communication/skins/default/add_friend_group/1" />
|
||||
<ul>
|
||||
<li>
|
||||
<label for="title" class="control-label">{$lang->msg_insert_group_name}</label>
|
||||
<input name="title" id="title" type="text" value="{htmlspecialchars($friend_group->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false)}"/>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="bna">
|
||||
<input cond="$friend_group->friend_group_srl" type="submit" value="{$lang->cmd_modify}" class="btn btn-inverse" />
|
||||
<input cond="!$friend_group->friend_group_srl" type="submit" value="{$lang->cmd_insert}" class="btn btn-inverse" />
|
||||
</div>
|
||||
</form>
|
||||
|
|
@ -100,7 +100,7 @@ input[type=radio]{width:13px;height:13px;margin:0;padding:0}
|
|||
.ff label+input[type=text],
|
||||
.ff label+input[type=password],
|
||||
.ff label+textarea,
|
||||
.ff label+select{display:block;box-sizing:border-box;width:100%;font-size:14px;margin:0 0 5px 0}
|
||||
.ff label+select{display:block;width:96%;font-size:14px;margin:0 0 5px 0}
|
||||
.ff label+input[type=text],
|
||||
.ff label+input[type=password],
|
||||
.ff label+textarea{padding:5px}
|
||||
|
|
|
|||
|
|
@ -20,50 +20,3 @@ function mergeContents()
|
|||
$form.find('input[name=content]').val(content);
|
||||
$form.submit();
|
||||
}
|
||||
|
||||
/* 친구 그룹 삭제 */
|
||||
function doDeleteFriendGroup() {
|
||||
var friend_group_srl = jQuery('#friend_group_list option:selected').val();
|
||||
if(!friend_group_srl) return;
|
||||
|
||||
var fo_obj = jQuery('#for_delete_group').get(0);
|
||||
fo_obj.friend_group_srl.value = friend_group_srl;
|
||||
|
||||
procFilter(fo_obj, delete_friend_group);
|
||||
}
|
||||
|
||||
function completeDeleteFriendGroup(ret_obj) {
|
||||
alert(ret_obj['message']);
|
||||
location.href = current_url.setQuery('friend_group_srl','');
|
||||
}
|
||||
|
||||
/* 친구 그룹의 이름 변경 */
|
||||
function doRenameFriendGroup() {
|
||||
var friend_group_srl = jQuery('#friend_group_list option:selected').val();
|
||||
if(!friend_group_srl) return;
|
||||
|
||||
popopen("./?module=communication&act=dispCommunicationAddFriendGroup&friend_group_srl="+friend_group_srl);
|
||||
}
|
||||
|
||||
/* 친구 그룹 이동 */
|
||||
function doMoveFriend() {
|
||||
var fo_obj = jQuery('#fo_friend_list').get(0);
|
||||
procFilter(fo_obj, move_friend);
|
||||
}
|
||||
|
||||
/* 친구 그룹 선택 */
|
||||
function doJumpFriendGroup() {
|
||||
var sel_val = jQuery('#jumpMenu option:selected').val();
|
||||
location.href = current_url.setQuery('friend_group_srl', sel_val);
|
||||
}
|
||||
|
||||
jQuery(function($){
|
||||
$('.__submit_group button[type=submit]').click(function(e){
|
||||
var sel_val = $('input[name="friend_srl_list[]"]:checked').length;
|
||||
if(sel_val == 0)
|
||||
{
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,11 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ruleset version="1.5.0">
|
||||
<customrules>
|
||||
</customrules>
|
||||
<fields>
|
||||
<field name="module" required="true" rule="alpha" />
|
||||
<field name="act" required="true" rule="alpha" />
|
||||
<field name="target_srl" required="true" rule="number" />
|
||||
<field name="friend_group_srl" required="false" rule="number" />
|
||||
</fields>
|
||||
<customrules>
|
||||
</customrules>
|
||||
<fields>
|
||||
</fields>
|
||||
</ruleset>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ruleset version="1.5.0">
|
||||
<customrules>
|
||||
</customrules>
|
||||
<fields>
|
||||
<field name="module" required="true" rule="alpha" />
|
||||
<field name="act" required="true" rule="alpha" />
|
||||
<field name="friend_group_srl" required="false" rule="number" />
|
||||
<customrules>
|
||||
</customrules>
|
||||
<fields>
|
||||
<field name="title" required="true" length="1:240"/>
|
||||
</fields>
|
||||
</fields>
|
||||
</ruleset>
|
||||
|
|
|
|||
|
|
@ -15,18 +15,11 @@
|
|||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
|
||||
<form ruleset="insertConfig" action="./" method="post" class="x_form-horizontal" id="communication_module_config_form">
|
||||
<form ruleset="insertConfig" action="./" method="post" class="x_form-horizontal">
|
||||
<input type="hidden" name="module" value="communication" />
|
||||
<input type="hidden" name="act" value="procCommunicationAdminInsertConfig">
|
||||
<input type="hidden" name="xe_validator_id" value="modules/communication/tpl/index/1" />
|
||||
|
||||
<div class="x_control-group module_io">
|
||||
<label for="able_module" class="x_control-label">{$lang->communication_io}</label>
|
||||
<div class="x_controls" style="padding-top:3px">
|
||||
<input type="checkbox" name="able_module" id="able_module" value="Y" checked="checked"|cond="!$communication_config->able_module||$communication_config->able_module=='Y'" />
|
||||
<span class="x_help-inline">{$lang->about_communication_io}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="editor_skin">{$lang->editor_skin}</label>
|
||||
<div class="x_controls">
|
||||
|
|
@ -112,24 +105,10 @@
|
|||
</div>
|
||||
</form>
|
||||
<script>
|
||||
jQuery(function() {
|
||||
jQuery(function() {
|
||||
doGetSkinColorset("{$communication_config->skin}", 'P');
|
||||
doGetSkinColorset("{$communication_config->mskin}", 'M');
|
||||
jQuery('.grant_default').change( function(event) { doShowGrantZone(); } );
|
||||
doShowGrantZone()
|
||||
});
|
||||
jQuery(function($){
|
||||
var communication_module_cfg = $('#communication_module_config_form .x_control-group:not(.module_io)');
|
||||
if(!$('#able_module').is(':checked'))
|
||||
{
|
||||
communication_module_cfg.hide();
|
||||
}
|
||||
$('#able_module').change(function(){
|
||||
if($(this).is(':checked')){
|
||||
communication_module_cfg.slideDown(200);
|
||||
} else {
|
||||
communication_module_cfg.slideUp(200);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue