mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-25 21:09:06 +02:00
simpler customizer files section; adds glyphicons.less
This commit is contained in:
@@ -5,6 +5,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
|
||||
$('<div id="bsCustomizerAlert" class="bs-customizer-alert">\
|
||||
<div class="container">\
|
||||
<a href="#bsCustomizerAlert" data-dismiss="alert" class="close pull-right">×</a>\
|
||||
<span class="glyphicon glyphicon-warning-sign"></span>
|
||||
<p class="bs-customizer-alert-text">' + msg + '</p>' +
|
||||
(err.extract ? '<pre class="bs-customizer-alert-extract">' + err.extract.join('\n') + '</pre>' : '') + '\
|
||||
</div>\
|
||||
@@ -51,7 +52,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
|
||||
history.replaceState(false, document.title, window.location.origin + window.location.pathname + '?id=' + result.id)
|
||||
})
|
||||
.error(function(err) {
|
||||
showError('<strong>Error</strong> Could not save gist file, configuration not saved.', err)
|
||||
showError('<strong>Ruh roh!</strong> Could not save gist file, configuration not saved.', err)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -108,7 +109,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
|
||||
}
|
||||
|
||||
function generateZip(css, js, complete) {
|
||||
if (!css && !js) return showError('<strong>Error</strong> No Bootstrap files selected.', new Error('no Bootstrap'))
|
||||
if (!css && !js) return showError('<strong>Ruh roh!</strong> No Bootstrap files selected.', new Error('no Bootstrap'))
|
||||
|
||||
var zip = new JSZip()
|
||||
|
||||
@@ -174,7 +175,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
|
||||
, filename: 'bootstrap.css'
|
||||
}).parse(css, function (err, tree) {
|
||||
if (err) {
|
||||
return showError('<strong>Error</strong> Could not parse less files.', err)
|
||||
return showError('<strong>Ruh roh!</strong> Could not parse less files.', err)
|
||||
}
|
||||
result = {
|
||||
'bootstrap.css' : cw + tree.toCSS(),
|
||||
@@ -182,7 +183,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
|
||||
}
|
||||
})
|
||||
} catch (err) {
|
||||
return showError('<strong>Error</strong> Could not parse less files.', err)
|
||||
return showError('<strong>Ruh roh!</strong> Could not parse less files.', err)
|
||||
}
|
||||
|
||||
return result
|
||||
|
Reference in New Issue
Block a user