From 55d74f86440a5a804d4551e04f7fd39518af0723 Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Fri, 12 May 2017 01:49:57 +0800 Subject: add web portal framework for TestAPI Change-Id: I62cea8b59ffe6a6cde98051c130f4502c07d3557 Signed-off-by: SerenaFeng --- .../assets/lib/bootstrap/js/transition.js | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 testapi/3rd_party/static/testapi-ui/assets/lib/bootstrap/js/transition.js (limited to 'testapi/3rd_party/static/testapi-ui/assets/lib/bootstrap/js/transition.js') diff --git a/testapi/3rd_party/static/testapi-ui/assets/lib/bootstrap/js/transition.js b/testapi/3rd_party/static/testapi-ui/assets/lib/bootstrap/js/transition.js new file mode 100644 index 0000000..ec9ab68 --- /dev/null +++ b/testapi/3rd_party/static/testapi-ui/assets/lib/bootstrap/js/transition.js @@ -0,0 +1,59 @@ +/* ======================================================================== + * Bootstrap: transition.js v3.3.2 + * http://getbootstrap.com/javascript/#transitions + * ======================================================================== + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * ======================================================================== */ + + ++function ($) { + 'use strict'; + + // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) + // ============================================================ + + function transitionEnd() { + var el = document.createElement('bootstrap') + + var transEndEventNames = { + WebkitTransition : 'webkitTransitionEnd', + MozTransition : 'transitionend', + OTransition : 'oTransitionEnd otransitionend', + transition : 'transitionend' + } + + for (var name in transEndEventNames) { + if (el.style[name] !== undefined) { + return { end: transEndEventNames[name] } + } + } + + return false // explicit for ie8 ( ._.) + } + + // http://blog.alexmaccaw.com/css-transitions + $.fn.emulateTransitionEnd = function (duration) { + var called = false + var $el = this + $(this).one('bsTransitionEnd', function () { called = true }) + var callback = function () { if (!called) $($el).trigger($.support.transition.end) } + setTimeout(callback, duration) + return this + } + + $(function () { + $.support.transition = transitionEnd() + + if (!$.support.transition) return + + $.event.special.bsTransitionEnd = { + bindType: $.support.transition.end, + delegateType: $.support.transition.end, + handle: function (e) { + if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) + } + } + }) + +}(jQuery); -- cgit 1.2.3-korg