2012-02-19 08:33:22 +00:00
|
|
|
var viewportwidth,
|
|
|
|
viewportheight;
|
|
|
|
function resize() {
|
2012-02-13 05:02:52 +00:00
|
|
|
viewportheight=$(window).height();
|
|
|
|
viewportwidth=$(window).width();
|
|
|
|
if(window.navigator.userAgent.indexOf("MSIE")>0){
|
|
|
|
windH=document.clientHeight;
|
|
|
|
windW=document.clientWidht;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$(document).ready(function(){
|
2012-02-19 19:24:05 +00:00
|
|
|
$(document).on('click', '.orbit-bar-member', function(){
|
2012-02-19 08:33:22 +00:00
|
|
|
$(this).hasClass('open') ? $(this).removeClass('open') : $(this).addClass('open');
|
|
|
|
$('.bar-login .dropdown-menu').toggle();
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
|
|
|
|
$(document).click(function() {
|
|
|
|
$('.orbit-bar-member').removeClass("open");
|
|
|
|
$('.bar-login .dropdown-menu').hide();
|
|
|
|
});
|
|
|
|
|
2012-02-19 19:24:05 +00:00
|
|
|
$(document).on('click', '.dropdown-menu', function(e) {
|
2012-02-19 08:33:22 +00:00
|
|
|
e.stopPropagation();
|
|
|
|
$('.bar-login .dropdown-menu').show();
|
|
|
|
});
|
2012-02-13 05:02:52 +00:00
|
|
|
|
|
|
|
$('.tip').tooltip({
|
|
|
|
placement: "left"
|
|
|
|
});
|
|
|
|
|
2012-02-20 17:13:22 +00:00
|
|
|
$(document).on('click', '.privacy', function() {
|
|
|
|
switch ($(this).val()) {
|
|
|
|
case 'true':
|
|
|
|
$(this).parents('.controls').children('.select-role').slideUp(300);
|
|
|
|
break;
|
|
|
|
case 'false':
|
|
|
|
$(this).parents('.controls').children('.select-role').slideDown(300);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
$(document).on('click', '.toggle-tr-edit', function() {
|
|
|
|
$(this).parents('tr').next('.qe-block').removeClass('hide');
|
|
|
|
$(this).parents('tr').next('.qe-block').find('.qe-edit-div').addClass('hide');
|
|
|
|
$(this).parents('tr').next('.qe-block').find('#qe-' + $(this).attr('rel')).toggleClass('hide');
|
2012-02-13 05:02:52 +00:00
|
|
|
});
|
2012-02-19 08:33:22 +00:00
|
|
|
|
2012-02-13 05:02:52 +00:00
|
|
|
/*tinyscrollbar&windows-Size*/
|
|
|
|
resize();
|
|
|
|
$('#main-sidebar').css("height", viewportheight-40);
|
|
|
|
//$('#content-wrap .viewport').css("height", viewportheight-44);
|
|
|
|
//$('#content-wrap').css("width", viewportwidth-186);
|
|
|
|
$('#main-sidebar .viewport').css("height", viewportheight-40);
|
2012-02-19 08:33:22 +00:00
|
|
|
$('.post-title').css("width", viewportwidth-495);
|
2012-02-13 05:02:52 +00:00
|
|
|
$('#main-sidebar').tinyscrollbar();
|
|
|
|
$('#main-sidebar').tinyscrollbar({ size:(viewportheight-44)});
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
$(window).resize(function(){
|
|
|
|
resize();
|
|
|
|
$('#main-sidebar').css("height", viewportheight-40);
|
|
|
|
$('#main-sidebar .viewport').css("height", viewportheight-40);
|
2012-02-19 08:33:22 +00:00
|
|
|
$('.post-title').css("width", viewportwidth-495);
|
2012-02-13 05:02:52 +00:00
|
|
|
$('#main-sidebar').tinyscrollbar({ size:(viewportheight-44)});
|
2012-02-19 08:33:22 +00:00
|
|
|
});
|