Skip to content

Commit

Permalink
MINOR PJAX support for .cms-panel-link
Browse files Browse the repository at this point in the history
  • Loading branch information
chillu committed Apr 17, 2012
1 parent 84b0a7d commit 35d4cd3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions admin/javascript/LeftAndMain.js
Expand Up @@ -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();
Expand Down

0 comments on commit 35d4cd3

Please sign in to comment.