From: Stuart P. Bentley Date: Sat, 14 Sep 2013 08:11:07 +0000 (-0700) Subject: Customizer: Alert on successful save to Gist X-Git-Tag: v3.2.0~120^2~3^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5f9e2eb608012e26666ec1e851e7765051b0726;p=thirdparty%2Fbootstrap.git Customizer: Alert on successful save to Gist --- diff --git a/docs/assets/js/_src/customizer.js b/docs/assets/js/_src/customizer.js index 033e1c9c91..f1e209772b 100644 --- a/docs/assets/js/_src/customizer.js +++ b/docs/assets/js/_src/customizer.js @@ -24,6 +24,12 @@ window.onload = function () { // wait for load in a dumb way because B-0 throw err } + function showSuccess(msg) { + $('
' + + '' + msg + + '
').insertAfter('.bs-customize-download') + } + function showCallout(msg, showUpTop) { var callout = $('
' + '

Attention!

' + @@ -60,10 +66,13 @@ window.onload = function () { // wait for load in a dumb way because B-0 data: JSON.stringify(data) }) .success(function (result) { + var gistUrl = result.html_url; var origin = window.location.protocol + '//' + window.location.host - var newUrl = origin + window.location.pathname + '?id=' + result.id - history.replaceState(false, document.title, newUrl) - callback(result.html_url, newUrl) + var customizerUrl = origin + window.location.pathname + '?id=' + result.id + showSuccess('Success! Your configuration has been saved to ' + gistUrl + ' ' + + 'and can be revisited here at ' + customizerUrl + ' for further customization.') + history.replaceState(false, document.title, customizerUrl) + callback(gistUrl, customizerUrl) }) .error(function (err) { try {