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
0ba39d45
Commit
0ba39d45
authored
Oct 25, 2014
by
XhmikosR
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move "Copy" button in code.
parent
a92aea51
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
10 deletions
+3
-10
docs/assets/js/docs.min.js
docs/assets/js/docs.min.js
+1
-1
docs/assets/js/src/application.js
docs/assets/js/src/application.js
+2
-9
No files found.
docs/assets/js/docs.min.js
View file @
0ba39d45
...
...
@@ -23,4 +23,4 @@ License: http://opensource.org/licenses/MIT
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see http://creativecommons.org/licenses/by/3.0/.
*/
!
function
(
a
){
"
use strict
"
;
a
(
function
(){
var
b
=
a
(
window
),
c
=
a
(
document
.
body
);
c
.
scrollspy
({
target
:
"
.bs-docs-sidebar
"
}),
b
.
on
(
"
load
"
,
function
(){
c
.
scrollspy
(
"
refresh
"
)}),
a
(
"
.bs-docs-container [href=#]
"
).
click
(
function
(
a
){
a
.
preventDefault
()}),
setTimeout
(
function
(){
var
b
=
a
(
"
.bs-docs-sidebar
"
);
b
.
affix
({
offset
:{
top
:
function
(){
var
c
=
b
.
offset
().
top
,
d
=
parseInt
(
b
.
children
(
0
).
css
(
"
margin-top
"
),
10
),
e
=
a
(
"
.bs-docs-nav
"
).
height
();
return
this
.
top
=
c
-
e
-
d
},
bottom
:
function
(){
return
this
.
bottom
=
a
(
"
.bs-docs-footer
"
).
outerHeight
(
!
0
)}}})},
100
),
setTimeout
(
function
(){
a
(
"
.bs-top
"
).
affix
()},
100
),
function
(){
var
b
=
a
(
"
#bs-theme-stylesheet
"
),
c
=
a
(
"
.bs-docs-theme-toggle
"
),
d
=
function
(){
b
.
attr
(
"
href
"
,
b
.
attr
(
"
data-href
"
)),
c
.
text
(
"
Disable theme preview
"
),
localStorage
.
setItem
(
"
previewTheme
"
,
!
0
)};
localStorage
.
getItem
(
"
previewTheme
"
)
&&
d
(),
c
.
click
(
function
(){
var
a
=
b
.
attr
(
"
href
"
);
a
&&
0
!==
a
.
indexOf
(
"
data
"
)?(
b
.
attr
(
"
href
"
,
""
),
c
.
text
(
"
Preview theme
"
),
localStorage
.
removeItem
(
"
previewTheme
"
)):
d
()})}(),
a
(
"
.tooltip-demo
"
).
tooltip
({
selector
:
'
[data-toggle="tooltip"]
'
,
container
:
"
body
"
}),
a
(
"
.popover-demo
"
).
popover
({
selector
:
'
[data-toggle="popover"]
'
,
container
:
"
body
"
}),
a
(
"
.tooltip-test
"
).
tooltip
(),
a
(
"
.popover-test
"
).
popover
(),
a
(
"
.bs-docs-popover
"
).
popover
(),
a
(
"
#loading-example-btn
"
).
click
(
function
(){
var
b
=
a
(
this
);
b
.
button
(
"
loading
"
),
setTimeout
(
function
(){
b
.
button
(
"
reset
"
)},
3
e3
)}),
ZeroClipboard
.
config
({
moviePath
:
"
/assets/flash/ZeroClipboard.swf
"
,
hoverClass
:
"
btn-clipboard-hover
"
}),
a
(
"
.highlight
"
).
each
(
function
(){
var
b
=
a
(
this
),
c
=
b
.
prev
(),
d
=
'
<div class="zero-clipboard"><span class="btn-clipboard">Copy</span></div>
'
;
c
.
hasClass
(
"
bs-example
"
)?
c
.
before
(
d
.
replace
(
/btn-clipboard/
,
"
btn-clipboard with-example
"
)):
b
.
before
(
d
)});
var
d
=
new
ZeroClipboard
(
a
(
"
.btn-clipboard
"
)),
e
=
a
(
"
#global-zeroclipboard-html-bridge
"
);
d
.
on
(
"
load
"
,
function
(){
e
.
data
(
"
placement
"
,
"
top
"
).
attr
(
"
title
"
,
"
Copy to clipboard
"
).
tooltip
()}),
d
.
on
(
"
dataRequested
"
,
function
(
b
){
var
c
=
a
(
this
).
parent
().
nextAll
(
"
.highlight
"
).
first
();
b
.
setText
(
c
.
text
())}),
d
.
on
(
"
complete
"
,
function
(){
e
.
attr
(
"
title
"
,
"
Copied!
"
).
tooltip
(
"
fixTitle
"
).
tooltip
(
"
show
"
).
attr
(
"
title
"
,
"
Copy to clipboard
"
).
tooltip
(
"
fixTitle
"
)}),
d
.
on
(
"
noflash wrongflash
"
,
function
(){
e
.
attr
(
"
title
"
,
"
Flash required
"
).
tooltip
(
"
fixTitle
"
).
tooltip
(
"
show
"
)})})}(
jQuery
);
\ No newline at end of file
!
function
(
a
){
"
use strict
"
;
a
(
function
(){
var
b
=
a
(
window
),
c
=
a
(
document
.
body
);
c
.
scrollspy
({
target
:
"
.bs-docs-sidebar
"
}),
b
.
on
(
"
load
"
,
function
(){
c
.
scrollspy
(
"
refresh
"
)}),
a
(
"
.bs-docs-container [href=#]
"
).
click
(
function
(
a
){
a
.
preventDefault
()}),
setTimeout
(
function
(){
var
b
=
a
(
"
.bs-docs-sidebar
"
);
b
.
affix
({
offset
:{
top
:
function
(){
var
c
=
b
.
offset
().
top
,
d
=
parseInt
(
b
.
children
(
0
).
css
(
"
margin-top
"
),
10
),
e
=
a
(
"
.bs-docs-nav
"
).
height
();
return
this
.
top
=
c
-
e
-
d
},
bottom
:
function
(){
return
this
.
bottom
=
a
(
"
.bs-docs-footer
"
).
outerHeight
(
!
0
)}}})},
100
),
setTimeout
(
function
(){
a
(
"
.bs-top
"
).
affix
()},
100
),
function
(){
var
b
=
a
(
"
#bs-theme-stylesheet
"
),
c
=
a
(
"
.bs-docs-theme-toggle
"
),
d
=
function
(){
b
.
attr
(
"
href
"
,
b
.
attr
(
"
data-href
"
)),
c
.
text
(
"
Disable theme preview
"
),
localStorage
.
setItem
(
"
previewTheme
"
,
!
0
)};
localStorage
.
getItem
(
"
previewTheme
"
)
&&
d
(),
c
.
click
(
function
(){
var
a
=
b
.
attr
(
"
href
"
);
a
&&
0
!==
a
.
indexOf
(
"
data
"
)?(
b
.
attr
(
"
href
"
,
""
),
c
.
text
(
"
Preview theme
"
),
localStorage
.
removeItem
(
"
previewTheme
"
)):
d
()})}(),
a
(
"
.tooltip-demo
"
).
tooltip
({
selector
:
'
[data-toggle="tooltip"]
'
,
container
:
"
body
"
}),
a
(
"
.popover-demo
"
).
popover
({
selector
:
'
[data-toggle="popover"]
'
,
container
:
"
body
"
}),
a
(
"
.tooltip-test
"
).
tooltip
(),
a
(
"
.popover-test
"
).
popover
(),
a
(
"
.bs-docs-popover
"
).
popover
(),
a
(
"
#loading-example-btn
"
).
click
(
function
(){
var
b
=
a
(
this
);
b
.
button
(
"
loading
"
),
setTimeout
(
function
(){
b
.
button
(
"
reset
"
)},
3
e3
)}),
ZeroClipboard
.
config
({
moviePath
:
"
/assets/flash/ZeroClipboard.swf
"
,
hoverClass
:
"
btn-clipboard-hover
"
}),
a
(
"
.highlight
"
).
each
(
function
(){
var
b
=
'
<div class="zero-clipboard"><span class="btn-clipboard">Copy</span></div>
'
;
a
(
this
).
before
(
b
)});
var
d
=
new
ZeroClipboard
(
a
(
"
.btn-clipboard
"
)),
e
=
a
(
"
#global-zeroclipboard-html-bridge
"
);
d
.
on
(
"
load
"
,
function
(){
e
.
data
(
"
placement
"
,
"
top
"
).
attr
(
"
title
"
,
"
Copy to clipboard
"
).
tooltip
()}),
d
.
on
(
"
dataRequested
"
,
function
(
b
){
var
c
=
a
(
this
).
parent
().
nextAll
(
"
.highlight
"
).
first
();
b
.
setText
(
c
.
text
())}),
d
.
on
(
"
complete
"
,
function
(){
e
.
attr
(
"
title
"
,
"
Copied!
"
).
tooltip
(
"
fixTitle
"
).
tooltip
(
"
show
"
).
attr
(
"
title
"
,
"
Copy to clipboard
"
).
tooltip
(
"
fixTitle
"
)}),
d
.
on
(
"
noflash wrongflash
"
,
function
(){
e
.
attr
(
"
title
"
,
"
Flash required
"
).
tooltip
(
"
fixTitle
"
).
tooltip
(
"
show
"
)})})}(
jQuery
);
\ No newline at end of file
docs/assets/js/src/application.js
View file @
0ba39d45
...
...
@@ -116,17 +116,10 @@
hoverClass
:
'
btn-clipboard-hover
'
})
// Insert copy to clipboard button before .highlight
or .bs-example
// Insert copy to clipboard button before .highlight
$
(
'
.highlight
'
).
each
(
function
()
{
var
highlight
=
$
(
this
)
var
previous
=
highlight
.
prev
()
var
btnHtml
=
'
<div class="zero-clipboard"><span class="btn-clipboard">Copy</span></div>
'
if
(
previous
.
hasClass
(
'
bs-example
'
))
{
previous
.
before
(
btnHtml
.
replace
(
/btn-clipboard/
,
'
btn-clipboard with-example
'
))
}
else
{
highlight
.
before
(
btnHtml
)
}
$
(
this
).
before
(
btnHtml
)
})
var
zeroClipboard
=
new
ZeroClipboard
(
$
(
'
.btn-clipboard
'
))
var
htmlBridge
=
$
(
'
#global-zeroclipboard-html-bridge
'
)
...
...
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