This commit is contained in:
shim
2023-04-17 11:06:08 +09:00
parent d0b393aa97
commit 76264e09ad
4686 changed files with 552713 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
<header class="bar bar-nav bar-light bg-faded">
<a class="title" data-href="<?php echo RW(0)?>" data-text="새로고침">
<?php echo $d['layout']['header_file']?'<img src="'.$g['url_layout'].'/_var/'.$d['layout']['header_file'].'">':stripslashes($d['layout']['header_title'])?>
</a>
</header>
<div class="content">
<p class="text-xs-center text-muted py-5">잘못된 주소이거나 비공개 또는 삭제된 글입니다.</p>
<div class="text-xs-center">
<?php if (!$my['uid']): ?>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#modal-login">로그인 하기</button>
<?php endif; ?>
<button type="button" class="btn btn-light" onclick="history.back();">이전가기</button>
</div>
</div>
<script type="text/javascript">
document.title = 'Page not found · 킴스큐';
</script>

View File

@@ -0,0 +1 @@
<p class="text-xs-center text-muted py-5">잘못된 주소이거나 비공개 또는 삭제된 글입니다.</p>

View File

@@ -0,0 +1,28 @@
<li class="media mb-3" data-role="item" data-uid="{$uid}">
<a class="w-100"
data-toggle="profile"
data-target="#modal-member-profile"
data-mbruid="{$mbruid}"
data-title="{$nic}"
data-zindex="21"
data-url="{$profile_url}">
<div class="pull-left text-xs-center" style="width:6.25rem">
<img class="border img-circle" src="{$avatar}" alt="" style="width: 4.0625rem">
</div>
<div class="media-body">
<h5 class="h6 my-1 font-weight-light line-clamp-3">
{$nic}
</h5>
<div class="mb-1 f13 text-muted">
구독자 {$num_follower}명 <br>
동영상 {$num_post}개
</div>
</div>
</a>
<span class="badge badge-default badge-inverted">
<a href="#popup-post-postMore" data-toggle="popup" data-uid="{$post_uid}" class="icon material-icons text-muted f18">more_vert</a>
</span>
</li>

View File

@@ -0,0 +1,38 @@
<li class="table-view-cell border-bottom-0">
<div class="media" data-toggle="page"
data-target="#page-post-view"
data-format="{$format}"
data-start="{$start}"
data-uid="{$uid}"
data-featured="{$featured_16by9}"
data-provider="{$provider}"
data-videoId="{$videoId}"
data-url="/post/{$cid}">
<div class="media-left">
<span class="embed-responsive embed-responsive-16by9 bg-faded">
<img class="media-object" src="{$featured_16by9_sm}" class="img-fluid" alt="" style="width:10rem">
<time class="badge badge-default bg-black rounded-0 position-absolute f13" style="top:auto;left:auto;right:0.0625rem;bottom:0.0625rem">{$time}</time>
</span>
</div>
<div class="media-body">
<div class="f14 line-clamp-3" style="line-height:1.3">{$subject}</div>
<div class="f12" style="margin-top:.2rem;line-height:1.3">
<p>{$nic}</p>
<ul class="list-inline text-muted mb-0">
<li class="list-inline-item">조회수 {$hit}회 </li>
<li class="list-inline-item"><time class="" data-plugin="timeago" datetime="{$d_modify}"></time></li>
</ul>
</div>
</div>
</div>
<span class="badge badge-default badge-inverted">
<a href="#popup-post-postMore" data-toggle="popup" data-uid="{$uid}" class="icon material-icons text-muted">more_vert</a>
</span>
</li>

View File

@@ -0,0 +1,38 @@
<li class="table-view-cell border-bottom-0">
<div class="media" data-toggle="page"
data-target="#page-post-view"
data-format="{$format}"
data-start="{$start}"
data-uid="{$uid}"
data-featured="{$featured_16by9}"
data-provider="{$provider}"
data-videoId="{$videoId}"
data-url="/post/{$cid}">
<div class="media-left">
<span class="embed-responsive embed-responsive-16by9 bg-faded">
<img class="media-object" src="{$featured_16by9_sm}" class="img-fluid" alt="" style="width:10rem">
<time class="badge badge-default bg-black rounded-0 position-absolute f13" style="top:auto;left:auto;right:0.0625rem;bottom:0.0625rem">{$time}</time>
</span>
</div>
<div class="media-body">
<div class="f14 line-clamp-3" style="line-height:1.3">{$subject}</div>
<div class="f12" style="margin-top:.2rem;line-height:1.3">
<p>{$nic}</p>
<ul class="list-inline text-muted mb-0">
<li class="list-inline-item">조회수 {$hit}회 </li>
<li class="list-inline-item"><time class="" data-plugin="timeago" datetime="{$d_modify}"></time></li>
</ul>
</div>
</div>
</div>
<span class="badge badge-default badge-inverted">
<a href="#popup-post-postMore" data-toggle="popup" data-uid="{$uid}" class="icon material-icons text-muted">more_vert</a>
</span>
</li>

View File

@@ -0,0 +1,33 @@
<li class="d-flex justify-content-between mb-2" data-role="item">
<div class="media"
data-toggle="page"
data-target="#page-post-listview"
data-start="{$start}"
data-uid="{$uid}"
data-title="{$name}"
data-featured="{$featured_16by9}"
data-url="/list/{$id}" data-id="{$id}">
<div class="media-left">
<span class="embed-responsive embed-responsive-16by9 bg-faded">
<img src="{$featured_16by9}" class="media-object img-fluid" alt="" style="width:10rem">
<span class="list_mask">
<span class="txt">{$num}<i class="fa fa-list-ul d-block" aria-hidden="true"></i></span>
</span>
</span>
</div>
<div class="media-body pt-1">
<h4 class="media-heading f15 line-clamp-2">{$name}</h4>
<div class="f14">동영상 {$num}개</div>
<ul class="list-inline f13 text-muted mt-1 mb-0">
<li class="list-inline-item">{$nic}</li>
<li class="list-inline-item"><time data-plugin="timeago" datetime="{$d_modify}"></time></li>
<li class="list-inline-item"><i class="material-icons f15" style="vertical-align:text-bottom">{$display}</i></li>
</ul>
</div>
</div>
<div class="ml-4 px-1 d-none">
<a href="#popup-list-postMore" data-toggle="popup" data-uid="{$uid}" data-role="more" class="icon material-icons text-muted f18">
more_vert
</a>
</div>
</li>

View File

@@ -0,0 +1,27 @@
<li class="table-view-cell border-bottom-0" data-role="item" data-uid="{$uid}">
<div class="media" data-toggle="page" data-target="#page-post-listview" class="ml-1" data-start="" data-url="/list/{$id}" data-id="{$id}" data-title="{$name}">
<div class="media-left">
<div class="embed-responsive embed-responsive-16by9 bg-faded">
<img class="media-object " src="{$featured_16by9}" class="img-fluid" alt="" style="width:10rem">
<span class="list_mask">
<span class="txt">{$num}<i class="fa fa-list-ul d-block" aria-hidden="true"></i></span>
</span>
</div>
</div>
<div class="media-body">
<div class="line-clamp-3">{$name}</div>
<p>포스트 {$num}개</p>
<ul class="list-inline f13 text-muted mt-1 mb-0">
<li class="list-inline-item">{$nic}</li>
<li class="list-inline-item"><time data-plugin="timeago" datetime="{$d_modify}"></time></li>
</ul>
</div>
</div>
<span class="badge badge-default badge-inverted">
<a href="#popup-post-admin" data-toggle="popup" data-uid="{$uid}" class="icon material-icons text-muted">more_vert</a>
</span>
</li>

View File

@@ -0,0 +1,11 @@
<div class="ad_section bg-black position-relative mb-3" style="background-image: url({$cover});">
<div class="text-xs-center text-white position-relative p-2">
<strong class="h4 d-block">{$name}</strong>
<div class="mb-1"><small>{$review}</small></div>
</div>
</div>
<span class="text-muted f14 content-padded">포스트 {$num}개 </span>
<ul class="table-view table-view-sm mt-0 border-top-0 border-bottom-0">
{$row}
</ul>

View File

@@ -0,0 +1,29 @@
<li class="table-view-cell border-bottom-0" data-role="item" data-uid="{$uid}">
<div class="media" data-toggle="page"
data-target="#page-post-view"
data-format="{$format}"
data-start="#page-post-listview"
data-list="{$list}"
data-provider="{$provider}"
data-featured="{$featured_16by9}"
data-videoid="{$videoId}"
data-uid="{$uid}" data-url="/post/{$cid}?list={$list}">
<div class="media-left">
<span class="embed-responsive embed-responsive-16by9 bg-faded">
<img src="{$featured_16by9_sm}" class="media-object border" alt="" style="width:10rem">
<time class="badge badge-default bg-black rounded-0 position-absolute f13" style="top:auto;left:auto;right:0.0625rem;bottom:0.0625rem">{$time}</time>
</span>
</div>
<div class="media-body">
<div class="f14 line-clamp-3">{$subject}</div>
<p><small>{$nic}</small></p>
</div>
</div>
<span class="badge badge-default badge-inverted">
<a href="#popup-post-postMore" data-toggle="popup" data-uid="{$uid}" class="icon icon-more-vertical text-muted f18"></a>
</span>
</li>

View File

@@ -0,0 +1,37 @@
<li class="d-flex justify-content-between mb-2" data-role="item">
<div class="media"
data-toggle="page"
data-target="#page-post-view"
data-format="{$format}"
data-start="{$start}"
data-uid="{$uid}"
data-featured="{$featured_16by9}"
data-provider="{$provider}"
data-videoId="{$videoId}"
data-title="{$subject}"
data-url="/post/{$cid}">
<div class="media-left {$has_featured}">
<div class="embed-responsive embed-responsive-16by9 bg-faded">
<img class="media-object" src="{$featured_16by9_sm}" alt="" data-role="featured" style="width:10rem">
<time class="badge badge-default bg-black rounded-0 position-absolute f12 p-1" style="right:0.125rem;bottom:0.125rem" data-role="time">{$time}</time>
</div>
</div>
<div class="media-body pt-1">
<h4 class="media-heading f15 line-clamp-2">{$subject}</h4>
<ul class="list-inline f13 text-muted mt-1 mb-0">
<li class="list-inline-item">{$nic}</li>
<li class="list-inline-item">조회수 {$hit}회 </li>
<li class="list-inline-item">댓글 {$comment} </li>
<li class="list-inline-item"><time data-plugin="timeago" datetime="{$d_modify}"></time></li>
<li class="list-inline-item"><i class="material-icons f15" style="vertical-align:text-bottom">{$display}</i></li>
</ul>
</div>
</div>
<div class="ml-4 px-1">
<a href="#popup-post-postMore" data-toggle="popup" data-uid="{$uid}" data-role="more" class="icon material-icons text-muted f18">
more_vert
</a>
</div>
</li>

View File

@@ -0,0 +1,21 @@
<li class="table-view-cell">
<a data-toggle="analytics"
data-uid="{$uid}">
통계
</a>
</li>
<li class="table-view-cell">
<a class="" data-toggle="postedit"
data-uid="{$uid}"
data-title="포스트 수정"
data-url="/post/write/{$cid}"
class="btn btn-outline-primary">
수정
</a>
</li>
<li class="table-view-cell">
<a class="" data-toggle="postdel" data-title="정말로 포스트를 삭제하시겠습니까?" data-type="post">
삭제
</a>
</li>

View File

@@ -0,0 +1,30 @@
<li class="table-view-cell">
<a class="" data-toggle="saved" data-title="나중에 다시 보고 싶으신가요" data-subtext="로그인하여 동영상을 저장하세요.">
나중에 볼 동영상에 저장
</a>
</li>
<li class="table-view-cell">
<a class="" data-toggle="listAdd" data-title="나중에 다시 보고 싶으신가요" data-subtext="로그인하여 동영상을 재생목록에 추가하세요.">
재생목록에 저장
</a>
</li>
<li class="table-view-cell" >
<a class="" data-toggle="linkShare" data-hback="back">
링크 복사
</a>
</li>
<li class="table-view-cell">
<a class="" data-toggle="kakaoTalkSend" data-hback="back">
카톡 공유
</a>
</li>
<li class="table-view-cell">
<a class="" data-toggle="opinionList">
좋아요 내역
</a>
</li>
<li class="table-view-cell">
<a class="" data-toggle="report" data-title="동영상을 신고하시겠습니까?" data-subtext="부적절한 콘텐츠를 신고하려면 로그인하세요.">
신고...
</a>
</li>

View File

@@ -0,0 +1,51 @@
<div class="card card-full border-bottom rounded-0" data-role="item" data-uid="{$uid}">
<div class="position-relative embed-responsive embed-responsive-16by9 bg-faded"
data-toggle="modal"
data-target="#modal-post-view"
data-format="{$format}"
data-start="{$start}"
data-uid="{$uid}"
data-title="{$subject}"
data-featured="{$featured_16by9}"
data-provider="{$provider}"
data-videoId="{$videoId}"
data-url="{$post_url}">
<img class="card-img-top img-fluid rounded-0" src="{$featured_16by9}" alt="" data-role="featured">
<time class="badge badge-default bg-black rounded-0 position-absolute f14" style="right:0.0625rem;bottom:0.0625rem" data-role="time">{$time}</time>
</div>
<div class="card-block px-2 pb-4" style="padding-top: .8rem">
<div class="media">
<div class="mr-2">
<span class="badge badge-warning text-white">광고</span>
</div>
<div class="media-body"
data-toggle="modal"
data-target="#modal-post-view"
data-format="{$format}"
data-start="{$start}"
data-uid="{$uid}"
data-title="{$subject}"
data-featured="{$featured_16by9}"
data-provider="{$provider}"
data-videoId="{$videoId}"
data-url="{$post_url}">
<div class="f15 line-clamp-2" style="line-height: 1.2">
{$subject}
</div>
<ul class="list-inline f13 text-muted mt-1 mb-0">
<li class="list-inline-item line-clamp-2">{$review}</li>
</ul>
</div>
<div class="ml-4 px-1">
<a href="#popup-post-postMore"
data-toggle="popup"
data-role="more"
data-uid="{$uid}" class="icon material-icons text-muted f18">
more_vert
</a>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,93 @@
<div class="card card-full border-bottom rounded-0 bg-white" data-role="item" data-uid="{$uid}" data-saved="{$is_post_saved}">
<header class="px-3 pt-3 d-flex justify-content-between">
<div class="media"
data-toggle="profile"
data-target="#modal-member-profile"
data-mbruid="{$mbruid}"
data-title="{$nic}"
data-url="{$profile_url}">
<span class="media-left">
<img class="media-object img-circle" data-role="avatar" src="{$avatar}" alt="" style="width:2.5rem">
</span>
<div class="media-body">
<div class="f15 line-clamp-2" style="line-height: 1.2">{$nic}</div>
<ul class="list-inline f13 text-muted mt-1 mb-0">
<li class="list-inline-item"><time data-plugin="timeago" datetime="{$d_modify}"></time></li>
</ul>
</div>
</div><!-- /.media -->
<div class="px-1">
<a href="#popup-post-postMore"
data-toggle="popup"
data-role="more"
data-uid="{$uid}" class="icon material-icons text-muted f18">
more_vert
</a>
</div>
</header><!-- /.d-flex -->
<div class="card-block px-3 py-2"
data-toggle="page"
data-target="#page-post-view"
data-format="{$format}"
data-start="{$start}"
data-uid="{$uid}"
data-featured="{$featured_1by1}"
data-provider="{$provider}"
data-videoId="{$videoId}"
data-title="{$subject}"
data-url="{$post_url}">
<p>{$subject} <span class="f14 text-muted mt-2 {$has_content}">자세히 보기</span></p>
<div class="position-relative embed-responsive embed-responsive-1by1 bg-faded {$has_featured}">
<img class="card-img-top img-fluid rounded-0" src="{$featured_1by1}" alt="" data-role="featured">
<span class="position-absolute icon-tag text-white {$has_goodslink}" style="left:0.625rem;bottom:0.625rem" data-role="goodslink">
<i class="material-icons f18">redeem</i>
</span>
<time class="badge badge-default bg-black rounded-0 position-absolute f14" style="right:0.0625rem;bottom:0.0625rem" data-role="time">{$time}</time>
</div>
</div>
<footer class="d-flex justify-content-between px-3 mb-3">
<div class="">
<button type="button"
class="btn btn-link muted-link px-1 text-decoration-none {$is_post_liked}"
data-toggle="view_opinion"
data-title="동영상이 마음에 드시나요?"
data-subtext="로그인하여 의견을 알려주세요."
data-send="_ajax"
data-uid="{$uid}"
data-opinion="like"
data-role="btn_post_like_{$uid}">
<i class="material-icons align-text-bottom f20 align-middle">thumb_up</i>
<span class="ml-1 f13" data-role="likes_{$uid}">{$likes}</span>
</button>
<button type="button" class="btn btn-link muted-link px-1 text-decoration-none ml-2 {$is_post_disliked}"
data-toggle="view_opinion"
data-target="#popup-login-guide"
data-title="동영상이 마음에 안 드시나요?"
data-subtext="로그인하여 의견을 알려주세요."
data-send="_ajax"
data-uid="{$uid}"
data-opinion="dislike"
data-role="btn_post_dislike_{$uid}">
<i class="material-icons align-text-bottom f20 align-middle">thumb_down</i>
<span class="ml-1 f13" data-role="dislikes_{$uid}">{$dislikes}</span>
</button>
</div>
<div class="">
<button type="button" class="btn btn-link text-muted px-1 text-decoration-none"
data-toggle="modal"
data-target="#modal-post-view"
data-format="{$format}"
data-start="{$start}"
data-uid="{$uid}"
data-featured="{$featured_16by9}"
data-provider="{$provider}"
data-videoId="{$videoId}"
data-url="{$post_url}">
<i class="material-icons align-text-bottom f20 align-middle">comment</i>
<span class="ml-1 f13" data-role="comment_{$uid}">{$comment}{$oneline}</span>
</button>
</div>
</footer>
</div>

View File

@@ -0,0 +1,57 @@
<div class="card card-full border-bottom rounded-0" data-role="item" data-uid="{$uid}">
<div class="position-relative embed-responsive embed-responsive-16by9 bg-faded"
data-toggle="modal"
data-target="#modal-post-view"
data-format="{$format}"
data-start="{$start}"
data-uid="{$uid}"
data-featured="{$featured_16by9}"
data-provider="{$provider}"
data-videoId="{$videoId}"
data-title="{$subject}"
data-url="{$post_url}">
<img class="card-img-top img-fluid rounded-0" src="{$featured_16by9}" alt="" data-role="featured">
<span class="position-absolute icon-tag text-white {$has_goodslink}" style="left:0.625rem;bottom:0.625rem" data-role="goodslink">
<i class="material-icons f18">redeem</i>
</span>
<time class="badge badge-default bg-black rounded-0 position-absolute f14" style="right:0.0625rem;bottom:0.0625rem" data-role="time">{$time}</time>
</div>
<div class="card-block px-2 pb-4" style="padding-top: .8rem">
<div class="media">
<a data-toggle="profile"
data-target="#modal-member-profile"
data-mbruid="{$mbruid}"
data-title="{$nic}"
data-url="{$profile_url}"
class="media-left">
<img class="media-object img-circle" data-role="avatar" src="{$avatar}" alt="" style="width:2.5rem">
</a>
<div class="media-body"
data-toggle="modal"
data-target="#modal-post-view"
data-format="{$format}"
data-uid="{$uid}"
data-featured="{$featured_16by9}"
data-provider="{$provider}"
data-videoId="{$videoId}"
data-url="{$post_url}">
<div class="f15 line-clamp-2" style="line-height: 1.2">{$subject}</div>
<ul class="list-inline f13 text-muted mt-1 mb-0">
<li class="list-inline-item">{$nic}</li>
<li class="list-inline-item">조회수 {$hit}회 </li>
<li class="list-inline-item">댓글 {$comment} </li>
<li class="list-inline-item"><time data-plugin="timeago" datetime="{$d_modify}"></time></li>
</ul>
</div>
<div class="ml-4 px-1">
<a href="#popup-post-postMore"
data-toggle="popup"
data-role="more"
data-uid="{$uid}" class="icon material-icons text-muted f18">
more_vert
</a>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,29 @@
<div class="swiper-slide" style="width:40%;">
<div class="card card-video border-0 text-left m-0" data-role="item"
data-toggle="page"
data-target="#page-post-view"
data-format="{$format}"
data-start="{$start}"
data-uid="{$uid}"
data-featured="{$featured_16by9}"
data-provider="{$provider}"
data-videoId="{$videoId}"
data-title="{$subject}"
data-url="/post/{$cid}">
<div class="position-relative">
<img src="{$featured_16by9_sm}" alt="" class="img-fluid">
<time class="badge badge-default bg-black rounded-0 position-absolute" style="right:0.0625rem;bottom:0.0625rem" data-role="time">{$time}</time>
</div>
<div class="d-flex justify-content-between mt-2 mb-0 ">
<div class="f14 line-clamp-2" style="line-height:1.1">
{$subject}
</div>
<div class="ml-1 pl-1">
<a href="#popup-post-postMore" data-toggle="popup" data-uid="{$uid}" data-role="more" class="icon material-icons text-muted f18">
more_vert
</a>
</div>
</div><!-- /.d-flex -->
<small class="text-muted">{$nic}</small>
</div>
</div><!-- /.swiper-slide -->

View File

@@ -0,0 +1,8 @@
<div class="d-flex justify-content-between align-items-center py-2">
<label class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" type="checkbox" id="listRadio{$uid}" name="postlist_members[]" value="{$uid}" {$is_list}>
<span class="custom-control-indicator"></span>
<span class="custom-control-description" for="listRadio{$uid}">{$name}</span>
</label>
<i class="material-icons text-muted mr-2" data-toggle="tooltip" title="{$display_label}">{$display_icon}</i>
</div>

View File

@@ -0,0 +1,37 @@
<li class="table-view-cell border-bottom-0">
<div class="media" data-toggle="modal"
data-target="#modal-post-view"
data-format="{$format}"
data-uid="{$uid}"
data-featured="{$featured_16by9}"
data-provider="{$provider}"
data-videoId="{$videoId}"
data-url="/post/{$cid}">
<div class="media-left">
<span class="embed-responsive embed-responsive-16by9 bg-faded">
<img class="media-object" src="{$featured_16by9_sm}" class="img-fluid" alt="" style="width:10rem">
<time class="badge badge-default bg-black rounded-0 position-absolute f13" style="top:auto;left:auto;right:0.0625rem;bottom:0.0625rem">{$time}</time>
</span>
</div>
<div class="media-body">
<div class="f14 line-clamp-3" style="line-height:1.3">{$subject}</div>
<div class="f12" style="margin-top:.2rem;line-height:1.3">
<p>{$nic}</p>
<ul class="list-inline text-muted mb-0">
<li class="list-inline-item">조회수 {$hit}회 </li>
<li class="list-inline-item"><time class="" data-plugin="timeago" datetime="{$d_modify}"></time></li>
</ul>
</div>
</div>
</div>
<span class="badge badge-default badge-inverted">
<a href="#popup-post-postMore" data-toggle="popup" data-uid="{$uid}" class="icon material-icons text-muted">more_vert</a>
</span>
</li>

View File

@@ -0,0 +1,11 @@
<header class="bar bar-nav bar-light bg-white px-0">
<a class="icon pull-left material-icons px-3" role="button" data-history="back" data-role="hback">arrow_back</a>
<a class="icon material-icons pull-left px-3 d-none" role="button" data-href="/" data-text="홈으로 이동" data-role="gohome">house</a>
<a class="icon material-icons pull-right px-3 mirror" role="button" data-toggle="linkShare" data-subject data-title="링크공유">reply</a>
<span class="title title-left" data-history="back" data-role="title">포스트 보기</span>
</header>
<div class="bar bar-standard bar-header-secondary px-0 border-0" data-role="listCollapse" style="height:auto">
</div>
<main role="main" class="content post-section">
<div data-role="box"></div>
</main>

View File

@@ -0,0 +1,110 @@
<div class="content-padded p-2">
<h5 data-role="title" class="mt-1 mb-0">
{$subject}
</h5>
<div class="d-flex justify-content-between align-items-end mt-2 mb-3">
<ul class="list-inline f13 text-muted mt-1 mb-0">
<li class="list-inline-item">조회수 {$hit}회 </li>
<li class="list-inline-item">{$d_regis}</li>
</ul>
<div class="">
<button type="button" class="btn btn-secondary"
data-toggle="move" data-target="[data-role='comment-box']" data-role="btn_comment">
<i class="material-icons align-text-bottom f20 align-middle">comment</i>
<span class="">{$comment}{$oneline}</span>
</button>
</div>
</div><!-- /.d-flex -->
<div class="rb-article px-4 pb-4 d-none" data-role="review">
<blockquote>
{$review}
</blockquote>
</div>
<div class="rb-article mb-4 text-break">
{$content}
</div>
<div class="content-padded" data-role="attach-photo"></div>
<ul class="table-view" data-role="attach-file"></ul>
<div class="content-padded" data-role="attach-link"></div>
<div class="content-padded">
{$tag}
</div>
</div>
<div class="d-flex text-xs-center px-2">
<div class="flex-fill" data-role="opinion">
<button type="button" class="btn btn-link muted-link px-3"
data-toggle="view_opinion"
data-title="동영상이 마음에 드시나요?"
data-subtext="로그인하여 의견을 알려주세요."
data-send="_ajax"
data-uid="{$uid}"
data-opinion="like"
data-effect="heartbeat"
data-role="btn_post_like_{$uid}">
<i class="material-icons d-block mb-1">thumb_up</i>
<small class="text-muted" data-role='likes_{$uid}'>{$likes}</small>
</button>
</div>
<div class="flex-fill" data-role="opinion">
<button type="button" class="btn btn-link muted-link px-3"
data-toggle="view_opinion"
data-target="#popup-login-guide"
data-title="동영상이 마음에 안 드시나요?"
data-subtext="로그인하여 의견을 알려주세요."
data-send="_ajax"
data-uid="{$uid}"
data-opinion="dislike"
data-effect="heartbeat"
data-role="btn_post_dislike_{$uid}">
<i class="material-icons d-block mb-1">thumb_down</i>
<small class="text-muted" data-role='dislikes_{$uid}'>{$dislikes}</small>
</button>
</div>
<div class="flex-fill" data-role="linkShare">
<button type="button" class="btn btn-link muted-link px-3"
data-toggle="linkShareCopy"
data-subject="{$subject}"
data-featured="{$featured_16by9}"
data-desc="{$review}"
data-link="{$post_url}"
data-title="링크공유">
<i class="material-icons d-block mb-1 mirror" style="font-size: 1.875rem;margin-top:-0.375rem">reply</i>
<small>공유</small>
</button>
</div>
<div class="flex-fill" data-role="listadd">
<button type="button" class="btn btn-link muted-link px-3"
data-toggle="view_listadd"
data-title="나중에 다시 보고 싶으신가요?"
data-subtext="로그인하여 동영상을 재생목록에 추가하세요."
data-uid="{$uid}">
<i class="material-icons d-block mb-1" style="font-size: 1.625rem;">library_add</i>
<small>저장</small>
</button>
</div>
</div>
<div class="border-top">
<div class="d-flex justify-content-between align-items-center content-padded">
<div data-role="item" data-featured_img="{$avatar}" data-subject="{$subject}">
{$view_opinion}
</div>
</div><!-- /.d-flex -->
</div>
<aside class="mt-4">
<div data-role="comment_box"></div>
</aside>

View File

@@ -0,0 +1,11 @@
<header class="bar bar-nav bar-light bg-white px-0">
<a class="icon pull-left material-icons px-3" role="button" data-history="back" data-role="hback">arrow_back</a>
<a class="icon material-icons pull-left px-3 d-none" role="button" data-href="/" data-text="홈으로 이동" data-role="gohome">house</a>
<a class="icon material-icons pull-right px-3 mirror" role="button" data-toggle="linkShare" data-subject data-title="링크공유">reply</a>
<span class="title title-left" data-history="back">포스트 보기</span>
</header>
<div class="bar bar-standard bar-header-secondary px-0 border-0" data-role="listCollapse" style="height:auto">
</div>
<main role="main" class="content post-section">
<div data-role="box"></div>
</main>

View File

@@ -0,0 +1,140 @@
<div class="content-padded p-2">
<h3 data-role="title" class="rb-subject">
{$subject}
</h3>
<div class="d-flex justify-content-between align-items-end mt-2 mb-3">
<ul class="list-inline f13 text-muted mt-1 mb-0">
<li class="list-inline-item">{$nic}</li>
<li class="list-inline-item">조회수 {$hit}회 </li>
<li class="list-inline-item">{$d_regis}</li>
</ul>
<div class="">
<button type="button" class="btn btn-secondary"
data-toggle="move" data-target="[data-role='comment-box']" data-role="btn_comment">
<i class="material-icons align-text-bottom f20 align-middle">comment</i>
<span class="">{$comment}{$oneline}</span>
</button>
</div>
</div><!-- /.d-flex -->
</div>
<div class="rb-article px-4 pb-4 d-none" data-role="review">
<blockquote>
{$review}
</blockquote>
</div>
<div class="rb-article mb-4 text-break">
{$content}
</div>
<div class="content-padded" data-role="attach-photo"></div>
<ul class="table-view" data-role="attach-file"></ul>
<div class="content-padded" data-role="attach-link"></div>
<div class="content-padded">
{$tag}
</div>
<div class="d-flex text-xs-center mt-4 px-2">
<div class="flex-fill" data-role="opinion">
<button type="button" class="btn btn-link muted-link px-3"
data-toggle="view_opinion"
data-title="동영상이 마음에 드시나요?"
data-subtext="로그인하여 의견을 알려주세요."
data-send="_ajax"
data-uid="{$uid}"
data-opinion="like"
data-role="btn_post_like_{$uid}">
<i class="material-icons d-block mb-1">thumb_up</i>
<small class="text-muted" data-role='likes_{$uid}'>{$likes}</small>
</button>
</div>
<div class="flex-fill" data-role="opinion">
<button type="button" class="btn btn-link muted-link px-3"
data-toggle="view_opinion"
data-target="#popup-login-guide"
data-title="동영상이 마음에 안 드시나요?"
data-subtext="로그인하여 의견을 알려주세요."
data-send="_ajax"
data-uid="{$uid}"
data-opinion="dislike"
data-role="btn_post_dislike_{$uid}">
<i class="material-icons d-block mb-1">thumb_down</i>
<small class="text-muted" data-role='dislikes_{$uid}'>{$dislikes}</small>
</button>
</div>
<div class="flex-fill" data-role="linkShare">
<button type="button" class="btn btn-link muted-link px-3"
data-toggle="linkShareCopy"
data-subject="{$subject}"
data-featured="{$featured_16by9}"
data-desc="{$review}"
data-link="{$post_url}"
data-title="링크공유">
<i class="material-icons d-block mb-1 mirror" style="font-size: 1.875rem;margin-top:-0.375rem">reply</i>
<small>공유</small>
</button>
</div>
<div class="flex-fill" data-role="listadd">
<button type="button" class="btn btn-link muted-link px-3"
data-toggle="view_listadd"
data-title="나중에 다시 보고 싶으신가요?"
data-subtext="로그인하여 동영상을 재생목록에 추가하세요."
data-uid="{$uid}">
<i class="material-icons d-block mb-1" style="font-size: 1.625rem;">library_add</i>
<small>저장</small>
</button>
</div>
<div class="flex-fill">
<button type="button" class="btn btn-link muted-link px-3"
data-toggle="view_report"
data-title="동영상을 신고하시겠습니까?"
data-subtext="부적절한 콘텐츠를 신고하려면 로그인하세요."
data-uid="{$uid}">
<i class="material-icons d-block mb-1" style="font-size: 1.875rem;margin-top:-0.125rem">flag</i>
<small>신고</small>
</button>
</div>
</div>
<div class="border-top border-bottom">
<div class="d-flex justify-content-between align-items-center content-padded">
<a class="text-reset media"
data-toggle="sheet"
href="#sheet-member-profile"
dat-url="{$profile_url}"
data-mbruid="{$mbruid}"
data-avatar="{$avatar}"
data-nic="{$nic}">
<img src="{$avatar}" class="mr-2 rounded-circle" style="width:2.125rem;height:2.125rem" alt="{$M1_nic}의 프로필">
<div class="media-body">
<div class="f16" style="line-height: 1.2;">{$nic}</div>
<p class="mb-0 text-muted f12">
구독자
<span data-role="num_follower">{$num_follower}</span>
</p>
</div>
</a><!-- /.media -->
<div>
{$view_opinion}
{$view_follow}
</div>
</div><!-- /.d-flex -->
</div>
<ul class="table-view table-view-sm border-top-0 border-bottom-0 mt-2" data-role="newPost">
{$newPost}
</ul>
<aside class="mt-4">
<div data-role="comment_box"></div>
</aside>

View File

@@ -0,0 +1,7 @@
<button type="button" class="btn btn-link {$isFollowing} mr-2"
data-title="채널을 구독하시겠습니까?"
data-subtext="채널을 구독하려면 로그인하세요."
data-toggle="follow"
data-mbruid="{$mbruid}">
구독
</button>

View File

@@ -0,0 +1,19 @@
<button class="d-flex justify-content-between align-items-center bg-black w-100 collapsed shadow-sm text-xs-left"
data-role="list"
data-toggle="collapse" data-target="#listCollapse"
aria-expanded="false" aria-controls="listCollapse">
<h3 class="f16 text-white content-padded">
{$list_name}<br>
<small class="text-muted">동영상 {$list_num}개 <span class="ml-1">• {$list_mbrnic}</span></small>
</h3>
<div class="pr-3">
<i class="fa fa-caret-up fa-lg text-muted" aria-hidden="true"></i>
</div>
</button><!-- /.d-flex -->
<div class="collapse" id="listCollapse">
<div class="shadow" style="overflow:auto;background-color: #111">
<ul class="table-view table-view-sm border-0 table-view-inverse mt-2 mb-4">
{$listPost}
</ul>
</div>
</div><!-- /.collapse -->

View File

@@ -0,0 +1,22 @@
<li class="table-view-cell border-bottom-0 serial {$L_active}">
<a class="media d-flex" data-toggle="view"
data-uid="{$L_uid}"
data-list="{$list_id}"
data-featured="{$L_featured_16by9}"
data-provider="{$L_provider}"
data-videoId="{$L_videoId}"
data-format="{$L_format}"
data-collapse="ture"
data-url="/post/{$L_cid}">
<span class="pull-left media-middle pr-2 pl-1 f12 counter" style="width:1.25rem"></span>
<span class="pull-left position-relative mr-2">
<img class="media-object" src="{$L_featured_16by9_sm}" style="width:7.5rem">
<time class="badge badge-dark rounded-0 position-absolute" style="right:0.0625rem;bottom:0.0625rem">{$L_time}</time>
</span>
<div class="media-body">
<p class="font-weight-light line-clamp-2 f16" >
{$L_subject}
</p>
</div>
</a>
</li>

View File

@@ -0,0 +1,35 @@
<li class="table-view-cell table-view-cell-full border-bottom-0">
<a data-toggle="view"
data-uid="{$newpost_uid}"
data-featured="{$newpost_featured_16by9}"
data-provider="{$newpost_provider}"
data-videoId="{$newpost_videoId}"
data-format="{$newpost_format}"
data-title="{$subject}"
data-url="/post/{$newpost_cid}">
<div class="pull-left mr-2 {$newpost_has_featured}">
<div class="embed-responsive embed-responsive-16by9 bg-faded">
<img class="media-object border" src="{$newpost_featured_16by9_sm}" alt="" style="width: 10rem">
<time class="badge badge-default rounded-0 position-absolute" style="top:auto;left:auto;right:0.0625rem;bottom:0.0625rem">{$newpost_time}</time>
</div>
</div>
<div class="media-body">
<h5 class="h6 my-1 font-weight-light line-clamp-3">
{$newpost_subject}
</h5>
<div class="mb-1">
<ul class="list-inline d-inline-block f13 text-muted">
<li class="list-inline-item">조회수 {$newpost_hit}회 </li>
<li class="list-inline-item">
<time data-plugin="timeago" datetime="{$newpost_d_modify}"></time>
</li>
</ul>
</div>
</div>
</a>
<span class="badge badge-default badge-inverted">
<a href="#popup-post-postMore" data-toggle="popup" data-uid="{$newpost_uid}" class="icon material-icons text-muted f18">more_vert</a>
</span>
</li>

View File

@@ -0,0 +1,8 @@
<button type="button" class="btn btn-link"
data-target="#modal-post-opinion"
data-opinion="like"
data-toggle="modal"
data-featured_img="{$avatar}" data-subject="{$subject}"
data-uid="{$uid}">
좋아요 내역
</button>

View File

@@ -0,0 +1,37 @@
<header class="bar bar-standard px-0 bar-dark bg-black border-bottom-0 bar-media shadow-sm">
<div class="embed-responsive embed-responsive-16by9 bg-black mask" data-role="video">
<oembed id="player"></oembed>
</div>
<div class="progress rounded-0 position-absolute" style="height: .15rem;left:0;right:0;bottom:0;top:auto;display:none" data-role="progress_yt">
<div class="progress-bar bg-danger" role="progressbar" style="width: 0" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="modia-loader"></div>
<div class="miniplayer-control">
<div class="d-flex justify-content-between align-items-center">
<div class="py-1" data-uid='' data-toggle="modal" data-target="#modal-post-view" data-url="">
<div data-role="subject" class="f13 text-black line-clamp-1"></div>
<span data-role="nic" class="f12 line-clamp-1 text-muted"></span>
</div>
<div style="width: 7.5rem;text-align: right" class="text-nowrap">
<button type="button" class="btn btn-link px-2 active" data-toggle="play">
<i class="material-icons">
pause
</i>
</button>
<button type="button" class="btn btn-link js-close px-3">
<i class="material-icons">
clear
</i>
</button>
<button type="button" class="d-none" data-act="pauseVideo">
pause
</button>
</div>
</div><!-- /.flex -->
<!-- /.flex -->
</div><!-- /.miniplayer-control -->
<div data-role="listCollapse" class="bg-black text-white"></div>
</header>
<main class="content post-section">
<div data-role="box"></div>
</main>

View File

@@ -0,0 +1,123 @@
<div class="content-padded mb-0" data-role="tag">
{$tag}
</div>
<button class="d-flex justify-content-between px-0 collapsed text-reset w-100" data-toggle="collapse" data-target="#collapseContent">
<div class="content-padded my-1 text-xs-left">
<strong class="h5 mb-0 line-clamp-2" data-role="subject">
{$subject}
</strong>
<small class="d-block text-muted mt-1">
조회수 {$hit}회
</small>
</div>
<div class="pr-3">
<i class="fa fa-caret-up text-muted" aria-hidden="true"></i>
</div>
</button>
<div class="d-flex text-xs-center px-3">
<div class="flex-fill" data-role="opinion">
<button type="button" class="btn btn-link muted-link px-3"
data-toggle="view_opinion"
data-title="동영상이 마음에 드시나요?"
data-subtext="로그인하여 의견을 알려주세요."
data-send="_ajax"
data-uid="{$uid}"
data-opinion="like"
data-effect="heartbeat"
data-role="btn_post_like_{$uid}">
<i class="material-icons d-block mb-1">thumb_up</i>
<small class="text-muted" data-role='likes_{$uid}'>{$likes}</small>
</button>
</div>
<div class="flex-fill" data-role="opinion">
<button type="button" class="btn btn-link muted-link px-3"
data-toggle="view_opinion"
data-target="#popup-login-guide"
data-title="동영상이 마음에 안 드시나요?"
data-subtext="로그인하여 의견을 알려주세요."
data-send="_ajax"
data-uid="{$uid}"
data-opinion="dislike"
data-effect="heartbeat"
data-role="btn_post_dislike_{$uid}">
<i class="material-icons d-block mb-1">thumb_down</i>
<small class="text-muted" data-role='dislikes_{$uid}'>{$dislikes}</small>
</button>
</div>
<div class="flex-fill" data-role="linkShare">
<button type="button" class="btn btn-link muted-link px-3"
data-toggle="linkShareCopy"
data-subject="{$subject}"
data-featured="{$featured_16by9}"
data-desc="{$review}"
data-link="{$post_url}"
data-title="링크공유">
<i class="material-icons d-block mb-1 mirror" style="font-size: 1.875rem;margin-top:-0.375rem">reply</i>
<small>공유</small>
</button>
</div>
<div class="flex-fill" data-role="listadd">
<button type="button" class="btn btn-link muted-link px-3"
data-toggle="view_listadd"
data-title="나중에 다시 보고 싶으신가요?"
data-subtext="로그인하여 동영상을 재생목록에 추가하세요."
data-uid="{$uid}">
<i class="material-icons d-block mb-1" style="font-size: 1.625rem;">library_add</i>
<small>저장</small>
</button>
</div>
<div class="flex-fill">
<button type="button" class="btn btn-link muted-link px-3"
data-toggle="view_report"
data-title="동영상을 신고하시겠습니까?"
data-subtext="부적절한 콘텐츠를 신고하려면 로그인하세요."
data-uid="{$uid}">
<i class="material-icons d-block mb-1" style="font-size: 1.875rem;margin-top:-0.125rem">flag</i>
<small>신고</small>
</button>
</div>
</div>
<div class="border-top border-bottom">
<div class="d-flex justify-content-between align-items-center content-padded">
<div class="text-reset media"
data-toggle="profile"
data-target="#modal-member-profile"
dat-url="{$profile_url}"
data-mbruid="{$mbruid}"
data-nic="{$nic}" data-change="true">
<img src="{$avatar}" class="mr-2 rounded-circle" style="width:2.125rem;height:2.125rem" alt="{$M1_nic}의 프로필">
<div class="media-body">
<div class="f16" style="line-height: 1.2;">{$nic}</div>
<p class="mb-0 text-muted f12">
구독자
<span data-role="num_follower">{$num_follower}</span>
</p>
</div>
</div><!-- /.media -->
<div class="text-right">
{$view_opinion}
{$view_follow}
</div>
</div><!-- /.d-flex -->
</div>
<!-- 본문 -->
<article class="collapse border-bottom" id="collapseContent">
<div class="f15 text-muted content-padded text-break" data-plugin="shorten">
{$content}
</div>
</article>
<ul class="table-view table-view-sm border-top-0 border-bottom-0 mt-2" data-role="newPost">
{$newPost}
</ul>
<aside class="mt-4 border-top">
<div data-role="comment_box"></div>
</aside>

View File

@@ -0,0 +1,124 @@
function setPostTrendChart(ctx,uid,mod,unit,start) {
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postTrend',{
uid : uid,
mod : mod,
unit : unit,
d_start : start
},function(response,status){
if(status=='success'){
var result = $.parseJSON(response);
var type=result.type;
var data=result.data;
var options=result.options;
var postChart = new Chart(ctx, {
type: type,
data: data,
options: options
});
$('[data-role="canvas"]').removeClass('d-none');
$('[data-role="loader"]').addClass('d-none');
} else {
alert(status);
}
});
}
page_post_analytics_hit.on('show.rc.page', function(event) {
var modal = modal_post_analytics;
var uid = modal.attr('data-uid');
var page = $(this);
var ctx = page.find('canvas');
var mod = 'hit';
var start = modal.attr('data-start');
page.find('[data-role="canvas"]').addClass('d-none');
page.find('[data-role="loader"]').removeClass('d-none');
setTimeout(function(){
setPostTrendChart(ctx,uid,mod,'day',start);
}, 400);
})
page_post_analytics_referer.on('show.rc.page', function(event) {
var modal = modal_post_analytics;
var uid = modal.attr('data-uid');
var page = $(this);
var ctx = page.find('canvas');
var mod = 'referer';
var start = modal.attr('data-start');
page.find('[data-role="canvas"]').addClass('d-none');
page.find('[data-role="loader"]').removeClass('d-none');
setTimeout(function(){
setPostTrendChart(ctx,uid,mod,'day',start);
}, 400);
})
page_post_analytics_device.on('show.rc.page', function(event) {
var modal = modal_post_analytics;
var uid = modal.attr('data-uid');
var page = $(this);
var ctx = page.find('canvas');
var mod = 'device';
var start = modal.attr('data-start');
page.find('[data-role="canvas"]').addClass('d-none');
page.find('[data-role="loader"]').removeClass('d-none');
setTimeout(function(){
setPostTrendChart(ctx,uid,mod,'day',start);
}, 400);
})
page_post_analytics_side.on('show.rc.page', function(event) {
var modal = modal_post_analytics;
var uid = modal.attr('data-uid');
var page = $(this);
var ctx = page.find('canvas');
var mod = 'side';
var start = modal.attr('data-start');
page.find('[data-role="canvas"]').addClass('d-none');
page.find('[data-role="loader"]').removeClass('d-none');
setTimeout(function(){
setPostTrendChart(ctx,uid,mod,'day',start);
}, 400);
})
page_post_analytics_likes.on('show.rc.page', function(event) {
var modal = modal_post_analytics;
var uid = modal.attr('data-uid');
var page = $(this);
var ctx = page.find('canvas');
var mod = 'likes';
var start = modal.attr('data-start');
page.find('[data-role="canvas"]').addClass('d-none');
page.find('[data-role="loader"]').removeClass('d-none');
setTimeout(function(){
setPostTrendChart(ctx,uid,mod,'day',start);
}, 400);
})
page_post_analytics_dislikes.on('show.rc.page', function(event) {
var modal = modal_post_analytics;
var uid = modal.attr('data-uid');
var page = $(this);
var ctx = page.find('canvas');
var mod = 'dislikes';
var start = modal.attr('data-start');
page.find('[data-role="canvas"]').addClass('d-none');
page.find('[data-role="loader"]').removeClass('d-none');
setTimeout(function(){
setPostTrendChart(ctx,uid,mod,'day',start);
}, 400);
})
page_post_analytics_comment.on('show.rc.page', function(event) {
var modal = modal_post_analytics;
var uid = modal.attr('data-uid');
var page = $(this);
var ctx = page.find('canvas');
var mod = 'comment';
var start = modal.attr('data-start');
page.find('[data-role="canvas"]').addClass('d-none');
page.find('[data-role="loader"]').removeClass('d-none');
setTimeout(function(){
setPostTrendChart(ctx,uid,mod,'day',start);
}, 400);
})

View File

@@ -0,0 +1,76 @@
function getPostBest(settings) {
var start = settings.start;
var d_start = settings.d_start;
var wrapper = settings.wrapper;
var sort=settings.sort; // sort
var orderby=settings.orderby; // orderby
var recnum=settings.recnum; // recnum
var markup_file = settings.markup;
var none = settings.none;
var paging = settings.paging; //페이징 타입
var currentPage =1; // 처음엔 무조건 1, 아래 더보기 진행되면서 +1 증가
wrapper.loader({ position: 'inside' });
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postBest',{
start: start,
d_start : d_start,
sort : sort,
recnum : recnum,
p : currentPage,
markup_file : markup_file
},function(response,status){
if(status=='success'){
var result = $.parseJSON(response);
var list=result.list;
var num=result.num;
var totalPage=result.tpg
wrapper.loader('hide');
if (list) wrapper.html(list);
else wrapper.html(none);
wrapper.find('[data-plugin="timeago"]').timeago();
if (paging=='infinit') {
//무한 스크롤
wrapper.closest('.content').infinitescroll({
dataSource: function(helpers, callback){
var nextPage = parseInt(currentPage)+1;
if (totalPage>currentPage) {
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postBest',{
start: start,
d_start : d_start,
sort: sort,
recnum : recnum,
markup_file : markup_file,
p : nextPage
},function(response) {
var result = $.parseJSON(response);
var error = result.error;
var list=result.list;
if(error) alert(result.error);
callback({ content: list });
currentPage++; // 현재 페이지 +1
console.log(currentPage+'페이지 불러옴')
wrapper.find('[data-plugin="timeago"]').timeago();
//wrapper.find('[data-plugin="markjs"]').mark(keyword); // marks.js
});
} else {
callback({ end: true });
console.log('더이상 불러올 페이지가 없습니다.')
}
},
appendToEle : wrapper,
percentage : 95, // 95% 아래로 스크롤할때 다움페이지 호출
hybrid : true // true: 버튼형, false: 자동
});
}
} else {
alert(status);
}
});
}

View File

@@ -0,0 +1,79 @@
function getPostCategory(settings) {
var wrapper = settings.wrapper;
var category=settings.category; // category
var sort=settings.sort; // sort
var orderby=settings.orderby; // orderby
var recnum=settings.recnum; // recnum
var totalPage = settings.totalPage;
var totalNUM = settings.totalNUM;
var markup_file = settings.markup;
var start = settings.start;
var none = settings.none;
var currentPage =1; // 처음엔 무조건 1, 아래 더보기 진행되면서 +1 증가
var prevNUM = currentPage * recnum;
var moreNUM = totalNUM - prevNUM ;
wrapper.loader();
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postCategory',{
sort : sort,
cat : category,
recnum : recnum,
p : currentPage,
markup_file : markup_file,
orderby :orderby,
start : start
},function(response,status){
if(status=='success'){
var result = $.parseJSON(response);
var list=result.list;
var num=result.num;
wrapper.loader('hide');
if (num) wrapper.html(list)
else wrapper.html(none)
wrapper.find('[data-plugin="timeago"]').timeago();
//무한 스크롤
wrapper.closest('.content').infinitescroll({
dataSource: function(helpers, callback){
var nextPage = parseInt(currentPage)+1;
if (totalPage>currentPage) {
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postKeyword',{
sort: sort,
keyword : keyword,
recnum : recnum,
markup_file : markup_file,
p : nextPage,
start : start
},function(response) {
var result = $.parseJSON(response);
var error = result.error;
var list=result.list;
if(error) alert(result.error);
callback({ content: list });
currentPage++; // 현재 페이지 +1
console.log(currentPage+'페이지 불러옴')
wrapper.find('[data-plugin="timeago"]').timeago();
//wrapper.find('[data-plugin="markjs"]').mark(keyword); // marks.js
});
} else {
callback({ end: true });
console.log('더이상 불러올 페이지가 없습니다.')
}
},
appendToEle : wrapper,
percentage : 95, // 95% 아래로 스크롤할때 다움페이지 호출
hybrid : false // true: 버튼형, false: 자동
});
} else {
alert(status);
}
});
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,124 @@
function getPostFeed(settings) {
var start = settings.start;
var wrapper = settings.wrapper;
var sort=settings.sort; // sort
var orderby=settings.orderby; // orderby
var recnum=settings.recnum; // recnum
var totalPage = settings.totalPage;
var totalNUM = settings.totalNUM;
var markup_file = settings.markup;
var none = settings.none;
var paging = settings.paging; //페이징 타입
var currentPage =1; // 처음엔 무조건 1, 아래 더보기 진행되면서 +1 증가
var prevNUM = currentPage * recnum;
var moreNUM = totalNUM - prevNUM ;
wrapper.removeClass('animated fadeIn');
wrapper.loader({ position: 'inside' });
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postFeed',{
start: start,
sort : sort,
recnum : recnum,
p : currentPage,
markup_file : markup_file
},function(response,status){
if(status=='success'){
var result = $.parseJSON(response);
var list=result.list;
var num=result.num;
var totalPage=result.tpg;
wrapper.loader('hide');
if (list) wrapper.html(list).addClass('animated fadeIn');
else wrapper.html(none);
wrapper.find('[data-plugin="timeago"]').timeago();
if (paging=='infinit') {
//무한 스크롤
wrapper.closest('.content').infinitescroll({
dataSource: function(helpers, callback){
var nextPage = parseInt(currentPage)+1;
if (totalPage>currentPage) {
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postFeed',{
start: start,
sort: sort,
recnum : recnum,
markup_file : markup_file,
p : nextPage
},function(response) {
var result = $.parseJSON(response);
var error = result.error;
var list=result.list;
if(error) alert(result.error);
callback({ content: list });
currentPage++; // 현재 페이지 +1
console.log(currentPage+'페이지 불러옴')
wrapper.find('[data-plugin="timeago"]').timeago();
//wrapper.find('[data-plugin="markjs"]').mark(keyword); // marks.js
});
} else {
callback({ end: true });
console.log('더이상 불러올 페이지가 없습니다.')
}
},
appendToEle : wrapper,
percentage : 95, // 95% 아래로 스크롤할때 다움페이지 호출
hybrid : false // true: 버튼형, false: 자동
});
} else {
//수동 페이징
if (totalPage>currentPage) {
$(document).on('click','[data-toggle="morePage"]',function(){
var button = $(this);
var nextPage = parseInt(currentPage)+1;
console.log(nextPage+' 페이지 불러옴');
console.log('전체페이지'+totalPage)
return false
//
// $.post(rooturl+'/?r='+raccount+'&m=post&a=get_postAll',{
// start: start,
// sort: sort,
// recnum : recnum,
// markup_file : markup_file,
// p : nextPage
// },function(response) {
// var result = $.parseJSON(response);
// var error = result.error;
// var list=result.list;
// if(error) alert(result.error);
//
// currentPage++; // 현재 페이지 +1
// console.log(currentPage+'페이지 불러옴')
// wrapper.find('[data-plugin="timeago"]').timeago();
// wrapper.append(list);
//
// });
});
wrapper.append('<div class="content-padded"><button type="button" class="btn btn-link btn-block text-muted" data-toggle="morePage"><i class="material-icons">expand_more</i></button></div>');
} else {
wrapper.append('<div class="infinitescroll-end"></div>');
console.log('피드에서 더이상 불러올 페이지가 없습니다.')
}
}
} else {
alert(status);
}
});
}

View File

@@ -0,0 +1,78 @@
function getPostKeyword(settings) {
var wrapper = settings.wrapper;
var keyword=settings.keyword; // keyword
var sort=settings.sort; // sort
var orderby=settings.orderby; // orderby
var recnum=settings.recnum; // recnum
var totalPage = settings.totalPage;
var totalNUM = settings.totalNUM;
var markup_file = settings.markup;
var start = settings.start;
var none = settings.none;
var currentPage =1; // 처음엔 무조건 1, 아래 더보기 진행되면서 +1 증가
var prevNUM = currentPage * recnum;
var moreNUM = totalNUM - prevNUM ;
wrapper.loader();
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postKeyword',{
sort : sort,
keyword : keyword,
recnum : recnum,
p : currentPage,
markup_file : markup_file,
start : start
},function(response,status){
if(status=='success'){
var result = $.parseJSON(response);
var list=result.list;
var num=result.num;
wrapper.loader('hide');
if (num) wrapper.html(list)
else wrapper.html(none)
wrapper.find('[data-plugin="timeago"]').timeago();
//무한 스크롤
wrapper.closest('.content').infinitescroll({
dataSource: function(helpers, callback){
var nextPage = parseInt(currentPage)+1;
if (totalPage>currentPage) {
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postKeyword',{
sort: sort,
keyword : keyword,
recnum : recnum,
markup_file : markup_file,
p : nextPage,
start : start
},function(response) {
var result = $.parseJSON(response);
var error = result.error;
var list=result.list;
if(error) alert(result.error);
callback({ content: list });
currentPage++; // 현재 페이지 +1
console.log(currentPage+'페이지 불러옴')
wrapper.find('[data-plugin="timeago"]').timeago();
//wrapper.find('[data-plugin="markjs"]').mark(keyword); // marks.js
});
} else {
callback({ end: true });
console.log('더이상 불러올 페이지가 없습니다.')
}
},
appendToEle : wrapper,
percentage : 95, // 95% 아래로 스크롤할때 다움페이지 호출
hybrid : false // true: 버튼형, false: 자동
});
} else {
alert(status);
}
});
}

View File

@@ -0,0 +1,91 @@
function getPostLiked(settings) {
var start = settings.start;
var wrapper = settings.wrapper;
var sort=settings.sort; // sort
var orderby=settings.orderby; // orderby
var recnum=settings.recnum; // recnum
var markup_file = settings.markup;
var none = settings.none;
var currentPage =1; // 처음엔 무조건 1, 아래 더보기 진행되면서 +1 증가
wrapper.removeClass('animated fadeIn');
wrapper.loader();
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postLiked',{
start: start,
sort : sort,
recnum : recnum,
p : currentPage,
markup_file : markup_file
},function(response,status){
if(status=='success'){
var result = $.parseJSON(response);
var list=result.list;
var num=result.num;
var totalPage=result.tpg;
wrapper.loader('hide');
if (num) wrapper.html(list).addClass('animated fadeIn');
else wrapper.html(none);
wrapper.find('[data-plugin="timeago"]').timeago();
//무한 스크롤
wrapper.closest('.content').infinitescroll({
dataSource: function(helpers, callback){
var nextPage = parseInt(currentPage)+1;
if (totalPage>currentPage) {
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postLiked',{
start: start,
sort: sort,
recnum : recnum,
markup_file : markup_file,
p : nextPage
},function(response) {
var result = $.parseJSON(response);
var error = result.error;
var list=result.list;
if(error) alert(result.error);
callback({ content: list });
currentPage++; // 현재 페이지 +1
console.log(currentPage+'페이지 불러옴')
wrapper.find('[data-plugin="timeago"]').timeago();
//wrapper.find('[data-plugin="markjs"]').mark(keyword); // marks.js
});
} else {
callback({ end: true });
console.log('더이상 불러올 페이지가 없습니다.')
}
},
appendToEle : wrapper,
percentage : 95, // 95% 아래로 스크롤할때 다움페이지 호출
hybrid : false // true: 버튼형, false: 자동
});
// edgeEffect
var wrapper_startY = 0;
wrapper.closest('.content').on('touchstart',function(event){
wrapper_startY = event.originalEvent.changedTouches[0].pageY;
});
wrapper.closest('.content').on('touchmove',function(event){
var wrapper_moveY = event.originalEvent.changedTouches[0].pageY;
var wrapper_contentY = $(this).scrollTop();
if (wrapper_contentY === 0 && wrapper_moveY > wrapper_startY) {
if (wrapper_moveY-wrapper_startY>50) {
edgeEffect(wrapper.closest('.page'),'top','show'); // 스크롤 상단 끝
}
}
if( (wrapper_moveY < wrapper_startY) && ($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight)) {
if (wrapper_startY-wrapper_moveY>50) {
edgeEffect(wrapper.closest('.page'),'bottom','show');
}
}
});
} else {
alert(status);
}
});
}

View File

@@ -0,0 +1,78 @@
function getPostListAll(settings) {
var wrapper = settings.wrapper;
var start = settings.start;
var sort=settings.sort; // sort
var orderby=settings.orderby; // orderby
var recnum=settings.recnum; // recnum
var totalPage = settings.totalPage;
var totalNUM = settings.totalNUM;
var markup_file = settings.markup;
var none = settings.none;
var currentPage =1; // 처음엔 무조건 1, 아래 더보기 진행되면서 +1 증가
var prevNUM = currentPage * recnum;
var moreNUM = totalNUM - prevNUM ;
wrapper.loader();
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_listAll',{
sort : sort,
recnum : recnum,
p : currentPage,
markup_file : markup_file
},function(response,status){
if(status=='success'){
var result = $.parseJSON(response);
var list=result.list;
var num=result.num;
wrapper.loader('hide');
if (num) {
wrapper.html(list);
console.log(start)
wrapper.find('[data-toggle="page"]').attr('data-start',start);
} else {
wrapper.html(none)
}
wrapper.find('[data-plugin="timeago"]').timeago();
//무한 스크롤
wrapper.closest('.content').infinitescroll({
dataSource: function(helpers, callback){
var nextPage = parseInt(currentPage)+1;
if (totalPage>currentPage) {
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_listAll',{
sort: sort,
recnum : recnum,
markup_file : markup_file,
p : nextPage
},function(response) {
var result = $.parseJSON(response);
var error = result.error;
var list=result.list;
if(error) alert(result.error);
callback({ content: list });
currentPage++; // 현재 페이지 +1
console.log(currentPage+'페이지 불러옴')
wrapper.find('[data-role="item"]').attr('data-start',start);
wrapper.find('[data-plugin="timeago"]').timeago();
});
} else {
callback({ end: true });
console.log('더이상 불러올 페이지가 없습니다.')
}
},
appendToEle : wrapper,
percentage : 95, // 95% 아래로 스크롤할때 다움페이지 호출
hybrid : false // true: 버튼형, false: 자동
});
} else {
alert(status);
}
});
}

View File

@@ -0,0 +1,72 @@
function getPostListview(settings) {
var listid = settings.listid;
var wrapper = settings.wrapper;
var sort=settings.sort; // sort
var orderby=settings.orderby; // orderby
var recnum=settings.recnum; // recnum
var totalPage = settings.totalPage;
var totalNUM = settings.totalNUM;
var markup_file = settings.markup;
var none = settings.none;
var currentPage =1; // 처음엔 무조건 1, 아래 더보기 진행되면서 +1 증가
var prevNUM = currentPage * recnum;
var moreNUM = totalNUM - prevNUM ;
wrapper.loader();
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_listview',{
listid : listid,
sort : sort,
recnum : recnum,
p : currentPage,
markup_file : markup_file
},function(response,status){
if(status=='success'){
var result = $.parseJSON(response);
var box=result.box;
var num=result.num;
wrapper.loader('hide');
wrapper.html(box)
wrapper.find('[data-plugin="timeago"]').timeago();
//무한 스크롤
wrapper.closest('.content').infinitescroll({
dataSource: function(helpers, callback){
var nextPage = parseInt(currentPage)+1;
if (totalPage>currentPage) {
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_listview',{
listid : listid,
sort: sort,
recnum : recnum,
markup_file : markup_file,
p : nextPage
},function(response) {
var result = $.parseJSON(response);
var error = result.error;
var list=result.list;
if(error) alert(result.error);
callback({ content: list });
currentPage++; // 현재 페이지 +1
console.log(currentPage+'페이지 불러옴')
wrapper.find('[data-plugin="timeago"]').timeago();
});
} else {
callback({ end: true });
console.log('더이상 불러올 페이지가 없습니다.')
}
},
appendToEle : wrapper,
percentage : 95, // 95% 아래로 스크롤할때 다움페이지 호출
hybrid : false // true: 버튼형, false: 자동
});
} else {
alert(status);
}
});
}

View File

@@ -0,0 +1,169 @@
function getPostMore(uid) {
var wrapper = popup_post_postMore;
wrapper.find('[data-role="list"]').html('<div data-role="loader"><div class="d-flex justify-content-center align-items-center text-muted" style="height:30vh"><div class="spinner-border mr-2" role="status"></div></div></div>');
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postMenu',{
uid: uid
},function(response,status){
if(status=='success'){
var result = $.parseJSON(response);
var list=result.list;
var owner=result.owner;
var likes=result.likes;
var subject = result.subject.replace(/&quot;/g, '"');
var featured=result.featured;
var review=result.review;
var link=result.link;
var cid=result.cid;
wrapper.find('[data-role="list"]').html(list)
wrapper.find('[data-toggle="kakaoTalkSend"],[data-toggle="linkShare"]').attr('data-subject',subject).attr('data-review',review).attr('data-featured',featured).attr('data-link',link).attr('data-entry',cid);
if (owner) {
wrapper.find('[data-role="list"] [data-toggle="saved"]').closest('.table-view-cell').remove();
wrapper.find('[data-role="list"] [data-toggle="report"]').closest('.table-view-cell').remove();
}
if (!likes) {
wrapper.find('[data-role="list"] [data-toggle="opinionList"]').closest('.table-view-cell').remove();
}
} else {
alert(status);
}
});
}
popup_post_postMore.on('click','[data-toggle="listAdd"]',function(){
var button = $(this);
var uid = popup_post_postMore.attr('data-uid');
history.back();
setTimeout(function(){
if (memberid) {
sheet_post_listadd.attr('data-uid',uid).css('top','20vh');
sheet_post_listadd.sheet();
} else {
var title = button.attr('data-title')
var subtext = button.attr('data-subtext')
popup_login_guide.find('[data-role="title"]').text(title);
popup_login_guide.find('[data-role="subtext"]').text(subtext);
popup_login_guide.popup('show');
}
}, 200);
});
popup_post_postMore.on('click','[data-toggle="report"]',function(){
var button = $(this);
var uid = popup_post_postMore.attr('data-uid');
history.back();
setTimeout(function(){
if (memberid) {
popup_post_report.attr('data-uid',uid);
popup_post_report.popup();
} else {
var title = button.attr('data-title')
var subtext = button.attr('data-subtext')
popup_login_guide.find('[data-role="title"]').text(title);
popup_login_guide.find('[data-role="subtext"]').text(subtext);
popup_login_guide.popup('show');
}
}, 200);
});
popup_post_postMore.on('click','[data-toggle="saved"]',function(){
var button = $(this);
var uid = popup_post_postMore.attr('data-uid');
history.back();
setTimeout(function(){
if (memberid) {
setTimeout(function(){
$.post(rooturl+'/?r='+raccount+'&m=post&a=update_saved',{
uid : uid
},function(response,status){
if(status=='success'){
$.notify({message: '나중에 볼 동영상에 추가되었습니다.'},{type: 'default'});
} else {
alert(status);
}
});
}, 100);
} else {
var title = button.attr('data-title')
var subtext = button.attr('data-subtext')
popup_login_guide.find('[data-role="title"]').text(title);
popup_login_guide.find('[data-role="subtext"]').text(subtext);
popup_login_guide.popup('show');
}
}, 200);
});
popup_post_postMore.on('click','[data-toggle="postedit"]',function(){
var button = $(this);
var uid = button.attr('data-uid');
var title = button.attr('data-title');
var url = button.attr('data-url');
modal_post_write.attr('data-uid',uid);
history.back();
setTimeout(function(){
modal_post_write.modal({
title : title,
url : url
})
}, 200);
});
popup_post_postMore.on('click','[data-toggle="analytics"]',function(){
var button = $(this);
var uid = button.attr('data-uid');
modal_post_analytics.attr('data-uid',uid);
history.back();
setTimeout(function(){
modal_post_analytics.modal()
}, 200);
});
popup_post_postMore.on('click','[data-toggle="opinionList"]',function(){
var button = $(this);
var uid = popup_post_postMore.attr('data-uid');
modal_post_opinion.attr('data-uid',uid);
history.back();
setTimeout(function(){
modal_post_opinion.modal()
}, 200);
});
popup_post_postMore.on('click','[data-toggle="postdel"]',function(){
var button = $(this);
var uid = popup_post_postMore.attr('data-uid');
var title = button.attr('data-title');
var type = button.attr('data-type');
popup_post_delConfirm.attr('data-uid',uid);
history.back();
setTimeout(function(){
popup_post_delConfirm.popup({
title : title
})
}, 200);
});
// 카카오톡 링크 공유
popup_post_postMore.on('click','[data-toggle="kakaoTalkSend"]',function(){
var button = $(this);
var subject = button.attr('data-subject');
var review = button.attr('data-review');
var featured = button.attr('data-featured');
var link = button.attr('data-link');
history.back();
kakaoTalkSend({
subject : subject,
review : review,
featured : featured,
link : link
})
});

View File

@@ -0,0 +1,90 @@
function getMyHistory(settings) {
var start = settings.start;
var wrapper = settings.wrapper;
var sort=settings.sort; // sort
var orderby=settings.orderby; // orderby
var recnum=settings.recnum; // recnum
var markup_file = settings.markup;
var none = settings.none;
var currentPage =1; // 처음엔 무조건 1, 아래 더보기 진행되면서 +1 증가
wrapper.removeClass('animated fadeIn');
wrapper.loader({ position: 'inside' });
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_myHistory',{
start: start,
sort : sort,
recnum : recnum,
p : currentPage,
markup_file : markup_file
},function(response,status){
if(status=='success'){
var result = $.parseJSON(response);
var list=result.list;
var num=result.num;
var totalPage=result.tpg;
wrapper.loader('hide');
if (num) wrapper.html(list).addClass('animated fadeIn');
else wrapper.html(none);
wrapper.find('[data-plugin="timeago"]').timeago();
//무한 스크롤
wrapper.closest('.content').infinitescroll({
dataSource: function(helpers, callback){
var nextPage = parseInt(currentPage)+1;
if (totalPage>currentPage) {
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_myHistory',{
start: start,
sort: sort,
recnum : recnum,
markup_file : markup_file,
p : nextPage
},function(response) {
var result = $.parseJSON(response);
var error = result.error;
var list=result.list;
if(error) alert(result.error);
callback({ content: list });
currentPage++; // 현재 페이지 +1
console.log(currentPage+'페이지 불러옴')
wrapper.find('[data-plugin="timeago"]').timeago();
});
} else {
callback({ end: true });
console.log('더이상 불러올 페이지가 없습니다.')
}
},
appendToEle : wrapper,
percentage : 95, // 95% 아래로 스크롤할때 다움페이지 호출
hybrid : false // true: 버튼형, false: 자동
});
// edgeEffect
var wrapper_startY = 0;
wrapper.closest('.content').on('touchstart',function(event){
wrapper_startY = event.originalEvent.changedTouches[0].pageY;
});
wrapper.closest('.content').on('touchmove',function(event){
var wrapper_moveY = event.originalEvent.changedTouches[0].pageY;
var wrapper_contentY = $(this).scrollTop();
if (wrapper_contentY === 0 && wrapper_moveY > wrapper_startY) {
if (wrapper_moveY-wrapper_startY>50) {
edgeEffect(wrapper.closest('.page'),'top','show'); // 스크롤 상단 끝
}
}
if( (wrapper_moveY < wrapper_startY) && ($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight)) {
if (wrapper_startY-wrapper_moveY>50) {
edgeEffect(wrapper.closest('.page'),'bottom','show');
}
}
});
} else {
alert(status);
}
});
}

View File

@@ -0,0 +1,90 @@
function getMyList(settings) {
var start = settings.start;
var wrapper = settings.wrapper;
var sort=settings.sort; // sort
var orderby=settings.orderby; // orderby
var recnum=settings.recnum; // recnum
var markup_file = settings.markup;
var none = settings.none;
var currentPage =1; // 처음엔 무조건 1, 아래 더보기 진행되면서 +1 증가
wrapper.loader({ position: 'inside' });
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_myList',{
start: start,
sort : sort,
recnum : recnum,
p : currentPage,
markup_file : markup_file
},function(response,status){
if(status=='success'){
var result = $.parseJSON(response);
var list=result.list;
var num=result.num;
var totalPage=result.tpg;
if (num) wrapper.html(list)
else wrapper.html(none)
wrapper.find('[data-plugin="timeago"]').timeago();
//무한 스크롤
wrapper.closest('.content').infinitescroll({
dataSource: function(helpers, callback){
var nextPage = parseInt(currentPage)+1;
if (totalPage>currentPage) {
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_myList',{
start: start,
sort: sort,
recnum : recnum,
markup_file : markup_file,
p : nextPage
},function(response) {
var result = $.parseJSON(response);
var error = result.error;
var list=result.list;
if(error) alert(result.error);
callback({ content: list });
currentPage++; // 현재 페이지 +1
console.log(currentPage+'페이지 불러옴')
wrapper.find('[data-plugin="timeago"]').timeago();
//wrapper.find('[data-plugin="markjs"]').mark(keyword); // marks.js
});
} else {
callback({ end: true });
console.log('더이상 불러올 페이지가 없습니다.')
}
},
appendToEle : wrapper,
percentage : 95, // 95% 아래로 스크롤할때 다움페이지 호출
hybrid : false // true: 버튼형, false: 자동
});
// edgeEffect
var wrapper_startY = 0;
wrapper.closest('.content').on('touchstart',function(event){
wrapper_startY = event.originalEvent.changedTouches[0].pageY;
});
wrapper.closest('.content').on('touchmove',function(event){
var wrapper_moveY = event.originalEvent.changedTouches[0].pageY;
var wrapper_contentY = $(this).scrollTop();
if (wrapper_contentY === 0 && wrapper_moveY > wrapper_startY) {
if (wrapper_moveY-wrapper_startY>50) {
edgeEffect(wrapper.closest('.page'),'top','show'); // 스크롤 상단 끝
}
}
if( (wrapper_moveY < wrapper_startY) && ($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight)) {
if (wrapper_startY-wrapper_moveY>50) {
edgeEffect(wrapper.closest('.page'),'bottom','show');
}
}
});
} else {
alert(status);
}
});
}

View File

@@ -0,0 +1,91 @@
function getMyPost(settings) {
var start = settings.start;
var wrapper = settings.wrapper;
var sort=settings.sort; // sort
var orderby=settings.orderby; // orderby
var recnum=settings.recnum; // recnum
var markup_file = settings.markup;
var none = settings.none;
var currentPage =1; // 처음엔 무조건 1, 아래 더보기 진행되면서 +1 증가
wrapper.removeClass('animated fadeIn');
wrapper.loader();
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_myPost',{
start: start,
sort : sort,
recnum : recnum,
p : currentPage,
markup_file : markup_file
},function(response,status){
if(status=='success'){
var result = $.parseJSON(response);
var list=result.list;
var num=result.num;
var totalPage=result.tpg;
wrapper.loader('hide');
if (num) wrapper.html(list).addClass('animated fadeIn');
else wrapper.html(none);
wrapper.find('[data-plugin="timeago"]').timeago();
//무한 스크롤
wrapper.closest('.content').infinitescroll({
dataSource: function(helpers, callback){
var nextPage = parseInt(currentPage)+1;
if (totalPage>currentPage) {
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_myPost',{
start: start,
sort: sort,
recnum : recnum,
markup_file : markup_file,
p : nextPage
},function(response) {
var result = $.parseJSON(response);
var error = result.error;
var list=result.list;
if(error) alert(result.error);
callback({ content: list });
currentPage++; // 현재 페이지 +1
console.log(currentPage+'페이지 불러옴')
wrapper.find('[data-plugin="timeago"]').timeago();
//wrapper.find('[data-plugin="markjs"]').mark(keyword); // marks.js
});
} else {
callback({ end: true });
console.log('더이상 불러올 페이지가 없습니다.')
}
},
appendToEle : wrapper,
percentage : 95, // 95% 아래로 스크롤할때 다움페이지 호출
hybrid : false // true: 버튼형, false: 자동
});
// edgeEffect
var wrapper_startY = 0;
wrapper.closest('.content').on('touchstart',function(event){
wrapper_startY = event.originalEvent.changedTouches[0].pageY;
});
wrapper.closest('.content').on('touchmove',function(event){
var wrapper_moveY = event.originalEvent.changedTouches[0].pageY;
var wrapper_contentY = $(this).scrollTop();
if (wrapper_contentY === 0 && wrapper_moveY > wrapper_startY) {
if (wrapper_moveY-wrapper_startY>50) {
edgeEffect(wrapper.closest('.page'),'top','show'); // 스크롤 상단 끝
}
}
if( (wrapper_moveY < wrapper_startY) && ($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight)) {
if (wrapper_startY-wrapper_moveY>50) {
edgeEffect(wrapper.closest('.page'),'bottom','show');
}
}
});
} else {
alert(status);
}
});
}

View File

@@ -0,0 +1,77 @@
function getPostOpinion(settings) {
var start = settings.start;
var wrapper = settings.wrapper;
var uid=settings.uid;
var opinion=settings.opinion;
var sort=settings.sort; // sort
var orderby=settings.orderby; // orderby
var recnum=settings.recnum; // recnum
var totalPage = settings.totalPage;
var totalNUM = settings.totalNUM;
var markup_file = settings.markup;
var none = settings.none;
var currentPage =1; // 처음엔 무조건 1, 아래 더보기 진행되면서 +1 증가
var prevNUM = currentPage * recnum;
var moreNUM = totalNUM - prevNUM ;
wrapper.loader({ position: 'inside' });
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_opinionList',{
uid : uid,
opinion : opinion,
start: start,
sort : sort,
recnum : recnum,
p : currentPage,
markup_file : markup_file
},function(response,status){
if(status=='success'){
var result = $.parseJSON(response);
var list=result.list;
var num=result.num;
if (num) wrapper.html(list)
else wrapper.html(none)
wrapper.find('[data-plugin="timeago"]').timeago();
//무한 스크롤
wrapper.closest('.content').infinitescroll({
dataSource: function(helpers, callback){
var nextPage = parseInt(currentPage)+1;
if (totalPage>currentPage) {
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postSaved',{
start: start,
sort: sort,
recnum : recnum,
markup_file : markup_file,
p : nextPage
},function(response) {
var result = $.parseJSON(response);
var error = result.error;
var list=result.list;
if(error) alert(result.error);
callback({ content: list });
currentPage++; // 현재 페이지 +1
console.log(currentPage+'페이지 불러옴')
wrapper.find('[data-plugin="timeago"]').timeago();
//wrapper.find('[data-plugin="markjs"]').mark(keyword); // marks.js
});
} else {
callback({ end: true });
console.log('더이상 불러올 페이지가 없습니다.')
}
},
appendToEle : wrapper,
percentage : 95, // 95% 아래로 스크롤할때 다움페이지 호출
hybrid : false // true: 버튼형, false: 자동
});
} else {
alert(status);
}
});
}

View File

@@ -0,0 +1,115 @@
function getPostAll(settings) {
var start = settings.start;
var wrapper = settings.wrapper;
var page = wrapper.closest('.page');
var sort=settings.sort; // sort
var orderby=settings.orderby; // orderby
var recnum=settings.recnum; // recnum
var markup_file = settings.markup;
var none = settings.none;
var paging = settings.paging; //페이징 타입
var currentPage =1; // 처음엔 무조건 1, 아래 더보기 진행되면서 +1 증가
wrapper.removeClass('animated fadeIn');
wrapper.loader();
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postAll',{
start: start,
sort : sort,
recnum : recnum,
p : currentPage,
markup_file : markup_file
},function(response,status){
if(status=='success'){
var result = $.parseJSON(response);
var list=result.list;
var num=result.num;
var totalPage=result.tpg;
wrapper.loader('hide');
if (list) wrapper.html(list).addClass('animated fadeIn');
else wrapper.html(none)
wrapper.find('[data-plugin="timeago"]').timeago();
if (page.find('.snap-content').length) {
overScrollEffect(page.find('.snap-content'));
} else {
overScrollEffect(page);
}
if (paging=='infinit') {
pullToRefresh_post($(start));
//무한 스크롤
wrapper.closest('.content').infinitescroll({
dataSource: function(helpers, callback){
var nextPage = parseInt(currentPage)+1;
if (totalPage>currentPage) {
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postAll',{
start: start,
sort: sort,
recnum : recnum,
markup_file : markup_file,
p : nextPage
},function(response) {
var result = $.parseJSON(response);
var error = result.error;
var list=result.list;
if(error) alert(result.error);
callback({ content: list });
currentPage++; // 현재 페이지 +1
console.log(currentPage+'페이지 불러옴')
wrapper.find('[data-plugin="timeago"]').timeago();
//wrapper.find('[data-plugin="markjs"]').mark(keyword); // marks.js
});
} else {
callback({ end: true });
console.log('더이상 불러올 페이지가 없습니다.')
}
},
appendToEle : wrapper,
percentage : 85, // 95% 아래로 스크롤할때 다움페이지 호출
hybrid : false // true: 버튼형, false: 자동
});
} else {
//수동 페이징
if (totalPage>currentPage) {
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postAll',{
start: start,
sort: sort,
recnum : recnum,
markup_file : markup_file,
p : nextPage
},function(response) {
var result = $.parseJSON(response);
var error = result.error;
var list=result.list;
if(error) alert(result.error);
callback({ content: list });
currentPage++; // 현재 페이지 +1
console.log(currentPage+'페이지 불러옴')
wrapper.find('[data-plugin="timeago"]').timeago();
wrapper.append(list);
wrapper.append('<button type="button" class="btn btn-white btn-block">불러오기</button>');
});
} else {
console.log('더이상 불러올 페이지가 없습니다.')
}
}
} else {
alert(status);
}
});
}

View File

@@ -0,0 +1,91 @@
function getPostSaved(settings) {
var start = settings.start;
var wrapper = settings.wrapper;
var sort=settings.sort; // sort
var orderby=settings.orderby; // orderby
var recnum=settings.recnum; // recnum
var markup_file = settings.markup;
var none = settings.none;
var currentPage =1; // 처음엔 무조건 1, 아래 더보기 진행되면서 +1 증가
wrapper.removeClass('animated fadeIn');
wrapper.loader();
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postSaved',{
start: start,
sort : sort,
recnum : recnum,
p : currentPage,
markup_file : markup_file
},function(response,status){
if(status=='success'){
var result = $.parseJSON(response);
var list=result.list;
var num=result.num;
var totalPage=result.tpg;
wrapper.loader('hide');
if (num) wrapper.html(list).addClass('animated fadeIn');
else wrapper.html(none);
wrapper.find('[data-plugin="timeago"]').timeago();
//무한 스크롤
wrapper.closest('.content').infinitescroll({
dataSource: function(helpers, callback){
var nextPage = parseInt(currentPage)+1;
if (totalPage>currentPage) {
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postSaved',{
start: start,
sort: sort,
recnum : recnum,
markup_file : markup_file,
p : nextPage
},function(response) {
var result = $.parseJSON(response);
var error = result.error;
var list=result.list;
if(error) alert(result.error);
callback({ content: list });
currentPage++; // 현재 페이지 +1
console.log(currentPage+'페이지 불러옴')
wrapper.find('[data-plugin="timeago"]').timeago();
//wrapper.find('[data-plugin="markjs"]').mark(keyword); // marks.js
});
} else {
callback({ end: true });
console.log('더이상 불러올 페이지가 없습니다.')
}
},
appendToEle : wrapper,
percentage : 95, // 95% 아래로 스크롤할때 다움페이지 호출
hybrid : false // true: 버튼형, false: 자동
});
// edgeEffect
var wrapper_startY = 0;
wrapper.closest('.content').on('touchstart',function(event){
wrapper_startY = event.originalEvent.changedTouches[0].pageY;
});
wrapper.closest('.content').on('touchmove',function(event){
var wrapper_moveY = event.originalEvent.changedTouches[0].pageY;
var wrapper_contentY = $(this).scrollTop();
if (wrapper_contentY === 0 && wrapper_moveY > wrapper_startY) {
if (wrapper_moveY-wrapper_startY>50) {
edgeEffect(wrapper.closest('.page'),'top','show'); // 스크롤 상단 끝
}
}
if( (wrapper_moveY < wrapper_startY) && ($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight)) {
if (wrapper_startY-wrapper_moveY>50) {
edgeEffect(wrapper.closest('.page'),'bottom','show');
}
}
});
} else {
alert(status);
}
});
}

View File

@@ -0,0 +1,584 @@
function getPostView(settings) {
var mod = settings.mod;
var wrapper = settings.wrapper;
var start = settings.start;
var format=settings.format;
var uid=settings.uid;
var list=settings.list;
var featured=settings.featured;
var provider = settings.provider;
var videoId = settings.videoId;
var url = settings.url;
var landing = settings.landing;
var ctheme=settings.ctheme?settings.ctheme:'_mobile/rc-default'; // 댓글테마
var template = '/modules/post/themes/'+post_skin_mobile+'/_html/view_'+format+'.html';
var list_collapse = settings.list_collapse;
if (!uid || !post_skin_mobile || !format) {
console.log('템플릿이 없어요')
setTimeout(function(){
history.back();
setTimeout(function(){ $.notify({message: ' 존재하지 않는 포스트 입니다.'},{type: 'default'}); }, 400);
return false
}, 300);
}
page_post_photo.find('.swiper-wrapper').html('') // 사진크게보기 영역 초기화
wrapper.load(template, function() {
var header_height = wrapper.find('.bar-nav').outerHeight();
var embed_height = wrapper.find('.embed-responsive').outerHeight();
var height = header_height + embed_height;
var window_height = $(window).height();
var content_height = window_height - height;
if (landing) {
wrapper.find('[data-role="hback"]').addClass('d-none');
wrapper.find('[data-role="gohome"]').removeClass('d-none');
}
if (mod=='page') {
wrapper.find('[data-role="buy"]').attr('data-toggle','page');
wrapper.find('[data-role="buy"]').attr('data-act','pauseVideo')
} else {
wrapper.find('[data-role="buy"]').attr('data-toggle','goods');
wrapper.find('[data-role="buy"]').removeAttr('data-act','pauseVideo')
}
wrapper.find('[data-toggle="linkShare"]').attr('data-link',url);
wrapper.find('.embed-responsive').css('background-image','url('+featured+')')
wrapper.find('.content').css('padding-top',height+'px')
wrapper.find('[data-role="goodsLink"]').addClass('d-none');
wrapper.find('[data-uid]').attr('data-uid',uid);
wrapper.find('[data-role="progress_yt"] .progress-bar').css('width',0);
if (format=='video') {
wrapper.find('.bar-standard').css('height',embed_height+'px')
wrapper.find('.bar-standard .embed-responsive').css('height',embed_height+'px')
if (provider=='YouTube') {
var player;
player = new YT.Player('player', {
height: '360',
width: '640',
videoId: videoId,
events: {
'onReady': onPlayerReady,
'onStateChange': onPlayerStateChange
}
});
function onPlayerReady(event) {
event.target.playVideo();
}
function onPlayerStateChange(event) {
var miniplayer = wrapper.find('.miniplayer-control');
var playerTimeDifference =0;
if (event.data == YT.PlayerState.PLAYING) {
console.log('재생중')
miniplayer.find('[data-toggle="play"]').addClass('active');
miniplayer.find('[data-toggle="play"] .material-icons').text('pause');
//재생 진행바
setTimeout(function(){
wrapper.find('[data-role="progress_yt"]').show();
}, 2000);
var playerTotalTime = player.getDuration();
timer_yt = setInterval(function() {
var playerCurrentTime = player.getCurrentTime();
var playerTimeDifference = (playerCurrentTime / playerTotalTime) * 100;
// console.log(playerTimeDifference)
wrapper.find('[data-role="progress_yt"] .progress-bar').css('width',playerTimeDifference+'%')
}, 1000);
} else {
wrapper.find('[data-role="progress_yt"]').hide();
}
if (event.data == YT.PlayerState.PAUSED) {
console.log('일시중지')
clearTimeout(timer_yt);
miniplayer.find('[data-toggle="play"]').removeClass('active');
miniplayer.find('[data-toggle="play"] .material-icons').text('play_arrow');
}
if (event.data == YT.PlayerState.ENDED) {
console.log('재생끝')
clearTimeout(timer_yt);
miniplayer.find('[data-toggle="play"]').removeClass('active');
miniplayer.find('[data-toggle="play"] .material-icons').text('replay');
}
}
wrapper.on('click','[data-toggle="play"]',function(){
if ($(this).hasClass('active')) {
player.pauseVideo();
$(this).find('.material-icons').text('play_arrow');
} else {
player.playVideo();
$(this).find('.material-icons').text('pause');
}
$(this).button('toggle')
})
wrapper.on('click','[data-act="pauseVideo"]',function(){
player.pauseVideo();
})
}
}
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postView',{
uid : uid,
list : list,
markup_file : 'view_'+format+'_content'
},function(response,status){
if(status=='success'){
var result = $.parseJSON(response);
var subject = result.subject.replace(/&quot;/g, '"');
var nic=result.nic;
var isperm=result.isperm;
var article=result.article;
var review=result.review;
var linkurl=result.linkurl;
var listCollapse=result.listCollapse;
var is_post_liked=result.is_post_liked;
var is_post_disliked=result.is_post_disliked;
var dis_like = result.dis_like;
var dis_rating = result.dis_rating;
var dis_comment = result.dis_comment;
var dis_listadd = result.dis_listadd;
var goods = result.goods;
var featured = result.featured_640;
var attachNum=result.attachNum;
var attachFileTheme = result.theme_attachFile;
var link=result.link;
var theme=result.theme;
var theme_css = '/modules/post/themes/'+theme+'/_main.css';
if (!$('link[href="'+theme_css+'"]').length)
$('<link/>', {
rel: 'stylesheet',
type: 'text/css',
href: theme_css
}).appendTo('head');
wrapper.find('[data-toggle="linkShare"]').attr('data-subject',subject).attr('data-link',url).attr('data-featured',featured);
wrapper.find('oembed').attr('url',linkurl);
wrapper.find('[data-role="subject"]').text(subject);
wrapper.find('[data-role="nic"]').text(nic);
wrapper.find('.miniplayer-control [data-toggle="play"]').removeClass('d-none');
wrapper.find('[data-role="review"]').removeClass('d-none');
if (provider!='YouTube') {
Iframely('oembed[url]') // oembed 미디어 변환
setTimeout(function(){
wrapper.find('.bar-media [data-role="featured"]').addClass('d-none')
wrapper.find('.embed-responsive').removeClass('d-none');
wrapper.find('.miniplayer-control [data-toggle="play"]').addClass('d-none');
}, 500);
}
wrapper.find('[data-role="box"]').html(article);
if (goods) {
wrapper.find('[data-role="goodsLink"]').removeClass('d-none');
setImageGoodsTag('figure.image') // 이미지상품태그 처리
}
if (format!='video') Iframely('oembed[url]') // oembed 미디어 변환
// 첨부파일이 있을 경우
if (attachNum) {
$.post(rooturl+'/?r='+raccount+'&m=mediaset&a=getAttachFileList',{
p_module : 'post',
uid : uid,
theme_file : attachFileTheme,
mod : 'view'
},function(response){
var result = $.parseJSON(response);
var photo=result.photo;
var photo_full=result.photo_full;
var video=result.video;
var audio=result.audio;
var file=result.file;
var zip=result.zip;
var doc=result.doc;
if (photo) { // 첨부 이미지가 있을 경우
wrapper.find('[data-role="attach-photo"]').removeClass('hidden').html(photo)
i=0;
wrapper.find('[data-role="attach-photo"] [data-toggle="page"]').each(function(i) {
$(this).attr('data-index',i);i=++i;
});
page_post_photo.find('.swiper-wrapper').html(photo_full)
}
if (video) { // 첨부 비디오가 있을 경우
wrapper.find('[data-role="attach-video"]').removeClass('hidden').html(video)
}
if (audio) { // 첨부 오디오가 있을 경우
wrapper.find('[data-role="attach-audio"]').removeClass('hidden').html(audio)
}
if (doc) { // 첨부 문서 있을 경우
wrapper.find('[data-role="attach-file"]').removeClass('hidden').html(doc)
}
if (zip) { // 첨부 압축파일이 있을 경우
page.find('[data-role="attach-file"]').removeClass('hidden').html(zip)
}
if (file) { // 첨부 기타파일이 있을 경우
wrapper.find('[data-role="attach-file"]').removeClass('hidden').html(file)
}
});
}
if (link) { // 첨부 링크가 있을 경우
wrapper.find('[data-role="attach-link"]').removeClass('hidden').html(link);
Iframely('oembed[url]') // oembed 미디어 변환
}
if (listCollapse) {
wrapper.find('[data-role="listCollapse"]').html(listCollapse);
if (format=='doc') {
if (!list) wrapper.find('.bar-header-secondary').addClass('d-none');
else wrapper.find('.bar-header-secondary').removeClass('d-none');
}
if (format=='video' && list_collapse ) setTimeout(function(){wrapper.find('#listCollapse').collapse('show');}, 3000);
var _window_height = $(window).height();
var list_height = wrapper.find('[data-role="listCollapse"]').outerHeight();
var _height = height + list_height - 1;
var content_height = _window_height - _height;
wrapper.find('.content').css('padding-top',_height+'px')
wrapper.find('#listCollapse > div').css('height',content_height+'px');
}
wrapper.find('[data-plugin="shorten"]').shorten({
moreText: '더보기',
lessText: ''
});
if (is_post_liked) wrapper.find('[data-role="btn_post_like_'+uid+'"]').addClass('active');
if (is_post_disliked) wrapper.find('[data-role="btn_post_dislike_'+uid+'"]').addClass('active');
wrapper.find('#collapseContent').on('show.rc.collapse', function () {
wrapper.find('[data-toggle="collapse"] [data-role="subject"]').removeClass('line-clamp-2')
})
wrapper.find('#collapseContent').on('hide.rc.collapse', function () {
wrapper.find('[data-toggle="collapse"] [data-role="subject"]').addClass('line-clamp-2')
})
if (dis_like) wrapper.find('[data-role="opinion"]').hide();
if (dis_listadd) wrapper.find('[data-role="listadd"]').hide();
if (review) wrapper.find('[data-role="review"]').removeClass('d-none');
else wrapper.find('[data-role="review"]').addClass('d-none');
if (!dis_comment) {
// 댓글 출력 함수 정의
var get_Rb_Comment = function(p_module,p_table,p_uid,theme){
wrapper.find('[data-role="comment_box"]').Rb_comment({
moduleName : 'comment', // 댓글 모듈명 지정 (수정금지)
parent : p_module+'-'+p_uid, // rb_s_comment parent 필드에 저장되는 형태가 p_modulep_uid 형태임 참조.(- 는 저장시 제거됨)
parent_table : p_table, // 부모 uid 가 저장된 테이블 (게시판인 경우 rb_bbs_data : 댓글, 한줄의견 추가/삭제시 전체 합계 업데이트용)
theme_name : theme, // 댓글 테마
containerClass :'', // 본 엘리먼트(#commentting-container)에 추가되는 class
recnum: 5, // 출력갯수
commentPlaceHolder : '공개 댓글 추가...',
noMoreCommentMsg : '댓글 없음 ',
commentLength : 200, // 댓글 입력 글자 수 제한
toolbar : ['imageUpload'] // 툴바 항목
});
}
// 댓글 출력 함수 실행
var p_module = 'post';
var p_table = 'rb_post_data';
var comment_theme_css = '/modules/comment/themes/'+ctheme+'/css/style.css';
if (!$('link[href="'+comment_theme_css+'"]').length)
$('<link/>', {
rel: 'stylesheet',
type: 'text/css',
href: comment_theme_css
}).appendTo('head');
get_Rb_Comment(p_module,p_table,uid,ctheme);
// 보기 에서 댓글이 등록된 이후에 ..
wrapper.find('[data-role="comment_box"]').on('saved.rb.comment',function(){
window.history.back(); //댓글작성 sheet 내림
var list_item = $(document).find('[data-role="item"] [data-uid="'+uid+'"]')
//var showComment_Ele_1 = page_allcomment.find('[data-role="total_comment"]'); // 댓글 숫자 출력 element
var showComment_Ele_2 = wrapper.find('[data-role="total_comment"]'); // 댓글 숫자 출력 element
var showComment_ListEle = list_item.find('[data-role="comment_'+uid+'"]'); // 댓글 숫자 출력 element
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postData',{
uid : uid
},function(response){
var result = $.parseJSON(response);
var total_comment=result.comment;
//$.notify({message: '댓글이 등록 되었습니다.'},{type: 'default'});
//showComment_Ele_1.text(total_comment); // 모달 상단 최종 댓글수량 합계 업데이트
showComment_Ele_2.text(total_comment); // 모달 상단 최종 댓글수량 합계 업데이트
showComment_ListEle.text(total_comment); // 포스트 목록 해당 항목의 최종 댓글수량 합계 업데이트
});
});
// 포스트 보기 모달에서 한줄의견이 등록된 이후에..
wrapper.find('[data-role="comment_box"]').on('saved.rb.oneline',function(){
window.history.back(); //댓글작성 sheet 내림
var uid = wrapper.find('[name="uid"]').val()
var list_item = $('[data-role="list"]').find('#item-'+uid)
//var showComment_Ele_1 = page_allcomment.find('[data-role="total_comment"]'); // 댓글 숫자 출력 element
var showComment_Ele_2 = wrapper.find('[data-role="total_comment"]'); // 댓글 숫자 출력 element
var showComment_ListEle = list_item.find('[data-role="total_comment"]'); // 댓글 숫자 출력 element
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postData',{
uid : uid
},function(response){
var result = $.parseJSON(response);
var total_comment=result.total_comment;
$.notify({message: '답글이 등록 되었습니다.'},{type: 'default'});
//showComment_Ele_1.text(total_comment); // 최종 댓글수량 합계 업데이트
showComment_Ele_2.text(total_comment); // 최종 댓글수량 합계 업데이트
showComment_ListEle.text(total_comment); // 포스트 목록 해당 항목의 최종 댓글수량 합계 업데이트
});
});
// 댓글이 수정된 후에..
wrapper.find('[data-role="comment_box"]').on('edited.rb.comment',function(){
setTimeout(function(){
history.back()
$.notify({message: '댓글이 수정 되었습니다.'},{type: 'default'});
}, 300);
})
// 한줄의견이 수정 후에
wrapper.find('[data-role="comment_box"]').on('edited.rb.oneline',function(){
setTimeout(function(){
history.back()
$.notify({message: '답글이 수정 되었습니다.'},{type: 'default'});
}, 300);
})
} else {
wrapper.find('[data-role="btn_comment"]').hide(); //댓글 바로가기 버튼 숨김
wrapper.find('[data-role="comment_box"]').html('<div class="text-muted pb-3 text-xs-center">댓글이 사용 중지되었습니다.</div>')
}
} else {
setTimeout(function(){
history.back();
setTimeout(function(){ $.notify({message: error+' 존재하지 않는 포스트 입니다.'},{type: 'default'}); }, 400);
return false
}, 300);
}
if (!isperm) wrapper.find('.bar-standard .embed-responsive').empty().removeAttr('style')
// edgeEffect
var wrapper_startY = 0;
wrapper.find('.content').on('touchstart',function(event){
wrapper_startY = event.originalEvent.changedTouches[0].pageY;
});
wrapper.find('.content').on('touchmove',function(event){
var wrapper_moveY = event.originalEvent.changedTouches[0].pageY;
var wrapper_contentY = $(this).scrollTop();
if (wrapper_contentY === 0 && wrapper_moveY > wrapper_startY) {
edgeEffect(wrapper,'top','show');
}
if( (wrapper_moveY < wrapper_startY) && ($(this).scrollTop() + $(this).innerHeight() >= $(this)[0].scrollHeight)) {
edgeEffect(wrapper,'bottom','show');
}
});
});
});
wrapper.off('click').on('click','[data-toggle="view"]',function(){
var button = $(this);
var _uid = button.attr('data-uid');
var _featured = button.attr('data-featured');
var _provider = button.attr('data-provider');
var _videoId = button.attr('data-videoId');
var _list = button.attr('data-list');
var _format = button.attr('data-format');
var list_collapse = button.attr('data-collapse');
var template = template?template:'/modules/post/themes/'+post_skin_mobile+'/_html/view_'+_format+'.html';
//wrapper.empty(); //초기화
wrapper.load('/modules/post/themes/'+post_skin_mobile+'/_html/view_'+_format+'.html', function() {
wrapper.attr('data-format',_format).attr('data-uid',_uid);
getPostView({
uid : _uid,
format : _format,
list : _list,
featured : _featured,
provider : _provider,
videoId : _videoId,
wrapper : wrapper,
list_collapse : list_collapse
});
});
});
page_post_photo.on('show.rc.page', function (e) {
var ele = $(e.relatedTarget)
var index = ele.attr('data-index');
var uid = ele.attr('data-uid');
var page = $(this);
var title = page_post_view.find('[data-role="title"]').text();
var subject = page_post_view.find('[data-role="subject"]').text();
page.find('[data-role="title"]').text(title);
page.find('[data-role="subject"]').text(subject);
page.find('[data-act="down"]').attr('data-uid',uid);
var bbs_photo_swiper = new Swiper('#page-post-photo .swiper-container', {
zoom: true,
initialSlide: index,
spaceBetween: 30,
pagination: {
el: '#page-post-photo .swiper-pagination',
type: 'fraction',
},
navigation: {
nextEl: '#page-post-photo .swiper-button-next',
prevEl: '#page-post-photo .swiper-button-prev',
},
on: {
init: function () {
page_post_photo.find('.swiper-container').css('height','100vh');
},
},
});
bbs_photo_swiper.on('slideChangeTransitionEnd', function () {
var uid = page_post_photo.find('.swiper-slide-active').attr('data-uid');
page_post_photo.find('[data-act="down"]').attr('data-uid',uid)
});
})
page_post_photo.on('hidden.rc.page', function () {
// swiper destroy
var bbs_photo_swiper = document.querySelector('#page-post-photo .swiper-container').swiper
bbs_photo_swiper.destroy(false, true);
// 줌상태 초기화
setTimeout(function(){
page_post_photo.find('.swiper-zoom-container').removeAttr('style');
page_post_photo.find('.swiper-zoom-container img').removeAttr('style');
}, 500);
})
} // getPostView
$(document).on('click','[data-toggle="view_listadd"]',function(){
var button = $(this);
var popup = $('#popup-login-guide');
var sheet = $('#sheet-post-listadd');
var uid = button.attr('data-uid');
var height = button.closest('.content').css('padding-top');
if (memberid) {
sheet.attr('data-uid',uid).css('top',height);
sheet.sheet();
} else {
var title = button.attr('data-title')
var subtext = button.attr('data-subtext')
popup.find('[data-role="title"]').text(title);
popup.find('[data-role="subtext"]').text(subtext);
popup.popup('show');
}
});
$(document).on('click','[data-toggle="view_tag"]',function(){
var button = $(this);
var keyword = button.attr('data-tag');
var page = $('#page-post-keyword');
page.attr('data-keyword',keyword);
page.find('[data-role="title"]').text(keyword);
window.history.back();
setTimeout(function(){ page.page({
start: '#page-main',
title : keyword
}); }, 300);
});
$(document).on('click','[data-toggle="view_opinion"]',function(){
var button = $(this);
var popup = $('#popup-login-guide');
var uid = button.attr('data-uid');
var opinion = button.attr('data-opinion');
var url = rooturl+'/?r='+raccount+'&m=post&a=opinion&opinion='+opinion+'&uid='+uid;
if (memberid) {
button.button('toggle');
getIframeForAction('');
frames.__iframe_for_action__.location.href = url;
} else {
var title = button.attr('data-title')
var subtext = button.attr('data-subtext')
popup.find('[data-role="title"]').text(title);
popup.find('[data-role="subtext"]').text(subtext);
popup.popup('show');
}
});
$(document).on('click','[data-toggle="view_report"]',function(){
var button = $(this);
var uid = button.attr('data-uid');
if (memberid) {
popup_post_report.attr('data-uid',uid);
popup_post_report.popup();
} else {
var title = button.attr('data-title')
var subtext = button.attr('data-subtext')
popup_login_guide.find('[data-role="title"]').text(title);
popup_login_guide.find('[data-role="subtext"]').text(subtext);
popup_login_guide.popup('show');
}
});
$(document).on('tap','[data-toggle="tag"]',function(){
var keyword= $(this).attr('data-tag');
page_post_keyword.attr('data-keyword',keyword)
history.back();
setTimeout(function(){
page_post_keyword.page({ start: '#page-main' });
}, 300);
})

View File

@@ -0,0 +1,893 @@
function setPostWrite(settings) {
var wrapper = settings.wrapper;
var uid=settings.uid;
if (!uid) var uid=wrapper.attr('data-uid');
// 상태 초기화
wrapper.find('[name="uid"]').val('');
wrapper.find('[data-role="display_label"]').text(uid?'':'전체공개');
popover_post_display.find('[data-toggle="display"] .badge').empty();
popover_post_display.find('[data-toggle="display"][data-display="5"] .badge').html('<span class="icon icon-check"></span>');
wrapper.find('[name="display"]').val(5);
wrapper.find('[name="category_members"]').val('');
wrapper.find('[name="list_members"]').val('');
wrapper.find('[name="upload"]').val('');
wrapper.find('[name="member"]').val('');
wrapper.find('[name="featured_img"]').val('');
wrapper.find('[name="review"]').val('');
wrapper.find('[name="format"]').val(1);
wrapper.find('[name="dis_rating"]').val(0);
wrapper.find('[name="dis_like"]').val(0);
wrapper.find('[name="dis_comment"]').val(0);
wrapper.find('[name="dis_listadd"]').val(0);
wrapper.find('[name="goods"]').val('');
wrapper.find('[data-role="linkNum"]').text('');
//wrapper.find('[data-role="attach-preview-photo"]').html('');
wrapper.find('[data-role="attach-preview-link"]').html('');
wrapper.find('[data-role="linkadd_input"]').val('');
wrapper.find('[data-toggle="switch"][data-role="dis_like"]').addClass('active');
wrapper.find('[data-toggle="switch"][data-role="dis_comment"]').addClass('active');
wrapper.find('[data-toggle="switch"][data-role="dis_listadd"]').addClass('active');
wrapper.find('.switch-handle').removeAttr("style");
wrapper.find('[data-toggle="collapse"]').addClass('collapsed');
wrapper.find('.collapse').removeClass('in');
wrapper.find('[data-role="goodsNum"]').text('');
wrapper.find('[name="uid"]').val(uid);
autosize.destroy(wrapper.find('[data-plugin="autosize"]'));
setTimeout(function(){
// 미디어셋 초기화
wrapper.find('[data-role="attach-files"]').RbUploadFile(post_upload_settings); // 아작스 폼+input=file 엘리먼트 세팅
wrapper.find('[data-role="attach-files"]').RbAttachTheme(post_attach_settings);
wrapper.find('[data-sortable="mediaset"]').sortable({
axis: 'y',
cancel: 'button',
delay: 250,
update: function( event, ui ) {
var attachfiles=wrapper.find('input[name="attachfiles[]"]').map(function(){return $(this).val()}).get();
var new_upfiles='';
if(attachfiles){
for(var i=0;i<attachfiles.length;i++) {
new_upfiles+=attachfiles[i];
}
}
$.post(rooturl+'/?r='+raccount+'&m=mediaset&a=modifygid',{
attachfiles : new_upfiles
})
}
});
// 에디터 초기화
DecoupledEditor
.create( document.querySelector( '[data-role="write"] [data-role="editor-body"]' ),{
placeholder: '본문 입력...',
toolbar: [ 'alignment:left','alignment:center','bulletedList','blockQuote','imageUpload','insertTable','undo'],
removePlugins: [ 'ImageToolbar', 'ImageCaption', 'ImageStyle',,'WordCount' ],
image: {},
language: 'ko',
extraPlugins: [rbUploadAdapterPlugin],
table: {
contentToolbar: [ 'tableColumn', 'tableRow', 'mergeTableCells' ]
},
mediaEmbed: {
extraProviders: [
{
name: 'other',
url: /^([a-zA-Z0-9_\-]+)\.([a-zA-Z0-9_\-]+)\.([a-zA-Z0-9_\-]+)/
},
{
name: 'another',
url: /^([a-zA-Z0-9_\-]+)\.([a-zA-Z0-9_\-]+)/
}
]
},
typing: {
transformations: {
include: [
'quotes',
'typography',
],
extra: [
// Add some custom transformations e.g. for emojis.
{ from: ':)', to: '🙂' },
{ from: ':+1:', to: '👍' },
{ from: ':tada:', to: '🎉' }
],
}
}
} )
.then( newEditor => {
console.log('editor_post init');
editor_post = newEditor;
wrapper.find('.toolbar-container').html(editor_post.ui.view.toolbar.element)
editor_post.editing.view.document.on( 'change:isFocused', ( evt, name, value ) => {
if (value) {
console.log('editor_post focus');
wrapper.addClass('editor-focused');
} else {
console.log('editor_post blur');
wrapper.removeClass('editor-focused');
}
} );
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_category',{
uid : uid
},function(response,status){
if(status=='success'){
var result = $.parseJSON(response);
var error=result.error;
if (!error) {
var category_tree=result.category_tree;
page_post_edit_category.find('[data-role="box"]').html(category_tree);
} else {
page_post_edit_category.find('[data-role="box"]').html('<div class="text-xs-center p-3 text-muted">지정 권한이 없습니다.</div>');
}
} else {
alert(status);
}
});
if (uid) {
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postWrite',{
uid : uid
},function(response,status){
if(status=='success'){
var result = $.parseJSON(response);
var featured=result.featured;
var featured_img=result.featured_img;
var upload=result.upload;
var display=result.display;
var display_label=result.display_label;
var format=result.format;
var time=result.time;
var subject=result.subject;
var review=result.review;
var tag=result.tag;
var content=result.content;
var nic=result.nic;
var isperm=result.isperm;
var linkurl=result.linkurl;
var listCollapse=result.listCollapse;
var dis_like = result.dis_like;
var dis_comment = result.dis_comment;
var dis_listadd = result.dis_listadd;
var goods = result.goods;
var linkNum = result.linkNum;
var attachNum = result.attachNum;
var goodsNum = result.goodsNum;
var attachFileTheme = result.theme_attachFile;
wrapper.find('[data-role="display_label"]').text(display_label);
popover_post_display.find('[data-toggle="display"] .badge').empty();
popover_post_display.find('[data-toggle="display"][data-display="'+display+'"] .badge').html('<span class="icon icon-check"></span>');
wrapper.find('[name="display"]').val(display);
wrapper.find('[data-role="subject"]').val(subject);
wrapper.find('[data-role="time"]').text(time);
wrapper.find('[data-role="featured"]').attr('src',featured);
wrapper.find('[name="featured_img"]').val(featured_img);
wrapper.find('[name="upload"]').val(upload);
wrapper.find('[name="review"]').val(review);
wrapper.find('[name="tag"]').val(tag);
wrapper.find('[name="goods"]').val(goods);
wrapper.find('[name="dis_like"]').val(dis_like);
wrapper.find('[name="dis_comment"]').val(dis_comment);
wrapper.find('[name="dis_listadd"]').val(dis_listadd);
if (featured_img) wrapper.find('.media-left').removeClass('d-none');
else wrapper.find('.media-left').addClass('d-none');
if (linkNum) {
wrapper.find('[data-role="addlink_guide"]').addClass('d-none');
wrapper.find('[data-role="linkNum"]').text(linkNum);
wrapper.find('[data-role="attach-preview-link"]').removeClass('hidden').html(link)
}
if (attachNum) {
$.post(rooturl+'/?r='+raccount+'&m=mediaset&a=getAttachFileList',{
p_module : 'post',
uid : uid,
theme_file : attachFileTheme,
mod : 'upload'
},function(response){
var result = $.parseJSON(response);
var photo=result.photo;
var video=result.video;
var audio=result.audio;
var file=result.file;
var zip=result.zip;
var doc=result.doc;
wrapper.find('[name="featured_img"]').val(featured_img); // 대표이미지 셋팅
wrapper.find('[data-role="attach-preview-photo"]').html(photo);
wrapper.find('[data-role="attach-preview-video"]').html(video)
wrapper.find('[data-role="attach-preview-audio"]').html(audio)
wrapper.find('[data-role="attach-preview-file"]').html(file)
wrapper.find('[data-role="attachNum"]').text(attachNum)
});
} else {
$('[data-role="attach_guide"]').removeClass('d-none');
wrapper.find('[data-role="attachNum"]').text('');
}
if (goodsNum) {
wrapper.find('[data-role="goodsNum"]').text(goodsNum);
}
editor_post.setData(content);
wrapper.find('[name="format"]').val(format).prop("selected", true);
wrapper.find('[data-role="loader"]').addClass('d-none') //로더 제거
wrapper.find('form').removeClass('d-none')
if (dis_like) {
wrapper.find('[data-toggle="switch"][data-role="dis_like"]').removeClass('active');
} else {
wrapper.find('[data-toggle="switch"][data-role="dis_like"]').addClass('active');
}
if (dis_comment) {
wrapper.find('[data-toggle="switch"][data-role="dis_comment"]').removeClass('active');
} else {
wrapper.find('[data-toggle="switch"][data-role="dis_comment"]').addClass('active');
}
if (dis_listadd) {
wrapper.find('[data-toggle="switch"][data-role="dis_listadd"]').removeClass('active');
} else {
wrapper.find('[data-toggle="switch"][data-role="dis_listadd"]').addClass('active');
}
wrapper.find('.form-list.floating .input-row').addClass('active');
autosize(wrapper.find('[data-plugin="autosize"]'));
} else {
alert(status);
}
});
} else {
wrapper.find('[data-role="loader"]').addClass('d-none') //로더 제거
wrapper.find('form').removeClass('d-none')
autosize(wrapper.find('[data-plugin="autosize"]'));
}
})
.catch( error => {
console.error( error );
} );
}, 10);
wrapper.find('.form-list.floating .input-row textarea').on('keyup', function(event) {
if ($(this).val().length >= 1) {
$(this).parents('.input-row').addClass('active');
} else {
$(this).parents('.input-row').removeClass('active');
}
})
wrapper.find('.switch[data-role="dis_comment"]').on('changed.rc.switch', function () {
var _switch = $(this);
if (_switch.hasClass('active')) {
wrapper.find('[name="dis_comment"]').val(0);
} else {
wrapper.find('[name="dis_comment"]').val(1);
}
})
wrapper.find('.switch[data-role="dis_like"]').on('changed.rc.switch', function () {
var _switch = $(this);
if (_switch.hasClass('active')) {
wrapper.find('[name="dis_like"]').val(0);
} else {
wrapper.find('[name="dis_like"]').val(1);
}
})
wrapper.find('.switch[data-role="dis_listadd"]').on('changed.rc.switch', function () {
var _switch = $(this);
if (_switch.hasClass('active')) {
wrapper.find('[name="dis_listadd"]').val(0);
} else {
wrapper.find('[name="dis_listadd"]').val(1);
}
})
//연결상품 불러오기
// $.post(rooturl+'/?r='+raccount+'&m=shop&a=get_postAttachGoods',{
// markup_file: 'attach_goods_write_item',
// uid : uid,
// featured_size : '140x104'
// },function(response,status){
// if(status=='success'){
// var result = $.parseJSON(response);
// var list=result.list;
// page_post_edit_goodslist.find('[data-role="attach-goods"]').html(list);
// page_post_edit_goodslist.find('[data-sortable="goods"]').sortable({
// axis: 'y',
// cancel: 'button',
// delay: 250,
// update: function( event, ui ) {
// var attachGoods=$('input[name="attachGoods[]"]').map(function(){return $(this).val()}).get();
// var new_goods='';
// if(attachGoods){
// for(var i=0;i<attachGoods.length;i++) {
// new_goods+=attachGoods[i];
// }
// }
// $.post(rooturl+'/?r='+raccount+'&m=shop&a=modifygid',{
// attachfiles : new_goods
// })
//
// }
// });
// } else {
// alert(status);
// }
// });
} // getPostWrite
function savePost(f) {
var editorData = editor_post.getData();
var after = modal_post_write.attr('data-after');
var start = modal_post_write.attr('data-start')?modal_post_write.attr('data-start'):'#page-post-allpost';
// 카테고리 체크
var cat_sel=page_post_edit_category.find('input[name="tree_members[]"]');
var cat_sel_n=cat_sel.length;
var cat_arr=page_post_edit_category.find('input[name="tree_members[]"]:checked').map(function(){return $(this).val();}).get();
var cat_n=cat_arr.length;
// if(cat_sel_n>0 && cat_arr==''){
// alert('지정된 카테고리가 없습니다.\n적어도 하나이상의 카테고리를 지정해 주세요.');
// $('#advan').tab('show')
// return false;
// }
var s='';
for (var i=0;i <cat_n;i++) {
if(cat_arr[i]!='') s += '['+cat_arr[i]+']';
}
f.category_members.value = s;
// 리스트 체크
var list_sel=modal_post_write.find('input[name="postlist_members[]"]');
var list_arr=modal_post_write.find('input[name="postlist_members[]"]:checked').map(function(){return $(this).val();}).get();
var list_n=list_arr.length;
var l='';
for (var i=0;i <list_n;i++) {
if(list_arr[i]!='') l += '['+list_arr[i]+']';
}
modal_post_write.find('input[name="list_members"]').val(l);
// 대표이미지가 없을 경우, 첫번째 업로드 사진을 지정함
var featured_img_input = modal_post_write.find('input[name="featured_img"]'); // 대표이미지 input
var featured_img_uid = $(featured_img_input).val();
if(featured_img_uid ==0){ // 대표이미지로 지정된 값이 없는 경우
var first_attach_img_li = modal_post_write.find('[data-role="attach-preview-photo"] li:first'); // 첫번째 첨부된 이미지 리스트 li
var first_attach_img_uid = modal_post_write.find(first_attach_img_li).attr('data-id');
featured_img_input.val(first_attach_img_uid);
}
// 첨부파일 uid 를 upfiles 값에 추가하기
var attachfiles=modal_post_write.find('input[name="attachfiles[]"]').map(function(){return $(this).val()}).get();
var new_upfiles='';
if(attachfiles){
for(var i=0;i<attachfiles.length;i++) {
new_upfiles+=attachfiles[i];
}
modal_post_write.find('input[name="upload"]').val(new_upfiles);
}
// 공유회원 uid 를 members 값에 추가하기
var postmembers=modal_post_write.find('input[name="postmembers[]"]').map(function(){return $(this).val()}).get();
var new_members='';
if(postmembers){
for(var i=0;i<postmembers.length;i++) {
new_members+=postmembers[i];
}
modal_post_write.find('input[name="member"]').val(new_members);
}
// 첨부상품 uid 를 gooods 값에 추가하기
var postgoods=$('input[name="attachGoods[]"]').map(function(){return $(this).val()}).get();
var new_goods='';
if(postgoods){
for(var i=0;i<postgoods.length;i++) {
new_goods+=postgoods[i];
}
modal_post_write.find('input[name="goods"]').val(new_goods);
}
checkUnload = false;
$('[data-role="postsubmit"]').attr( 'disabled', true );
var form = modal_post_write.find('[name="writeForm"]')
var uid = form.find('[name="uid"]').val();
var category_members = form.find('[name="category_members"]').val();
var list_members = form.find('[name="list_members"]').val();
var member = form.find('[name="member"]').val();
var upload = form.find('[name="upload"]').val();
var goods = form.find('[name="goods"]').val();
var featured_img = form.find('[name="featured_img"]').val();
var html = form.find('[name="html"]').val();
var subject = form.find('[name="subject"]').val();
var display = form.find('[name="display"]').val();
var format = modal_post_write.find('[name="format"]').val();
var review = page_post_edit_review.find('[name="review"]').val();
var tag = page_post_edit_tag.find('[name="tag"]').val();
var dis_like = form.find('[name="dis_like"]').val();
var dis_comment = form.find('[name="dis_comment"]').val();
var dis_listadd = form.find('[name="dis_listadd"]').val();
if (!subject) {
$.notify({message: '제목 입력후 저장해 주세요.'},{type: 'default'});
modal_post_write.find('[data-act="submit"]').attr('disabled',false);
return false;
}
// if (editorData == '') {
// $.notify({message: '본문 입력후 저장해 주세요.'},{type: 'default'});
// modal_post_write.find('[data-act="submit"]').attr('disabled',false);
// return false;
// }
setTimeout(function(){
$.post(rooturl+'/?r='+raccount+'&m=post&a=write',{
send_mod : 'ajax',
content : editorData,
uid : uid,
category_members : category_members,
list_members : list_members,
member : member,
upload : upload,
featured_img : featured_img,
html : html,
subject : subject,
review : review,
tag : tag,
format : format,
goods : goods,
display : display,
dis_like : dis_like,
dis_comment : dis_comment,
dis_listadd : dis_listadd
},function(response,status){
if(status=='success'){
var result = $.parseJSON(response);
var error=result.error;
if (!error) {
var d_modify=result.d_modify;
form.find('[data-role="postsubmit"]').attr( 'disabled', false );
history.back();
setTimeout(function(){
if (uid) {
$.notify({message: '저장 되었습니다.'},{type: 'default'});
} else {
if (display<4) {
$('#page-post-mypost').page({ start: start, title : '내 포스트', url : 'dashboard?page=post' });
}
}
// 메인화면 목록 새로불러오기
getPostAll({
wrapper : $('[data-role="postFeed"] [data-role="list"]'),
start : start,
markup : 'post-row', // 테마 > _html > post-row-***.html
recnum : 5,
sort : 'gid',
none : $(start).find('[data-role="postFeed"] [data-role="none"]').html(),
paging : 'infinit'
})
}, 300);
} else {
history.back();
setTimeout(function(){
$.notify({message: error},{type: 'danger'}); // 작성권한 없음
return false
}, 300);
}
} else {
alert(status);
}
});
}, 200);
}
function saveTwit(display,content) {
var start = modal_post_twit.attr('data-start')?modal_post_twit.attr('data-start'):'#page-post-allpost';
setTimeout(function(){
$.post(rooturl+'/?r='+raccount+'&m=post&a=write',{
send_mod : 'ajax',
content : '',
subject : content,
display : display,
html : 'TEXT'
},function(response,status){
if(status=='success'){
var result = $.parseJSON(response);
var error=result.error;
if (!error) {
history.back(); // 작성모달 내리고
setTimeout(function(){
if (display==5) {
// 메인화면 목록 새로불러오기
getPostAll({
wrapper : $('[data-role="postFeed"] [data-role="list"]'),
start : start,
markup : 'post-row', // 테마 > _html > post-row-***.html
recnum : 5,
sort : 'gid',
none : '',
paging : 'infinit'
})
} else {
$('#page-post-mypost').page({ start: start });
}
}, 300);
} else {
history.back();
setTimeout(function(){
$.notify({message: error},{type: 'danger'}); // 작성권한 없음
return false
}, 300);
}
} else {
alert(status);
}
});
}, 200);
}
function savePostByLink(url,start) {
$.get('//embed.kimsq.com/oembed',{
url: url
}).done(function(response) {
var type = response.type;
var title = response.title;
var description = response.description?response.description:'.';
var description = linkifyStr(description,{ target: '_blank' });
var description = description.replace(/(?:\r\n|\r|\n)/g, '<br>');
var thumbnail_url = response.thumbnail_url;
var author = response.author;
var provider = response.provider_name;
var url = response.url;
var width = response.thumbnail_width;
var height = response.thumbnail_height;
var embed = response.html;
$('[name="subject"]').val(title);
if (type=='video') {
$.get('//embed.kimsq.com/iframely',{
url: url
}).done(function(response) {
var duration = response.meta.duration;
var _duration = moment.duration(duration, 's');
var formatted_duration = _duration.format("h:*m:ss");
$.post(rooturl+'/?r='+raccount+'&m=mediaset&a=saveLink',{
type : 9,
title : title,
theme : '_desktop/bs4-default-link',
description : description,
thumbnail_url : thumbnail_url,
author: author,
provider : provider,
url : url,
duration : duration?duration:'',
time : duration?formatted_duration:'',
width : width,
height : height,
embed : embed
},function(response){
var result=$.parseJSON(response);
var uid = result.last_uid
if(!result.error){
// 새 포스트 저장
var subject = title;
var content = description;
var upload = '['+uid+']';
var featured_img = uid;
var format = 2; //비디오 타입
var html = 'HTML';
$.post(rooturl+'/?r='+raccount+'&m=post&a=write',{
send_mod : 'ajax',
content : content,
upload : upload,
featured_img : featured_img,
html : html,
subject : subject,
format : format
},function(response,status){
if(status=='success'){
var result = $.parseJSON(response);
var error=result.error;
if (!error) {
var uid=result.last_uid;
var cid=result.last_cid;
history.back();
modal_post_write.attr('data-uid',uid).attr('data-after','mypost').attr('data-start',start);
setTimeout(function(){
modal_post_write.modal({
title : '포스트 수정',
url : '/post/write/'+cid
});
}, 300);
} else {
history.back();
setTimeout(function(){
$.notify({message: error},{type: 'danger'}); // 작성권한 없음
return false
}, 300);
}
} else {
alert(status);
}
});
}
});
});
} else {
$.post(rooturl+'/?r='+raccount+'&m=mediaset&a=saveLink',{
type : 8,
title : title,
saveDir : './files/post/',
theme : '_desktop/bs4-default-link',
description : description,
thumbnail_url : thumbnail_url,
author: author,
provider : provider,
url : url,
width : width,
height : height,
embed : embed
},function(response){
var result=$.parseJSON(response);
var uid = result.last_uid
if(!result.error){
// 새 포스트 저장
var subject = title;
var content = '<p>'+description+'</p>';
var upload = '['+uid+']';
var featured_img = uid;
if (provider=='Vimeo' || provider=='kakaoTV' || provider=='NAVERTV') {
var format = 2; //비디오 타입
} else {
var format = 1; //문서 타입
}
var html = 'HTML';
$.post(rooturl+'/?r='+raccount+'&m=post&a=write',{
send_mod : 'ajax',
content : content,
upload : upload,
featured_img : featured_img,
html : html,
subject : subject,
format : format
},function(response,status){
if(status=='success'){
var result = $.parseJSON(response);
var error=result.error;
if (!error) {
var uid=result.last_uid;
var cid=result.last_cid;
history.back();
modal_post_write.attr('data-uid',uid).attr('data-after','mypost').attr('data-start',start);
setTimeout(function(){
modal_post_write.modal({
title : '포스트 수정',
url : '/post/write/'+cid
});
}, 300);
} else {
history.back();
setTimeout(function(){
$.notify({message: error},{type: 'danger'}); // 작성권한 없음
return false
}, 300);
}
} else {
alert(status);
}
});
}
});
}
}).fail(function() {
$.notify({message: 'URL을 확인해주세요.'},{type: 'default'});
sheet_post_linkadd.find('[data-act="submit"]').attr('disabled',false );
textarea.attr('disabled',false).focus()
}).always(function() {
});
} // savePostByLink()
page_post_edit_review.on('shown.rc.page', function(event) {
var page = $(this)
var textarea = page.find('textarea')
setTimeout(function(){ textarea.focus() }, 300);
})
page_post_edit_review.on('hidden.rc.page', function(event) {
var page = $(this)
var textarea = page.find('textarea')
textarea.blur()
})
page_post_edit_tag.on('shown.rc.page', function(event) {
var page = $(this)
var textarea = page.find('textarea')
setTimeout(function(){ textarea.focus() }, 300);
})
page_post_edit_tag.on('hidden.rc.page', function(event) {
var page = $(this)
var textarea = page.find('textarea')
textarea.blur()
})
page_post_edit_imageGoodsTag.on('shown.rc.page', function(event) {
var page = $(this)
console.log('상품태그 기능추가');
var swiper = new Swiper('#page-post-edit-imageGoodsTag .swiper-container');
})
page_post_edit_imageGoodsTag.on('hidden.rc.page', function(event) {
var page = $(this)
var swiper = new Swiper('#page-post-edit-imageGoodsTag .swiper-container');
swiper.destroy();
})
page_post_edit_goodslist.on('shown.rc.page', function(event) {
var page = $(this)
var input = page.find('[name="keyword"]')
var uid = modal_post_write.attr('data-uid');
page.find('[data-role="backdrop"]').addClass('d-none')
page.find('[data-plugin="autocomplete"]').blur(function(){
page.find('[data-role="backdrop"]').addClass('d-none')
$(this).val('');
});
page.find('[data-plugin="autocomplete"]').on("change keyup paste", function() {
var currentVal = $(this).val();
if (currentVal) {
page.find('[data-role="backdrop"]').removeClass('d-none')
page.find('[data-role="keyword-reset"]').removeClass("d-none");
} else {
page.find('[data-role="backdrop"]').addClass('d-none');
page.find('[data-role="keyword-reset"]').addClass("d-none");
}
});
// 검색어 입력필드 초기화
page.on('click','[data-act="keyword-reset"]',function(){
page.find('[data-plugin="autocomplete"]').val('') // 입력필드 초기화
setTimeout(function(){
page.find('[data-plugin="autocomplete"]').blur().autocomplete('clear');; // 입력필드 포커싱
page.find('[data-role="keyword-reset"]').addClass("d-none"); // 검색어 초기화 버튼 숨김
}, 10);
});
//상품연결을 위한 상품명 검색
page.find('[data-plugin="autocomplete"]').autocomplete({
width : 320,
minChars:1,
showNoSuggestionNotice: true,
noSuggestionNotice : '결과가 없습니다.',
lookup: function (query, done) {
$.getJSON(rooturl+"/?m=shop&a=search_data", {q: query,featured_size : '140x104'}, function(res){
if (res.goodslist) {
var sg_goods = [];
var data_arr = res.goodslist.split(',');//console.log(data.usernames);
$.each(data_arr,function(key,goods){
var goodsData = goods.split('|');
var name = goodsData[0];
var uid = goodsData[1];
var featured_img = goodsData[2];
var price = goodsData[3];
sg_goods.push({"value":name,"data":{ 'uid': uid, 'featured_img': featured_img, 'price': price }});
});
var result = {
suggestions: sg_goods
};
done(result);
}
});
},
formatResult: function (suggestion,currentValue) {
return '<div class="media"><span class="media-left"><img src="' + suggestion.data.featured_img+'" class="media-object border mr-2" style="width:70px"/></span><div class="media-body" style="line-height: 1.2;"><h6 class="my-0 text-reset line-clamp-2">' + $.Autocomplete.formatResult(suggestion, currentValue) + '</h6><span class="text-muted f13">'+ suggestion.data.price+'</span></div></div>';
},
onSelect: function (suggestion) {
if (page.find('[data-plugin="autocomplete"]').val().length >= 1) {
console.log(suggestion.data.uid)
$(this).val('');
page.find('[data-role="backdrop"]').addClass('d-none')
page.find('[data-role="keyword-reset"]').addClass("d-none"); // 검색어 초기화 버튼 숨김
$.post(rooturl+'/?r='+raccount+'&m=shop&a=get_goodsData',{
markup_file: 'attach_goods_write_item',
uid : suggestion.data.uid,
featured_size : '140x104'
},function(response){
var result = $.parseJSON(response);
var item=result.item;
page.find('[data-role="attach-goods"]').append(item);
$.notify({message: '추가 되었습니다.'},{type: 'default'});
});
}
}
});
})
page_post_edit_goodslist.on('hidden.rc.page', function(event) {
var page = $(this);
var input = page.find('[name="keyword"]');
var goodsNum = page.find('[data-role="item"]').length
input.val('').blur()
page.find('[data-plugin="autocomplete"]').autocomplete('dispose');
page_post_edit_main.find('[data-role="goodsNum"]').text(goodsNum);
})
//연결상품 지우기
page_post_edit_goodslist.find('[data-role="attach-goods"]').on('tap','[data-act="del"]',function(){
var item = $(this).closest('[data-role="item"]')
item.remove();
});
page_post_edit_goodsview.on('show.rc.page', function(event) {
var page = $(this)
console.log('상품 상세보기')
})

View File

@@ -0,0 +1,26 @@
.collapsed .fa-caret-up:before {
content: "\f0d7";
}
.collapsed .fa {
transition: all 0.4s ease;
}
button[data-toggle="popover"],
button[data-toggle="collapse"] {
background-image: none;
background-color: #fff;
outline: none;
border: none
}
button[data-toggle="collapse"]:active {
background-color: #eee
}
.table-view-inverse .table-view-cell {
background-color: #111;
border-bottom: none
}
.table-view-inverse .table-view-active {
background-color: #373a3c;
}

View File

@@ -0,0 +1,142 @@
function setPostView(settings) {
var format=settings.format;
var uid=settings.uid;
var list=settings.list;
var featured=settings.featured;
var provider = settings.provider;
var videoId = settings.videoId;
var url = settings.url;
var ctheme = '_mobile/rc-default';
var header_height = $('.bar-nav').outerHeight();
var embed_height = $('.embed-responsive').outerHeight();
var height = header_height + embed_height;
var window_height = $(window).height();
var content_height = window_height - height;
if (format=='video') {
$('.embed-responsive').css('background-image','url('+featured+')')
$('.content').css('padding-top',height+'px')
$('.bar-standard').css('height',embed_height+'px')
$('.bar-standard .embed-responsive').css('height',embed_height+'px')
$('.modia-loader').loader();
if (provider=='YouTube') {
var player;
player = new YT.Player('player', {
height: '360',
width: '640',
videoId: videoId,
events: {
// 'onReady': onPlayerReady
}
});
function onPlayerReady(event) {
event.target.playVideo();
}
setTimeout(function(){
$('.modia-loader').loader('hide');
}, 1000);
}
} else {
setTimeout(function(){
$('[data-role="box"]').loader({ position: 'inside' });
}, 50);
}
$('oembed').attr('url',linkurl);
if (!dis_comment) {
// 댓글 출력 함수 정의
var get_Rb_Comment = function(p_module,p_table,p_uid,theme){
$('[data-role="comment"]').Rb_comment({
moduleName : 'comment', // 댓글 모듈명 지정 (수정금지)
parent : p_module+'-'+p_uid, // rb_s_comment parent 필드에 저장되는 형태가 p_modulep_uid 형태임 참조.(- 는 저장시 제거됨)
parent_table : p_table, // 부모 uid 가 저장된 테이블 (게시판인 경우 rb_bbs_data : 댓글, 한줄의견 추가/삭제시 전체 합계 업데이트용)
theme_name : theme, // 댓글 테마
containerClass :'', // 본 엘리먼트(#commentting-container)에 추가되는 class
recnum: 5, // 출력갯수
commentPlaceHolder : '공개 댓글 추가...',
noMoreCommentMsg : '댓글 없음 ',
commentLength : 200, // 댓글 입력 글자 수 제한
toolbar : ['imageUpload'] // 툴바 항목
});
}
// 댓글 출력 함수 실행
var p_module = 'post';
var p_table = 'rb_post_data';
get_Rb_Comment(p_module,p_table,uid,ctheme);
// 보기 에서 댓글이 등록된 이후에 ..
$('[data-role="comment"]').on('saved.rb.comment',function(){
window.history.back(); //댓글작성 sheet 내림
var list_item = $(document).find('[data-role="item"] [data-uid="'+uid+'"]')
//var showComment_Ele_1 = page_allcomment.find('[data-role="total_comment"]'); // 댓글 숫자 출력 element
var showComment_Ele_2 = $('[data-role="total_comment"]'); // 댓글 숫자 출력 element
var showComment_ListEle = list_item.find('[data-role="comment_'+uid+'"]'); // 댓글 숫자 출력 element
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postData',{
uid : uid
},function(response){
var result = $.parseJSON(response);
var total_comment=result.comment;
//$.notify({message: '댓글이 등록 되었습니다.'},{type: 'default'});
//showComment_Ele_1.text(total_comment); // 모달 상단 최종 댓글수량 합계 업데이트
showComment_Ele_2.text(total_comment); // 모달 상단 최종 댓글수량 합계 업데이트
showComment_ListEle.text(total_comment); // 포스트 목록 해당 항목의 최종 댓글수량 합계 업데이트
});
});
// 포스트 보기 모달에서 한줄의견이 등록된 이후에..
$('[data-role="comment"]').on('saved.rb.oneline',function(){
window.history.back(); //댓글작성 sheet 내림
var uid = $('[name="uid"]').val()
var list_item = $('[data-role="list"]').find('#item-'+uid)
//var showComment_Ele_1 = page_allcomment.find('[data-role="total_comment"]'); // 댓글 숫자 출력 element
var showComment_Ele_2 = $('[data-role="total_comment"]'); // 댓글 숫자 출력 element
var showComment_ListEle = list_item.find('[data-role="total_comment"]'); // 댓글 숫자 출력 element
$.post(rooturl+'/?r='+raccount+'&m=post&a=get_postData',{
uid : uid
},function(response){
var result = $.parseJSON(response);
var total_comment=result.total_comment;
$.notify({message: '답글이 등록 되었습니다.'},{type: 'default'});
//showComment_Ele_1.text(total_comment); // 최종 댓글수량 합계 업데이트
showComment_Ele_2.text(total_comment); // 최종 댓글수량 합계 업데이트
showComment_ListEle.text(total_comment); // 포스트 목록 해당 항목의 최종 댓글수량 합계 업데이트
});
});
// 댓글이 수정된 후에..
$('[data-role="comment"]').on('edited.rb.comment',function(){
setTimeout(function(){
history.back()
$.notify({message: '댓글이 수정 되었습니다.'},{type: 'default'});
}, 300);
})
// 한줄의견이 수정 후에
$('[data-role="comment"]').on('edited.rb.oneline',function(){
setTimeout(function(){
history.back()
$.notify({message: '답글이 수정 되었습니다.'},{type: 'default'});
}, 300);
})
} else {
$('[data-role="btn_comment"]').hide(); //댓글 바로가기 버튼 숨김
$('[data-role="comment"]').html('<div class="text-muted pb-3 text-xs-center">댓글이 사용 중지되었습니다.</div>')
}
};

View File

@@ -0,0 +1,52 @@
<?php
$wdgvar['limit'] = 3; //전체 출력수
$postque = 'mbruid='.$M1['memberuid'].' and site='.$s.' and data <>'.$R['uid'];
if ($my['uid']) $postque .= ' and display > 3'; // 회원공개와 전체공개 포스트 출력
else $postque .= ' and display = 5'; // 전체공개 포스트만 출력
$_RCD=getDbArray($table['postmember'],$postque,'*','gid','asc',$wdgvar['limit'],1);
while($_R = db_fetch_array($_RCD)) $RCD[] = getDbData($table['postdata'],'gid='.$_R['gid'],'*');
$_NUM = getDbRows($table['postmember'],$postque);
?>
<section class="widget-post-card-01">
<?php if ($_NUM): ?>
<ul class="table-view table-view-sm border-top-0 mt-2" data-role="newPost">
<?php $i=0;foreach($RCD as $POST):$i++;?>
<li class="media mb-2">
<a href="<?php echo getPostLink($POST,1) ?>" class="position-relative mr-2">
<img class="" src="<?php echo getPreviewResize(getUpImageSrc($POST),'160x90') ?>" alt="" >
<time class="badge badge-dark rounded-0 position-absolute" style="right:1px;bottom:1px"><?php echo getUpImageTime($POST) ?></time>
</a>
<div class="media-body">
<h5 class="h6 my-1 font-weight-light line-clamp-3">
<a href="<?php echo getPostLink($POST,1) ?>" class="text-reset" ><?php echo stripslashes($POST['subject'])?></a>
</h5>
<div class="mb-1">
<ul class="list-inline d-inline-block f13 text-muted">
<li class="list-inline-item">조회수 <?php echo $POST['hit']?>회 </li>
<li class="list-inline-item">
<time data-plugin="timeago" datetime="<?php echo getDateFormat($POST['d_regis'],'c')?>"></time>
</li>
</ul>
</div>
</div>
</li>
<?php endforeach?>
</ul>
<?php else: ?>
<div class="p-5 text-muted text-center border mb-3">
내역이 없습니다.
</div>
<?php endif; ?>
</section><!-- /.widget -->

View File

@@ -0,0 +1,3 @@
<?php
$d['theme']['format'] = "doc,video,adv"; // 포맷 (문서형,비디오형,포토갤러리형,카드형) , 테마폴더 view_doc.php .. 연계
?>

View File

@@ -0,0 +1,38 @@
<header class="bar bar-nav bar-light bg-white px-0">
<a class="icon material-icons pull-left px-3" role="button" data-href="<?php echo RW(0)?>" data-text="홈으로 이동">house</a>
<a class="title" data-href="<?php echo RW(0)?>" data-text="홈으로 이동">
<?php echo $d['layout']['header_file']?'<img src="'.$g['url_layout'].'/_var/'.$d['layout']['header_file'].'">':stripslashes($d['layout']['header_title'])?>
</a>
</header>
<div class="bar bar-standard bar-header-secondary bar-light bg-white px-0">
<a class="icon pull-right material-icons px-3" role="button" data-toggle="sheet" data-target="#sheet-post-filter" data-backdrop="static">tune</a>
<span class="title" data-location="reload"><?php echo $CAT['name']?$CAT['name']:'전체 카테고리' ?></span>
</div>
<section class="content">
<ul class="table-view table-view-sm mt-2 border-top-0 border-bottom-0" data-role="list"></ul>
</section>
<script src="<?php echo $g['url_module_skin'] ?>/_js/category.js<?php echo $g['wcache']?>" ></script>
<script>
$( document ).ready(function() {
getPostCategory({
wrapper : $('[data-role="list"]'),
category : '<?php echo $cat ?>',
markup : 'category-row', // 테마 > _html > keyword-row.html
start : '#page-main',
totalNUM : '<?php echo $NUM?>',
recnum : <?php echo $recnum ?>,
totalPage : '<?php echo getTotalPage($NUM,$recnum)?>',
sort : '<?php echo $sort ?>',
orderby : 'desc',
none : '<div class="p-5 text-xs-center text-muted">포스트가 없습니다.</div>'
});
});
</script>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,40 @@
<header class="bar bar-nav bar-light bg-white px-0">
<a class="icon material-icons pull-left px-3" role="button" data-href="<?php echo RW(0)?>" data-text="홈으로 이동">house</a>
<a class="title" data-href="<?php echo RW(0)?>" data-text="홈으로 이동">
<?php echo $d['layout']['header_file']?'<img src="'.$g['url_layout'].'/_var/'.$d['layout']['header_file'].'">':stripslashes($d['layout']['header_title'])?>
</a>
</header>
<div class="bar bar-standard bar-header-secondary bar-light bg-white px-0">
<a class="icon pull-right material-icons px-3" role="button" data-toggle="sheet" data-target="#sheet-post-filter" data-backdrop="static">tune</a>
<span class="title">#<?php echo $keyword ?></span>
</div>
<section class="content">
<ul class="table-view table-view-sm mt-2 border-top-0 border-bottom-0" data-role="list"></ul>
</section>
<script src="<?php echo $g['url_module_skin'] ?>/_js/keyword.js<?php echo $g['wcache']?>" ></script>
<script>
$( document ).ready(function() {
getPostKeyword({
wrapper : $('[data-role="list"]'),
keyword : '<?php echo $keyword ?>',
markup : 'keyword-row', // 테마 > _html > keyword-row.html
start : '#page-main',
totalNUM : '<?php echo $NUM?>',
recnum : <?php echo $recnum ?>,
totalPage : '<?php echo getTotalPage($NUM,$recnum)?>',
sort : '<?php echo $sort ?>',
orderby : 'desc',
none : '<div class="p-5 text-xs-center text-muted">포스트가 없습니다.</div>'
});
});
</script>

View File

@@ -0,0 +1,41 @@
<header class="bar bar-nav bar-light bg-white px-0">
<a class="icon material-icons pull-left px-3" role="button" data-href="<?php echo RW(0)?>" data-text="홈으로 이동">house</a>
<a class="icon material-icons pull-right pl-2 pr-3" role="button" data-toggle="modal" data-target="#modal-post-search">search</a>
<a class="icon pull-right material-icons px-2" role="button" data-toggle="sheet" data-target="#sheet-post-filter" data-backdrop="static">tune</a>
<a class="title" data-href="<?php echo RW(0)?>" data-text="홈으로 이동">
<?php echo $d['layout']['header_file']?'<img src="'.$g['url_layout'].'/_var/'.$d['layout']['header_file'].'">':stripslashes($d['layout']['header_title'])?>
</a>
</header>
<section class="content">
<ul class="table-view table-view-sm mt-2 border-top-0 border-bottom-0" data-role="list"></ul>
</section>
<script src="<?php echo $g['url_module_skin'] ?>/_js/list.js<?php echo $g['wcache']?>" ></script>
<script>
var settings={
wrapper : $('[data-role="list"]'),
start : '#page-main',
markup : 'list-row', // 테마 > _html > list-tableview.html
totalNUM : '<?php echo $NUM?>',
recnum : <?php echo $recnum ?>,
totalPage : '<?php echo getTotalPage($NUM,$recnum)?>',
sort : '<?php echo $sort ?>',
orderby : '<?php echo $orderby ?>',
none : '<div class="p-5 text-xs-center text-muted">등록된 리스트가 없습니다.</div>'
}
getPostListAll(settings);
//목록 다시 불러오기
$('[data-toggle="reload"]').click(function(){
$('[data-role="list"]').empty();
$('.infinitescroll-end').remove();
console.log(settings.recnum)
getPostListAll(settings);
});
</script>

View File

@@ -0,0 +1,42 @@
<header class="bar bar-nav bar-light bg-white">
<a class="icon material-icons pull-left px-3" role="button" data-href="<?php echo RW(0)?>" data-text="홈으로 이동">house</a>
<a class="icon material-icons pull-right pl-2 pr-3 mirror" role="button" data-toggle="popup" data-target="#popup-link-share" data-url>reply</a>
<a class="title" data-href="<?php echo RW(0)?>" data-text="새로고침">
<?php echo $d['layout']['header_file']?'<img src="'.$g['url_layout'].'/_var/'.$d['layout']['header_file'].'">':stripslashes($d['layout']['header_title'])?>
</a>
</header>
<section class="content">
<div data-role="box"></div>
</section>
<script src="<?php echo $g['url_module_skin'] ?>/_js/list_view.js<?php echo $g['wcache']?>" ></script>
<script>
var settings={
listid : '<?php echo $listid?>',
wrapper : $('[data-role="box"]'),
markup : 'listview-box', // 테마 > _html > list-tableview.html
totalNUM : '<?php echo $NUM?>',
recnum : <?php echo $recnum ?>,
totalPage : '<?php echo getTotalPage($NUM,$recnum)?>',
sort : '<?php echo $sort ?>',
orderby : '<?php echo $orderby ?>',
none : '<div class="p-5 text-xs-center text-muted">등록된 포스트가 없습니다.</div>'
}
getPostListview(settings);
//목록 다시 불러오기
$('[data-toggle="reload"]').click(function(){
$('[data-role="list"]').empty();
$('.infinitescroll-end').remove();
console.log(settings.recnum)
getPostListview(settings);
});
</script>

View File

@@ -0,0 +1,94 @@
<?php
$sort = $sort ? $sort : 'gid';
$orderby= $orderby ? $orderby : 'asc';
$c_recnum = 3; // 한 열에 출력할 카드 갯수
$recnum = $recnum && $recnum < 200 ? $recnum : 24;
$_WHERE = 'display<2 and site='.$s;
if ($cat) $_WHERE .= ' and ('.getPostCategoryCodeToSql($table[$m.'category'],$cat).')';
$TCD = getDbArray($table[$m.'index'],$_WHERE,'*',$sort,$orderby,$recnum,$p);
$NUM = getDbRows($table[$m.'index'],$_WHERE);
$TPG = getTotalPage($NUM,$recnum);
while($_R = db_fetch_array($TCD)) $RCD[] = getDbData($table[$m.'data'],'gid='.$_R['gid'],'*');
?>
<?php if ($NUM): ?>
<div class="card-deck-wrapper">
<div class="card-deck">
<?php
$totalCardDeck=ceil($NUM/$c_recnum); // card-deck 갯수 ($NUM 은 해당 데이타의 총 card 갯수 getDbRows 이용)
$total_card_num = $totalCardDeck*$c_recnum;// 총 출력되야 할 card 갯수(빈카드 포함)
$print_card_num = 0; // 실제 출력된 카드 숫자 (아래 card 출력될 때마다 1 씩 증가)
$lack_card_num = $total_card_num;
?>
<?php $i=1;foreach($RCD as $R):?>
<?php $R['mobile']=isMobileConnect($R['agent'])?>
<div class="card" data-target="#page-post-view"
data-toggle="page"
data-start="#page-main"
data-uid="<?php echo $R['uid'] ?>"
data-url="/post/<?php echo $R['cid'] ?>"
<?php if ($R['featured_img'] || $R['linkedshop']): ?>
<?php
if ($R['linkedshop']):;
$linkedshopArr = getArrayString($R['linkedshop']);
$SH=getUidData($table['shopproduct'],$linkedshopArr['data'][0]);
?>
data-src="<?php echo getPreviewResize(getUpImageSrc($SH),'600x600') ?>"
<?php else: ?>
data-src="<?php echo getPreviewResize(getUpImageSrc($R),'600x600') ?>"
<?php endif; ?>
<?php endif; ?>
data-title="<?php echo $R['subject'] ?>">
<?php if ($R['featured_img'] || $R['linkedshop']): ?>
<?php
if ($R['linkedshop']):;
$linkedshopArr = getArrayString($R['linkedshop']);
$SH=getUidData($table['shopproduct'],$linkedshopArr['data'][0]);
?>
<img src="<?php echo getPreviewResize(getUpImageSrc($SH),'600x400') ?>" class="card-img-top img-fluid" alt="...">
<?php else: ?>
<img src="<?php echo getPreviewResize(getUpImageSrc($R),'600x400') ?>" class="card-img-top img-fluid" alt="...">
<?php endif; ?>
<?php endif; ?>
<div class="card-block">
<h4 class="card-title h6"><?php echo $R['subject']?></h4>
<p class="card-text"><small class="text-muted"><?php echo $R['review']?></small></p>
</div>
</div><!-- /.card -->
<?php
$print_card_num++; // 카드 출력될 때마 1씩 증가
$lack_card_num = $total_card_num - $print_card_num;
?>
<?php if(!($i%$c_recnum)):?></div><div class="card-deck mt-5"><?php endif?>
<?php $i++;endforeach?>
<?php if($lack_card_num ):?>
<?php for($j=0;$j<$lack_card_num;$j++):?>
<a class="card border-0"></a>
<?php endfor?>
<?php endif?>
</div><!-- /.card-deck -->
</div><!-- /.card-deck-wrapper -->
<?php else: ?>
<div class="d-flex align-items-center justify-content-center" style="height:50vh">
<div class="text-muted">
자료가 없습니다.
</div>
</div>
<?php endif; ?>

View File

@@ -0,0 +1,41 @@
<?php $recnum = 3 ?>
<header class="bar bar-nav bar-light bg-white px-0">
<a class="icon material-icons pull-left px-3" role="button" data-href="<?php echo RW(0)?>" data-text="홈으로 이동">house</a>
<a class="icon material-icons pull-right pl-2 pr-3" role="button" data-toggle="modal" data-target="#modal-post-search">search</a>
<a class="icon pull-right material-icons px-2" role="button" data-toggle="sheet" data-target="#sheet-post-filter" data-backdrop="static">tune</a>
<a class="title" data-href="<?php echo RW(0)?>" data-text="홈으로 이동">
<?php echo $d['layout']['header_file']?'<img src="'.$g['url_layout'].'/_var/'.$d['layout']['header_file'].'">':stripslashes($d['layout']['header_title'])?>
</a>
</header>
<section class="content bg-faded">
<div data-role="list"></div>
</section>
<script src="<?php echo $g['url_module_skin'] ?>/_js/post.js<?php echo $g['wcache']?>" ></script>
<script>
var settings={
wrapper : $(document).find('[data-role="list"]'),
markup : 'post-row', // 테마 > _html > post-card-full.html
totalNUM : '<?php echo $NUM?>',
recnum : <?php echo $recnum ?>,
totalPage : '<?php echo getTotalPage($NUM,$recnum)?>',
sort : '<?php echo $sort ?>',
orderby : '<?php echo $orderby ?>',
none : '<div class="p-5 text-xs-center text-muted">등록된 포스트가 없습니다.</div>'
}
getPostAll(settings);
//목록 다시 불러오기
$('[data-toggle="reload"]').click(function(){
$('[data-role="list"]').html('');
$('.infinitescroll-end').remove();
// $('.content [data-role="list"]').infinitescroll('destroy');
// $('.content').html('<div data-role="list"></div>')
getPostAll(settings);
});
</script>

View File

@@ -0,0 +1,61 @@
<div data-role="loader">
<div class="d-flex justify-content-center align-items-center text-muted" style="height:90vh">
<div class="spinner-border" role="status"></div>
</div>
</div>
<div class="d-flex justify-content-center align-items-center text-muted" style="height:90vh">
<div class="">
<div class="content-padded">
<ul class="media-list">
<li class="media mb-2" data-role="item" data-landing="true"
data-target="#modal-post-view" id ="veiw-<?php echo $R['cid'] ?>"
data-toggle="modal"
data-format="<?php echo $R['format'] ?>"
data-uid="<?php echo $R['uid'] ?>"
data-featured="<?php echo getPreviewResize(getUpImageSrc($R),'640x360'); ?>"
data-provider="<?php echo getFeaturedimgMeta($R,'provider') ?>"
data-videoid="<?php echo getFeaturedimgMeta($R,'provider')=='YouTube'?getFeaturedimgMeta($R,'name'):'' ?>"
data-url="/post/<?php echo $R['cid'] ?>?ref=<?php echo $ref ?>">
<div class="media-left">
<div class="embed-responsive embed-responsive-16by9 bg-faded">
<img class="media-object" src="<?php echo getPreviewResize(getUpImageSrc($R),'320x180'); ?>" alt="" data-role="featured" style="width:160px">
<time class="badge badge-default bg-black rounded-0 position-absolute f12 p-1" style="right:2px;bottom:2px" data-role="time">13:17</time>
</div>
</div>
<div class="media-body pt-1">
<h4 class="media-heading f15 line-clamp-3"><?php echo stripslashes($R['subject']) ?></h4>
<ul class="list-inline f13 text-muted mt-1 mb-0">
<li class="list-inline-item"><?php echo $M1[$_HS['nametype']] ?></li>
<li class="list-inline-item">조회수 <?php echo number_format($R['hit'])?>회 </li>
<li class="list-inline-item">댓글 <?php echo number_format($R['comment'])?> </li>
</ul>
</div>
</li>
</ul>
<button type="button" data-href="/" data-text="홈으로 이동" class="btn btn-secondary btn-block">
홈으로 이동
</button>
</div>
</div>
</div>
<script>
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
$( document ).ready(function() {
$('[data-role="loader"]').addClass('d-none');
$('#veiw-<?php echo $R['cid'] ?>').click();
});
</script>

View File

@@ -0,0 +1,34 @@
<div data-role="loader">
<div class="d-flex justify-content-center align-items-center text-muted" style="height:90vh">
<div class="spinner-border" role="status"></div>
</div>
</div>
<div class="d-flex justify-content-center align-items-center text-muted" style="height:90vh">
<div class="w-75">
<button type="button" data-location="reload" class="btn btn-secondary btn-block">
새로고침
</button>
<button type="button" data-href="/" data-text="홈으로 이동" class="btn btn-secondary btn-block">
홈으로 이동
</button>
</div>
</div>
<?php getImport('ckeditor5','decoupled-document/build/ckeditor',false,'js'); ?>
<?php getImport('ckeditor5','decoupled-document/build/translations/ko',false,'js'); ?>
<script>
var uid = '<?php echo $R['uid'] ?>';
$( document ).ready(function() {
$('[data-role="loader"]').addClass('d-none');
if (uid) modal_post_write.attr('data-uid',uid);
modal_post_write.modal();
});
</script>