]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Docs Customize "Customize and Download" button not working properly 8158/head
authorEric Baer <eric.baer@readytalk.com>
Wed, 12 Jun 2013 19:40:37 +0000 (13:40 -0600)
committerEric Baer <eric.baer@readytalk.com>
Wed, 12 Jun 2013 20:01:59 +0000 (14:01 -0600)
docs/assets/js/application.js

index 30a7c0d6ebdd19d91bf9b2113ed378f0b48ef370..90c7e68e6933e7982e80ac5ca2cfa4b9a72d235c 100644 (file)
     })
 
     // request built javascript
-    $('.download-btn .btn').on('click', function () {
+    $('.bs-customize-download .btn').on('click', function (e) {
+      e.preventDefault()
 
-      var css = $("#components input:checked")
+      var css = $("#less input:checked")
             .map(function () { return this.value })
             .toArray()
         , js = $("#plugins input:checked")
         , vars = {}
         , img = ['glyphicons-halflings.png', 'glyphicons-halflings-white.png']
 
-    $("#variables input")
-      .each(function () {
-        $(this).val() && (vars[ $(this).prev().text() ] = $(this).val())
+      $("#less-variables input")
+        .each(function () {
+          $(this).val() && (vars[ $(this).prev().text() ] = $(this).val())
       })
 
       $.ajax({
         type: 'POST'
-      , url: /\?dev/.test(window.location) ? 'http://localhost:3000' : 'http://bootstrap.herokuapp.com'
+      , url: /localhost/.test(window.location) ? 'http://localhost:9001' : 'http://bootstrap.herokuapp.com'
       , dataType: 'jsonpi'
       , params: {
           js: js