diff options
-rwxr-xr-x | assets/css/docs.css | 6 | ||||
-rwxr-xr-x | cerulean/index.html | 11 | ||||
-rwxr-xr-x | cyborg/index.html | 11 | ||||
-rwxr-xr-x | default/index.html | 11 | ||||
-rwxr-xr-x | journal/index.html | 11 | ||||
-rwxr-xr-x | js/application.js | 181 | ||||
-rwxr-xr-x | js/bootstrap-collapse.js | 136 | ||||
-rwxr-xr-x | simplex/index.html | 11 | ||||
-rwxr-xr-x | slate/index.html | 11 | ||||
-rwxr-xr-x | spacelab/index.html | 11 | ||||
-rwxr-xr-x | superhero/index.html | 11 | ||||
-rwxr-xr-x | united/index.html | 11 |
12 files changed, 377 insertions, 45 deletions
diff --git a/assets/css/docs.css b/assets/css/docs.css index e121c128..f1cff91d 100755 --- a/assets/css/docs.css +++ b/assets/css/docs.css @@ -788,3 +788,9 @@ form.well { } } + + +.tooltip-inner { + max-width: 500px; +} + diff --git a/cerulean/index.html b/cerulean/index.html index 0b2dffce..c6c63d14 100755 --- a/cerulean/index.html +++ b/cerulean/index.html @@ -635,12 +635,13 @@ <!-- Le javascript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> - <script src="../assets/js/jquery.js"></script> - <script src="../assets/js/bootstrap-dropdown.js"></script> - <script src="../assets/js/bootstrap-scrollspy.js"></script> - <script src="../assets/js/bootstrap-collapse.js"></script> + <script src="../js/jquery.js"></script> + <script src="../js/bootstrap-dropdown.js"></script> + <script src="../js/bootstrap-scrollspy.js"></script> + <script src="../js/bootstrap-collapse.js"></script> + <script src="../js/bootstrap-tooltip.js"></script> + <script src="../js/application.js"></script> <script src="../js/bootswatch.js"></script> - <script src="../assets/js/application.js"></script> </body> diff --git a/cyborg/index.html b/cyborg/index.html index b12959af..26057c35 100755 --- a/cyborg/index.html +++ b/cyborg/index.html @@ -635,12 +635,13 @@ <!-- Le javascript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> - <script src="../assets/js/jquery.js"></script> - <script src="../assets/js/bootstrap-dropdown.js"></script> - <script src="../assets/js/bootstrap-scrollspy.js"></script> - <script src="../assets/js/bootstrap-collapse.js"></script> + <script src="../js/jquery.js"></script> + <script src="../js/bootstrap-dropdown.js"></script> + <script src="../js/bootstrap-scrollspy.js"></script> + <script src="../js/bootstrap-collapse.js"></script> + <script src="../js/bootstrap-tooltip.js"></script> + <script src="../js/application.js"></script> <script src="../js/bootswatch.js"></script> - <script src="../assets/js/application.js"></script> </body> diff --git a/default/index.html b/default/index.html index 8f050f08..e819aece 100755 --- a/default/index.html +++ b/default/index.html @@ -632,12 +632,13 @@ <!-- Le javascript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> - <script src="../assets/js/jquery.js"></script> - <script src="../assets/js/bootstrap-dropdown.js"></script> - <script src="../assets/js/bootstrap-scrollspy.js"></script> - <script src="../assets/js/bootstrap-collapse.js"></script> + <script src="../js/jquery.js"></script> + <script src="../js/bootstrap-dropdown.js"></script> + <script src="../js/bootstrap-scrollspy.js"></script> + <script src="../js/bootstrap-collapse.js"></script> + <script src="../js/bootstrap-tooltip.js"></script> + <script src="../js/application.js"></script> <script src="../js/bootswatch.js"></script> - <script src="../assets/js/application.js"></script> </body> diff --git a/journal/index.html b/journal/index.html index c790f8ed..e697b375 100755 --- a/journal/index.html +++ b/journal/index.html @@ -635,12 +635,13 @@ <!-- Le javascript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> - <script src="../assets/js/jquery.js"></script> - <script src="../assets/js/bootstrap-dropdown.js"></script> - <script src="../assets/js/bootstrap-scrollspy.js"></script> - <script src="../assets/js/bootstrap-collapse.js"></script> + <script src="../js/jquery.js"></script> + <script src="../js/bootstrap-dropdown.js"></script> + <script src="../js/bootstrap-scrollspy.js"></script> + <script src="../js/bootstrap-collapse.js"></script> + <script src="../js/bootstrap-tooltip.js"></script> + <script src="../js/application.js"></script> <script src="../js/bootswatch.js"></script> - <script src="../assets/js/application.js"></script> </body> diff --git a/js/application.js b/js/application.js new file mode 100755 index 00000000..675653a4 --- /dev/null +++ b/js/application.js @@ -0,0 +1,181 @@ +// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT +// IT'S ALL JUST JUNK FOR OUR DOCS! +// ++++++++++++++++++++++++++++++++++++++++++ + +!function ($) { + + $(function(){ + + // Disable certain links in docs + // $('section [href^=#]').click(function (e) { + // e.preventDefault() + // }) + + // make code pretty + // window.prettyPrint && prettyPrint() + // + // // add-ons + // $('.add-on :checkbox').on('click', function () { + // var $this = $(this) + // , method = $this.attr('checked') ? 'addClass' : 'removeClass' + // $(this).parents('.add-on')[method]('active') + // }) + + // position static twipsies for components page + // if ($(".twipsies a").length) { + // $(window).on('load resize', function () { + // $(".twipsies a").each(function () { + // $(this) + // .tooltip({ + // placement: $(this).attr('title') + // , trigger: 'manual' + // }) + // .tooltip('show') + // }) + // }) + // } + + // add tipsies to grid for scaffolding + // if ($('#grid-system').length) { + // $('#grid-system').tooltip({ + // selector: '.show-grid > div' + // , title: function () { return $(this).width() + 'px' } + // }) + // } + + // fix sub nav on scroll + var $win = $(window) + , $nav = $('.subnav') + , navHeight = $('.navbar').first().height() + , navTop = $('.subnav').length && $('.subnav').offset().top - navHeight + , isFixed = 0 + + processScroll() + + $win.on('scroll', processScroll) + + function processScroll() { + var i, scrollTop = $win.scrollTop() + if (scrollTop >= navTop && !isFixed) { + isFixed = 1 + $nav.addClass('subnav-fixed') + } else if (scrollTop <= navTop && isFixed) { + isFixed = 0 + $nav.removeClass('subnav-fixed') + } + } + + // tooltip demo + // $('.tooltip-demo.well').tooltip({ + // selector: "a[rel=tooltip]" + // }) + // + // $('.tooltip-test').tooltip() + // $('.popover-test').popover() + + // popover demo + // $("a[rel=popover]") + // .popover() + // .click(function(e) { + // e.preventDefault() + // }) + + // button state demo + // $('#fat-btn') + // .click(function () { + // var btn = $(this) + // btn.button('loading') + // setTimeout(function () { + // btn.button('reset') + // }, 3000) + // }) + + // carousel demo + // $('#myCarousel').carousel() + + // javascript build logic + // var inputsComponent = $("#components.download input") + // , inputsPlugin = $("#plugins.download input") + // , inputsVariables = $("#variables.download input") + + // toggle all plugin checkboxes + // $('#components.download .toggle-all').on('click', function (e) { + // e.preventDefault() + // inputsComponent.attr('checked', !inputsComponent.is(':checked')) + // }) + // + // $('#plugins.download .toggle-all').on('click', function (e) { + // e.preventDefault() + // inputsPlugin.attr('checked', !inputsPlugin.is(':checked')) + // }) + // + // $('#variables.download .toggle-all').on('click', function (e) { + // e.preventDefault() + // inputsVariables.val('') + // }) + + // request built javascript + // $('.download-btn').on('click', function () { + // + // var css = $("#components.download input:checked") + // .map(function () { return this.value }) + // .toArray() + // , js = $("#plugins.download input:checked") + // .map(function () { return this.value }) + // .toArray() + // , vars = {} + // , img = ['glyphicons-halflings.png', 'glyphicons-halflings-white.png'] + // + // $("#variables.download input") + // .each(function () { + // $(this).val() && (vars[ $(this).prev().text() ] = $(this).val()) + // }) + // + // $.ajax({ + // type: 'POST' + // , url: 'http://bootstrap.herokuapp.com' + // , dataType: 'jsonpi' + // , params: { + // js: js + // , css: css + // , vars: vars + // , img: img + // } + // }) + // }) + // + // }) + +// 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 = $('<iframe>') +// .attr('name', name) +// .appendTo('head') +// +// form = $('<form>') +// .attr('method', opts.type) // GET or POST +// .attr('action', url) +// .attr('target', name) +// +// $.each(opts.params, function(k, v) { +// +// $('<input>') +// .attr('type', 'hidden') +// .attr('name', k) +// .attr('value', typeof v == 'string' ? v : JSON.stringify(v)) +// .appendTo(form) +// }) +// +// form.appendTo('body').submit() +// } +// } +}) + +}(window.jQuery)
\ No newline at end of file diff --git a/js/bootstrap-collapse.js b/js/bootstrap-collapse.js new file mode 100755 index 00000000..8134cc42 --- /dev/null +++ b/js/bootstrap-collapse.js @@ -0,0 +1,136 @@ +/* ============================================================= + * bootstrap-collapse.js v2.0.0 + * http://twitter.github.com/bootstrap/javascript.html#collapse + * ============================================================= + * 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" + + var Collapse = function ( element, options ) { + this.$element = $(element) + this.options = $.extend({}, $.fn.collapse.defaults, options) + + if (this.options["parent"]) { + this.$parent = $(this.options["parent"]) + } + + this.options.toggle && this.toggle() + } + + Collapse.prototype = { + + constructor: Collapse + + , dimension: function () { + var hasWidth = this.$element.hasClass('width') + return hasWidth ? 'width' : 'height' + } + + , show: function () { + var dimension = this.dimension() + , scroll = $.camelCase(['scroll', dimension].join('-')) + , actives = this.$parent && this.$parent.find('.in') + , hasData + + if (actives && actives.length) { + hasData = actives.data('collapse') + actives.collapse('hide') + hasData || actives.data('collapse', null) + } + + this.$element[dimension](0) + this.transition('addClass', 'show', 'shown') + this.$element[dimension](this.$element[0][scroll]) + + } + + , hide: function () { + var dimension = this.dimension() + this.reset(this.$element[dimension]()) + this.transition('removeClass', 'hide', 'hidden') + this.$element[dimension](0) + } + + , reset: function ( size ) { + var dimension = this.dimension() + + this.$element + .removeClass('collapse') + [dimension](size || 'auto') + [0].offsetWidth + + this.$element.addClass('collapse') + } + + , transition: function ( method, startEvent, completeEvent ) { + var that = this + , complete = function () { + if (startEvent == 'show') that.reset() + that.$element.trigger(completeEvent) + } + + this.$element + .trigger(startEvent) + [method]('in') + + $.support.transition && this.$element.hasClass('collapse') ? + this.$element.one($.support.transition.end, complete) : + complete() + } + + , toggle: function () { + this[this.$element.hasClass('in') ? 'hide' : 'show']() + } + + } + + /* COLLAPSIBLE PLUGIN DEFINITION + * ============================== */ + + $.fn.collapse = function ( option ) { + return this.each(function () { + var $this = $(this) + , data = $this.data('collapse') + , options = typeof option == 'object' && option + if (!data) $this.data('collapse', (data = new Collapse(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.collapse.defaults = { + toggle: true + } + + $.fn.collapse.Constructor = Collapse + + + /* COLLAPSIBLE DATA-API + * ==================== */ + + $(function () { + $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) { + var $this = $(this), href + , target = $this.attr('data-target') + || e.preventDefault() + || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 + , option = $(target).data('collapse') ? 'toggle' : $this.data() + $(target).collapse(option) + }) + }) + +}( window.jQuery ) diff --git a/simplex/index.html b/simplex/index.html index 28eaf7b8..d40a1f6c 100755 --- a/simplex/index.html +++ b/simplex/index.html @@ -634,12 +634,13 @@ <!-- Le javascript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> - <script src="../assets/js/jquery.js"></script> - <script src="../assets/js/bootstrap-dropdown.js"></script> - <script src="../assets/js/bootstrap-scrollspy.js"></script> - <script src="../assets/js/bootstrap-collapse.js"></script> + <script src="../js/jquery.js"></script> + <script src="../js/bootstrap-dropdown.js"></script> + <script src="../js/bootstrap-scrollspy.js"></script> + <script src="../js/bootstrap-collapse.js"></script> + <script src="../js/bootstrap-tooltip.js"></script> + <script src="../js/application.js"></script> <script src="../js/bootswatch.js"></script> - <script src="../assets/js/application.js"></script> </body> diff --git a/slate/index.html b/slate/index.html index 922e8287..cb0e9c4e 100755 --- a/slate/index.html +++ b/slate/index.html @@ -635,12 +635,13 @@ <!-- Le javascript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> - <script src="../assets/js/jquery.js"></script> - <script src="../assets/js/bootstrap-dropdown.js"></script> - <script src="../assets/js/bootstrap-scrollspy.js"></script> - <script src="../assets/js/bootstrap-collapse.js"></script> + <script src="../js/jquery.js"></script> + <script src="../js/bootstrap-dropdown.js"></script> + <script src="../js/bootstrap-scrollspy.js"></script> + <script src="../js/bootstrap-collapse.js"></script> + <script src="../js/bootstrap-tooltip.js"></script> + <script src="../js/application.js"></script> <script src="../js/bootswatch.js"></script> - <script src="../assets/js/application.js"></script> </body> diff --git a/spacelab/index.html b/spacelab/index.html index 4a5c700d..a6b40cab 100755 --- a/spacelab/index.html +++ b/spacelab/index.html @@ -634,12 +634,13 @@ <!-- Le javascript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> - <script src="../assets/js/jquery.js"></script> - <script src="../assets/js/bootstrap-dropdown.js"></script> - <script src="../assets/js/bootstrap-scrollspy.js"></script> - <script src="../assets/js/bootstrap-collapse.js"></script> + <script src="../js/jquery.js"></script> + <script src="../js/bootstrap-dropdown.js"></script> + <script src="../js/bootstrap-scrollspy.js"></script> + <script src="../js/bootstrap-collapse.js"></script> + <script src="../js/bootstrap-tooltip.js"></script> + <script src="../js/application.js"></script> <script src="../js/bootswatch.js"></script> - <script src="../assets/js/application.js"></script> </body> diff --git a/superhero/index.html b/superhero/index.html index 98ad91bd..81949668 100755 --- a/superhero/index.html +++ b/superhero/index.html @@ -633,12 +633,13 @@ <!-- Le javascript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> - <script src="../assets/js/jquery.js"></script> - <script src="../assets/js/bootstrap-dropdown.js"></script> - <script src="../assets/js/bootstrap-scrollspy.js"></script> - <script src="../assets/js/bootstrap-collapse.js"></script> + <script src="../js/jquery.js"></script> + <script src="../js/bootstrap-dropdown.js"></script> + <script src="../js/bootstrap-scrollspy.js"></script> + <script src="../js/bootstrap-collapse.js"></script> + <script src="../js/bootstrap-tooltip.js"></script> + <script src="../js/application.js"></script> <script src="../js/bootswatch.js"></script> - <script src="../assets/js/application.js"></script> </body> diff --git a/united/index.html b/united/index.html index 12d84ce1..b55db5de 100755 --- a/united/index.html +++ b/united/index.html @@ -633,12 +633,13 @@ <!-- Le javascript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> - <script src="../assets/js/jquery.js"></script> - <script src="../assets/js/bootstrap-dropdown.js"></script> - <script src="../assets/js/bootstrap-scrollspy.js"></script> - <script src="../assets/js/bootstrap-collapse.js"></script> + <script src="../js/jquery.js"></script> + <script src="../js/bootstrap-dropdown.js"></script> + <script src="../js/bootstrap-scrollspy.js"></script> + <script src="../js/bootstrap-collapse.js"></script> + <script src="../js/bootstrap-tooltip.js"></script> + <script src="../js/application.js"></script> <script src="../js/bootswatch.js"></script> - <script src="../assets/js/application.js"></script> </body> |