diff options
| author | Alec Perkins | 2012-09-07 12:58:47 -0400 |
|---|---|---|
| committer | Alec Perkins | 2012-09-07 13:01:01 -0400 |
| commit | 3306e448ef4ac9f3e01312916062126dfc94c1ae (patch) | |
| tree | 571fa15e10293e3ea39e1e66601a1f1d3f6d24c7 /docs/static/js | |
| parent | 72bdd0fcec7faa32d7f24e0698736f9433b56f3f (diff) | |
| download | django-rest-framework-3306e448ef4ac9f3e01312916062126dfc94c1ae.tar.bz2 | |
[docs] Update Bootstrap to 2.1.1
Diffstat (limited to 'docs/static/js')
| -rwxr-xr-x | docs/static/js/bootstrap-affix.js | 104 | ||||
| -rwxr-xr-x[-rw-r--r--] | docs/static/js/bootstrap-alert.js | 2 | ||||
| -rwxr-xr-x[-rw-r--r--] | docs/static/js/bootstrap-button.js | 4 | ||||
| -rwxr-xr-x[-rw-r--r--] | docs/static/js/bootstrap-carousel.js | 2 | ||||
| -rwxr-xr-x[-rw-r--r--] | docs/static/js/bootstrap-collapse.js | 2 | ||||
| -rwxr-xr-x[-rw-r--r--] | docs/static/js/bootstrap-dropdown.js | 6 | ||||
| -rwxr-xr-x[-rw-r--r--] | docs/static/js/bootstrap-modal.js | 2 | ||||
| -rwxr-xr-x[-rw-r--r--] | docs/static/js/bootstrap-popover.js | 2 | ||||
| -rwxr-xr-x[-rw-r--r--] | docs/static/js/bootstrap-scrollspy.js | 2 | ||||
| -rwxr-xr-x[-rw-r--r--] | docs/static/js/bootstrap-tab.js | 2 | ||||
| -rwxr-xr-x[-rw-r--r--] | docs/static/js/bootstrap-tooltip.js | 2 | ||||
| -rwxr-xr-x[-rw-r--r--] | docs/static/js/bootstrap-transition.js | 2 | ||||
| -rwxr-xr-x[-rw-r--r--] | docs/static/js/bootstrap-typeahead.js | 4 |
13 files changed, 120 insertions, 16 deletions
diff --git a/docs/static/js/bootstrap-affix.js b/docs/static/js/bootstrap-affix.js new file mode 100755 index 00000000..c49d6e9d --- /dev/null +++ b/docs/static/js/bootstrap-affix.js @@ -0,0 +1,104 @@ +/* ========================================================== + * bootstrap-affix.js v2.1.1 + * http://twitter.github.com/bootstrap/javascript.html#affix + * ========================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* AFFIX CLASS DEFINITION + * ====================== */ + + var Affix = function (element, options) { + this.options = $.extend({}, $.fn.affix.defaults, options) + this.$window = $(window).on('scroll.affix.data-api', $.proxy(this.checkPosition, this)) + this.$element = $(element) + this.checkPosition() + } + + Affix.prototype.checkPosition = function () { + if (!this.$element.is(':visible')) return + + var scrollHeight = $(document).height() + , scrollTop = this.$window.scrollTop() + , position = this.$element.offset() + , offset = this.options.offset + , offsetBottom = offset.bottom + , offsetTop = offset.top + , reset = 'affix affix-top affix-bottom' + , affix + + if (typeof offset != 'object') offsetBottom = offsetTop = offset + if (typeof offsetTop == 'function') offsetTop = offset.top() + if (typeof offsetBottom == 'function') offsetBottom = offset.bottom() + + affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? + false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? + 'bottom' : offsetTop != null && scrollTop <= offsetTop ? + 'top' : false + + if (this.affixed === affix) return + + this.affixed = affix + this.unpin = affix == 'bottom' ? position.top - scrollTop : null + + this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : '')) + } + + + /* AFFIX PLUGIN DEFINITION + * ======================= */ + + $.fn.affix = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('affix') + , options = typeof option == 'object' && option + if (!data) $this.data('affix', (data = new Affix(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.affix.Constructor = Affix + + $.fn.affix.defaults = { + offset: 0 + } + + + /* AFFIX DATA-API + * ============== */ + + $(window).on('load', function () { + $('[data-spy="affix"]').each(function () { + var $spy = $(this) + , data = $spy.data() + + data.offset = data.offset || {} + + data.offsetBottom && (data.offset.bottom = data.offsetBottom) + data.offsetTop && (data.offset.top = data.offsetTop) + + $spy.affix(data) + }) + }) + + +}(window.jQuery);
\ No newline at end of file diff --git a/docs/static/js/bootstrap-alert.js b/docs/static/js/bootstrap-alert.js index 4dd31adb..51273ab9 100644..100755 --- a/docs/static/js/bootstrap-alert.js +++ b/docs/static/js/bootstrap-alert.js @@ -1,5 +1,5 @@ /* ========================================================== - * bootstrap-alert.js v2.1.0 + * bootstrap-alert.js v2.1.1 * http://twitter.github.com/bootstrap/javascript.html#alerts * ========================================================== * Copyright 2012 Twitter, Inc. diff --git a/docs/static/js/bootstrap-button.js b/docs/static/js/bootstrap-button.js index d0413d6e..a0ab0bfa 100644..100755 --- a/docs/static/js/bootstrap-button.js +++ b/docs/static/js/bootstrap-button.js @@ -1,5 +1,5 @@ /* ============================================================ - * bootstrap-button.js v2.1.0 + * bootstrap-button.js v2.1.1 * http://twitter.github.com/bootstrap/javascript.html#buttons * ============================================================ * Copyright 2012 Twitter, Inc. @@ -51,7 +51,7 @@ } Button.prototype.toggle = function () { - var $parent = this.$element.parent('[data-toggle="buttons-radio"]') + var $parent = this.$element.closest('[data-toggle="buttons-radio"]') $parent && $parent .find('.active') diff --git a/docs/static/js/bootstrap-carousel.js b/docs/static/js/bootstrap-carousel.js index 0b87eb8a..5c194b42 100644..100755 --- a/docs/static/js/bootstrap-carousel.js +++ b/docs/static/js/bootstrap-carousel.js @@ -1,5 +1,5 @@ /* ========================================================== - * bootstrap-carousel.js v2.1.0 + * bootstrap-carousel.js v2.1.1 * http://twitter.github.com/bootstrap/javascript.html#carousel * ========================================================== * Copyright 2012 Twitter, Inc. diff --git a/docs/static/js/bootstrap-collapse.js b/docs/static/js/bootstrap-collapse.js index 391d9128..8116f225 100644..100755 --- a/docs/static/js/bootstrap-collapse.js +++ b/docs/static/js/bootstrap-collapse.js @@ -1,5 +1,5 @@ /* ============================================================= - * bootstrap-collapse.js v2.1.0 + * bootstrap-collapse.js v2.1.1 * http://twitter.github.com/bootstrap/javascript.html#collapse * ============================================================= * Copyright 2012 Twitter, Inc. diff --git a/docs/static/js/bootstrap-dropdown.js b/docs/static/js/bootstrap-dropdown.js index ab601e9e..42370dfb 100644..100755 --- a/docs/static/js/bootstrap-dropdown.js +++ b/docs/static/js/bootstrap-dropdown.js @@ -1,5 +1,5 @@ /* ============================================================ - * bootstrap-dropdown.js v2.1.0 + * bootstrap-dropdown.js v2.1.1 * http://twitter.github.com/bootstrap/javascript.html#dropdowns * ============================================================ * Copyright 2012 Twitter, Inc. @@ -110,7 +110,7 @@ if (!selector) { selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 } $parent = $(selector) @@ -142,7 +142,7 @@ $('html') .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus) $('body') - .on('click.dropdown touchstart.dropdown.data-api', '.dropdown', function (e) { e.stopPropagation() }) + .on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) .on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle) .on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) }) diff --git a/docs/static/js/bootstrap-modal.js b/docs/static/js/bootstrap-modal.js index 62fbc951..f1622b1c 100644..100755 --- a/docs/static/js/bootstrap-modal.js +++ b/docs/static/js/bootstrap-modal.js @@ -1,5 +1,5 @@ /* ========================================================= - * bootstrap-modal.js v2.1.0 + * bootstrap-modal.js v2.1.1 * http://twitter.github.com/bootstrap/javascript.html#modals * ========================================================= * Copyright 2012 Twitter, Inc. diff --git a/docs/static/js/bootstrap-popover.js b/docs/static/js/bootstrap-popover.js index 4ce7a16d..94137228 100644..100755 --- a/docs/static/js/bootstrap-popover.js +++ b/docs/static/js/bootstrap-popover.js @@ -1,5 +1,5 @@ /* =========================================================== - * bootstrap-popover.js v2.1.0 + * bootstrap-popover.js v2.1.1 * http://twitter.github.com/bootstrap/javascript.html#popovers * =========================================================== * Copyright 2012 Twitter, Inc. diff --git a/docs/static/js/bootstrap-scrollspy.js b/docs/static/js/bootstrap-scrollspy.js index df70ebdd..e740ac01 100644..100755 --- a/docs/static/js/bootstrap-scrollspy.js +++ b/docs/static/js/bootstrap-scrollspy.js @@ -1,5 +1,5 @@ /* ============================================================= - * bootstrap-scrollspy.js v2.1.0 + * bootstrap-scrollspy.js v2.1.1 * http://twitter.github.com/bootstrap/javascript.html#scrollspy * ============================================================= * Copyright 2012 Twitter, Inc. diff --git a/docs/static/js/bootstrap-tab.js b/docs/static/js/bootstrap-tab.js index df2a7f7a..070deb8f 100644..100755 --- a/docs/static/js/bootstrap-tab.js +++ b/docs/static/js/bootstrap-tab.js @@ -1,5 +1,5 @@ /* ======================================================== - * bootstrap-tab.js v2.1.0 + * bootstrap-tab.js v2.1.1 * http://twitter.github.com/bootstrap/javascript.html#tabs * ======================================================== * Copyright 2012 Twitter, Inc. diff --git a/docs/static/js/bootstrap-tooltip.js b/docs/static/js/bootstrap-tooltip.js index 4d06dfcc..ed628853 100644..100755 --- a/docs/static/js/bootstrap-tooltip.js +++ b/docs/static/js/bootstrap-tooltip.js @@ -1,5 +1,5 @@ /* =========================================================== - * bootstrap-tooltip.js v2.1.0 + * bootstrap-tooltip.js v2.1.1 * http://twitter.github.com/bootstrap/javascript.html#tooltips * Inspired by the original jQuery.tipsy by Jason Frame * =========================================================== diff --git a/docs/static/js/bootstrap-transition.js b/docs/static/js/bootstrap-transition.js index f0913d86..fedc90a8 100644..100755 --- a/docs/static/js/bootstrap-transition.js +++ b/docs/static/js/bootstrap-transition.js @@ -1,5 +1,5 @@ /* =================================================== - * bootstrap-transition.js v2.1.0 + * bootstrap-transition.js v2.1.1 * http://twitter.github.com/bootstrap/javascript.html#transitions * =================================================== * Copyright 2012 Twitter, Inc. diff --git a/docs/static/js/bootstrap-typeahead.js b/docs/static/js/bootstrap-typeahead.js index ae57221c..c2ccdea2 100644..100755 --- a/docs/static/js/bootstrap-typeahead.js +++ b/docs/static/js/bootstrap-typeahead.js @@ -1,5 +1,5 @@ /* ============================================================= - * bootstrap-typeahead.js v2.1.0 + * bootstrap-typeahead.js v2.1.1 * http://twitter.github.com/bootstrap/javascript.html#typeahead * ============================================================= * Copyright 2012 Twitter, Inc. @@ -174,7 +174,7 @@ .on('keypress', $.proxy(this.keypress, this)) .on('keyup', $.proxy(this.keyup, this)) - if ($.browser.webkit || $.browser.msie) { + if ($.browser.chrome || $.browser.webkit || $.browser.msie) { this.$element.on('keydown', $.proxy(this.keydown, this)) } |
