You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
954 B

  1. APP.POPUP = null;
  2. (function($) {
  3. APP.POPUP = function(option) {
  4. var defaults={
  5. title : '_blank',
  6. width : 800,
  7. height : 600,
  8. url : ''
  9. };
  10. var options = $.extend({}, defaults, option);
  11. cw = screen.availWidth;
  12. ch = screen.availHeight;
  13. sw = options.width;
  14. sh = options.height;
  15. ml = (cw - sw) / 2;
  16. mt = (ch - sh) / 2;
  17. var option = 'width='+sw+',height='+sh+',top='+mt+',left='+ml+',scrollbars=yes,resizable=no';
  18. var win = window.open(options.url, options.title, option);
  19. if (win == null || typeof(win) == "undefined" || (win == null && win.outerWidth == 0) || (win != null && win.outerHeight == 0))
  20. {
  21. alert("팝업 차단 기능이 설정되어있습니다\n\n차단 기능을 해제(팝업허용) 한 후 다시 이용해 주십시오.");
  22. return;
  23. }
  24. };
  25. })(jQuery);