Ingen beskrivning
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.

admin.js 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. $(function() {
  2. //操作提示缩放动画
  3. $("#checkZoom").toggle(
  4. function() {
  5. $("#explanation").animate({
  6. color: "#FFF",
  7. backgroundColor: "#4FD6BE",
  8. width: "80",
  9. height: "20",
  10. },300);
  11. $("#explanationZoom").hide();
  12. },
  13. function() {
  14. $("#explanation").animate({
  15. color: "#2CBCA3",
  16. backgroundColor: "#EDFBF8",
  17. width: "99%",
  18. height: "20",
  19. },300,function() {
  20. $(this).css('height', '100%');
  21. });
  22. $("#explanationZoom").show();
  23. }
  24. );
  25. //自定义radio样式
  26. $(".cb-enable").click(function(){
  27. var parent = $(this).parents('.onoff');
  28. $('.cb-disable',parent).removeClass('selected');
  29. $(this).addClass('selected');
  30. $('.checkbox',parent).attr('checked', true);
  31. });
  32. $(".cb-disable").click(function(){
  33. var parent = $(this).parents('.onoff');
  34. $('.cb-enable',parent).removeClass('selected');
  35. $(this).addClass('selected');
  36. $('.checkbox',parent).attr('checked', false);
  37. });
  38. //自定义radio样式
  39. $(".cb-enable1").click(function(){
  40. var parent = $(this).parents('.onoff');
  41. $('.bankcon').css('display', 'block');
  42. $('.xgtu1').css('display', 'block');
  43. $('.xgtu2').css('display', 'none');
  44. });
  45. $(".cb-enable2").click(function(){
  46. var parent = $(this).parents('.onoff');
  47. $('.bankcon').css('display', 'none');
  48. $('.xgtu2').css('display', 'block');
  49. $('.xgtu1').css('display', 'none');
  50. });
  51. // 显示隐藏预览图 start
  52. $('.show_image').hover(
  53. function(){
  54. $(this).next().css('display','block');
  55. },
  56. function(){
  57. $(this).next().css('display','none');
  58. }
  59. );
  60. // 全选 start
  61. $('.checkall').click(function(){
  62. $('.checkall').attr('checked',$(this).attr('checked') == 'checked');
  63. $('.checkitem').each(function(){
  64. $(this).attr('checked',$('.checkall').attr('checked') == 'checked');
  65. });
  66. });
  67. $("#btnGet").click(function () {
  68. $("body,html").animate({ scrollTop: 480 }, 800);
  69. });
  70. var isPostback = 'False';
  71. /* BACK TO TOP */
  72. if (isPostback == "False") {
  73. /* 窗体滚动事件 */
  74. $(window).scroll(function () {
  75. //判断滚动条的垂直位置是否大于0,说白了就是:判断滚动条是否在顶部
  76. if ($(window).scrollTop() <= 0) {
  77. $("#goTop").stop(true, false).animate({ bottom: "-156px" }, 500); //动画隐藏ID="doTop"的这个层
  78. } else {
  79. $("#goTop").stop(true, false).animate({ bottom: "30px" }, 500); //动画显示ID="doTop"的这个层
  80. }
  81. });
  82. /* 此方法可以不加,这里加这个的目的是去除在IE下点击出现的虚线框 */
  83. $("button").click(function () {
  84. if (this.focus) {
  85. this.blur();
  86. }
  87. })
  88. /* 点击返回顶部箭头的事件 */
  89. $("#btntop").click(function () {
  90. $("body,html").animate({ scrollTop: 0 }, 500); //返回顶部,用JQ的animate动画
  91. });
  92. /* 点击返回底部箭头的事件 */
  93. $("#btnbottom").click(function () {
  94. $("body,html").animate({ scrollTop: document.body.clientHeight }, 500); //返回底部,用JQ的animate动画
  95. });
  96. var adsId = '14406';
  97. if (adsId == "13868" || adsId == "14406") {
  98. setTimeout('$(".slidePopupBox").slideUp("slow")', 1500);
  99. } else {
  100. $(".slidePopupBox").hide();
  101. }
  102. } else {
  103. $(".slidePopupBox").hide();
  104. }
  105. // 高级搜索边栏动画
  106. $('#searchBarOpen').click(function() {
  107. $('.ncap-search-ban-s').animate({'right': '-40px'},200,
  108. function() {
  109. $('.ncap-search-bar').animate({'right': '0'},300);
  110. });
  111. });
  112. $('#searchBarClose').click(function() {
  113. $('.ncap-search-bar').animate({'right': '-240px'}, 300,
  114. function() {
  115. $('.ncap-search-ban-s').animate({'right': '0'}, 200);
  116. });
  117. });
  118. // 搜索项目过多时出现滚动条
  119. $('#searchCon').height($(window).height()-90).perfectScrollbar();
  120. });
  121. /* 火狐下取本地全路径 */
  122. function getFullPath(obj)
  123. {
  124. if(obj)
  125. {
  126. // ie
  127. if (window.navigator.userAgent.indexOf("MSIE")>=1)
  128. {
  129. obj.select();
  130. if(window.navigator.userAgent.indexOf("MSIE") == 25){
  131. obj.blur();
  132. }
  133. return document.selection.createRange().text;
  134. }
  135. // firefox
  136. else if(window.navigator.userAgent.indexOf("Firefox")>=1)
  137. {
  138. if(obj.files)
  139. {
  140. //return obj.files.item(0).getAsDataURL();
  141. return window.URL.createObjectURL(obj.files.item(0));
  142. }
  143. return obj.value;
  144. }
  145. return obj.value;
  146. }
  147. }
  148. $(function(){
  149. $(".bDiv").scroll(function(){
  150. var bdiv = $(".bDiv").scrollLeft();
  151. $('.hDiv').css('overflow','auto').scrollLeft(bdiv);
  152. });
  153. })