|
diff --git a/adm/board_form_update.php b/adm/board_form_update.php
index 7e55c0759..bcb674469 100644
--- a/adm/board_form_update.php
+++ b/adm/board_form_update.php
@@ -100,7 +100,6 @@ $sql_common = " gr_id = '{$_POST['gr_id']}',
bo_gallery_cols = '{$_POST['bo_gallery_cols']}',
bo_gallery_width = '{$_POST['bo_gallery_width']}',
bo_gallery_height = '{$_POST['bo_gallery_height']}',
- bo_mobile_gallery_cols = '{$_POST['bo_mobile_gallery_cols']}',
bo_mobile_gallery_width = '{$_POST['bo_mobile_gallery_width']}',
bo_mobile_gallery_height= '{$_POST['bo_mobile_gallery_height']}',
bo_upload_count = '{$_POST['bo_upload_count']}',
@@ -264,7 +263,6 @@ if (is_checked('chk_grp_mobile_skin')) $grp_fields .= " , bo_mobile_ski
if (is_checked('chk_grp_gallery_cols')) $grp_fields .= " , bo_gallery_cols = '{$bo_gallery_cols}' ";
if (is_checked('chk_grp_gallery_width')) $grp_fields .= " , bo_gallery_width = '{$bo_gallery_width}' ";
if (is_checked('chk_grp_gallery_height')) $grp_fields .= " , bo_gallery_height = '{$bo_gallery_height}' ";
-if (is_checked('chk_grp_mobile_gallery_cols')) $grp_fields .= " , bo_mobile_gallery_cols = '{$bo_mobile_gallery_cols}' ";
if (is_checked('chk_grp_mobile_gallery_width')) $grp_fields .= " , bo_mobile_gallery_width = '{$bo_mobile_gallery_width}' ";
if (is_checked('chk_grp_mobile_gallery_height'))$grp_fields .= " , bo_mobile_gallery_height = '{$bo_mobile_gallery_height}' ";
if (is_checked('chk_grp_table_width')) $grp_fields .= " , bo_table_width = '{$bo_table_width}' ";
@@ -349,7 +347,6 @@ if (is_checked('chk_all_mobile_skin')) $all_fields .= " , bo_mobile_ski
if (is_checked('chk_all_gallery_cols')) $all_fields .= " , bo_gallery_cols = '{$bo_gallery_cols}' ";
if (is_checked('chk_all_gallery_width')) $all_fields .= " , bo_gallery_width = '{$bo_gallery_width}' ";
if (is_checked('chk_all_gallery_height')) $all_fields .= " , bo_gallery_height = '{$bo_gallery_height}' ";
-if (is_checked('chk_all_mobile_gallery_cols')) $all_fields .= " , bo_mobile_gallery_cols = '{$bo_mobile_gallery_cols}' ";
if (is_checked('chk_all_mobile_gallery_width')) $all_fields .= " , bo_mobile_gallery_width = '{$bo_mobile_gallery_width}' ";
if (is_checked('chk_all_mobile_gallery_height'))$all_fields .= " , bo_mobile_gallery_height = '{$bo_mobile_gallery_height}' ";
if (is_checked('chk_all_table_width')) $all_fields .= " , bo_table_width = '{$bo_table_width}' ";
diff --git a/install/gnuboard5.sql b/install/gnuboard5.sql
index cc1a03e0d..8b6cf0eda 100644
--- a/install/gnuboard5.sql
+++ b/install/gnuboard5.sql
@@ -81,7 +81,6 @@ CREATE TABLE IF NOT EXISTS `g5_board` (
`bo_gallery_cols` int(11) NOT NULL DEFAULT '0',
`bo_gallery_width` int(11) NOT NULL DEFAULT '0',
`bo_gallery_height` int(11) NOT NULL DEFAULT '0',
- `bo_mobile_gallery_cols` int(11) NOT NULL DEFAULT '0',
`bo_mobile_gallery_width` int(11) NOT NULL DEFAULT '0',
`bo_mobile_gallery_height` int(11) NOT NULL DEFAULT '0',
`bo_upload_size` int(11) NOT NULL DEFAULT '0',
diff --git a/js/jquery.fancylist.js b/js/jquery.fancylist.js
new file mode 100644
index 000000000..19149bc6f
--- /dev/null
+++ b/js/jquery.fancylist.js
@@ -0,0 +1,62 @@
+(function($) {
+ $.fn.fancyList = function(element, clear)
+ {
+ var cfg = {
+ element: "li",
+ clear: "clear"
+ };
+
+ if(typeof element == "object")
+ cfg = $.extend( cfg, element );
+ else {
+ if(element)
+ cfg = $.extend( cfg, { element: element } );
+ if(clear)
+ cfg = $.extend( cfg, { clear: clear } );
+ }
+
+ var $element = this.find(cfg.element);
+ var $this = this;
+
+ function item_arrange()
+ {
+ var $el = $element.filter(":first");
+ var padding = 0;
+ if($el.data("padding-right") == undefined) {
+ padding = parseInt($el.css("padding-right"));
+ $el.data("padding-right", padding);
+ }
+ else
+ padding = $el.data("padding-right");
+
+ $element.css("padding-left", 0).css("padding-right", padding);
+ $element.filter("."+cfg.clear).removeClass(cfg.clear);
+
+ var wrap_width = parseInt($this.width());
+ var item_width = parseInt($el.outerWidth());
+ var line_count = parseInt((wrap_width + padding) / item_width);
+
+ if(line_count == 0)
+ return;
+
+ var space = parseInt(wrap_width % item_width);
+
+ if((space + padding) < item_width) {
+ space = wrap_width - ((item_width - padding) * line_count);
+ var new_padding = parseInt(space / (line_count * 2));
+
+ if(new_padding > padding)
+ $element.css("padding-left", new_padding+"px").css("padding-right", new_padding);
+ }
+
+ $element.filter(":nth-child("+line_count+"n)").css("padding-right", 0);
+ $element.filter(":nth-child("+line_count+"n+1)").addClass(cfg.clear);
+ }
+
+ item_arrange();
+
+ $(window).resize(function() {
+ item_arrange();
+ });
+ }
+}(jQuery));
\ No newline at end of file
diff --git a/js/viewimageresize.js b/js/viewimageresize.js
new file mode 100644
index 000000000..b3c4ed65b
--- /dev/null
+++ b/js/viewimageresize.js
@@ -0,0 +1,43 @@
+(function($) {
+ $.fn.viewimageresize = function(selector)
+ {
+ var cfg = {
+ selector: "img"
+ };
+
+ if(typeof selector == "object") {
+ cfg = $.extend(cfg, selector);
+ } else {
+ if(selector) {
+ cfg = $.extend({ selector: selector });
+ }
+ }
+
+ var $img = this.find(cfg.selector);
+ var width = this.width();
+
+ function image_resize()
+ {
+ $img.each(function() {
+ $(this).removeAttr("width")
+ .removeAttr("height")
+ .css("width","");
+
+ if($(this).data("width") == undefined)
+ $(this).data("width", $(this).width());
+
+ if($(this).data("width") > width) {
+ $(this).css("width", "100%");
+ }
+ });
+ }
+
+ $(window).on("load", function() {
+ image_resize();
+ });
+
+ $(window).on("resize", function() {
+ image_resize();
+ });
+ }
+}(jQuery));
\ No newline at end of file
diff --git a/mobile/skin/board/basic/view.skin.php b/mobile/skin/board/basic/view.skin.php
index 1b2f044a9..3d87b7366 100644
--- a/mobile/skin/board/basic/view.skin.php
+++ b/mobile/skin/board/basic/view.skin.php
@@ -4,6 +4,7 @@ include_once(G5_LIB_PATH.'/thumbnail.lib.php');
?>
+
@@ -226,6 +227,9 @@ $(function() {
excute_good(this.href, $(this), $tx);
return false;
});
+
+ // 이미지 리사이즈
+ $("#bo_v_atc").viewimageresize();
});
function excute_good(href, $el, $tx)
diff --git a/mobile/skin/board/gallery/list.skin.php b/mobile/skin/board/gallery/list.skin.php
index 83bf88a1b..038237083 100644
--- a/mobile/skin/board/gallery/list.skin.php
+++ b/mobile/skin/board/gallery/list.skin.php
@@ -4,6 +4,7 @@ include_once(G5_LIB_PATH.'/thumbnail.lib.php');
?>
+
@@ -48,13 +49,6 @@ include_once(G5_LIB_PATH.'/thumbnail.lib.php');
0 && ($i % $board['bo_mobile_gallery_cols'] == 0))
- $style = 'clear:both;';
- else
- $style = '';
- if ($i == 0) $k = 0;
- $k += 1;
- if ($k % $board['bo_mobile_gallery_cols'] == 0) $style .= "margin:0 !important;";
?>
-
@@ -145,6 +139,12 @@ include_once(G5_LIB_PATH.'/thumbnail.lib.php');
+
+
|