From c03bfc6afc26cfa4f25f3c181d07c14287f40563 Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 21 Oct 2013 17:13:38 +0900 Subject: [PATCH] =?UTF-8?q?alert=20=ED=95=A8=EC=88=98=20=EB=8C=80=EC=B2=B4?= =?UTF-8?q?=20fancyalert=20=ED=95=A8=EC=88=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/jquery.fancyalert.js | 31 +++++++++++++++++++++++ mobile/skin/shop/basic/item.form.skin.php | 13 +++++++--- mobile/skin/shop/basic/style.css | 6 ++++- 3 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 js/jquery.fancyalert.js 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