mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 19:02:29 +03:00
Remeber the last settings location
This commit is contained in:
parent
8e7123dd84
commit
7ea1f2a7dc
@ -1,4 +1,4 @@
|
|||||||
/*globals document, jQuery */
|
/*globals document, location, jQuery */
|
||||||
(function ($) {
|
(function ($) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$('.settings-menu .active').removeClass('active');
|
$('.settings-menu .active').removeClass('active');
|
||||||
|
location.hash = $(this).attr('class'); // Placed here so never gets given the active attribute.
|
||||||
$(this).addClass('active');
|
$(this).addClass('active');
|
||||||
|
|
||||||
$('.settings-content').fadeOut().delay(250);
|
$('.settings-content').fadeOut().delay(250);
|
||||||
@ -14,7 +15,16 @@
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function () {
|
||||||
|
if (location.hash) {
|
||||||
|
var page = $(".settings-menu li." + location.hash.replace('#', '')),
|
||||||
|
newPage = page.children('a').attr('href');
|
||||||
|
$('.settings-menu .active').removeClass('active');
|
||||||
|
page.addClass('active');
|
||||||
|
|
||||||
|
$('.settings-content').hide().delay(250);
|
||||||
|
$(newPage).show();
|
||||||
|
}
|
||||||
$('.settings-menu li').on('click', changePage);
|
$('.settings-menu li').on('click', changePage);
|
||||||
|
|
||||||
$('input').iCheck({
|
$('input').iCheck({
|
||||||
|
Loading…
Reference in New Issue
Block a user