This was bad idea. The problem should be solved on php side.
[fa-stable.git] / js / inserts.js
index 01fad9985f28912f80f2d77cf151c309c1f3583f..5e6774b26435577ad54fd3c3ed0390e64f5a210a 100644 (file)
@@ -203,11 +203,13 @@ var inserts = {
            // this shows divs for js enabled browsers only
            e.style.display = 'block';
        },
-       'input.ajaxsubmit','button.ajaxsubmit,button.editbutton,button.navibutton': 
+//     '.ajaxsubmit,.editbutton,.navibutton': // much slower on IE7
+       'button.ajaxsubmit,input.ajaxsubmit,input.editbutton,button.navibutton': 
        function(e) {
            e.onclick = function() {
                        if (this.getAttribute('aspect') == 'process')
                                progbar();
+                   save_focus(this);
                        JsHttpRequest.request(this);
                        return false;
            }
@@ -257,6 +259,13 @@ var inserts = {
                        };
                }
        },
+       'a.printlink':  function(l) {
+               l.onclick = function() {
+                   save_focus(this);
+                       JsHttpRequest.request(this);
+                       return false;
+               }
+       },
        'ul.ajaxtabs':  function(ul) {
            var ulist=ul.getElementsByTagName("li");
            for (var x=0; x<ulist.length; x++){ //loop through each LI e
@@ -336,7 +345,12 @@ function setHotKeys() {
                        if (key == 18) {
                                _hotkeys.alt = false;
                                if (_hotkeys.focus>=0) {
-                                       window.location = document.links[_hotkeys.focus].href;
+                                       var link = document.links[_hotkeys.focus];
+                                       if (link.target=='_blank') {
+//                                             window.open(link.href,'','toolbar=no,scrollbar=no,resizable=yes,menubar=no,width=900,height=500');
+                                               openWindow(link.href,'_blank');
+                                       } else
+                                               window.location = link.href;
                                }
                        } 
                        return stopEv(ev);