쇼핑몰: #271 메인 애니메이션 smt_50 완료, 20, 40 스크립트 수정 요망

This commit is contained in:
whitedot
2013-08-08 15:42:08 +09:00
parent 60774014e8
commit 42058419cd
5 changed files with 67 additions and 56 deletions

View File

@ -18,13 +18,20 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
if ($i == 1) {
if ($this->css) {
echo "<ul id=\"smt_{$this->type}\" class=\"{$this->css}\">\n";
echo "<div id=\"smt_{$this->type}\" class=\"{$this->css}\">\n";
} else {
echo "<ul id=\"smt_{$this->type}\" class=\"sct smt_20\">\n";
echo "<div id=\"smt_{$this->type}\" class=\"sct smt_50\">\n";
}
echo "<li class=\"sct_li sct_li_first\">\n";
echo "<ul class=\"sct_ul sct_ul_first\">\n";
}
if ($i>1 && $i%$this->list_mod == 1) {
echo "</ul>\n";
echo "<ul class=\"sct_ul\">\n";
}
echo "<li class=\"sct_li{$sct_last}\">";
if ($i > 1 && $i%$this->list_mod == 1) {
echo "</li>\n";
echo "<li class=\"sct_li\">\n";
@ -60,6 +67,10 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
echo "<span class=\"sct_icon\">".item_icon($row)."</span>\n";
}
if ($this->href) {
echo "</a>\n";
}
if ($this->view_sns) {
echo "<div class=\"sct_sns\">";
echo get_sns_share_link('facebook', $sns_url, $sns_title, G4_SHOP_URL.'/img/sns_fb.png');
@ -68,16 +79,12 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
echo "</div>\n";
}
if ($this->href) {
echo "</a>\n";
}
echo "</div>\n";
echo "</li>\n";
}
if ($i > 1) {
echo "</li>\n";
echo "</ul>\n";
echo "</div>\n";
}
if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\n";
@ -86,8 +93,8 @@ if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\
<script>
$.fn.topRolling = function(option)
{
var $smt = this.find("li.sct_li");
var $smt_a = $smt.find("a");
var $smt = this.find("ul.sct_ul");
var $smt_a = $smt.find("a.sct_a");
var height = $smt.closest("ul").height();
var count = $smt.size();
var c_idx = o_idx = 0;

View File

@ -12,6 +12,10 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<!-- 상품유형 30 시작 { -->
<?php
for ($i=1; $row=sql_fetch_array($result); $i++) {
$sct_last = '';
if($i>1 && $i%$this->list_mod == 0)
$sct_last = ' sct_last'; // 줄 마지막
if ($i == 1) {
if ($this->css) {
echo "<div id=\"smt_{$this->type}\" class=\"{$this->css}\">\n";
@ -22,11 +26,11 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
}
if ($i>1 && $i%$this->list_mod == 1) {
echo "</ul>";
echo "<ul class=\"sct_ul\">";
echo "</ul>\n";
echo "<ul class=\"sct_ul\">\n";
}
echo "<li class=\"sct_li\">\n";
echo "<li class=\"sct_li{$sct_last}\">\n";
if ($this->href) {
echo "<a href=\"{$this->href}{$row['it_id']}\" class=\"sct_a\">\n";

View File

@ -18,19 +18,19 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
if ($i == 1) {
if ($this->css) {
echo "<ul id=\"smt_{$this->type}\" class=\"{$this->css}\">\n";
echo "<div id=\"smt_{$this->type}\" class=\"{$this->css}\">\n";
} else {
echo "<ul id=\"smt_{$this->type}\" class=\"sct smt_40\">\n";
echo "<div id=\"smt_{$this->type}\" class=\"sct smt_50\">\n";
}
echo "<li class=\"sct_li sct_li_first\">\n";
echo "<ul class=\"sct_ul sct_ul_first\">\n";
}
if ($i > 1 && $i%$this->list_mod == 1) {
echo "</li>\n";
echo "<li class=\"sct_li\">\n";
if ($i>1 && $i%$this->list_mod == 1) {
echo "</ul>\n";
echo "<ul class=\"sct_ul\">\n";
}
echo "<div class=\"sct_div{$sct_last}\">";
echo "<li class=\"sct_li{$sct_last}\">";
if ($this->href) {
echo "<a href=\"{$this->href}{$row['it_id']}\" class=\"sct_a\">\n";
@ -60,6 +60,10 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
echo "<span class=\"sct_icon\">".item_icon($row)."</span>\n";
}
if ($this->href) {
echo "</a>\n";
}
if ($this->view_sns) {
echo "<div class=\"sct_sns\">";
echo get_sns_share_link('facebook', $sns_url, $sns_title, G4_SHOP_URL.'/img/sns_fb.png');
@ -68,16 +72,12 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
echo "</div>\n";
}
if ($this->href) {
echo "</a>\n";
}
echo "</div>\n";
echo "</li>\n";
}
if ($i > 1) {
echo "</li>\n";
echo "</ul>\n";
echo "</div>\n";
}
if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\n";
@ -86,8 +86,8 @@ if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\
<script>
$.fn.itemlistShow = function(option)
{
var $smt = this.find("li.sct_li");
var $smt_a = $smt.find("a");
var $smt = this.find("ul.sct_ul");
var $smt_a = $smt.find("a.sct_a");
var count = $smt.size();
var c_idx = o_idx = 0;
var fx = null;

View File

@ -17,19 +17,19 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
if ($i == 1) {
if ($this->css) {
echo "<ul id=\"smt_{$this->type}\" class=\"{$this->css}\">\n";
echo "<div id=\"smt_{$this->type}\" class=\"{$this->css}\">\n";
} else {
echo "<ul id=\"smt_{$this->type}\" class=\"sct smt_50\">\n";
echo "<div id=\"smt_{$this->type}\" class=\"sct smt_50\">\n";
}
echo "<li class=\"sct_li sct_li_first\">\n";
echo "<ul class=\"sct_ul sct_ul_first\">\n";
}
if ($i > 1 && $i%$this->list_mod == 1) {
echo "</li>\n";
echo "<li class=\"sct_li\">\n";
if ($i>1 && $i%$this->list_mod == 1) {
echo "</ul>\n";
echo "<ul class=\"sct_ul\">\n";
}
echo "<div class=\"sct_div{$sct_last}\">";
echo "<li class=\"sct_li{$sct_last}\">";
if ($this->href) {
echo "<a href=\"{$this->href}{$row['it_id']}\" class=\"sct_a\">\n";
@ -59,6 +59,10 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
echo "<span class=\"sct_icon\">".item_icon($row)."</span>\n";
}
if ($this->href) {
echo "</a>\n";
}
if ($this->view_sns) {
echo "<div class=\"sct_sns\">";
echo get_sns_share_link('facebook', $sns_url, $sns_title, G4_SHOP_URL.'/img/sns_fb.png');
@ -67,16 +71,12 @@ for ($i=1; $row=sql_fetch_array($result); $i++) {
echo "</div>\n";
}
if ($this->href) {
echo "</a>\n";
}
echo "</div>\n";
echo "</li>\n";
}
if ($i > 1) {
echo "</li>\n";
echo "</ul>\n";
echo "</div>\n";
}
if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\n";
@ -85,7 +85,7 @@ if($i == 1) echo "<p class=\"sct_noitem\">등록된 상품이 없습니다.</p>\
<script>
$.fn.itemDrop = function(option)
{
var $smt = this.find("li.sct_li");
var $smt = this.find("ul.sct_ul");
var $smt_a = $smt.find("a");
var count = $smt.size();
var height = $smt.height();
@ -102,7 +102,7 @@ $.fn.itemDrop = function(option)
// 초기실행
if(count > 0) {
$smt.eq(0).find("div.sct_div").each(function() {
$smt.eq(0).find("li.sct_li").each(function() {
$(this).delay(delay).animate(
{ top: "+="+height+"px" }, settings.duration
);
@ -152,12 +152,12 @@ $.fn.itemDrop = function(option)
delay = 0;
$smt.eq(o_idx).css("display", "none");
$smt.eq(o_idx).find("div.sct_div").css("top", "-"+height+"px");
$smt.eq(o_idx).find("li.sct_li").css("top", "-"+height+"px");
c_idx = (o_idx + 1) % count;
$smt.eq(c_idx).css("display", "block");
$smt.eq(c_idx).find("div.sct_div").each(function() {
$smt.eq(c_idx).find("li.sct_li").each(function() {
$(this).delay(delay).animate(
{ top: "+="+height+"px" }, settings.duration
);

View File

@ -83,9 +83,9 @@
/* 메인 상품 목록 스킨 20 */
.smt_20 {position:relative;height:306px;overflow-y:hidden}
.smt_20 .sct_li {position:absolute;top:306px;left:0;display:none}
.smt_20 .sct_li_first {top:0;display:block}
.smt_20 .sct_div {float:left;margin:0 25px 15px 0}
.smt_20 .sct_ul {position:absolute;top:306px;left:0;display:none}
.smt_20 .sct_ul_first {top:0;display:block}
.smt_20 .sct_li {float:left;margin:0 25px 15px 0}
.smt_20 .sct_last {margin:0 0 15px !important}
.smt_20 .sct_a {display:block;position:relative;text-decoration:none}
.smt_20 .sct_a:focus, .smt_20 .sct_a:hover {text-decoration:none}
@ -99,7 +99,7 @@
/* 메인 상품 목록 스킨 30 */
.smt_30 {position:relative;height:306px;overflow-x:hidden}
.smt_30 .sct_ul {position:absolute;top:0;left:765px;margin:0;padding:0;width:765px;list-style:none;zoom:1}
.smt_30 .sct_ul {position:absolute;top:0;left:765px;margin:0;padding:0;list-style:none;zoom:1}
.smt_30 .sct_ul:after {display:block;visibility:hidden;clear:both;content:""}
.smt_30 .sct_ul_first {display:block;left:0}
.smt_30 .sct_li {float:left;margin-right:25px}
@ -116,9 +116,9 @@
/* 메인 상품 목록 스킨 40 */
.smt_40 {position:relative;height:306px}
.smt_40 .sct_li {display:none;position:absolute;top:0;left:0}
.smt_40 .sct_li_first {display:block}
.smt_40 .sct_div {float:left;margin:0 25px 15px 0}
.smt_40 .sct_ul {display:none;position:absolute;top:0;left:0}
.smt_40 .sct_ul_first {display:block}
.smt_40 .sct_li {float:left;margin:0 25px 15px 0}
.smt_40 .sct_last {margin:0 0 15px !important}
.smt_40 .sct_a {display:block;position:relative;text-decoration:none}
.smt_40 .sct_a:focus, .smt_40 .sct_a:hover {text-decoration:none}
@ -132,9 +132,9 @@
/* 메인 상품 목록 스킨 50 */
.smt_50 {position:relative;height:306px}
.smt_50 .sct_li {display:none;position:absolute;top:0;left:0;height:306px;overflow-y:hidden}
.smt_50 .sct_li_first {display:block}
.smt_50 .sct_div {float:left;position:relative;top:-306px;margin:0 25px 15px 0}
.smt_50 .sct_ul {display:none;position:absolute;top:0;left:0;height:306px;margin:0;padding:0;list-style:none;overflow-y:hidden}
.smt_50 .sct_ul_first {display:block}
.smt_50 .sct_li {float:left;position:relative;top:-306px;margin:0 25px 15px 0}
.smt_50 .sct_last {margin:0 0 15px}
.smt_50 .sct_a {display:block;position:relative;text-decoration:none}
.smt_50 .sct_a:focus, .smt_50 .sct_a:hover {text-decoration:none}