78 lines
2.3 KiB
JavaScript
78 lines
2.3 KiB
JavaScript
var viewportwidth,
|
|
viewportheight;
|
|
function resize() {
|
|
viewportheight=$(window).height();
|
|
viewportwidth=$(window).width();
|
|
if(window.navigator.userAgent.indexOf("MSIE")>0){
|
|
windH=document.clientHeight;
|
|
windW=document.clientWidht;
|
|
}
|
|
}
|
|
$(document).ready(function(){
|
|
$(document).on('click', '.orbit-bar-member', function(){
|
|
$(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();
|
|
});
|
|
|
|
$(document).on('click', '.bar-login .dropdown-menu', function(e) {
|
|
e.stopPropagation();
|
|
$('.bar-login .dropdown-menu').show();
|
|
});
|
|
|
|
$('.tip').tooltip({
|
|
placement: "left"
|
|
});
|
|
|
|
$(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');
|
|
});
|
|
|
|
$(document).on('click', '.sort-header > .sort', function() {
|
|
$.getScript($(this).attr('rel'));
|
|
});
|
|
|
|
/*tinyscrollbar&windows-Size*/
|
|
resize();
|
|
$('#main-sidebar').css("height", viewportheight-40);
|
|
$('#main-sidebar .viewport').css("height", viewportheight-40);
|
|
$('.post-title').css("width", viewportwidth-495);
|
|
$('#main-sidebar').tinyscrollbar();
|
|
$('.detal-list').tinyscrollbar();
|
|
$('#main-sidebar').tinyscrollbar({size:(viewportheight-44)});
|
|
|
|
/*isotope*/
|
|
var $container = $('#isotope');
|
|
$container.isotope({
|
|
itemSelector : '.item',
|
|
layoutMode : 'masonry',
|
|
});
|
|
|
|
|
|
});
|
|
$(window).resize(function(){
|
|
resize();
|
|
$('#main-sidebar').css("height", viewportheight-40);
|
|
$('#main-sidebar .viewport').css("height", viewportheight-40);
|
|
$('.post-title').css("width", viewportwidth-495);
|
|
$('#main-sidebar').tinyscrollbar({ size:(viewportheight-44)});
|
|
});
|