国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
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.

169 lines
4.4KB

  1. <!--
  2. var $ = jQuery;
  3. var thespeed = 5;
  4. var navIE = document.all && navigator.userAgent.indexOf("Firefox")==-1;
  5. var myspeed=0;
  6. $(function(){
  7. //快捷菜单
  8. bindQuickMenu();
  9. //左侧菜单开关
  10. LeftMenuToggle();
  11. //全部功能开关
  12. AllMenuToggle();
  13. //取消菜单链接虚线
  14. $(".head").find("a").click(function(){$(this).blur()});
  15. $(".menu").find("a").click(function(){$(this).blur()});
  16. /*
  17. //载入滚动消息
  18. $.get('getdedesysmsg.php',function(data){
  19. if(data != ''){
  20. $(".scroll").html(data);
  21. $(".scroll").Scroll({line:1,speed:500,timer:3000});
  22. }
  23. else
  24. {
  25. $(".scroll").html("无法读取织梦官方消息");
  26. }
  27. });
  28. */
  29. }).keydown(function(event){//快捷键
  30. if(event.keyCode ==116 ){
  31. //url = $("#main").attr("src");
  32. //main.location.href = url;
  33. //return false;
  34. }
  35. if(event.keyCode ==27 ){
  36. $("#qucikmenu").slideToggle("fast")
  37. }
  38. });
  39. function bindQuickMenu(){//快捷菜单
  40. $("#ac_qucikmenu").bind("mouseenter",function(){
  41. $("#qucikmenu").slideDown("fast");
  42. }).dblclick(function(){
  43. $("#qucikmenu").slideToggle("fast");
  44. }).bind("mouseleave",function(){
  45. hidequcikmenu=setTimeout('$("#qucikmenu").slideUp("fast");',700);
  46. $(this).bind("mouseenter",function(){clearTimeout(hidequcikmenu);});
  47. });
  48. $("#qucikmenu").bind("mouseleave",function(){
  49. hidequcikmenu=setTimeout('$("#qucikmenu").slideUp("fast");',700);
  50. $(this).bind("mouseenter",function(){clearTimeout(hidequcikmenu);});
  51. }).find("a").click(function(){
  52. $(this).blur();
  53. $("#qucikmenu").slideUp("fast");
  54. //$("#ac_qucikmenu").text($(this).text());
  55. });
  56. }
  57. function LeftMenuToggle(){//左侧菜单开关
  58. $("#togglemenu").click(function(){
  59. if($("body").attr("class")=="showmenu"){
  60. $("body").attr("class","hidemenu");
  61. $(this).html("显示菜单");
  62. }else{
  63. $("body").attr("class","showmenu");
  64. $(this).html("隐藏菜单");
  65. }
  66. });
  67. }
  68. function AllMenuToggle(){//全部功能开关
  69. mask = $(".pagemask,.iframemask,.allmenu");
  70. $("#allmenu").click(function(){
  71. mask.show();
  72. });
  73. //mask.mousedown(function(){alert("123");});
  74. mask.click(function(){mask.hide();});
  75. }
  76. function AC(act){
  77. //alert(act);
  78. mlink = $("a[id='"+act+"']");
  79. if(mlink.size()>0){
  80. box = mlink.parents("div[id^='menu_']");
  81. boxid = box.attr("id").substring(5,128);
  82. if($("body").attr("class")!="showmenu")$("#togglemenu").click();
  83. if(mlink.attr("_url")){
  84. $("#menu").find("div[id^=menu]").hide();
  85. box.show();
  86. mlink.addClass("thisclass").blur().parents("#menu").find("ul li a").not(mlink).removeClass("thisclass");
  87. if($("#mod_"+boxid).attr("class")==""){
  88. $("#nav").find("a").removeClass("thisclass");
  89. $("#nav").find("a[id='mod_"+boxid+"']").addClass("thisclass").blur();
  90. }
  91. main.location.href = mlink.attr("_url");
  92. }else if(mlink.attr("_open") && mlink.attr("_open")!=undefined){
  93. window.open(mlink.attr("_open"));
  94. }
  95. }
  96. }
  97. /*********************
  98. * 滚动按钮设置
  99. *********************/
  100. function scrollwindow()
  101. {
  102. parent.frames['menu'].scrollBy(0,myspeed);
  103. }
  104. function initializeIT()
  105. {
  106. if (myspeed!=0) {
  107. scrollwindow();
  108. }
  109. }
  110. //滚动插件
  111. /*
  112. (function($){
  113. $.fn.extend({
  114. Scroll:function(opt,callback){
  115. //参数初始化
  116. if(!opt) var opt={};
  117. var _this=this.eq(0).find("ul:first");
  118. var lineH=_this.find("li:first").height(), //获取行高
  119. line=opt.line?parseInt(opt.line,10):parseInt(this.height()/lineH,10), //每次滚动的行数,默认为一屏,即父容器高度
  120. speed=opt.speed?parseInt(opt.speed,10):500, //卷动速度,数值越大,速度越慢(毫秒)
  121. timer=opt.timer?parseInt(opt.timer,10):3000; //滚动的时间间隔(毫秒)
  122. if(line==0) line=1;
  123. var upHeight=0-line*lineH;
  124. //滚动函数
  125. scrollUp=function(){
  126. _this.animate({
  127. marginTop:upHeight
  128. },speed,function(){
  129. for(i=1;i<=line;i++){
  130. _this.find("li:first").appendTo(_this);
  131. }
  132. _this.css({marginTop:0});
  133. });
  134. }
  135. //鼠标事件绑定
  136. var timerID;
  137. timerID=setInterval("scrollUp()",timer);
  138. _this.mouseover(function(){
  139. clearInterval(timerID);
  140. }).mouseout(function(){
  141. timerID=setInterval("scrollUp()",timer);
  142. });
  143. }
  144. })
  145. })(jQuery);
  146. */
  147. -->