Edit D:\AVAWeike\AVAWeike\AVA.ResourcesPlatform.WebUI\CSS\zh-CN\DefaultTheme\js\libs\lim.it.js
??/*--------------------------------------------------------------------- Template Name: lim.it Version: 1.0 Release Date: July 12, 2010 File: lim.it.js Updated: 2010-07-12 Copyright (c) 2010 Chanry Ian - http://wcweb.us ----------------------------------------------------------------------- WARNING! DO NOT EDIT THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! ---------------------------------------------------------------------*/ // globle use // sometime you can preload some images // imageObj = new Image(); // imgs = ["/static/style/img/toggle.gif", "/static/style/img/nyro/ajaxLoader.gif", "/static/style/img/nyro/prev.gif", "/static/style/img/nyro/next.gif"]; // for (i = 0; i <= imgs.length; i++) imageObj.src = imgs[i]; // lim object setup if (!Limit) var Limit = {}; Limit.scrollToTop = function (e) { $(e).hide().removeAttr("href"); if ($(window).scrollTop() != "0") { $(e).fadeIn("slow") } var scrollDiv = $(e); $(window).scroll(function () { if ($(window).scrollTop() == "0") { $(scrollDiv).fadeOut("slow") } else { $(scrollDiv).fadeIn("slow") } }); $(e).click(function () { $("html, body").animate({ scrollTop: 0 }, "slow") }) } Limit.setup = function () { // Open external link in new windows $('a[href^="http://"]').filter(function () { return this.hostname && this.hostname !== location.hostname; }).attr('target', '_blank'); // build an animated footer $('#animated').each(function () { $(this).hover(function () { $(this).stop().animate({ opacity: 0.9 }, 400); }, function () { $(this).stop().animate({ opacity: 0.0 }, 200); }); }); // scroll to top on request if ($("a#totop").length) Limit.scrollToTop("a#totop"); // setup content boxes if ($(".content-box").length) { $(".content-box .head").css({ "cursor": "s-resize" }); $(".content-box .body").slideUp(); // Give the header in content-box a different cursor $(".content-box .head").toggle( function () { var that = this; $(this).parent().find('.body').slideDown('slow', function () { $(that).find('.caption').toggleClass("content-box-closed"); }); // Toggle the content }, function () { var that = this; $(this).parent().find('.body').slideUp('slow', function () { $(that).find('.caption').toggleClass("content-box-closed"); }); // Toggle the content }); } // custom tooltips to replace the default browser tooltips for <a title=""> <div title=""> and <span title=""> //$("a[title], div[title], span[title]").tipTip(); // if($('.dropdown-toggle').length){ // $('.dropdown-toggle').dropdown(); // } if ($(".collapse").length) { //$(".collapse").collapse(); } } if ($('#list-grid-toggle').length) { $('.list-toggle-btn').click(function (e) { if ($(e.currentTarget).hasClass("list-toggle-btn-up")) { $(e.currentTarget).toggleClass("list-toggle-btn-on list-toggle-btn-up"); $('.grid-toggle-btn').toggleClass("grid-toggle-btn-on grid-toggle-btn-up"); $('#list-grid-toggle').addClass("videolist-heng"); } e.preventDefault(); }); $('.grid-toggle-btn').click(function (e) { if ($(e.currentTarget).hasClass("grid-toggle-btn-up")) { $('.list-toggle-btn').toggleClass("list-toggle-btn-on list-toggle-btn-up"); $(e.currentTarget).toggleClass("grid-toggle-btn-on grid-toggle-btn-up"); $('#list-grid-toggle').removeClass("videolist-heng"); } e.preventDefault(); }); } $(function () { $('.toggle-info').slideUp('fast'); $('.toggle-info-btn').toggle( function () { var that = this; $("#" + $(this).attr('rel')).slideDown( 'slow', function () { $(that).children().html('??????'); } ); }, function () { var that = this; $("#" + $(this).attr('rel')).slideUp( 'fast', function () { $(that).children().html('??????'); } ); } ) }); (function (doc) { var addEvent = 'addEventListener', type = 'gesturestart', qsa = 'querySelectorAll', scales = [1, 1], meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : []; function fix() { meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1]; doc.removeEventListener(type, fix, true); } if ((meta = meta[meta.length - 1]) && addEvent in doc) { fix(); scales = [.25, 1.6]; doc[addEvent](type, fix, true); } }(document)); function is_ie() { return (/MSIE/g).test(window.navigator.userAgent); } function is_windows() { var ua = navigator.userAgent.toLowerCase(); return ua.indexOf('windows ') > 0; } function is_mac() { return navigator.userAgent.indexOf("Mac") != -1 } //Plugin start (function ($) { var methods = { init: function (options) { return this.each(function () { var _this = $(this); _this.data('marquee', options); var _li = $('>li', _this); _this.wrap('<div class="slide_container"></div>') .height(_this.height()) .hover(function () { if ($(this).data('marquee').stop) { $(this).stop(true, false); } }, function () { if ($(this).data('marquee').stop) { $(this).marquee('slide'); } }) .parent() .css({ position: 'relative', overflow: 'hidden', 'height': $('>li', _this).height() }) .find('>ul') .css({ width: screen.width * 2, position: 'absolute' }); for (var i = 0; i < Math.ceil((screen.width * 3) / _this.width()) ; ++i) { _this.append(_li.clone()); } _this.marquee('slide'); }); }, slide: function () { var $this = this; $this.animate({ 'left': $('>li', $this).width() * -1 }, $this.data('marquee').duration, 'swing', function () { $this.css('left', 0).append($('>li:first', $this)); $this.delay($this.data('marquee').delay).marquee('slide'); } ); } }; $.fn.marquee = function (m) { var settings = { 'delay': 2000, 'duration': 900, 'stop': true }; if (typeof m === 'object' || !m) { if (m) { $.extend(settings, m); } return methods.init.apply(this, [settings]); } else { return methods[m].apply(this); } }; } )(jQuery); //Plugin end //call //var doc_height; $(document).ready( function () { $('.slide').marquee({ delay: 3000 }); //doc_height = $(document).height(); } ); $(window).on('load resize', function () { //if (getInternetExplorerVersion() != 8.0) { // var height = $(document).height() - $('#header').height() - $('#footer').height(); // $('.app-sidebar').height(height - 32); //} // var total_height = $('#header').height() + $(".content").height() + $("#footer").height()+$(".flash_messages ").height(); //console.log(total_height); //if (doc_height > total_height + 20) { // var resize = doc_height - total_height - $(".flash_messages ").height()-10; // console.log(resize); // // console.log($(".content").height()); // $(".content").height($(".content").height() + resize); // console.log($(".content").height()); // } }); function getInternetExplorerVersion() // Returns the version of Internet Explorer or a -1 // (indicating the use of another browser). { var rv = -1; // Return value assumes failure. if (navigator.appName == 'Microsoft Internet Explorer') { var ua = navigator.userAgent; var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})"); if (re.exec(ua) != null) rv = parseFloat(RegExp.$1); } return rv; } $(function () { if ($("#nav-category").length) { $(".nav-list:first a").click(function (e) { if ($(e.currentTarget).attr("data-target") !== undefined) { //be fix at start with in $(".nav-list:first .nav-list .in").collapse("toggle"); $(".nav-list:first .nav-list .collapse").filter(".in").collapse("hide"); } }) } }); $(document).ready( function () { $(".flash_messages").filter(function (index) { if ($("p", this).html() !== "message-here") { $(this).fadeIn(); } }); } ); var tid = null; window.flash = function flash(str) { // single tid = null; var temp = $(".flash_messages"); $(".flash_messages").children("p").html(str); // mutiply instant //var temp = $(".flash_messages").first().clone(true); //$(temp).children().filter("p").html(str); //$(".flash_messages").last().before($(temp)); $(temp).fadeIn(); tid=setTimeout(function () { $(temp).fadeOut(function () { tid = null;}); }, 20000); } //window.alert = function alert(str) { // flash(str); //} $(document).ready(function () { if ($(".oct").length > 0) { $('.accordion-body').on('show', function (e) { $(e.currentTarget).parent().find('.accordion-heading').toggleClass('active') } ) $('.accordion-body').on('hide', function (e) { $(e.currentTarget).parent().find('.accordion-heading').toggleClass('active') } ) } }); /* Plugin switcher */ jQuery.fn.myswitch = function() { return this.each(function() { var mypid = jQuery(this).data("pid"); var state = $(this).data("state") $('[data-pid="'+ mypid +'"]').toggleClass("classclose"); if (state == "hide") { $(this).text("???"); $(this).data("state","show"); }else{ $(this).text("???"); $(this).data("state","hide"); } }); }; $(document).ready(function() { $(".btnmore a").click(function(){ $(this).myswitch(); }); }); $(function () { $("img").lazyload({ threshold: 2000, event: "updateImg", loaded_all: true, failure_limit: 1000 }); $(document).on("domChange", function (e) { $("img").lazyload({ threshold: 2000, event: "updateImg", failure_limit: 1000 });; }) $(document).on("click.tab.data-api", function (e) { $("img").trigger("updateImg"); }) $(window).on("scroll", function () { $("img").trigger("updateImg"); }) })
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de