]> git.0d.be Git - panikweb.git/blobdiff - panikweb_templates/static/js/specifics.js
keep middle click working as expected
[panikweb.git] / 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 */