mirror of
https://github.com/processwire/processwire.git
synced 2025-08-21 22:06:12 +02:00
Fix issue processwire/processwire-issues#325 panel.js and URL fragments fix
This commit is contained in:
@@ -136,6 +136,12 @@ var pwPanels = {
|
|||||||
if(typeof panelURL == 'undefined' || !panelURL.length) panelURL = $toggler.attr('href');
|
if(typeof panelURL == 'undefined' || !panelURL.length) panelURL = $toggler.attr('href');
|
||||||
|
|
||||||
if(typeof panelURL != 'undefined' && panelURL.length) {
|
if(typeof panelURL != 'undefined' && panelURL.length) {
|
||||||
|
var hash = '';
|
||||||
|
if(panelURL.indexOf('#') > -1) {
|
||||||
|
var parts = panelURL.split('#');
|
||||||
|
panelURL = parts[0];
|
||||||
|
hash = '#' + parts[1];
|
||||||
|
}
|
||||||
panelURL += (panelURL.indexOf('?') > -1 ? '&' : '?') + 'modal=panel&pw_panel=';
|
panelURL += (panelURL.indexOf('?') > -1 ? '&' : '?') + 'modal=panel&pw_panel=';
|
||||||
|
|
||||||
if($toggler !== null && $toggler.hasClass('pw-panel-links')) {
|
if($toggler !== null && $toggler.hasClass('pw-panel-links')) {
|
||||||
@@ -143,6 +149,7 @@ var pwPanels = {
|
|||||||
} else {
|
} else {
|
||||||
panelURL += '1'; // update target of links in panel
|
panelURL += '1'; // update target of links in panel
|
||||||
}
|
}
|
||||||
|
panelURL += hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
var $icon = $('<i />')
|
var $icon = $('<i />')
|
||||||
|
2
wire/modules/Jquery/JqueryUI/panel.min.js
vendored
2
wire/modules/Jquery/JqueryUI/panel.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user