mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-03 06:55:03 +03:00
Фикс багов
This commit is contained in:
parent
08e36673d1
commit
4f0072815b
|
@ -14,6 +14,9 @@ ls.vote = (function ($) {
|
|||
minus: 'voted-down',
|
||||
positive: 'vote-count-positive',
|
||||
negative: 'vote-count-negative'
|
||||
voted_zero: 'voted-zero',
|
||||
zero: 'vote-count-zero',
|
||||
not_voted: 'not-voted'
|
||||
},
|
||||
prefix_area: 'vote_area_',
|
||||
prefix_total: 'vote_total_',
|
||||
|
@ -71,6 +74,9 @@ ls.vote = (function ($) {
|
|||
if (value < 0) {
|
||||
divVoting.addClass(this.options.classes.minus);
|
||||
}
|
||||
if (value == 0) {
|
||||
divVoting.addClass(this.options.classes.voted_zero);
|
||||
}
|
||||
|
||||
var divTotal = $('#'+this.options.prefix_total+type+'_'+idTarget);
|
||||
var divCount = $('#'+this.options.prefix_count+type+'_'+idTarget);
|
||||
|
@ -83,6 +89,7 @@ ls.vote = (function ($) {
|
|||
|
||||
divVoting.removeClass(this.options.classes.negative);
|
||||
divVoting.removeClass(this.options.classes.positive);
|
||||
divVoting.removeClass(this.options.classes.not_voted);
|
||||
|
||||
if (result.iRating > 0) {
|
||||
divVoting.addClass(this.options.classes.positive);
|
||||
|
@ -91,6 +98,7 @@ ls.vote = (function ($) {
|
|||
divVoting.addClass(this.options.classes.negative);
|
||||
divTotal.text(result.iRating);
|
||||
}else if (result.iRating == 0) {
|
||||
divVoting.addClass(this.options.classes.zero);
|
||||
divTotal.text(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -107,8 +107,8 @@
|
|||
.block.block-type-blog .block-header h3 a { color: #275ec2; text-decoration: underline; }
|
||||
.block.block-type-blog .block-content { padding: 0 7px; }
|
||||
.block.block-type-blog footer { font-size: 11px; }
|
||||
.block.block-type-blog footer button { margin-right: 10px; }
|
||||
.block.block-type-blog footer a { color: #727a90; }
|
||||
.block.block-type-blog footer button { }
|
||||
.block.block-type-blog footer a { color: #727a90; margin-left: 7px; }
|
||||
|
||||
|
||||
/* Block Type - Tags */
|
||||
|
|
|
@ -209,7 +209,7 @@
|
|||
|
||||
/* Scroll up */
|
||||
.toolbar .toolbar-scrollup { display: none; }
|
||||
.toolbar .toolbar-scrollup i { background: url(../images/icons-synio.png) -293px -23px no-repeat; }
|
||||
.toolbar .toolbar-scrollup i { background: url(../images/icons-synio.png) -294px -23px no-repeat; }
|
||||
.toolbar .toolbar-scrollup i:hover { background-position: -294px -48px; }
|
||||
.toolbar .toolbar-scrollup i:active { background-position: -294px -73px; }
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
-------------------------------------------- */
|
||||
|
||||
#container { width: 976px; margin: 0 auto; margin-bottom: 20px; }
|
||||
#header-wrapper { background: #090909; }
|
||||
#header-wrapper { background: #090909; min-width: 976px; }
|
||||
#header { width: 976px; height: 51px; margin: 0 auto; position: relative; }
|
||||
#nav {
|
||||
min-height: 26px;
|
||||
|
@ -32,10 +32,9 @@
|
|||
#wrapper.no-sidebar { background-image: none; }
|
||||
#wrapper.no-sidebar #content { width: 100%; margin-right: 0; }
|
||||
|
||||
#container.toolbar-margin #wrapper { width: 888px; background: #fff url(../images/sidebar-border.png) 654px 0px repeat-y; }
|
||||
#container.toolbar-margin #wrapper #content { width: 590px; }
|
||||
#container.toolbar-margin #wrapper { width: 885px; background: #fff url(../images/sidebar-border.png) 651px 0px repeat-y; }
|
||||
#container.toolbar-margin #wrapper #content { width: 587px; }
|
||||
#container.toolbar-margin #wrapper #sidebar { width: 240px; }
|
||||
#container.toolbar-margin #footer { padding-right: 50px; }
|
||||
|
||||
#content.content-right { margin-right: 0; float: none; margin-left: 311px; width: auto; }
|
||||
|
||||
#content.content-right { margin-right: 0; float: none; margin-left: 311px; width: auto; }
|
|
@ -266,6 +266,14 @@ jQuery(document).ready(function($){
|
|||
return false;
|
||||
});
|
||||
|
||||
|
||||
$(window).scroll(function(){
|
||||
if ($(document).width() <= 1100) {
|
||||
$('#toolbar').css({'top' : eval(document.documentElement.scrollTop) + 136});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Хук конца инициализации javascript-составляющих шаблона
|
||||
ls.hook.run('ls_template_init_end',[],window);
|
||||
});
|
||||
|
@ -365,64 +373,6 @@ ls.blog.toggleInfo = function() {
|
|||
return false;
|
||||
};
|
||||
|
||||
ls.vote.options.classes.voted_zero = 'voted-zero';
|
||||
ls.vote.options.classes.zero = 'vote-count-zero';
|
||||
ls.vote.options.classes.not_voted = 'not-voted';
|
||||
|
||||
ls.vote.onVote = function(idTarget, objVote, value, type, result) {
|
||||
if (result.bStateError) {
|
||||
ls.msg.error(null, result.sMsg);
|
||||
} else {
|
||||
ls.msg.notice(null, result.sMsg);
|
||||
|
||||
var divVoting = $('#'+this.options.prefix_area+type+'_'+idTarget);
|
||||
|
||||
divVoting.addClass(this.options.classes.voted);
|
||||
|
||||
if (value > 0) {
|
||||
divVoting.addClass(this.options.classes.plus);
|
||||
}
|
||||
if (value < 0) {
|
||||
divVoting.addClass(this.options.classes.minus);
|
||||
}
|
||||
if (value == 0) {
|
||||
divVoting.addClass(this.options.classes.voted_zero);
|
||||
}
|
||||
|
||||
var divTotal = $('#'+this.options.prefix_total+type+'_'+idTarget);
|
||||
var divCount = $('#'+this.options.prefix_count+type+'_'+idTarget);
|
||||
|
||||
if (divCount.length>0 && result.iCountVote) {
|
||||
divCount.text(parseInt(result.iCountVote));
|
||||
}
|
||||
|
||||
result.iRating = parseFloat(result.iRating);
|
||||
|
||||
divVoting.removeClass(this.options.classes.negative);
|
||||
divVoting.removeClass(this.options.classes.positive);
|
||||
divVoting.removeClass(this.options.classes.not_voted);
|
||||
|
||||
if (result.iRating > 0) {
|
||||
divVoting.addClass(this.options.classes.positive);
|
||||
divTotal.text('+'+result.iRating);
|
||||
}else if (result.iRating < 0) {
|
||||
divVoting.addClass(this.options.classes.negative);
|
||||
divTotal.text(result.iRating);
|
||||
}else if (result.iRating == 0) {
|
||||
divVoting.addClass(this.options.classes.zero);
|
||||
divTotal.text(0);
|
||||
}
|
||||
|
||||
var method='onVote'+ls.tools.ucfirst(type);
|
||||
if ($.type(this[method])=='function') {
|
||||
this[method].apply(this,[idTarget, objVote, value, type, result]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$(this).trigger('vote',[idTarget, objVote, value, type, result]);
|
||||
};
|
||||
|
||||
|
||||
ls.infobox.aOptDef=$.extend(true,ls.infobox.aOptDef,{
|
||||
className: 'infobox-help',
|
||||
|
@ -492,9 +442,10 @@ function toolbarPos() {
|
|||
if ($('#toolbar section').length) {
|
||||
if ($(document).width() <= 1100) {
|
||||
$('#container').addClass('toolbar-margin');
|
||||
$('#toolbar').css({'position': 'absolute', 'left': $('#wrapper').offset().left + $('#wrapper').outerWidth() + 7, 'top' : eval(document.documentElement.scrollTop) + 136, 'display': 'block'});
|
||||
} else {
|
||||
$('#container').removeClass('toolbar-margin');
|
||||
$('#toolbar').css({'position': 'fixed', 'left': $('#wrapper').offset().left + $('#wrapper').outerWidth() + 7, 'top': 136, 'display': 'block'});
|
||||
}
|
||||
$('#toolbar').css({'left': $('#wrapper').offset().left + $('#wrapper').outerWidth() + 7, 'right': 'auto', 'display': 'block'});
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue