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
92ca8428
Commit
92ca8428
authored
Jun 27, 2014
by
Heinrich Fenkart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Save "Preview theme" state; resolves #13940
parent
2b6f00c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
docs/assets/js/_src/application.js
docs/assets/js/_src/application.js
+15
-7
No files found.
docs/assets/js/_src/application.js
View file @
92ca8428
...
...
@@ -27,13 +27,11 @@
$body
.
scrollspy
(
'
refresh
'
)
})
// Kill links
$
(
'
.bs-docs-container [href=#]
'
).
click
(
function
(
e
)
{
e
.
preventDefault
()
})
// Sidenav affixing
setTimeout
(
function
()
{
var
$sideBar
=
$
(
'
.bs-docs-sidebar
'
)
...
...
@@ -62,15 +60,25 @@
;(
function
()
{
var
stylesheetLink
=
$
(
'
#bs-theme-stylesheet
'
)
var
themeBtn
=
$
(
'
.bs-docs-theme-toggle
'
)
var
activateTheme
=
function
()
{
stylesheetLink
.
attr
(
'
href
'
,
stylesheetLink
.
attr
(
'
data-href
'
))
themeBtn
.
text
(
'
Disable theme preview
'
)
localStorage
.
setItem
(
'
previewTheme
'
,
true
)
}
if
(
localStorage
.
getItem
(
'
previewTheme
'
))
{
activateTheme
()
}
themeBtn
.
click
(
function
()
{
var
href
=
stylesheetLink
.
attr
(
'
href
'
)
;
var
href
=
stylesheetLink
.
attr
(
'
href
'
)
if
(
!
href
||
href
.
indexOf
(
'
data
'
)
===
0
)
{
stylesheetLink
.
attr
(
'
href
'
,
stylesheetLink
.
attr
(
'
data-href
'
))
themeBtn
.
text
(
'
Disable theme preview
'
)
}
else
{
activateTheme
()
}
else
{
stylesheetLink
.
attr
(
'
href
'
,
''
)
themeBtn
.
text
(
'
Preview theme
'
)
localStorage
.
removeItem
(
'
previewTheme
'
)
}
})
})();
...
...
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