mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Upgrading jQuery 1.7.1 to 1.7.2 and upgrading bootstrap's carousel to 2.0.5.
This commit is contained in:
parent
8d0278f162
commit
e2da3881d4
3 changed files with 708 additions and 558 deletions
|
@ -22,7 +22,7 @@ compress_assets: on
|
|||
|
||||
javascripts:
|
||||
common:
|
||||
- media/js/vendor/jquery-1.7.1.js
|
||||
- media/js/vendor/jquery-1.*.js
|
||||
- media/js/vendor/jquery.json.js
|
||||
- media/js/vendor/jquery.easing.js
|
||||
- media/js/vendor/jquery.newsblur.js
|
||||
|
@ -66,7 +66,7 @@ javascripts:
|
|||
- media/js/newsblur/reader/*.js
|
||||
- media/js/newsblur/static/*.js
|
||||
mobile:
|
||||
- media/js/vendor/jquery-1.7.1.js
|
||||
- media/js/vendor/jquery-1.*.js
|
||||
- media/js/mobile/jquery.mobile-1.0b1.js
|
||||
- media/js/vendor/jquery.ajaxmanager.3.js
|
||||
- media/js/vendor/underscore-*.js
|
||||
|
|
54
media/js/vendor/bootstrap.carousel.js
vendored
54
media/js/vendor/bootstrap.carousel.js
vendored
|
@ -1,5 +1,5 @@
|
|||
/* ==========================================================
|
||||
* bootstrap-carousel.js v2.0.1
|
||||
* bootstrap-carousel.js v2.0.4
|
||||
* http://twitter.github.com/bootstrap/javascript.html#carousel
|
||||
* ==========================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
|
@ -18,23 +18,30 @@
|
|||
* ========================================================== */
|
||||
|
||||
|
||||
!function( $ ){
|
||||
!function ($) {
|
||||
|
||||
"use strict"; // jshint ;_;
|
||||
|
||||
"use strict"
|
||||
|
||||
/* CAROUSEL CLASS DEFINITION
|
||||
* ========================= */
|
||||
|
||||
var Carousel = function (element, options) {
|
||||
this.$element = $(element)
|
||||
this.options = $.extend({}, $.fn.carousel.defaults, options)
|
||||
this.options = options
|
||||
this.options.slide && this.slide(this.options.slide)
|
||||
this.options.pause == 'hover' && this.$element
|
||||
.on('mouseenter', $.proxy(this.pause, this))
|
||||
.on('mouseleave', $.proxy(this.cycle, this))
|
||||
}
|
||||
|
||||
Carousel.prototype = {
|
||||
|
||||
cycle: function () {
|
||||
this.interval = setInterval($.proxy(this.next, this), this.options.interval)
|
||||
cycle: function (e) {
|
||||
if (!e) this.paused = false
|
||||
this.options.interval
|
||||
&& !this.paused
|
||||
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
|
||||
return this
|
||||
}
|
||||
|
||||
|
@ -59,7 +66,8 @@
|
|||
return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
|
||||
}
|
||||
|
||||
, pause: function () {
|
||||
, pause: function (e) {
|
||||
if (!e) this.paused = true
|
||||
clearInterval(this.interval)
|
||||
this.interval = null
|
||||
return this
|
||||
|
@ -82,8 +90,7 @@
|
|||
, direction = type == 'next' ? 'left' : 'right'
|
||||
, fallback = type == 'next' ? 'first' : 'last'
|
||||
, that = this
|
||||
|
||||
if (!$next.length) return
|
||||
, e = $.Event('slide')
|
||||
|
||||
this.sliding = true
|
||||
|
||||
|
@ -91,24 +98,28 @@
|
|||
|
||||
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
|
||||
|
||||
if (!$.support.transition && this.$element.hasClass('slide')) {
|
||||
this.$element.trigger('slide')
|
||||
$active.removeClass('active')
|
||||
$next.addClass('active')
|
||||
this.sliding = false
|
||||
this.$element.trigger('slid')
|
||||
} else {
|
||||
if ($next.hasClass('active')) return
|
||||
|
||||
if ($.support.transition && this.$element.hasClass('slide')) {
|
||||
this.$element.trigger(e)
|
||||
if (e.isDefaultPrevented()) return
|
||||
$next.addClass(type)
|
||||
$next[0].offsetWidth // force reflow
|
||||
$active.addClass(direction)
|
||||
$next.addClass(direction)
|
||||
this.$element.trigger('slide')
|
||||
this.$element.one($.support.transition.end, function () {
|
||||
$next.removeClass([type, direction].join(' ')).addClass('active')
|
||||
$active.removeClass(['active', direction].join(' '))
|
||||
that.sliding = false
|
||||
setTimeout(function () { that.$element.trigger('slid') }, 0)
|
||||
})
|
||||
} else {
|
||||
this.$element.trigger(e)
|
||||
if (e.isDefaultPrevented()) return
|
||||
$active.removeClass('active')
|
||||
$next.addClass('active')
|
||||
this.sliding = false
|
||||
this.$element.trigger('slid')
|
||||
}
|
||||
|
||||
isCycling && this.cycle()
|
||||
|
@ -122,20 +133,21 @@
|
|||
/* CAROUSEL PLUGIN DEFINITION
|
||||
* ========================== */
|
||||
|
||||
$.fn.carousel = function ( option ) {
|
||||
$.fn.carousel = function (option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
, data = $this.data('carousel')
|
||||
, options = typeof option == 'object' && option
|
||||
, options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
|
||||
if (!data) $this.data('carousel', (data = new Carousel(this, options)))
|
||||
if (typeof option == 'number') data.to(option)
|
||||
else if (typeof option == 'string' || (option = options.slide)) data[option]()
|
||||
else data.cycle()
|
||||
else if (options.interval) data.cycle()
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.carousel.defaults = {
|
||||
interval: 5000
|
||||
, pause: 'hover'
|
||||
}
|
||||
|
||||
$.fn.carousel.Constructor = Carousel
|
||||
|
@ -154,4 +166,4 @@
|
|||
})
|
||||
})
|
||||
|
||||
}( window.jQuery );
|
||||
}(window.jQuery);
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue