From 4fe37339653c909368ba772ea9214c0b2a511fee Mon Sep 17 00:00:00 2001 From: Thomas Park Date: Fri, 16 Aug 2013 16:26:07 -0700 Subject: update bootstrap to 3.0.0-rc2 --- .../bootstrap/assets/js/application.js | 102 +- bower_components/bootstrap/assets/js/customizer.js | 175 +++ bower_components/bootstrap/assets/js/html5shiv.js | 0 .../bootstrap/assets/js/jquery.bbq.min.js | 1287 ++++++++++++++++++ bower_components/bootstrap/assets/js/jquery.js | 0 bower_components/bootstrap/assets/js/jszip.js | 1425 ++++++++++++++++++++ bower_components/bootstrap/assets/js/less.js | 9 + .../bootstrap/assets/js/respond.min.js | 0 bower_components/bootstrap/assets/js/uglify.js | 14 + 9 files changed, 2918 insertions(+), 94 deletions(-) mode change 100644 => 100755 bower_components/bootstrap/assets/js/application.js create mode 100755 bower_components/bootstrap/assets/js/customizer.js mode change 100644 => 100755 bower_components/bootstrap/assets/js/html5shiv.js create mode 100755 bower_components/bootstrap/assets/js/jquery.bbq.min.js mode change 100644 => 100755 bower_components/bootstrap/assets/js/jquery.js create mode 100755 bower_components/bootstrap/assets/js/jszip.js create mode 100755 bower_components/bootstrap/assets/js/less.js mode change 100644 => 100755 bower_components/bootstrap/assets/js/respond.min.js create mode 100755 bower_components/bootstrap/assets/js/uglify.js (limited to 'bower_components/bootstrap/assets/js') diff --git a/bower_components/bootstrap/assets/js/application.js b/bower_components/bootstrap/assets/js/application.js old mode 100644 new mode 100755 index 8097107e..81b644b9 --- a/bower_components/bootstrap/assets/js/application.js +++ b/bower_components/bootstrap/assets/js/application.js @@ -7,26 +7,21 @@ $(function(){ var $window = $(window) + var $body = $(document.body) var navHeight = $('.navbar').outerHeight(true) + 10 - $(document.body).scrollspy({ + $body.scrollspy({ target: '.bs-sidebar', offset: navHeight }) - $('[href=#]').click(function (e) { - e.preventDefault() + $window.on('load', function () { + $body.scrollspy('refresh') }) - $(document.body).on('click', '.bs-sidenav [href^=#]', function (e) { - var $target = $(this.getAttribute('href')) - - e.preventDefault() // prevent browser scroll - - document.body.scrollTop = - $target.offset().top - - navHeight + 5 // offset scroll by nav + $('.bs-docs-container [href=#]').click(function (e) { + e.preventDefault() }) // back to top @@ -55,7 +50,8 @@ // tooltip demo $('.tooltip-demo').tooltip({ - selector: "[data-toggle=tooltip]" + selector: "[data-toggle=tooltip]", + container: "body" }) $('.tooltip-test').tooltip() @@ -82,88 +78,6 @@ // carousel demo $('.bs-docs-carousel-example').carousel() - - // javascript build logic - var inputsComponent = $("#less input") - , inputsPlugin = $("#plugins input") - , inputsVariables = $("#less-variables input") - - // toggle all plugin checkboxes - $('#less .toggle').on('click', function (e) { - e.preventDefault() - inputsComponent.prop('checked', !inputsComponent.is(':checked')) - }) - - $('#plugins .toggle').on('click', function (e) { - e.preventDefault() - inputsPlugin.prop('checked', !inputsPlugin.is(':checked')) - }) - - $('#less-variables .toggle').on('click', function (e) { - e.preventDefault() - inputsVariables.val('') - }) - - // request built javascript - $('.bs-customize-download .btn').on('click', function (e) { - e.preventDefault() - - var css = $("#less input:checked") - .map(function () { return this.value }) - .toArray() - , js = $("#plugins input:checked") - .map(function () { return this.value }) - .toArray() - , vars = {} - - $("#less-variables input") - .each(function () { - $(this).val() && (vars[ $(this).prev().text() ] = $(this).val()) - }) - - $.ajax({ - type: 'POST' - , url: /localhost/.test(window.location) ? 'http://localhost:9001' : 'http://bootstrap.herokuapp.com' - , dataType: 'jsonpi' - , params: { - js: js - , css: css - , vars: vars - } - }) - }) - }) - -// Modified from the original jsonpi https://github.com/benvinegar/jquery-jsonpi -$.ajaxTransport('jsonpi', function(opts, originalOptions, jqXHR) { - var url = opts.url; - - return { - send: function(_, completeCallback) { - var name = 'jQuery_iframe_' + jQuery.now() - , iframe, form - - iframe = $('