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.

51 lines
1.6 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. var _header = {};
  2. _header.init = function(formhash){
  3. _header.formhash=formhash;
  4. /*if(jQuery('.bs-left-container').length<1){
  5. jQuery('.resNav .leftTopmenu').hide();
  6. }*/
  7. };
  8. _header.loging_close = function(){
  9. var msg ='<span style="font-size:1.28rem">'+ __lang.js_exit+'</span>';
  10. if(msg){
  11. showDialog( msg, 'confirm','', function(){
  12. jQuery.get('user.php?mod=login&op=logging&action=logout&formhash='+_header.formhash+'&t='+new Date().getTime(),function(data){
  13. window.location.reload();
  14. });
  15. });
  16. }
  17. };
  18. _header.leftTopmenu=function(obj,flag){
  19. var clientWidth=document.documentElement.clientWidth;
  20. if(!flag){
  21. if(jQuery('.bs-left-container').is(':visible')){
  22. flag='hide';
  23. }else{
  24. flag='show';
  25. }
  26. }
  27. if(flag==='hide'){
  28. jQuery('.bs-left-container').hide();
  29. jQuery('.left-drager').hide();
  30. jQuery('.bs-main-container').css('marginLeft',0);
  31. jQuery(obj).removeClass('leftOpen');
  32. }else if(flag==='show'){
  33. jQuery('.bs-left-container').show();
  34. var leftWidth=jQuery('.bs-left-container').outerWidth(true);
  35. if(leftWidth<20){
  36. leftWidth=20;
  37. jQuery('.bs-left-container').width(leftWidth);
  38. jQuery('.left-drager').css({'left':leftWidth,'cursor':'w-resize'});
  39. }
  40. jQuery('.left-drager').show();
  41. jQuery('.bs-main-container').css('marginLeft',clientWidth<768?0:leftWidth);
  42. jQuery(obj).addClass('leftOpen');
  43. }
  44. };
  45. //头像颜色随机取出
  46. /*_header.Topcolor=function(){
  47. var colors=['#6b69d6','#a966ef','#e9308d','#e74856','#f35b42','#00cc6a','#0078d7','#5290f3','#00b7c3','#0099bc','#018574','#c77c52','#ff8c00','#68768a','#7083cb','#26a255'];
  48. var num = parseInt(Math.random()*10);
  49. jQuery('#Topcarousel').css({'background-color':colors[num]});
  50. }*/