1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-16 23:00:51 +03:00

fix опросов

This commit is contained in:
Mzhelskiy Maxim 2014-02-10 18:27:47 +07:00
parent 65d738a2c8
commit 9c571582aa
3 changed files with 7 additions and 6 deletions

View file

@ -299,6 +299,7 @@ class ActionAjax extends Action {
if (!$oPoll->isAllowRemove()) {
$this->Message_AddError('Этот опрос уже нельзя удалить');
return;
}
/**

View file

@ -20,7 +20,7 @@ ls.poll = (function ($) {
vote: aRouter['ajax'] + 'poll/vote/',
add: aRouter['ajax'] + 'poll/create/',
update: aRouter['ajax'] + 'poll/update/',
remove: aRouter['ajax'] + 'poll/remove/',
remove: aRouter['ajax'] + 'poll/remove/'
},
// Селекторы
@ -31,7 +31,7 @@ ls.poll = (function ($) {
poll: '.js-poll',
vote_form: '.js-poll-vote-form',
vote: '.js-poll-vote',
abstain: '.js-poll-abstain',
abstain: '.js-poll-abstain'
},
form: {
@ -48,7 +48,7 @@ ls.poll = (function ($) {
item: '.js-poll-form-answer-item',
text: '.js-poll-form-answer-item-text',
id: '.js-poll-form-answer-item-id',
remove: '.js-poll-form-answer-item-remove',
remove: '.js-poll-form-answer-item-remove'
}
},
@ -56,12 +56,12 @@ ls.poll = (function ($) {
result: {
container: '.js-poll-result',
item: '.js-poll-result-item',
sort: '.js-poll-result-sort',
sort: '.js-poll-result-sort'
}
},
// Максимальное кол-во вариантов ответов
iMaxAnswers: 20,
iMaxAnswers: 20
};
/**

View file

@ -55,7 +55,7 @@
oPollItem = $oAnswer
iPollItemIndex = $oAnswer@index
bPollIsAllowUpdate = $oPoll->isAllowUpdate()
bPollIsAllowRemove = $oPoll->isAllowUpdate() || ! $oAnswer->getCountVote()}
bPollIsAllowRemove = $oPoll->isAllowUpdate() && ! $oAnswer->getCountVote()}
{/foreach}
{else}
{include 'polls/poll.form.answers.item.tpl'}