MINOR PJAX support for .cms-panel-link

This commit is contained in:
Ingo Schommer 2012-04-17 22:28:36 +02:00
parent 84b0a7d96c
commit 35d4cd3da8

View File

@ -330,8 +330,12 @@ jQuery.noConflict();
*/
$('.cms .cms-panel-link').entwine({
onclick: function(e) {
var href = this.attr('href'), url = (href && !href.match(/^#/)) ? href : this.data('href'),
data = (this.data('targetPanel')) ? {selector: this.data('targetPanel')} : null;
var href = this.attr('href'),
url = (href && !href.match(/^#/)) ? href : this.data('href'),
data = {
selector: this.data('targetPanel'),
pjax: this.data('pjax')
};
$('.cms-container').loadPanel(url, null, data);
e.preventDefault();