]> git.0d.be Git - panikweb.git/commitdiff
keep middle click working as expected
authorFrédéric Péters <fpeters@0d.be>
Wed, 11 Sep 2013 09:28:39 +0000 (11:28 +0200)
committerFrédéric Péters <fpeters@0d.be>
Wed, 11 Sep 2013 09:28:54 +0000 (11:28 +0200)
panikweb_templates/static/js/specifics.js

index 360ae59347095f9eb1137564ce63d028ac75715b..2668d1a53dbe30a5cf64814f171be249e3fa42e2 100644 (file)
@@ -93,9 +93,13 @@ $(function() {
         $.fn.ajaxifyClick = function(params) {
                this.each(function() {
                        $(this).unbind('click');
-                       $(this).bind('click',function(){
-                               $(this).addClass('loading');
+                       $(this).bind('click',function(e){
                                var href = $(this).attr("href");
+                               if (e.which == 2) {
+                                       window.open(href, '_blank');
+                                       return false;
+                               }
+                               $(this).addClass('loading');
                                /* this checks the link points to a local document, be
                                 * it because it's just a path, or because the server
                                 * part points to the same domain */