Merge branch 'master' of github.com:gnuboard/g4s

This commit is contained in:
gnuboard
2013-04-29 15:17:18 +09:00
6 changed files with 128 additions and 90 deletions

View File

@ -18,7 +18,7 @@ function print_menu2($key, $no)
{
global $menu, $auth_menu, $is_admin, $auth, $g4;
$str .= "<ul class=\"gnb_sub_ul\">";
$str .= "<ul class=\"gnb_2dul\">";
for($i=1; $i<count($menu[$key]); $i++)
{
if ($is_admin != 'super' && (!array_key_exists($menu[$key][$i][0],$auth) || !strstr($auth[$menu[$key][$i][0]], 'r')))
@ -31,7 +31,7 @@ function print_menu2($key, $no)
if ($menu[$key][$i][4] == 1) $gnb_grp_style = 'gnb_grp_style';
else $gnb_grp_style = '';
$str .= '<li class="gnb_2depth"><a href="'.$menu[$key][$i][2].'" class="'.$gnb_grp_style.' '.$gnb_grp_div.'">'.$menu[$key][$i][1].'</a></li>';
$str .= '<li class="gnb_2dli"><a href="'.$menu[$key][$i][2].'" class="gnb_2da '.$gnb_grp_style.' '.$gnb_grp_div.'">'.$menu[$key][$i][1].'</a></li>';
$auth_menu[$menu[$key][$i][0]] = $menu[$key][$i][1];
}
@ -99,19 +99,19 @@ function imageview(id, w, h)
<h2>관리자 주메뉴</h2>
<script>$('#gnb').addClass('gnb_js');</script>
<?php
$gnb_str = "<ul id=\"gnb_ul\">";
$gnb_str = "<ul id=\"gnb_1dul\">";
foreach($amenu as $key=>$value) {
$href1 = $href2 = '';
if ($menu['menu'.$key][0][2]) {
$href1 = '<a href="'.$menu['menu'.$key][0][2].'">';
$href1 = '<a href="'.$menu['menu'.$key][0][2].'" class="gnb_1da">';
$href2 = '</a>';
} else {
continue;
}
$current_class = "";
if (isset($sub_menu) && (substr($sub_menu, 0, 2) == substr($menu['menu'.$key][0][0], 0, 2)))
$current_class = " gnb_1depth_air";
$gnb_str .= "<li class=\"gnb_1depth".$current_class."\">";
$current_class = " gnb_1dli_air";
$gnb_str .= '<li class="gnb_1dli'.$current_class.'">'.PHP_EOL;
$gnb_str .= $href1 . $menu['menu'.$key][0][1] . $href2;
$gnb_str .= print_menu1('menu'.$key, 1);
$gnb_str .= "</li>";

View File

@ -40,11 +40,12 @@ $(function(){
});
// 주메뉴
var $gnb = $('.gnb_1depth > a');
var $gnb = $(".gnb_1dli > a");
$gnb.mouseover(function() {
if(mouse_event) {
$('.gnb_1depth').removeClass('gnb_1depth_over gnb_1depth_on');
$(this).parent().addClass('gnb_1depth_over gnb_1depth_on');
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
$(this).parent().addClass("gnb_1dli_over gnb_1dli_on");
menu_rearrange($(this).parent());
hide_menu = false;
}
});
@ -53,17 +54,18 @@ $(function(){
hide_menu = true;
});
$('.gnb_1depth li').mouseover(function() {
$(".gnb_2dli").mouseover(function() {
hide_menu = false;
});
$('.gnb_1depth li').mouseout(function() {
$(".gnb_2dli").mouseout(function() {
hide_menu = true;
});
$gnb.focusin(function() {
$('.gnb_1depth').removeClass('gnb_1depth_over gnb_1depth_on');
$(this).parent().addClass('gnb_1depth_over gnb_1depth_on');
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
$(this).parent().addClass("gnb_1dli_over gnb_1dli_on");
menu_rearrange($(this).parent());
hide_menu = false;
});
@ -71,29 +73,63 @@ $(function(){
hide_menu = true;
});
$('.gnb_1depth ul a').focusin(function() {
$('.gnb_1depth').removeClass('gnb_1depth_over gnb_1depth_on');
var $gnb_li = $(this).closest('.gnb_1depth').addClass('gnb_1depth_over gnb_1depth_on');
$(".gnb_2da").focusin(function() {
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
var $gnb_li = $(this).closest(".gnb_1dli").addClass("gnb_1dli_over gnb_1dli_on");
menu_rearrange($(this).closest(".gnb_1dli"));
hide_menu = false;
});
$('.gnb_1depth ul a').focusout(function() {
$(".gnb_2da").focusout(function() {
hide_menu = true;
});
$(document).click(function() {
$('#gnb_1dul>li').bind('mouseleave',function(){
submenu_hide();
});
$(document).bind('click focusin',function(){
if(hide_menu) {
$('.gnb_1depth').removeClass('gnb_1depth_over gnb_1depth_on');
submenu_hide();
}
});
$(document).focusin(function() {
if(hide_menu) {
$('.gnb_1depth').removeClass('gnb_1depth_over gnb_1depth_on');
}
});
function submenu_hide() {
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
}
// 텍스트 리사이즈 카운트 쿠키있으면 실행
var resize_act;
var text_resize_count = parseInt(get_cookie("ck_font_resize_count"));
if(!isNaN(text_resize_count)) {
if(text_resize_count > 0)
resize_act = "increase";
else if(text_resize_count < 0)
resize_act = "decrease";
if(Math.abs(text_resize_count) > 0)
font_resize2("container", resize_act, Math.abs(text_resize_count));
}
});
function menu_rearrange(el)
{
var width = $("#gnb_1dul").width();
var left = w1 = w2 = 0;
var idx = $(".gnb_1dli").index(el);
for(i=0; i<=idx; i++) {
w1 = $(".gnb_1dli:eq("+i+")").outerWidth();
w2 = $(".gnb_2dli > a:eq("+i+")").outerWidth(true);
if((left + w2) > width) {
el.removeClass("gnb_1dli_over").addClass("gnb_1dli_over2");
}
left += w1;
}
}
</script>
<?php

View File

@ -67,28 +67,28 @@ h2 {font-size:1.2em}
/* gnb js off */
#gnb {z-index:12;background:#383a3f}
#gnb h2 {margin:0;padding:0;width:1px;height:1px;font-size:0;line-height:0;overflow:hidden}
#gnb_ul {margin:0 auto;padding:0;width:1000px;zoom:1}
#gnb_ul:after {display:block;visibility:hidden;clear:both;content:""}
.gnb_1depth {z-index:13;clear:both;zoom:1}
.gnb_1depth:after {display:block;visibility:hidden;clear:both;content:""}
.gnb_1depth a {display:block;float:left;width:120px;height:35px;color:#e0e0e0;font-weight:bold;line-height:2.95em;text-decoration:none}
.gnb_1depth a:focus,
.gnb_1depth a:hover {text-decoration:none}
.gnb_sub_ul {float:left;width:auto}
.gnb_2depth {float:left}
.gnb_2depth a {color:#e0e0e0;font-weight:normal}
#gnb_1dul {margin:0 auto;padding:0;width:1000px;zoom:1}
#gnb_1dul:after {display:block;visibility:hidden;clear:both;content:""}
.gnb_1dli {z-index:13;clear:both;zoom:1}
.gnb_1dli:after {display:block;visibility:hidden;clear:both;content:""}
.gnb_1dli a {display:block;float:left;width:120px;height:35px;color:#e0e0e0;font-weight:bold;line-height:2.95em;text-decoration:none}
.gnb_1dli a:focus,
.gnb_1dli a:hover {text-decoration:none}
.gnb_2dul {float:left;width:auto}
.gnb_2dli {float:left}
.gnb_2dli a {color:#e0e0e0;font-weight:normal}
/* gnb js on */
.gnb_js {padding-left:1px}
.gnb_js #gnb_ul {zoom:1}
.gnb_js #gnb_ul:after {display:block;visibility:hidden;clear:both;content:""}
.gnb_js .gnb_1depth {clear:none;position:relative;float:left;margin:0 0 0 -1px;border:1px solid #222;border-top:0;border-bottom:0}
.gnb_js .gnb_1depth a {color:#fff;text-align:center}
.gnb_js .gnb_1depth_air a {float:none;background:#f7f7f2;color:#000}
.gnb_js .gnb_1depth_on a {float:none;background:#fff;color:#000}
.gnb_js .gnb_sub_ul {position:absolute;top:35px;width:1px;height:1px;overflow:hidden}
.gnb_js .gnb_2depth a {display:inline-block;float:none !important;padding:0 10px;width:161px;text-align:left}
.gnb_1depth_over .gnb_sub_ul {left:-1px;width:181px;height:auto;border:1px solid #c3c7c5;border-top:0;background:#fff}
.gnb_1depth_over2 .gnb_sub_ul {right:-1px;width:181px;height:auto;border:1px solid #c3c7c5;border-top:0;background:#fff}
.gnb_js #gnb_1dul {zoom:1}
.gnb_js #gnb_1dul:after {display:block;visibility:hidden;clear:both;content:""}
.gnb_js .gnb_1dli {clear:none;position:relative;float:left;margin:0 0 0 -1px;border:1px solid #222;border-top:0;border-bottom:0}
.gnb_js .gnb_1dli a {color:#fff;text-align:center}
.gnb_js .gnb_1dli_air a {float:none;background:#f7f7f2;color:#000}
.gnb_js .gnb_1dli_on a {float:none;background:#fff;color:#000}
.gnb_js .gnb_2dul {position:absolute;top:35px;width:1px;height:1px;overflow:hidden}
.gnb_js .gnb_2dli a {display:inline-block;float:none !important;padding:0 10px;width:161px;text-align:left}
.gnb_1dli_over .gnb_2dul {left:-1px;width:181px;height:auto;border:1px solid #c3c7c5;border-top:0;background:#fff}
.gnb_1dli_over2 .gnb_2dul {right:-1px;width:181px;height:auto;border:1px solid #c3c7c5;border-top:0;background:#fff}
.gnb_js .gnb_grp_style {background:#f7f7f7 !important}
.gnb_js .gnb_grp_div {border-top:1px solid #eee}
@ -168,7 +168,7 @@ textarea {width:90%}
select {border:1px solid #ced9de}
button {padding:3px;border:1px solid #ced9de;background:#f6f9fa;cursor:pointer}
fieldset {margin-bottom:20px}
legend {margin:0;padding:0;width:1px;height:1px;font-size:0;line-height:0;border:0;overflow:hidden}
legend {position:absolute;font-size:0;line-height:0;border:0;overflow:hidden}
fieldset span {display:block;margin-bottom:10px}
fieldset p {color:#4c5f67}
fieldset button, .fieldset_submit {padding:0 15px;height:23px;border:0;background:#617d46;color:#fff;font-size:1em;line-height:2.1em;vertical-align:middle;cursor:pointer}

View File

@ -28,7 +28,7 @@ a:active {color:#000;text-decoration:underline}
.msg_sound_only,
.sound_only {display:inline-block !important;position:absolute;top:0;left:0;margin:0 !important;padding:0 !important;font-size:0;line-height:0;border:0 !important;overflow:hidden !important}
/* 본문 바로가기 */
#to_content a {z-index:100000;position:absolute;top:0;left:0;font-size:0;line-height:0;overflow:hidden}
#to_content a {z-index:100000;position:absolute;top:0;left:0;width:1px;height:1px;font-size:0;line-height:0;overflow:hidden}
#to_content a:focus,
#to_content a:active {width:100%;height:75px;background:#21272e;color:#fff;font-size:2em;font-weight:bold;text-align:center;text-decoration:none;line-height:3.3em}
@ -75,28 +75,30 @@ a:active {color:#000;text-decoration:underline}
/* gnb js off */
#gnb {z-index:10;margin:-1px 0 0;border-top:1px solid #e7f1ed;border-bottom:1px solid #c3c7c5;background:#f0f4f8}
#gnb h2 {position:absolute;margin:0;padding:0;font-size:0;line-height:0;overflow:hidden}
#gnb_ul {margin:0 auto;padding:0;width:980px;zoom:1}
#gnb_ul:after {display:block;visibility:hidden;clear:both;content:""}
.gnb_1depth {z-index:10;clear:both;zoom:1}
.gnb_1depth:after {display:block;visibility:hidden;clear:both;content:""}
.gnb_1depth a {display:block;float:left;width:80px;height:35px;font-weight:bold;line-height:2.95em;text-decoration:none}
.gnb_1depth a:focus,
.gnb_1depth a:hover {text-decoration:none}
.gnb_1depth ul {float:left;width:auto}
.gnb_2depth {float:left}
.gnb_2depth a {font-weight:normal}
#gnb_1dul {margin:0 auto;padding:0;width:980px;zoom:1}
#gnb_1dul:after {display:block;visibility:hidden;clear:both;content:""}
.gnb_1dli {z-index:10;clear:both;zoom:1}
.gnb_1dli:after {display:block;visibility:hidden;clear:both;content:""}
.gnb_1da {display:block;float:left;width:80px;height:35px;font-weight:bold;line-height:2.95em;text-decoration:none}
.gnb_1da:focus,
.gnb_1da:hover {text-decoration:none}
.gnb_2dul {float:left;width:auto}
.gnb_2dli {float:left}
.gnb_2da {display:block;float:left;width:80px;height:35px;line-height:2.95em;text-decoration:none}
.gnb_2da:focus,
.gnb_2da:hover {text-decoration:none}
/* gnb js on */
.gnb_js {}
.gnb_js #gnb_ul {zoom:1}
.gnb_js #gnb_ul:after {display:block;visibility:hidden;clear:both;content:""}
.gnb_js .gnb_1depth {clear:none;position:relative;float:left}
.gnb_js .gnb_1depth a {text-align:center}
.gnb_js .gnb_1depth_air a {float:none;background:#f7f7f2;color:#000}
.gnb_js .gnb_1depth_on a {float:none;border-color:#e0e5e9;background:#fff;color:#000}
.gnb_js .gnb_sub_ul {position:absolute;top:35px;width:1px;height:1px;overflow:hidden}
.gnb_js .gnb_2depth a {display:inline-block;float:none !important;padding:0 10px;width:161px;text-align:left}
.gnb_1depth_over .gnb_sub_ul {left:-1px;width:181px;height:auto;border:1px solid #c3c7c5;border-top:0;background:#fff}
.gnb_1depth_over2 .gnb_sub_ul {right:-1px;width:181px;height:auto;border:1px solid #c3c7c5;border-top:0;background:#fff}
.gnb_js #gnb_1dul {zoom:1}
.gnb_js #gnb_1dul:after {display:block;visibility:hidden;clear:both;content:""}
.gnb_js .gnb_1dli {clear:none;position:relative;float:left}
.gnb_js .gnb_1da {text-align:center}
.gnb_js .gnb_1dli_air a {float:none;background:#f7f7f2;color:#000}
.gnb_js .gnb_1dli_on a {float:none;border-color:#e0e5e9;background:#fff;color:#000}
.gnb_js .gnb_2dul {position:absolute;top:35px;width:1px;height:1px;overflow:hidden}
.gnb_js .gnb_2da {display:inline-block;float:none !important;padding:0 10px;width:161px;text-align:left}
.gnb_1dli_over .gnb_2dul {left:-1px;width:181px;height:auto;border:1px solid #c3c7c5;border-top:0;background:#fff}
.gnb_1dli_over2 .gnb_2dul {right:-1px;width:181px;height:auto;border:1px solid #c3c7c5;border-top:0;background:#fff}
.gnb_empty {width:100%;height:35px;text-align:center;line-height:2.95em}

View File

@ -132,21 +132,21 @@ if ($config['cf_include_head']) {
<nav id="gnb">
<script>$('#gnb').addClass('gnb_js');</script>
<h2>홈페이지 메인메뉴</h2>
<ul id="gnb_ul">
<ul id="gnb_1dul">
<?php
$sql = " select * from {$g4['group_table']} where gr_show_menu = '1' and gr_device <> 'mobile' order by gr_order ";
$result = sql_query($sql);
for ($gi=0; $row=sql_fetch_array($result); $gi++) { // gi 는 group index
?>
<li class="gnb_1depth">
<a href="<?php echo G4_BBS_URL ?>/group.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo $row['gr_subject'] ?></a>
<ul class="gnb_sub_ul">
<li class="gnb_1dli">
<a href="<?php echo G4_BBS_URL ?>/group.php?gr_id=<?php echo $row['gr_id'] ?>" class="gnb_1da"><?php echo $row['gr_subject'] ?></a>
<ul class="gnb_2dul">
<?php
$sql2 = " select * from {$g4['board_table']} where gr_id = '{$row['gr_id']}' and bo_show_menu = '1' and bo_device <> 'mobile' order by bo_order ";
$result2 = sql_query($sql2);
for ($bi=0; $row2=sql_fetch_array($result2); $bi++) { // bi 는 board index
?>
<li class="gnb_2depth"><a href="<?php echo G4_BBS_URL ?>/board.php?bo_table=<?php echo $row2['bo_table'] ?>"><?php echo $row2['bo_subject'] ?></a></li>
<li class="gnb_2dli"><a href="<?php echo G4_BBS_URL ?>/board.php?bo_table=<?php echo $row2['bo_table'] ?>" class="gnb_2da"><?php echo $row2['bo_subject'] ?></a></li>
<?php } ?>
</ul>
</li>

View File

@ -15,11 +15,11 @@ $(function(){
});
// 주메뉴
var $gnb = $(".gnb_1depth > a");
var $gnb = $(".gnb_1dli > a");
$gnb.mouseover(function() {
if(mouse_event) {
$(".gnb_1depth").removeClass("gnb_1depth_over gnb_1depth_over2 gnb_1depth_on");
$(this).parent().addClass("gnb_1depth_over gnb_1depth_on");
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
$(this).parent().addClass("gnb_1dli_over gnb_1dli_on");
menu_rearrange($(this).parent());
hide_menu = false;
}
@ -29,17 +29,17 @@ $(function(){
hide_menu = true;
});
$(".gnb_1depth li").mouseover(function() {
$(".gnb_2dli").mouseover(function() {
hide_menu = false;
});
$(".gnb_1depth li").mouseout(function() {
$(".gnb_2dli").mouseout(function() {
hide_menu = true;
});
$gnb.focusin(function() {
$(".gnb_1depth").removeClass("gnb_1depth_over gnb_1depth_over2 gnb_1depth_on");
$(this).parent().addClass("gnb_1depth_over gnb_1depth_on");
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
$(this).parent().addClass("gnb_1dli_over gnb_1dli_on");
menu_rearrange($(this).parent());
hide_menu = false;
});
@ -48,18 +48,18 @@ $(function(){
hide_menu = true;
});
$(".gnb_1depth ul a").focusin(function() {
$(".gnb_1depth").removeClass("gnb_1depth_over gnb_1depth_over2 gnb_1depth_on");
var $gnb_li = $(this).closest(".gnb_1depth").addClass("gnb_1depth_over gnb_1depth_on");
menu_rearrange($(this).closest(".gnb_1depth"));
$(".gnb_2da").focusin(function() {
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
var $gnb_li = $(this).closest(".gnb_1dli").addClass("gnb_1dli_over gnb_1dli_on");
menu_rearrange($(this).closest(".gnb_1dli"));
hide_menu = false;
});
$(".gnb_1depth ul a").focusout(function() {
$(".gnb_2da").focusout(function() {
hide_menu = true;
});
$('#gnb_ul>li').bind('mouseleave',function(){
$('#gnb_1dul>li').bind('mouseleave',function(){
submenu_hide();
});
@ -70,7 +70,7 @@ $(function(){
});
function submenu_hide() {
$(".gnb_1depth").removeClass("gnb_1depth_over gnb_1depth_over2 gnb_1depth_on");
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
}
// 텍스트 리사이즈 카운트 쿠키있으면 실행
@ -89,16 +89,16 @@ $(function(){
function menu_rearrange(el)
{
var width = $("#gnb_ul").width();
var width = $("#gnb_1dul").width();
var left = w1 = w2 = 0;
var idx = $(".gnb_1depth").index(el);
var idx = $(".gnb_1dli").index(el);
for(i=0; i<=idx; i++) {
w1 = $(".gnb_1depth:eq("+i+")").outerWidth();
w2 = $(".gnb_2depth > a:eq("+i+")").outerWidth(true);
w1 = $(".gnb_1dli:eq("+i+")").outerWidth();
w2 = $(".gnb_2dli > a:eq("+i+")").outerWidth(true);
if((left + w2) > width) {
el.removeClass("gnb_1depth_over").addClass("gnb_1depth_over2");
el.removeClass("gnb_1dli_over").addClass("gnb_1dli_over2");
}
left += w1;