mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
Merge pull request #8158 from baer/download-button-fix-proper
Docs "Customize and Download" button didn't send the correct parameters
This commit is contained in:
commit
47f8ba98f3
1 changed files with 7 additions and 6 deletions
|
@ -82,9 +82,10 @@
|
|||
})
|
||||
|
||||
// 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")
|
||||
|
@ -93,14 +94,14 @@
|
|||
, 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
|
||||
|
|
Loading…
Reference in a new issue