Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MINOR Load breadcrumb links via ajax into panels in CMS

  • Loading branch information...
commit 39dc5ae3010eff16feade96fe9c177dfeec13733 1 parent abedf2a
@chillu chillu authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 admin/javascript/LeftAndMain.Content.js
View
10 admin/javascript/LeftAndMain.Content.js
@@ -296,9 +296,13 @@
});
/**
- * Loads
+ * Loads the link's 'href' attribute into a panel via ajax,
+ * as opposed to triggering a full page reload.
+ * Little helper to avoid repetition, and make it easy to
+ * "opt in" to panel loading, while by default links still exhibit their default behaviour.
+ * Same goes for breadcrumbs in the CMS.
*/
- $('.cms-content .cms-panel-link').entwine({
+ $('.cms-content .cms-panel-link, .cms-content a.crumb').entwine({
onclick: function(e) {
var href = this.attr('href'), url = href ? href : this.data('href'),
data = (this.data('target-panel')) ? {selector: this.data('target-panel')} : null;
@@ -307,5 +311,5 @@
e.preventDefault();
}
});
-
+
})(jQuery);
Please sign in to comment.
Something went wrong with that request. Please try again.