X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=js%2Finserts.js;h=7450c199d40c670e42b3fa8e04632f755d515883;hb=5db6030e4d0126be8883347574111be381478256;hp=01fad9985f28912f80f2d77cf151c309c1f3583f;hpb=b1c79afd0a78ec37ff813f1305e9e0804be78ef3;p=fa-stable.git diff --git a/js/inserts.js b/js/inserts.js index 01fad998..7450c199 100644 --- a/js/inserts.js +++ b/js/inserts.js @@ -1,7 +1,17 @@ +/********************************************************************** + Copyright (C) FrontAccounting, LLC. + Released under the terms of the GNU General Public License, GPL, + as published by the Free Software Foundation, either version 3 + of the License, or (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the License here . +***********************************************************************/ var _focus; var _hotkeys = { 'alt': false, // whether is the Alt key pressed - 'focus': -1 // currently selected indeks of document.links + 'focus': -1 // currently selected indeks of document.links }; function debug(msg) { @@ -162,7 +172,13 @@ var inserts = { if((ev.ctrlKey && key == 13) || key == 27) { ev.cancelBubble = true; if(ev.stopPropagation) ev.stopPropagation(); -// here ctrl-enter/escape support + // activate submit/escape form + for (var i=0; i=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); @@ -344,7 +401,7 @@ function setHotKeys() { return true; } } - + Behaviour.register(inserts); Behaviour.addLoadEvent(setFocus);