From ef99288e3a4b94ed902f6a1bff3ef75ada8d2a54 Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Wed, 16 Nov 2016 23:47:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=AC=E5=85=B1=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bootstrap.Admin/Content/js/Longbow.Common.js | 18 ++------------ Bootstrap.Admin/Content/js/common-scripts.js | 26 ++++++++++++-------- 2 files changed, 18 insertions(+), 26 deletions(-) diff --git a/Bootstrap.Admin/Content/js/Longbow.Common.js b/Bootstrap.Admin/Content/js/Longbow.Common.js index 9b30e1ae..e7b88bc4 100644 --- a/Bootstrap.Admin/Content/js/Longbow.Common.js +++ b/Bootstrap.Admin/Content/js/Longbow.Common.js @@ -185,8 +185,8 @@ clickToSelect: false, }, options); $(this).bootstrapTable(settings); - $('.toolbar').insertBefore($('.bootstrap-table > .fixed-table-toolbar > .bs-bars')); - $('.toolbar a').click(function () { + $('div.toolbar').insertBefore($('div.bootstrap-table > div.fixed-table-toolbar > div.bs-bars')); + $('div.toolbar').on('click', 'a', function () { var ctl = $('#' + $(this).attr('id').replace('tb_', 'btn_')); ctl.trigger("click"); }); @@ -195,23 +195,9 @@ })(jQuery); $(function () { - // breadcrumb - var breadcrumb = $('.sidebar-menu > li > a.active > span').text(); - if (breadcrumb === "") $('.breadcrumb > li + li').hide(); - else $('.breadcrumb > li + li').text(breadcrumb); - if ($.isFunction($.validator)) { jQuery.validator.addMethod("ip", function (value, element) { return this.optional(element) || /^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$/.test(value); }, "请填写正确的IP地址"); } - - $(".go-top").click(function (e) { - e.preventDefault(); - $('#main-content, .content-body, body').animate({ - scrollTop: 0 - }, 200); - }); - - $('.site-footer div span').text($('#footer').val()); }); \ No newline at end of file diff --git a/Bootstrap.Admin/Content/js/common-scripts.js b/Bootstrap.Admin/Content/js/common-scripts.js index 9f3bba0d..918c2942 100644 --- a/Bootstrap.Admin/Content/js/common-scripts.js +++ b/Bootstrap.Admin/Content/js/common-scripts.js @@ -1,5 +1,4 @@ -/*---LEFT BAR ACCORDION----*/ -$(function () { +$(function () { $('#nav-accordion').dcAccordion({ eventType: 'click', autoClose: true, @@ -11,10 +10,21 @@ $(function () { // cookie: 'dcjq-accordion-1', classExpand: 'dcjq-current-parent' }); -}); -(function ($) { - // sidebar dropdown menu auto scrolling + // breadcrumb + var breadcrumb = $('.sidebar-menu > li > a.active > span').text(); + if (breadcrumb === "") $('.breadcrumb > li + li').hide(); + else $('.breadcrumb > li + li').text(breadcrumb); + + $(".go-top").click(function (e) { + e.preventDefault(); + $('#main-content, .content-body, body').animate({ + scrollTop: 0 + }, 200); + }); + + $('.site-footer div span').text($('#footer').val()); + $('#sidebar .sub-menu > a').click(function () { var o = ($(this).offset()); diff = 300 - o.top; @@ -35,8 +45,4 @@ $(function () { // custom scrollbar if (!$.browser.versions.ios) $("#sidebar").niceScroll({ styler: "fb", cursorcolor: "#e8403f", cursorwidth: '3', cursorborderradius: '10px', background: '#404040', spacebarenabled: false, cursorborder: '', scrollspeed: 60 }); - - //$("html").niceScroll({styler:"fb",cursorcolor:"#e8403f", cursorwidth: '6', cursorborderradius: '10px', background: '#404040', spacebarenabled:false, cursorborder: '', zindex: '1000', scrollspeed: 100, mousescrollstep: 60}); - - //$(".table-responsive").niceScroll({ styler: "fb", cursorcolor: "#e8403f", cursorwidth: '6', cursorborderradius: '10px', background: '#404040', spacebarenabled: false, cursorborder: '', zindex: '1000', horizrailenabled: true }); -})(jQuery); \ No newline at end of file +}); \ No newline at end of file