'+
'
-
' +
'
' +
'- ' +
'
' +
'
' +
'
';
Klumb.Box({
type: 'confirm',
html: html,
cssClass: 'feedback',
onOkay: function(block){
Klumb.blockOverlay(block);
$('#addFeedbackForm').ajaxSubmit({
beforeSend: function(){
$('#addFeedbackForm .error').text('');
},
success: function(data){
if(data.error){
if(data.error.vote){
$('#addFeedbackForm .vote').text(data.error.vote);
}
if(data.error.text){
$('#addFeedbackForm .text').text(data.error.text);
}
}else{
$('#content section.user-feedbacks').prepend(data.html);
$('#user-profile .feed-positive.feedback-res').text('+'+data.positive);
$('#user-profile .feed-negative.feedback-res').text('-'+data.negative);
block.arcticmodal('close');
}
Klumb.blockOverlay(block);
}
});
}
})
});
$('body').on('click', '#addFeedbackForm a.feedback-button', function(e){
e.preventDefault();
$(this).siblings().removeClass('active').end().addClass('active');
var form = $(this).closest('#addFeedbackForm');
var vote = $(this).hasClass('negative')? -1:1;
form.find('input[name=vote]').val(vote);
});
});
Моисеева Анна Геннадьевна