From acc0875259593d3206a07ac24bf877d0c8c0c8b9 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Wed, 22 May 2013 23:34:28 -0700 Subject: [PATCH] fix up customizer js and classes; turn buttons into real buttons --- docs/assets/css/docs.css | 11 +++++++++++ docs/assets/js/application.js | 29 +++++++++++------------------ docs/customize.html | 14 +++++++------- 3 files changed, 29 insertions(+), 25 deletions(-) diff --git a/docs/assets/css/docs.css b/docs/assets/css/docs.css index ddab6ba6a9..6f7254e821 100644 --- a/docs/assets/css/docs.css +++ b/docs/assets/css/docs.css @@ -97,6 +97,17 @@ body { /* Customize and Download button -------------------------------------------------- */ +.bs-customizer { + +} +.bs-customizer .toggle { + float: right; +} +.bs-customizer label { + margin-top: 10px; +} + + .bs-customize-download { text-align:center; } diff --git a/docs/assets/js/application.js b/docs/assets/js/application.js index 02785a49c3..9e75a8040a 100644 --- a/docs/assets/js/application.js +++ b/docs/assets/js/application.js @@ -27,13 +27,6 @@ $('.bs-top').affix() }, 100) - // add-ons - $('.add-on :checkbox').on('click', function () { - var $this = $(this) - , method = $this.attr('checked') ? 'addClass' : 'removeClass' - $(this).parents('.add-on')[method]('active') - }) - // add tipsies to grid for scaffolding if ($('#grid-system').length) { $('#grid-system').tooltip({ @@ -76,22 +69,22 @@ $('.bs-docs-carousel-example').carousel() // javascript build logic - var inputsComponent = $("#components.download input") - , inputsPlugin = $("#plugins.download input") - , inputsVariables = $("#variables.download input") + var inputsComponent = $("#components input") + , inputsPlugin = $("#plugins input") + , inputsVariables = $("#variables input") // toggle all plugin checkboxes - $('#components.download .toggle-all').on('click', function (e) { + $('#components .toggle').on('click', function (e) { e.preventDefault() - inputsComponent.attr('checked', !inputsComponent.is(':checked')) + inputsComponent.prop('checked', !inputsComponent.is(':checked')) }) - $('#plugins.download .toggle-all').on('click', function (e) { + $('#plugins .toggle').on('click', function (e) { e.preventDefault() - inputsPlugin.attr('checked', !inputsPlugin.is(':checked')) + inputsPlugin.prop('checked', !inputsPlugin.is(':checked')) }) - $('#variables.download .toggle-all').on('click', function (e) { + $('#variables .toggle').on('click', function (e) { e.preventDefault() inputsVariables.val('') }) @@ -99,16 +92,16 @@ // request built javascript $('.download-btn .btn').on('click', function () { - var css = $("#components.download input:checked") + var css = $("#components input:checked") .map(function () { return this.value }) .toArray() - , js = $("#plugins.download input:checked") + , js = $("#plugins input:checked") .map(function () { return this.value }) .toArray() , vars = {} , img = ['glyphicons-halflings.png', 'glyphicons-halflings-white.png'] - $("#variables.download input") + $("#variables input") .each(function () { $(this).val() && (vars[ $(this).prev().text() ] = $(this).val()) }) diff --git a/docs/customize.html b/docs/customize.html index 6a703e47f7..e6139f23af 100644 --- a/docs/customize.html +++ b/docs/customize.html @@ -7,10 +7,10 @@ lead: Customize Bootstrap's components, LESS variables, and jQuery plugins to ge -
+

Choose which LESS files should be compiled into your custom stylesheets.

@@ -273,10 +273,10 @@ lead: Customize Bootstrap's components, LESS variables, and jQuery plugins to ge
- +

Choose which jQuery plugins should be included in your custom JavaScript files.

@@ -369,11 +369,11 @@ lead: Customize Bootstrap's components, LESS variables, and jQuery plugins to ge

All checked plugins will be compiled into a single file, bootstrap.js. All plugins require the latest version of jQuery to be included.

- - + +

Customize LESS variables to define colors, sizes and more inside your custom CSS stylesheets.