kopia lustrzana https://github.com/wagtail/wagtail
Persist tab hash in URL to allow direct navigation to tabs in the admin interface (#4231)
Save the hash when clicking on a tab and select the tab if loading a page with a hash in it. This allows for giving direct links to a specific tab.  Fixes wagtail/wagtail#4111pull/4215/merge
rodzic
96a0189232
commit
6412bad624
|
@ -4,6 +4,7 @@ Changelog
|
|||
2.1 (xx.xx.xxxx) - IN DEVELOPMENT
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
* Persist tab hash in URL to allow direct navigation to tabs in the admin interface (Ben Weatherman)
|
||||
* Fix: Status button on 'edit page' now links to the correct URL when live and draft slug differ (LB (Ben Johnston))
|
||||
* Fix: Image title text in the gallery and in the chooser now wraps for long filenames (LB (Ben Johnston), Luiz Boaretto)
|
||||
|
||||
|
|
|
@ -273,6 +273,7 @@ Contributors
|
|||
* Mary Kate Fain
|
||||
* Dário Marcelino
|
||||
* Dave Bell
|
||||
* Ben Weatherman
|
||||
|
||||
Translators
|
||||
===========
|
||||
|
|
|
@ -14,6 +14,7 @@ What's new
|
|||
Other features
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
* Persist tab hash in URL to allow direct navigation to tabs in the admin interface (Ben Weatherman)
|
||||
|
||||
Bug fixes
|
||||
~~~~~~~~~
|
||||
|
|
|
@ -173,9 +173,14 @@ $(function() {
|
|||
});
|
||||
|
||||
/* tabs */
|
||||
if (window.location.hash) {
|
||||
$('a[href="' + window.location.hash + '"]').tab('show');
|
||||
}
|
||||
|
||||
$(document).on('click', '.tab-nav a', function(e) {
|
||||
e.preventDefault();
|
||||
$(this).tab('show');
|
||||
e.preventDefault();
|
||||
$(this).tab('show');
|
||||
window.history.replaceState(null, null, $(this).attr('href'));
|
||||
});
|
||||
|
||||
$(document).on('click', '.tab-toggle', function(e) {
|
||||
|
|
Ładowanie…
Reference in New Issue