]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
fix up customizer js and classes; turn buttons into real buttons
authorMark Otto <otto@github.com>
Thu, 23 May 2013 06:34:28 +0000 (23:34 -0700)
committerMark Otto <otto@github.com>
Thu, 23 May 2013 06:34:28 +0000 (23:34 -0700)
docs/assets/css/docs.css
docs/assets/js/application.js
docs/customize.html

index ddab6ba6a9305b6f238b4373ba3e6e2a1baccc43..6f7254e821114d666bdccc45894e209130bfe3bd 100644 (file)
@@ -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;
 }
index 02785a49c36d93732511dcf17493324bec97421b..9e75a8040aba8fd6b5277b5838d7be67db0de071 100644 (file)
       $('.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({
     $('.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('')
     })
     // 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())
       })
index 6a703e47f73bdc4114d18f07be49d93c8e74723e..e6139f23aff5a3ccd778fb89d35407b3784290ff 100644 (file)
@@ -7,10 +7,10 @@ lead: Customize Bootstrap's components, LESS variables, and jQuery plugins to ge
 
   <!-- Customize
   ================================================== -->
-  <form>
+  <form class="bs-customizer">
     <div class="bs-docs-section" id="components">
       <div class="page-header">
-        <a class="btn btn-default pull-right toggle-all" href="#">Toggle all</a>
+        <button class="btn btn-default toggle" type="button">Toggle all</button>
         <h1>LESS components</h1>
       </div>
       <p class="lead">Choose which LESS files should be compiled into your custom stylesheets.</p>
@@ -273,10 +273,10 @@ lead: Customize Bootstrap's components, LESS variables, and jQuery plugins to ge
         </div>
       </div>
     </div>
-  
+
     <div class="bs-docs-section" id="plugins">
       <div class="page-header">
-        <a class="btn btn-default pull-right toggle-all" href="#">Toggle all</a>
+        <button class="btn btn-default toggle" type="button">Toggle all</button>
         <h1>jQuery plugins</h1>
       </div>
       <p class="lead">Choose which jQuery plugins should be included in your custom JavaScript files.</p>
@@ -369,11 +369,11 @@ lead: Customize Bootstrap's components, LESS variables, and jQuery plugins to ge
         <p>All checked plugins will be compiled into a single file, bootstrap.js. All plugins require the latest version of <a href="http://jquery.com/" target="_blank">jQuery</a> to be included.</p>
       </div>
     </div>
-  
-  
+
+
     <div class="bs-docs-section" id="variables">
       <div class="page-header">
-        <a class="btn btn-default pull-right toggle-all" href="#">Reset to defaults</a>
+        <button class="btn btn-default toggle" type="button">Reset to defaults</button>
         <h1>LESS variables</h1>
       </div>
       <p class="lead">Customize LESS variables to define colors, sizes and more inside your custom CSS stylesheets.</p>