diff --git a/js/jquery.fancyalert.js b/js/jquery.fancyalert.js new file mode 100644 index 000000000..c7cebb72c --- /dev/null +++ b/js/jquery.fancyalert.js @@ -0,0 +1,31 @@ +function fancyalert(msg) +{ + var w = $(window).width(); + var h = $(window).height(); + var scroll_top = $(window).scrollTop(); + var box; + + if (/iP(hone|od|ad)/.test(navigator.platform)) { + if(window.innerHeight - $(window).outerHeight(true) > 0) + h += (window.innerHeight - $(window).outerHeight(true)); + } + + box = "
"; + box += ""; + box + ""; + box += ""; + box += ""; + box += "
"+msg; + box += "
"; + box += ""; + box += "
"; + box += "
"; + + $("body").append(box); +} + +$(function() { + $("#fancyalert_close").live("click", function() { + $("#fancyalert").fadeOut().remove(); + }); +}); \ No newline at end of file diff --git a/mobile/skin/shop/basic/item.form.skin.php b/mobile/skin/shop/basic/item.form.skin.php index eb0630a8a..4a4764b74 100644 --- a/mobile/skin/shop/basic/item.form.skin.php +++ b/mobile/skin/shop/basic/item.form.skin.php @@ -4,6 +4,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 +
@@ -384,29 +385,33 @@ $(function(){ }); // 이전 다음상품 swipe - $("#container").swipe({ + var swipeOptions = { swipe: function(event, direction) { switch(direction) { case "left": content_move(direction); - alert("다음 상품이 없습니다."); + fancyalert("다음 상품이 없습니다."); break; case "right": content_move(direction); - alert("이전 상품이 없습니다."); + fancyalert("이전 상품이 없습니다."); break; } + + return false; }, threshold: 50, excludedElements:".noSwipe", allowPageScroll:"vertical" - }); + }; + + $("#container").swipe(swipeOptions); }); function content_move(direction) diff --git a/mobile/skin/shop/basic/style.css b/mobile/skin/shop/basic/style.css index 63a29576e..b7fcc31ba 100644 --- a/mobile/skin/shop/basic/style.css +++ b/mobile/skin/shop/basic/style.css @@ -81,4 +81,8 @@ /* 로딩안내 레이어 */ #loading_message {position:absolute;top:0;left:0;z-index:10000;background-color:#eee;opacity:0.5} -#loading_message img {position:relative;opacity:1.0} \ No newline at end of file +#loading_message img {position:relative;opacity:1.0} + +/* 알림 box */ +#fancyalert {position:absolute;top:0;left:0;z-index:10000;background-color:#000;opacity: 0.5} +#fancyalert td { color:#fff;text-align: center;opacity:1.0} \ No newline at end of file