mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Add ability for a panel link to link externally.
This commit is contained in:
parent
770e23f8e1
commit
3e2cf27b38
@ -842,6 +842,12 @@ jQuery.noConflict();
|
||||
*/
|
||||
$('.cms .cms-panel-link').entwine({
|
||||
onclick: function(e) {
|
||||
if($(this).hasClass('external-link')) {
|
||||
e.stopPropagation();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var href = this.attr('href'),
|
||||
url = (href && !href.match(/^#/)) ? href : this.data('href'),
|
||||
data = {pjax: this.data('pjaxTarget')};
|
||||
|
@ -380,6 +380,7 @@ To avoid repetition, we've written some helpers for various use cases:
|
||||
|
||||
* Load into a PJAX panel: `<a href="..." class="cms-panel-link" data-pjax-target="Content">`
|
||||
* Load URL as an iframe into a popup/dialog: `<a href="..." class="ss-ui-dialog-link">`
|
||||
* GridField click to redirect to external link: `<a href="..." class="cms-panel-link action external-link">
|
||||
|
||||
## Buttons
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user