mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-27 14:22:54 +09:00
비추천도 취소할 수 있도록 개선
This commit is contained in:
parent
31ea80a380
commit
d3d7031730
3 changed files with 40 additions and 3 deletions
|
|
@ -64,7 +64,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
<script>
|
||||
var sTitle = '{str_ireplace(array('<script', '</script'), array("<scr'+'ipt", "</scr'+'ipt"), addslashes($oDocument->getTitleText()))}';
|
||||
var sTitle = '{$oDocument->getTitleText()}';
|
||||
jQuery(function($){
|
||||
$('.twitter').snspost({
|
||||
type : 'twitter',
|
||||
|
|
@ -87,6 +87,10 @@
|
|||
<a cond="$oDocument->getVoted() === false" href="#" onclick="doCallModuleAction('document','procDocumentVoteUp','{$oDocument->document_srl}');return false;"|cond="$is_logged" class="voted"> <i class="xi-thumbs-up"></i><br>{$lang->cmd_vote} {$oDocument->get('voted_count')}</a>
|
||||
<a cond="$oDocument->getVoted() > 0" href="#" onclick="doCallModuleAction('document','procDocumentVoteUpCancel','{$oDocument->document_srl}');return false;"|cond="$is_logged" class="voted"> <i class="xi-thumbs-up"></i><br>{$lang->cmd_vote} {$oDocument->get('voted_count')}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a cond="$oDocument->getVoted() === false" herf="#" onclick="doCallModuleAction('document','procDocumentVoteDown','{$oDocument->document_srl}');return false;"|cond="$is_logged" class="voted"> <i class="xi-thumbs-down"></i><br>{$lang->cmd_vote_down} {$oDocument->get('blamed_count')}</a>
|
||||
<a cond="$oDocument->getVoted() < 0" herf="#" onclick="doCallModuleAction('document','procDocumentVoteDownCancel','{$oDocument->document_srl}');return false;"|cond="$is_logged" class="voted"> <i class="xi-thumbs-down"></i><br>{$lang->cmd_vote_down} {$oDocument->get('blamed_count')}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div cond="$oDocument->hasUploadedFiles()" class="fileList">
|
||||
|
|
|
|||
|
|
@ -572,8 +572,8 @@
|
|||
|
||||
.read_footer .vote{ margin-top:51px;text-align:center; }
|
||||
.read_footer .vote li{display:inline;vertical-align:top}
|
||||
.read_footer .vote a{display:inline-block;width:46px;height:52px;border:1px solid #e0e0e0;background-color:#f4f4f4; border-radius:2px;}
|
||||
.read_footer .vote i{font-size:22px;line-height:32px;color:#bcbcbc}
|
||||
.read_footer .vote a{display:inline-block;width:70px;height:70px;border:1px solid #e0e0e0;background-color:#f4f4f4; border-radius:2px;}
|
||||
.read_footer .vote i{font-size:22px;line-height:45px;color:#bcbcbc}
|
||||
.read_footer .vote a:hover{border-color:#DECA79;background-color:#f9dc5f;transition: all 0.2s ease-in-out;-webkit-transition: all 0.2s ease-in-out}
|
||||
.read_footer .vote a:hover {color:#747474;transition: all 0.2s ease-in-out;-webkit-transition: all 0.2s ease-in-out}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,9 +66,11 @@ class documentController extends document
|
|||
$args->voted_count = $oDocument->get('voted_count') - 1;
|
||||
$output = executeQuery('document.updateVotedCount', $args);
|
||||
$d_output = executeQuery('document.deleteDocumentVotedLog', $d_args);
|
||||
|
||||
//session reset
|
||||
$_SESSION['voted_document'][$document_srl] = false;
|
||||
|
||||
$output = new Object();
|
||||
$output->setMessage('success_voted_canceled');
|
||||
return $output;
|
||||
}
|
||||
|
|
@ -118,6 +120,37 @@ class documentController extends document
|
|||
return $output;
|
||||
}
|
||||
|
||||
function procDocumentVoteDownCancel()
|
||||
{
|
||||
if(!Context::get('is_logged')) return new Object(-1, 'msg_invalid_request');
|
||||
|
||||
$document_srl = Context::get('target_srl');
|
||||
if(!$document_srl) return new Object(-1, 'msg_invalid_request');
|
||||
|
||||
$oDocumentModel = getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl, false, false);
|
||||
if($oDocument->get('blamed_count') >= 0)
|
||||
{
|
||||
return new Object(-1, 'msg_document_voted_cancel_not');
|
||||
}
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
$args = new stdClass();
|
||||
$d_args = new stdClass();
|
||||
$args->document_srl = $d_args->document_srl = $document_srl;
|
||||
$d_args->member_srl = $logged_info->member_srl;
|
||||
$args->blamed_count = $oDocument->get('blamed_count') + 1;
|
||||
$output = executeQuery('document.updateBlamedCount', $args);
|
||||
$d_output = executeQuery('document.deleteDocumentVotedLog', $d_args);
|
||||
|
||||
//session reset
|
||||
$_SESSION['voted_document'][$document_srl] = false;
|
||||
|
||||
$output = new Object();
|
||||
$output->setMessage('success_blamed_canceled');
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Action called when the post is reported by other member
|
||||
* @return void|Object
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue