From 16fdd3d4e040bcfb074dfbec9e5f9b5ebbabdfdb Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 27 Sep 2013 17:53:49 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=EB=AA=A8=EB=B0=94=EC=9D=BC=20=ED=94=8C?= =?UTF-8?q?=EB=A1=9C=ED=8C=85=20=EB=A9=94=EB=89=B4=20=EC=8A=A4=ED=81=AC?= =?UTF-8?q?=EB=A6=BD=ED=8A=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 10 - css/mobile_shop.css | 6 +- ...hop.mobile.list.js => jquery.fancylist.js} | 6 +- js/jquery.floatmenu.js | 172 ++++++++++++++++++ mobile/shop/iteminfo.php | 19 ++ mobile/skin/shop/basic/item.form.skin.php | 7 + .../skin/shop/basic/iteminfo.change.skin.php | 1 - .../shop/basic/iteminfo.delivery.skin.php | 1 - mobile/skin/shop/basic/iteminfo.info.skin.php | 50 +---- .../skin/shop/basic/iteminfo.itemqa.skin.php | 1 - .../skin/shop/basic/iteminfo.itemuse.skin.php | 1 - .../shop/basic/iteminfo.relation.skin.php | 1 - mobile/skin/shop/basic/list.10.skin.php | 4 +- mobile/skin/shop/basic/main.10.skin.php | 4 +- mobile/skin/shop/basic/relation.skin.php | 4 +- test.css | 3 + 16 files changed, 216 insertions(+), 74 deletions(-) rename js/{shop.mobile.list.js => jquery.fancylist.js} (94%) create mode 100644 js/jquery.floatmenu.js create mode 100644 test.css diff --git a/.gitignore b/.gitignore index 4bc4f406c..c99264668 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,9 @@ -<<<<<<< HEAD dbconfig.php log .htaccess data -======= /.htaccess data/ ->>>>>>> g5 test config.php sirgle @@ -16,16 +13,9 @@ skin/latest/basic2 rankiss* thumb.lib.php test.php -<<<<<<< HEAD -g4s_tree -======= ->>>>>>> g5 itzimara* nemoluv* cheditor* *.key -<<<<<<< HEAD g5_tree -======= *.sh ->>>>>>> g5 diff --git a/css/mobile_shop.css b/css/mobile_shop.css index 9519d301e..a68b3f3a9 100644 --- a/css/mobile_shop.css +++ b/css/mobile_shop.css @@ -629,4 +629,8 @@ td.empty_table {padding:5em 0;text-align:center} .pg_page, .qa_page {background:#f9f9f9;text-decoration:none} .pg_start, .pg_prev, .qa_start, .qa_prev {border-right:1px solid #cfded8} .pg_end, .pg_next, .qa_end, .qa_next {border-left:1px solid #cfded8} -.pg_current {background:#333;color:#fff;font-weight:bold} \ No newline at end of file +.pg_current {background:#333;color:#fff;font-weight:bold} + +/* 상품상세 메뉴 floating */ +#info_top_layer {display:none;position:absolute; top:0; left:0; width:100%; background-color: #eee;} +#form_btn_layer { display:none;position:absolute; top:0; left: 0; width: 100%; height: 60px; background-color: #eee;} \ No newline at end of file diff --git a/js/shop.mobile.list.js b/js/jquery.fancylist.js similarity index 94% rename from js/shop.mobile.list.js rename to js/jquery.fancylist.js index 5d7bd7050..19149bc6f 100644 --- a/js/shop.mobile.list.js +++ b/js/jquery.fancylist.js @@ -1,9 +1,9 @@ (function($) { - $.fn.itemList = function(element, clear) + $.fn.fancyList = function(element, clear) { var cfg = { - element: "li.sct_li", - clear: "sct_clear" + element: "li", + clear: "clear" }; if(typeof element == "object") diff --git a/js/jquery.floatmenu.js b/js/jquery.floatmenu.js new file mode 100644 index 000000000..b176ebe69 --- /dev/null +++ b/js/jquery.floatmenu.js @@ -0,0 +1,172 @@ +(function($) { + $.fn.topFloatMenu = function(timeout, duration) + { + var cfg = { + timeout: 300, + duration: 300 + }; + + if(typeof timeout == "object") { + cfg = $.extend( cfg, timeout); + } else { + if(timeout) { + cfg = $.extend({ timeout: timeout }); + } + + if(duration) { + cfg = $.extend({ duration: duration }); + } + } + + var $menu = this; + var scroll_y = 0; + var timeout = null; + var height = parseInt($menu.height()); + var move_timeout = null; + + function init_menu() + { + hide_menu(); + + timeout = setTimeout(function() { + $menu.css("top", (scroll_y - height)+"px").css("display", "block"); + $menu.animate({ top: scroll_y }, cfg.duration); + + return; + }, cfg.timeout); + } + + function float_menu() + { + hide_menu(); + + timeout = setTimeout(function() { + scroll_y = parseInt(document.body.scrollTop); + $menu.css("top", (scroll_y - height)+"px").css("display", "block"); + $menu.animate({ top: scroll_y }, cfg.duration); + + return; + }, cfg.timeout); + } + + function hide_menu() + { + clearTimeout(timeout); + $menu.clearQueue().stop().hide().css("top", "-"+height+"px"); + } + + $(window).on("scroll",function(event) { + float_menu(); + }); + + $(window).on("resize", function(event) { + $(window).trigger("scroll"); + }); + + $(window).on("load", function(event) { + init_menu(); + }); + + $(window).on("touchstart", function(event) { + hide_menu(); + }); + + if(navigator.userAgent.toLowerCase().indexOf("android") > -1) { + $(window).on("touchend", function(event) { + $(window).trigger("scroll"); + }); + } + } + + $.fn.bottomFloatMenu = function(timeout, duration) + { + var cfg = { + timeout: 300, + duration: 300 + }; + + if(typeof timeout == "object") { + cfg = $.extend( cfg, timeout); + } else { + if(timeout) { + cfg = $.extend({ timeout: timeout }); + } + + if(duration) { + cfg = $.extend({ duration: duration }); + } + } + + var $menu = this; + var scroll_y = 0; + var move_y = 0; + var element_y = 0; + var top_pos = 0; + var timeout = null; + var height = parseInt($menu.height()); + var w_height = 0; + + function init_menu() + { + hide_menu(); + + timeout = setTimeout(function() { + scroll_y = parseInt(document.body.scrollTop); + w_height = $(window).height(); + element_y = scroll_y + w_height; + $menu.css("top", element_y+"px").css("display", "block"); + $menu.clearQueue().stop().animate({ top: "-="+height }, cfg.duration); + }, cfg.timeout); + } + + function float_menu() + { + hide_menu(); + + w_height = $(window).height(); + scroll_y = parseInt(document.body.scrollTop); + element_y = scroll_y + w_height; + + if (/iP(hone|od|ad)/.test(navigator.platform)) { + if(window.innerHeight - $(window).outerHeight(true) > 0) + element_y += (window.innerHeight - $(window).outerHeight(true)); + } + + timeout = setTimeout(function() { + $menu.height(0).css("top", element_y+"px").css("display", "block"); + $menu.animate({ + top: "-="+height, + height: "+="+height + }, cfg.duration); + }, cfg.timeout); + } + + function hide_menu() + { + clearTimeout(timeout); + $menu.css("top", (w_height + height)+"px").clearQueue().stop().css("display", "none"); + } + + $(window).on("scroll",function(event) { + float_menu(); + }); + + $(window).on("load", function(event) { + init_menu(); + }); + + $(window).on("resize", function(event) { + $(window).trigger("scroll"); + }); + + $(window).on("touchstart", function(event) { + hide_menu(); + }); + + if(navigator.userAgent.toLowerCase().indexOf("android") > -1) { + $(window).on("touchend", function(event) { + $(window).trigger("scroll"); + }); + } + } +}(jQuery)); \ No newline at end of file diff --git a/mobile/shop/iteminfo.php b/mobile/shop/iteminfo.php index 9d9a5792a..e6d4f65c1 100644 --- a/mobile/shop/iteminfo.php +++ b/mobile/shop/iteminfo.php @@ -64,7 +64,17 @@ function pg_anchor($info) { + + +
+

상품 정보

+ +
+ +
+ +
+ + + \ 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 b18032b30..2843b7dc5 100644 --- a/mobile/skin/shop/basic/item.form.skin.php +++ b/mobile/skin/shop/basic/item.form.skin.php @@ -39,6 +39,7 @@ if ($row['it_id']) { ?> +
@@ -390,6 +391,10 @@ $href = G5_SHOP_URL.'/iteminfo.php?it_id='.$it_id; +
+ddd +
+ + 등록된 상품이 없습니다.

\ \ No newline at end of file diff --git a/mobile/skin/shop/basic/main.10.skin.php b/mobile/skin/shop/basic/main.10.skin.php index 6a6e2e26e..7b7a45fcb 100644 --- a/mobile/skin/shop/basic/main.10.skin.php +++ b/mobile/skin/shop/basic/main.10.skin.php @@ -3,7 +3,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 ?> - + 등록된 상품이 없습니다.

\ \ No newline at end of file diff --git a/mobile/skin/shop/basic/relation.skin.php b/mobile/skin/shop/basic/relation.skin.php index b4d5757d4..cc4ce00fd 100644 --- a/mobile/skin/shop/basic/relation.skin.php +++ b/mobile/skin/shop/basic/relation.skin.php @@ -3,7 +3,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 ?> - + 등록된 상품이 없습니다.

\ \ No newline at end of file diff --git a/test.css b/test.css new file mode 100644 index 000000000..296f9695b --- /dev/null +++ b/test.css @@ -0,0 +1,3 @@ +#topFloatMenu { position:absolute; top:0; left:0; z-index: 100; width:100%; height: 60px; line-height: 60px; text-align: center; background-color: #eee; } +#bottomFloatMenu { display:none; position:absolute; top:0; left: 0; z-index: 100; width: 100%; height: 60px; line-height: 60px; text-align: center; background-color: #eee; } +#Content { width: 100%; height: 2000px; } \ No newline at end of file From a413f1805ea6a3611049724d408fbebf9ff436aa Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 27 Sep 2013 18:02:20 +0900 Subject: [PATCH 2/2] =?UTF-8?q?test=20css=20=ED=8C=8C=EC=9D=BC=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test.css | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 test.css diff --git a/test.css b/test.css deleted file mode 100644 index 296f9695b..000000000 --- a/test.css +++ /dev/null @@ -1,3 +0,0 @@ -#topFloatMenu { position:absolute; top:0; left:0; z-index: 100; width:100%; height: 60px; line-height: 60px; text-align: center; background-color: #eee; } -#bottomFloatMenu { display:none; position:absolute; top:0; left: 0; z-index: 100; width: 100%; height: 60px; line-height: 60px; text-align: center; background-color: #eee; } -#Content { width: 100%; height: 2000px; } \ No newline at end of file