diff --git a/css/mobile.css b/css/mobile.css
index 1369828f7..3264796a3 100644
--- a/css/mobile.css
+++ b/css/mobile.css
@@ -460,7 +460,7 @@ input.required:focus {border:0;background:#21272e !important;color:#fff;line-hei
.btn_bo_user li {float:left;margin-left:0.3em}
.btn_bo_adm {float:left}
.btn_bo_adm li {float:left;margin-right:0.3em}
-.btn_bo_adm input {padding:0 1em;height:25px;border:1px solid #e8180c !important;background:#e8180c;color:#fff;text-decoration:none;vertical-align:middle;cursor:pointer}
+.btn_bo_adm input {padding:0 1em;height:2em;border:1px solid #e8180c !important;background:#e8180c;color:#fff;text-decoration:none;vertical-align:middle;cursor:pointer;-webkit-appearance:none}
.bo_notice td {background:#f7f7f7}
.bo_notice td a {font-weight:bold}
.td_num strong {color:#000}
diff --git a/mobile/skin/board/basic/view.skin.php b/mobile/skin/board/basic/view.skin.php
index 38d95486a..2cc5027f2 100644
--- a/mobile/skin/board/basic/view.skin.php
+++ b/mobile/skin/board/basic/view.skin.php
@@ -137,15 +137,20 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
=get_view_thumbnail($view['content']);?>
//echo $view[rich_content]; // {이미지:0} 과 같은 코드를 사용할 경우?>
-
if ($is_signature) { ?>=$signature?>
} ?>
if ($scrap_href || $good_href || $nogood_href) { ?>
} else {
if($board['bo_use_good'] || $board['bo_use_nogood']) {
@@ -201,6 +206,18 @@ $(function() {
window.open(this.href, "large_image", "top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
return false;
});
+
+ // 추천, 비추천
+ $("#good_button, #nogood_button").click(function() {
+ var $tx;
+ if(this.id == "good_button")
+ $tx = $("#bo_v_act_good");
+ else
+ $tx = $("#bo_v_act_nogood");
+
+ excute_good(this.href, $(this), $tx);
+ return false;
+ });
});
function view_image_resize()
@@ -218,4 +235,27 @@ function view_image_resize()
}
});
}
+
+function excute_good(href, $el, $tx)
+{
+ $.post(
+ href,
+ { js: "on" },
+ function(data) {
+ if(data.error) {
+ alert(data.error);
+ return false;
+ }
+
+ if(data.count) {
+ $el.find("strong").text(number_format(String(data.count)));
+ if($tx.attr("id").search("nogood") > -1) {
+ $tx.text("이 글을 비추천하셨습니다.").css("display", "inline");
+ } else {
+ $tx.text("이 글을 추천하셨습니다.").css("display", "inline");
+ }
+ }
+ }, "json"
+ );
+}
\ No newline at end of file
diff --git a/mobile/skin/board/gallery/view.skin.php b/mobile/skin/board/gallery/view.skin.php
index 79ac40243..2cc5027f2 100644
--- a/mobile/skin/board/gallery/view.skin.php
+++ b/mobile/skin/board/gallery/view.skin.php
@@ -14,10 +14,10 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
게시물 정보
- 작성자 =$view['name']?> if ($is_ip_view) { echo " ($ip)"; } ?>
- 작성일=date("y-m-d H:i", strtotime($view['wr_datetime']))?>
- 조회=number_format($view['wr_hit'])?>회
- 댓글=number_format($view['wr_comment'])?>건
+ 작성자 =$view['wr_name']?> if ($is_ip_view) { echo " ($ip)"; } ?>
+ 작성일 =date("y-m-d H:i", strtotime($view['wr_datetime']))?>
+ 조회 =number_format($view['wr_hit'])?>회
+ 댓글 =number_format($view['wr_comment'])?>건
@@ -137,15 +137,20 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
=get_view_thumbnail($view['content']);?>
//echo $view[rich_content]; // {이미지:0} 과 같은 코드를 사용할 경우?>
-
if ($is_signature) { ?>=$signature?>
} ?>
if ($scrap_href || $good_href || $nogood_href) { ?>
} else {
if($board['bo_use_good'] || $board['bo_use_nogood']) {
@@ -201,6 +206,18 @@ $(function() {
window.open(this.href, "large_image", "top=10,left=10,width=10,height=10,resizable=yes,scrollbars=no,status=no");
return false;
});
+
+ // 추천, 비추천
+ $("#good_button, #nogood_button").click(function() {
+ var $tx;
+ if(this.id == "good_button")
+ $tx = $("#bo_v_act_good");
+ else
+ $tx = $("#bo_v_act_nogood");
+
+ excute_good(this.href, $(this), $tx);
+ return false;
+ });
});
function view_image_resize()
@@ -218,4 +235,27 @@ function view_image_resize()
}
});
}
+
+function excute_good(href, $el, $tx)
+{
+ $.post(
+ href,
+ { js: "on" },
+ function(data) {
+ if(data.error) {
+ alert(data.error);
+ return false;
+ }
+
+ if(data.count) {
+ $el.find("strong").text(number_format(String(data.count)));
+ if($tx.attr("id").search("nogood") > -1) {
+ $tx.text("이 글을 비추천하셨습니다.").css("display", "inline");
+ } else {
+ $tx.text("이 글을 추천하셨습니다.").css("display", "inline");
+ }
+ }
+ }, "json"
+ );
+}
\ No newline at end of file
diff --git a/skin/board/basic/view.skin.php b/skin/board/basic/view.skin.php
index cddde08f7..32fa4643b 100644
--- a/skin/board/basic/view.skin.php
+++ b/skin/board/basic/view.skin.php
@@ -137,7 +137,6 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
=get_view_thumbnail($view['content']);?>
//echo $view[rich_content]; // {이미지:0} 과 같은 코드를 사용할 경우?>
-
if ($is_signature) { ?>=$signature?>
} ?>
diff --git a/skin/board/gallery/view.skin.php b/skin/board/gallery/view.skin.php
index 14c94a273..87bb16ff0 100644
--- a/skin/board/gallery/view.skin.php
+++ b/skin/board/gallery/view.skin.php
@@ -137,7 +137,6 @@ include_once(G4_LIB_PATH.'/thumbnail.lib.php');
=get_view_thumbnail($view['content']);?>
//echo $view[rich_content]; // {이미지:0} 과 같은 코드를 사용할 경우?>
-
if ($is_signature) { ?>=$signature?>
} ?>