diff --git a/adm/admin.head.php b/adm/admin.head.php
index 4ecd231d3..5bb94c00c 100644
--- a/adm/admin.head.php
+++ b/adm/admin.head.php
@@ -18,7 +18,7 @@ function print_menu2($key, $no)
{
global $menu, $auth_menu, $is_admin, $auth, $g4;
- $str .= "
";
+ $str .= "";
for($i=1; $i'.$menu[$key][$i][1].'';
+ $str .= '- '.$menu[$key][$i][1].'
';
$auth_menu[$menu[$key][$i][0]] = $menu[$key][$i][1];
}
@@ -99,19 +99,19 @@ function imageview(id, w, h)
관리자 주메뉴
";
+ $gnb_str = "";
foreach($amenu as $key=>$value) {
$href1 = $href2 = '';
if ($menu['menu'.$key][0][2]) {
- $href1 = '';
+ $href1 = '';
$href2 = '';
} 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 .= "- ";
+ $current_class = " gnb_1dli_air";
+ $gnb_str .= '
- '.PHP_EOL;
$gnb_str .= $href1 . $menu['menu'.$key][0][1] . $href2;
$gnb_str .= print_menu1('menu'.$key, 1);
$gnb_str .= "
";
diff --git a/adm/admin.tail.php b/adm/admin.tail.php
index 9a800ba01..b3827e495 100644
--- a/adm/admin.tail.php
+++ b/adm/admin.tail.php
@@ -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;
+ }
+}
+