diff options
author | jhilden <jakobhilden@gmail.com> | 2009-06-29 16:03:45 -0400 |
---|---|---|
committer | jhilden <jakobhilden@gmail.com> | 2009-06-29 16:03:45 -0400 |
commit | b31b3bd5bff4f8d5b5721e0fdd86579028a5b03a (patch) | |
tree | 9baa2a301c1e26dcf872e0bbfbb09be34cb020d5 /modules/digibug/js/digibug.js | |
parent | eb82f6a64a6b4e0b4e18ca92689bd467cba6e1bd (diff) | |
parent | 5de6de6a133c6c906ee63b5a2ab1b08bc14ca17e (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/digibug/js/digibug.js')
-rw-r--r-- | modules/digibug/js/digibug.js | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/modules/digibug/js/digibug.js b/modules/digibug/js/digibug.js new file mode 100644 index 00000000..78ca8cf3 --- /dev/null +++ b/modules/digibug/js/digibug.js @@ -0,0 +1,36 @@ +function digibug_popup(url, options) { + options = $.extend({ + /* default options */ + width: '800', + height: '600', + target: 'dbPopWin', + scrollbars: 'yes', + resizable: 'no', + menuBar: 'no', + addressBar: 'yes' + }, options); + + // center the window by default. + if (!options.winY) { + options.winY = screen.height / 2 - options.height / 2; + }; + if (!options.winX) { + options.winX = screen.width / 2 - options.width / 2; + }; + + open( + 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 + ); + + return false; + +} |