Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
a8641b4d
Commit
a8641b4d
authored
Jun 05, 2014
by
Chris Rebert
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10632 from stuartpb/patch-1
Customizer: Alert on successful save to Gist
parents
ef436c76
d5d64c2e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
docs/assets/js/_src/customizer.js
docs/assets/js/_src/customizer.js
+12
-3
No files found.
docs/assets/js/_src/customizer.js
View file @
a8641b4d
...
...
@@ -24,6 +24,12 @@ window.onload = function () { // wait for load in a dumb way because B-0
throw
err
}
function
showSuccess
(
msg
)
{
$
(
'
<div class="bs-callout bs-callout-info">
'
+
'
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
'
+
msg
+
'
</div>
'
).
insertAfter
(
'
.bs-customize-download
'
)
}
function
showCallout
(
msg
,
showUpTop
)
{
var
callout
=
$
(
'
<div class="bs-callout bs-callout-danger">
'
+
'
<h4>Attention!</h4>
'
+
...
...
@@ -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
(
'
<strong>Success!</strong> Your configuration has been saved to <a href="
'
+
gistUrl
+
'
">
'
+
gistUrl
+
'
</a>
'
+
'
and can be revisited here at <a href="
'
+
customizerUrl
+
'
">
'
+
customizerUrl
+
'
</a> for further customization.
'
)
history
.
replaceState
(
false
,
document
.
title
,
customizerUrl
)
callback
(
gistUrl
,
customizerUrl
)
})
.
error
(
function
(
err
)
{
try
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment