diff options
Diffstat (limited to 'modules/digibug/js/digibug.js')
-rw-r--r-- | modules/digibug/js/digibug.js | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/modules/digibug/js/digibug.js b/modules/digibug/js/digibug.js index 837c8f7f..30bff47d 100644 --- a/modules/digibug/js/digibug.js +++ b/modules/digibug/js/digibug.js @@ -1,26 +1,28 @@ $(document).ready(function() { $(".gDigibugPrintButton a").click(function(e) { e.preventDefault(); - queue_print(e); + return digibug_popup(e.currentTarget.href, { width: 800, height: 600 } ); }); + $("#gDigibugLink").click(function(e) { e.preventDefault(); - return queue_print(e); + return digibug_popup(e.currentTarget.href, { width: 800, height: 600 } ); }); }); -function popUp(url, options) { +function digibug_popup(url, options) { options = $.extend({ /* default options */ - width: 400, - height: 400, + width: '800', + height: '600', target: 'dbPopWin', scrollbars: 'yes', resizable: 'no', menuBar: 'no', - addressBar: 'yes'}, options); + addressBar: 'yes' + }, options); - /* center the window by default. */ + // center the window by default. if (!options.winY) { options.winY = screen.height / 2 - options.height / 2; }; @@ -32,19 +34,15 @@ function popUp(url, options) { url, options['target'], 'width= ' + options.width + - ',height=' + options.height + - ',top=' + options.winY + - ',left=' + options.winX + - ',scrollbars=' + options.scrollbars + - ',resizable=' + options.resizable + - ',menubar=' + options.menuBar + - ',location=' + options.addressBar - ); + ',height=' + options.height + + ',top=' + options.winY + + ',left=' + options.winX + + ',scrollbars=' + options.scrollbars + + ',resizable=' + options.resizable + + ',menubar=' + options.menuBar + + ',location=' + options.addressBar + ); return false; } - -function queue_print(e) { - return popUp(e.currentTarget.href, { width: 800, height: 600 } ); -}; |