You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Culturalandcreative/Back-office management/js/lrtk.js

127 lines
4.3 KiB

1 year ago
/* =================================================
//
// jQuery Fixed Plugins 1.3.1
// author :
// Url:
// Data : 2012-03-30
//
// <20><><EFBFBD><EFBFBD> : float --> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>[left or right]
// minStatue --> <20><>С״̬<D7B4><CCAC>ֻ<EFBFBD><D6BB>show_btn
// skin --> Ƥ<><C6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// durationTime --> <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
//
// =================================================*/
;(function($){
$.fn.fix = function(options){
var defaults = {
float : 'left',
minStatue : false,
skin : 'blue',
durationTime : 1000 ,
stylewidth:'220',
spacingw:30,
window_height:30,
spacingh:40,
content:'.side_content',
close_btn:'.close_btn',
show_btn:'.show_btn',
side_list:'.side_list',
close_btn_width:25,
side_title:'.side_title',
set_scrollsidebar:'.page_right_style',
table_menu:'.table_menu_list',
widgetbox:'.widget-box',
left_css:null,
right_css:null,
da_height:null,
}
var options = $.extend(defaults, options);
this.each(function(){
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
var thisBox = $(this),
closeBtn = thisBox.find(options.close_btn ),
showbtn = thisBox.find(options.show_btn ),
sideContent = thisBox.find(options.content),
sideList = thisBox.find(options.side_list),
sidetitle = thisBox.find(options.side_title),
scrollsidebar=thisBox.find(options.set_scrollsidebar),
stylespacing=thisBox.find(options.table_menu),
widget_box=thisBox.find(options.widgetbox),
leftcss=thisBox.find(options.left_css),
rightcss=thisBox.find(options.right_css),
outer_height=thisBox.find(options.da_height);
var defaultTop = thisBox.offset().top; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĭ<EFBFBD><C4AC>top
thisBox.css(options.float, 0);
sidetitle.height($(sidetitle).height());
//var heights=widget_box.height($(widget_box).height());
var showheight=sideList.height($(sideList).height());
//sideList.height($(window).height()-(options.window_height));
//<2F><><EFBFBD><EFBFBD><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD><EFBFBD>ı<EFBFBD><C4B1>Ǵ<EFBFBD><C7B4><EFBFBD>
$(window).resize(function(){
// outerheight.height($(window).height()-58+(options.window_height));
});
if(options.minStatue){
$(options.show_btn ).css("float", options.float);
sideContent.css('width', 0);
showbtn.css('width', (options.close_btn_width));
}
//Ƥ<><C6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if(options.skin) thisBox.addClass('side_'+options.skin);
//<2F><><EFBFBD><EFBFBD>scroll<6C>¼<EFBFBD>
//$(window).bind("scroll",function(){
// var offsetTop = defaultTop + $(window).clientHeight()+ "px";
// showbtn.animate({
// top: offsetTop
// },
// {
// duration: options.durationTime,
// queue: false //<2F>˶<EFBFBD><CBB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBB6AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// });
// });
//close<73>¼<EFBFBD>
closeBtn.bind("click",function(){
sideContent.animate({width: '0px'},"fast").addClass('active');
showbtn.stop(true, true).delay(300).animate({ width:+(options.close_btn_width)+'px'},"fast");
sideList.css({"display":"none"});
var heights=59+(options.window_height);
outer_height.outerHeight($(window).outerHeight(true)-heights);
leftcss.outerHeight($(window).outerHeight(true)-heights-2);
sidetitle.css("display","none");
showbtn.css("display","block");
scrollsidebar.addClass("Widescreen");
scrollsidebar.width($(window).width()-(options.spacingw));
stylespacing.width($(window).width()-(options.spacingw)).addClass("Widescreen");
});
//show<6F>¼<EFBFBD>
showbtn.click(function() {
$(this).animate({width: '0px',border:'1px solid #ddd'},"fast").css('display','none');
sideContent.stop(true, true).delay(0).animate({ width:+(options.stylewidth)+'px'},"fast");
sideList.css({"display":"block"})
sidetitle.css("display","block");
scrollsidebar.removeClass("Widescreen")
scrollsidebar.width($(window).width()-(options.stylewidth));
stylespacing.width($(window).width()-(options.spacingh)).removeClass("Widescreen");
var heights=$(sideList).outerHeight(true)+42+(options.window_height);
outer_height.outerHeight($(window).outerHeight(true)-heights);
if($('.centent_style').offsetHeight=leftcss.outerHeight($(window).outerHeight(true)-heights)){
leftcss.outerHeight($(window).outerHeight(true)-heights-2);
}
});
}); //end this.each
};
})(jQuery);