From 8aa5181126d9480eef502403aa98e469a3597826 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Mon, 23 Sep 2013 13:00:43 -0700 Subject: move /assets/ to /docs-assets/ ; fixes #10715 --- docs-assets/js/application.js | 98 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 docs-assets/js/application.js (limited to 'docs-assets/js/application.js') diff --git a/docs-assets/js/application.js b/docs-assets/js/application.js new file mode 100644 index 000000000..76c24e5a6 --- /dev/null +++ b/docs-assets/js/application.js @@ -0,0 +1,98 @@ +// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT +// IT'S ALL JUST JUNK FOR OUR DOCS! +// ++++++++++++++++++++++++++++++++++++++++++ + +!function ($) { + + $(function(){ + + // IE10 viewport hack for Surface/desktop Windows 8 bug + // + // See Getting Started docs for more information + if (navigator.userAgent.match(/IEMobile\/10\.0/)) { + var msViewportStyle = document.createElement("style"); + msViewportStyle.appendChild( + document.createTextNode( + "@-ms-viewport{width:auto!important}" + ) + ); + document.getElementsByTagName("head")[0]. + appendChild(msViewportStyle); + } + + + var $window = $(window) + var $body = $(document.body) + + var navHeight = $('.navbar').outerHeight(true) + 10 + + $body.scrollspy({ + target: '.bs-sidebar', + offset: navHeight + }) + + $window.on('load', function () { + $body.scrollspy('refresh') + }) + + $('.bs-docs-container [href=#]').click(function (e) { + e.preventDefault() + }) + + // back to top + setTimeout(function () { + var $sideBar = $('.bs-sidebar') + + $sideBar.affix({ + offset: { + top: function () { + var offsetTop = $sideBar.offset().top + var sideBarMargin = parseInt($sideBar.children(0).css('margin-top'), 10) + var navOuterHeight = $('.bs-docs-nav').height() + + return (this.top = offsetTop - navOuterHeight - sideBarMargin) + } + , bottom: function () { + return (this.bottom = $('.bs-footer').outerHeight(true)) + } + } + }) + }, 100) + + setTimeout(function () { + $('.bs-top').affix() + }, 100) + + // tooltip demo + $('.tooltip-demo').tooltip({ + selector: "[data-toggle=tooltip]", + container: "body" + }) + + $('.tooltip-test').tooltip() + $('.popover-test').popover() + + $('.bs-docs-navbar').tooltip({ + selector: "a[data-toggle=tooltip]", + container: ".bs-docs-navbar .nav" + }) + + // popover demo + $("[data-toggle=popover]") + .popover() + + // button state demo + $('#fat-btn') + .click(function () { + var btn = $(this) + btn.button('loading') + setTimeout(function () { + btn.button('reset') + }, 3000) + }) + + // carousel demo + $('.bs-docs-carousel-example').carousel() +}) + +}(window.jQuery) -- cgit v1.2.3 From ef1fc34e616a0efda482ec54247a84d589244d55 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Wed, 9 Oct 2013 19:29:25 -0700 Subject: use data-ride="carousel" in the docs & examples; fixes #11005 --- docs-assets/js/application.js | 3 --- 1 file changed, 3 deletions(-) (limited to 'docs-assets/js/application.js') diff --git a/docs-assets/js/application.js b/docs-assets/js/application.js index 76c24e5a6..44b2e12ad 100644 --- a/docs-assets/js/application.js +++ b/docs-assets/js/application.js @@ -90,9 +90,6 @@ btn.button('reset') }, 3000) }) - - // carousel demo - $('.bs-docs-carousel-example').carousel() }) }(window.jQuery) -- cgit v1.2.3 From c88cd1cd95dc4bef63697124f795fe7e60308a99 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Thu, 17 Oct 2013 11:33:04 -0700 Subject: add explicit copyright header to docs CSS & JS files; fixes #11112 --- docs-assets/js/application.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs-assets/js/application.js') diff --git a/docs-assets/js/application.js b/docs-assets/js/application.js index 44b2e12ad..7348d2a78 100644 --- a/docs-assets/js/application.js +++ b/docs-assets/js/application.js @@ -1,6 +1,13 @@ // NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT // IT'S ALL JUST JUNK FOR OUR DOCS! // ++++++++++++++++++++++++++++++++++++++++++ +/*! + * Copyright 2013 Twitter, Inc. + * This work is licensed under the Creative Commons Attribution 3.0 Unported License. + * You should have received a copy of this license along with this work. + * If not, visit http://creativecommons.org/licenses/by/3.0/ . + */ + !function ($) { -- cgit v1.2.3 From 1f33dc8033b2b8245df98a79ebe8800c6c0b992e Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Thu, 17 Oct 2013 14:11:40 -0700 Subject: even shorter banner; remove space between slash and period --- docs-assets/js/application.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'docs-assets/js/application.js') diff --git a/docs-assets/js/application.js b/docs-assets/js/application.js index 7348d2a78..72d4cd16b 100644 --- a/docs-assets/js/application.js +++ b/docs-assets/js/application.js @@ -1,11 +1,12 @@ // NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT // IT'S ALL JUST JUNK FOR OUR DOCS! // ++++++++++++++++++++++++++++++++++++++++++ + /*! * Copyright 2013 Twitter, Inc. - * This work is licensed under the Creative Commons Attribution 3.0 Unported License. - * You should have received a copy of this license along with this work. - * If not, visit http://creativecommons.org/licenses/by/3.0/ . + * + * Licensed under the Creative Commons Attribution 3.0 Unported License. For + * details, see http://creativecommons.org/licenses/by/3.0/. */ -- cgit v1.2.3