Css and js changes

This commit is contained in:
Christophe Vilayphiou 2012-02-29 12:45:47 +08:00
parent 0a23ce7b24
commit 5223a7a3e9
2 changed files with 40 additions and 11 deletions

View File

@ -9,6 +9,13 @@ function resize() {
}
}
$(document).ready(function(){
$(document).on('click', '.language-menu li', function(){
$(this).each(function(i){
$(this).siblings().removeClass('active')
$(this).addClass('active')
})
return false;
});
$(document).on('click', '.orbit-bar-member', function(){
$(this).hasClass('open') ? $(this).removeClass('open') : $(this).addClass('open');
$('.bar-login .dropdown-menu').toggle();
@ -70,8 +77,28 @@ $(document).ready(function(){
});
$(window).resize(function(){
resize();
$('#main-sidebar').css("height", viewportheight-40);
$('#main-sidebar .viewport').css("height", viewportheight-40);
var $mainWrapMarginLeft = parseInt($('#main-wrap').css("margin-left"))-2;
$('#main-sidebar').css("height", viewportheight-30);
$('#main-sidebar .viewport').css("height", viewportheight-30);
$('.post-title').css("width", viewportwidth-495);
$('#main-sidebar').tinyscrollbar({ size:(viewportheight-44)});
$('#main-wrap > .subnav').css("width", viewportwidth-$mainWrapMarginLeft)
$('#main-sidebar').tinyscrollbar({size:(viewportheight-34)});
mainTablePosition()
});
/*main-table position*/
function mainTablePosition() {
var $height = $('#main-wrap > .subnav').height()
var $table = $('#main-wrap > .table')
//alert ($table.height())
$table.stop().animate({marginTop:$height},500)
//$table.css({marginTop : $height})
}
$(window).scroll(function () {
//var $mainWrapMarginLeft = parseInt($('#main-wrap').css("margin-left"))-1;
//var $subnavWidth = parseInt($('#main-wrap > .subnav').css("width"));
var $winLeft = $(window).scrollLeft()
$(".table-label").css({left:$winLeft*-1} );
//$(".table-label").css({left:$mainWrapMarginLeft+($winLeft*-1)} );
//$("#main-wrap > .subnav").css({width:$subnavWidth+($winLeft)} );
//console.log($mainWrapMarginLeft+($winLeft*-1)+5);
});

View File

@ -1,10 +1,10 @@
@font-face{
font-family: 'WebSymbolsRegular';
src: url(<%= asset_path 'fonts/websymbols-regular-webfont.eot' %>);
src: url(<%= asset_path 'fonts/websymbols-regular-webfont.eot?#iefix' %>) format('embedded-opentype'),
url(<%= asset_path 'fonts/websymbols-regular-webfont.woff' %>) format('woff'),
url(<%= asset_path 'fonts/websymbols-regular-webfont.ttf' %>) format('truetype'),
url(<%= asset_path 'fonts/websymbols-regular-webfont.svg#WebSymbolsRegular' %>) format('svg');
src: url(<%= asset_path 'websymbols-regular-webfont.eot' %>);
src: url(<%= asset_path 'websymbols-regular-webfont.eot?#iefix' %>) format('embedded-opentype'),
url(<%= asset_path 'websymbols-regular-webfont.woff' %>) format('woff'),
url(<%= asset_path 'websymbols-regular-webfont.ttf' %>) format('truetype'),
url(<%= asset_path 'websymbols-regular-webfont.svg#WebSymbolsRegular' %>) format('svg');
}
.login-logo {
text-indent: -9999px;
@ -78,6 +78,9 @@
#orbit-bar .orbit-logo .dropdown-menu {
left: -15px;
}
#orbit-bar .nav > li {
height: 28px;
}
#orbit-bar .nav > li > a:hover {
background-color: rgba(0,157,220,1);
}
@ -121,7 +124,6 @@
}
#orbit-bar .nav span.member-name {
display: inline-block;
float: right;
line-height: 22px;
padding: 0 10px;
}
@ -212,7 +214,7 @@
padding-right: 4px;
border-right: 1px solid rgba(0,0,0,.2);
position:fixed;
top: 42px;
top: 32px;
z-index: 88;
}
#main-sidebar .nav {
@ -250,7 +252,7 @@
#main-wrap {
background-color: #FFF;
margin-left:160px;
padding-top: 42px;
padding-top: 32px;
padding-bottom: 18px;
position: relative;
min-height: 100%;