Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

a slightly more isolated way to deal with folder_content links

  • Loading branch information...
commit 5bca0c11bb1a4867f4fb76192031bcfa199bb940 1 parent 488cb9f
@izak izak authored
Showing with 11 additions and 11 deletions.
  1. +11 −11 plone/app/toolbar/resources/toolbar_overlays.js
View
22 plone/app/toolbar/resources/toolbar_overlays.js
@@ -39,17 +39,17 @@ window.parent.toolbar.el.on('toolbar_loaded',
// Keep all links inside the overlay (except for
// the folder_contents overlay)
$('a', body).on('click', function(e){
- if ($('#folderlisting-main-table', body).length) {
- if ($(e.target).attr('href').slice(-16) == '/folder_contents') {
- overlay($(e.target).attr('href'));
- return e.preventDefault();
- } else {
- window.parent.location.href = $(e.target).attr('href');
- };
- } else {
- overlay($(e.target).attr('href'));
- return e.preventDefault();
- };
+ overlay($(e.target).attr('href'));
+ return e.preventDefault();
+ });
+
+ // Override default behaviour on folder_contents links
+ $('#folderlisting-main-table a', body).each(function(){
+ if($(this).attr('href').slice(-16) != '/folder_contents') {
+ $(this).on('click', function(e){
+ window.parent.location.href = $(e.target).attr('href');
+ });
+ }
});
// Call any other event handlers
Please sign in to comment.
Something went wrong with that request. Please try again.