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:
@@ -134,15 +134,22 @@ var pwPanels = {
|
||||
|
||||
// allow for use of data-href or href attribute that references URL to load in panel
|
||||
if(typeof panelURL == 'undefined' || !panelURL.length) panelURL = $toggler.attr('href');
|
||||
|
||||
|
||||
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=';
|
||||
|
||||
|
||||
if($toggler !== null && $toggler.hasClass('pw-panel-links')) {
|
||||
panelURL += '2'; // don't update target of links in panel
|
||||
} else {
|
||||
panelURL += '1'; // update target of links in panel
|
||||
}
|
||||
panelURL += hash;
|
||||
}
|
||||
|
||||
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