Issue 2442. GNB position fixed. Remove toggle all function.

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11432 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ChanMyeong 2012-09-21 08:07:43 +00:00
parent 5e596ba61e
commit 6f38c32834
5 changed files with 34 additions and 71 deletions

View file

@ -47,7 +47,6 @@
<li cond="!is_array($favorite_list) || count($favorite_list) < 1"><a href="{getUrl('', 'module', 'admin', 'act', 'dispModuleAdminContent')}">{$lang->no_data}</a></li> <li cond="!is_array($favorite_list) || count($favorite_list) < 1"><a href="{getUrl('', 'module', 'admin', 'act', 'dispModuleAdminContent')}">{$lang->no_data}</a></li>
</ul> </ul>
</li> </li>
<li><a href="#gnb"><span class="tx openAll">{$lang->open_all}</span><span class="tx closeAll">{$lang->close_all}</span></a></li>
</ul> </ul>
</nav> </nav>
<!-- /GNB --> <!-- /GNB -->

View file

@ -41,6 +41,7 @@ body>.x,.x table,.x input,.x textarea,.x select,.x button{font-size:13px}
.x a[target="_blank"]:after, .x a[target="_blank"]:after,
.x>.body>.gnb>ul>li>a:before, .x>.body>.gnb>ul>li>a:before,
.x .dashboard>section>h2:before{background-image:url(../../../../common/img/glyphicons-halflings.png);background-repeat:no-repeat} .x .dashboard>section>h2:before{background-image:url(../../../../common/img/glyphicons-halflings.png);background-repeat:no-repeat}
.x>.body>.gnb.all>a>i,
.x>.body>.gnb>ul>li.open>a:before, .x>.body>.gnb>ul>li.open>a:before,
.x>.body>.gnb>ul>li.active>a:before{background-image:url(../../../../common/img/glyphicons-halflings-white.png);background-repeat:no-repeat} .x>.body>.gnb>ul>li.active>a:before{background-image:url(../../../../common/img/glyphicons-halflings-white.png);background-repeat:no-repeat}
/* Layout */ /* Layout */
@ -55,14 +56,17 @@ body>.x,.x table,.x input,.x textarea,.x select,.x button{font-size:13px}
.x>.body:after{content:"";display:block;clear:both} .x>.body:after{content:"";display:block;clear:both}
.x>.body>.content{width:100%;padding:1px 0 0 0;float:right;margin:0 0 30px -100%} .x>.body>.content{width:100%;padding:1px 0 0 0;float:right;margin:0 0 30px -100%}
.x>.body>.content>*:first-child{margin-top:0} .x>.body>.content>*:first-child{margin-top:0}
.x>.body>.gnb{position:relative;left:-240px;float:left;width:220px;margin:0 -220px 0 0;background:#f4f4f4;box-shadow:2px 0 4px #ddd} .x>.body>.gnb{width:220px}
.x>.body.wide>.gnb{width:36px;margin:0 -36px 0 0;left:-60px;position:fixed;top:73px;left:10px} .x>.body>.gnb.all{position:relative;left:-240px;top:auto;float:left;margin:0 -220px 0 0}
.x>.body.wide>.gnb{width:36px}
.x>.body>.gnb,
.x>.body.wide>.gnb.all{position:fixed;top:73px;left:10px}
@media all and (max-width:980px){ @media all and (max-width:980px){
.x>.body, .x>.body,
.x>.body.wide{padding:0} .x>.body.wide{padding:0}
.x>.body>.content{width:auto;padding:1px 10px 0 10px;float:none;margin:0 0 30px 0} .x>.body>.content{width:auto;padding:1px 10px 0 10px;float:none;margin:0 0 30px 0}
.x>.body>.gnb, .x>.body>.gnb,
.x>.body.wide>.gnb{float:none;width:auto;margin-right:0;left:0;border-radius:0;position:relative;top:auto;left:auto} .x>.body>.gnb.all{float:none;width:auto;margin-right:0;left:0;border-radius:0;position:relative;top:auto;left:auto}
} }
/* Header */ /* Header */
.x>.header>h1{margin:0 15px 0 0;float:left;text-shadow:0 1px 0 #fff} .x>.header>h1{margin:0 15px 0 0;float:left;text-shadow:0 1px 0 #fff}
@ -97,13 +101,13 @@ body>.x,.x table,.x input,.x textarea,.x select,.x button{font-size:13px}
/* GNB */ /* GNB */
.x>.body>.gnb>.close{background:none;border:0;position:absolute;top:0;left:0;width:100%;height:1px;overflow:hidden;margin:0;padding:0} .x>.body>.gnb>.close{background:none;border:0;position:absolute;top:0;left:0;width:100%;height:1px;overflow:hidden;margin:0;padding:0}
.x>.body>.gnb ul{margin:0;padding:0;list-style:none} .x>.body>.gnb ul{margin:0;padding:0;list-style:none}
.x>.body>.gnb>ul{position:relative;z-index:1;box-shadow:0 2px 4px #ddd} .x>.body>.gnb>ul{position:relative;z-index:1;box-shadow:2px 2px 4px #ddd}
.x>.body>.gnb a{text-decoration:none;text-shadow:0 1px 0 #fff;color:#000;display:block} .x>.body>.gnb a{text-decoration:none;text-shadow:0 1px 0 #fff;color:#000;display:block}
.x>.body>.gnb>a[href="#gnbNav"]{display:none} .x>.body>.gnb>a[href="#gnbNav"]{display:none}
@media all and (max-width:980px){ @media all and (max-width:980px){
.x>.body.mobile>.gnb>ul>li{display:none} .x>.body>.gnb>ul>li{display:none}
.x>.body.mobile>.gnb>ul>li:first-child{display:block} .x>.body>.gnb>ul>li:first-child{display:block}
.x>.body.mobile>.gnb.open>ul>li{display:block} .x>.body>.gnb.open>ul>li{display:block}
.x>.body>.gnb>a[href="#gnbNav"]{display:block;position:absolute;z-index:2;top:0;right:0;line-height:37px;width:44px;white-space:nowrap;font-size:0;border-left:1px solid #ddd} .x>.body>.gnb>a[href="#gnbNav"]{display:block;position:absolute;z-index:2;top:0;right:0;line-height:37px;width:44px;white-space:nowrap;font-size:0;border-left:1px solid #ddd}
.x>.body>.gnb>a[href="#gnbNav"]:before{content:"";position:absolute;width:1px;height:100%;border-left:1px solid #fff} .x>.body>.gnb>a[href="#gnbNav"]:before{content:"";position:absolute;width:1px;height:100%;border-left:1px solid #fff}
.x>.body>.gnb>a>i{position:absolute;top:50%;left:50%;margin:-7px 0 0 -7px} .x>.body>.gnb>a>i{position:absolute;top:50%;left:50%;margin:-7px 0 0 -7px}

View file

@ -41,6 +41,7 @@ body>.x,.x table,.x input,.x textarea,.x select,.x button{font-size:13px}
.x a[target="_blank"]:after, .x a[target="_blank"]:after,
.x>.body>.gnb>ul>li>a:before, .x>.body>.gnb>ul>li>a:before,
.x .dashboard>section>h2:before{background-image:url(../../../../common/img/glyphicons-halflings.png);background-repeat:no-repeat} .x .dashboard>section>h2:before{background-image:url(../../../../common/img/glyphicons-halflings.png);background-repeat:no-repeat}
.x>.body>.gnb.all>a>i,
.x>.body>.gnb>ul>li.open>a:before, .x>.body>.gnb>ul>li.open>a:before,
.x>.body>.gnb>ul>li.active>a:before{background-image:url(../../../../common/img/glyphicons-halflings-white.png);background-repeat:no-repeat} .x>.body>.gnb>ul>li.active>a:before{background-image:url(../../../../common/img/glyphicons-halflings-white.png);background-repeat:no-repeat}
/* Layout */ /* Layout */
@ -55,14 +56,17 @@ body>.x,.x table,.x input,.x textarea,.x select,.x button{font-size:13px}
.x>.body:after{content:"";display:block;clear:both} .x>.body:after{content:"";display:block;clear:both}
.x>.body>.content{width:100%;padding:1px 0 0 0;float:right;margin:0 0 30px -100%} .x>.body>.content{width:100%;padding:1px 0 0 0;float:right;margin:0 0 30px -100%}
.x>.body>.content>*:first-child{margin-top:0} .x>.body>.content>*:first-child{margin-top:0}
.x>.body>.gnb{position:relative;left:-240px;float:left;width:220px;margin:0 -220px 0 0;background:#f4f4f4;box-shadow:2px 0 4px #ddd} .x>.body>.gnb{width:220px}
.x>.body.wide>.gnb{width:36px;margin:0 -36px 0 0;left:-60px;position:fixed;top:73px;left:10px} .x>.body>.gnb.all{position:relative;left:-240px;top:auto;float:left;margin:0 -220px 0 0}
.x>.body.wide>.gnb{width:36px}
.x>.body>.gnb,
.x>.body.wide>.gnb.all{position:fixed;top:73px;left:10px}
@media all and (max-width:980px){ @media all and (max-width:980px){
.x>.body, .x>.body,
.x>.body.wide{padding:0} .x>.body.wide{padding:0}
.x>.body>.content{width:auto;padding:1px 10px 0 10px;float:none;margin:0 0 30px 0} .x>.body>.content{width:auto;padding:1px 10px 0 10px;float:none;margin:0 0 30px 0}
.x>.body>.gnb, .x>.body>.gnb,
.x>.body.wide>.gnb{float:none;width:auto;margin-right:0;left:0;border-radius:0;position:relative;top:auto;left:auto} .x>.body>.gnb.all{float:none;width:auto;margin-right:0;left:0;border-radius:0;position:relative;top:auto;left:auto}
} }
/* Header */ /* Header */
.x>.header>h1{margin:0 15px 0 0;float:left;text-shadow:0 1px 0 #fff} .x>.header>h1{margin:0 15px 0 0;float:left;text-shadow:0 1px 0 #fff}
@ -97,13 +101,13 @@ body>.x,.x table,.x input,.x textarea,.x select,.x button{font-size:13px}
/* GNB */ /* GNB */
.x>.body>.gnb>.close{background:none;border:0;position:absolute;top:0;left:0;width:100%;height:1px;overflow:hidden;margin:0;padding:0} .x>.body>.gnb>.close{background:none;border:0;position:absolute;top:0;left:0;width:100%;height:1px;overflow:hidden;margin:0;padding:0}
.x>.body>.gnb ul{margin:0;padding:0;list-style:none} .x>.body>.gnb ul{margin:0;padding:0;list-style:none}
.x>.body>.gnb>ul{position:relative;z-index:1;box-shadow:0 2px 4px #ddd} .x>.body>.gnb>ul{position:relative;z-index:1;box-shadow:2px 2px 4px #ddd}
.x>.body>.gnb a{text-decoration:none;text-shadow:0 1px 0 #fff;color:#000;display:block} .x>.body>.gnb a{text-decoration:none;text-shadow:0 1px 0 #fff;color:#000;display:block}
.x>.body>.gnb>a[href="#gnbNav"]{display:none} .x>.body>.gnb>a[href="#gnbNav"]{display:none}
@media all and (max-width:980px){ @media all and (max-width:980px){
.x>.body.mobile>.gnb>ul>li{display:none} .x>.body>.gnb>ul>li{display:none}
.x>.body.mobile>.gnb>ul>li:first-child{display:block} .x>.body>.gnb>ul>li:first-child{display:block}
.x>.body.mobile>.gnb.open>ul>li{display:block} .x>.body>.gnb.open>ul>li{display:block}
.x>.body>.gnb>a[href="#gnbNav"]{display:block;position:absolute;z-index:2;top:0;right:0;line-height:37px;width:44px;white-space:nowrap;font-size:0;border-left:1px solid #ddd} .x>.body>.gnb>a[href="#gnbNav"]{display:block;position:absolute;z-index:2;top:0;right:0;line-height:37px;width:44px;white-space:nowrap;font-size:0;border-left:1px solid #ddd}
.x>.body>.gnb>a[href="#gnbNav"]:before{content:"";position:absolute;width:1px;height:100%;border-left:1px solid #fff} .x>.body>.gnb>a[href="#gnbNav"]:before{content:"";position:absolute;width:1px;height:100%;border-left:1px solid #fff}
.x>.body>.gnb>a>i{position:absolute;top:50%;left:50%;margin:-7px 0 0 -7px} .x>.body>.gnb>a>i{position:absolute;top:50%;left:50%;margin:-7px 0 0 -7px}

View file

@ -39,44 +39,24 @@ jQuery(function($){
var $xGnb_li = $xGnb.find('>ul>li'); var $xGnb_li = $xGnb.find('>ul>li');
$(window).resize(function(){ $(window).resize(function(){
setTimeout(function(){ setTimeout(function(){
if($(window).width() < 980 || $(window).width() > 1240){ if($(window).width() <= 980 || $(window).width() > 1240){
$xBody.removeClass('wide'); $xBody.removeClass('wide');
} else { } else {
$xBody.addClass('wide'); $xBody.addClass('wide');
} }
if($(window).width() < 980){
$xBody.addClass('mobile');
}
}, 100); }, 100);
}).resize(); }).resize();
// GNB Click toggle // GNB Click toggle
// Virtual click // Virtual click
$xGnb_li.find('>a').not('[href="#gnb"]') //.virtual $xGnb_li.find('ul').prev('a')
.bind('click focus', function(){ .bind('click focus', function(){
var $this = $(this); var $this = $(this);
// Submenu toggle // Submenu toggle
if(!$xGnb.hasClass('all')) { $xGnb_li.not($this.parent('li')).removeClass('open');
$xGnb_li.not($this.parent('li')).removeClass('open'); $(this).parent('li').toggleClass('open');
$(this).parent('li').toggleClass('open');
}
$xGnb.trigger('mouseenter'); // GNB Hover $xGnb.trigger('mouseenter'); // GNB Hover
$(window).resize();
return false; return false;
}); });
// Toggle all
$xGnb_li.find('>a[href="#gnb"]')
.click(function(){
if(!$xGnb.hasClass('all')){ // Open All
$xGnb_li.addClass('open');
$xGnb.addClass('all');
} else { // Close All
$xGnb_li.removeClass('open');
$xGnb.removeClass('all');
}
})
.focus(function(){
$xGnb.trigger('mouseenter'); // GNB Hover
});
// GNB Hover toggle // GNB Hover toggle
function contentBugFix(){ // Chrome browser rendering bug fix function contentBugFix(){ // Chrome browser rendering bug fix
$xContent.width('99.99%'); $xContent.width('99.99%');
@ -87,10 +67,8 @@ jQuery(function($){
$xGnb $xGnb
.mouseenter(function(){ // Mouseenter .mouseenter(function(){ // Mouseenter
if($(window).width() >= 980){ if($(window).width() >= 980){
setTimeout(function(){ $xBody.removeClass('wide');
$xBody.removeClass('wide'); contentBugFix();
contentBugFix();
}, 200);
} }
}) })
.mouseleave(function(){ // Mouseleave .mouseleave(function(){ // Mouseleave

View file

@ -39,44 +39,24 @@ jQuery(function($){
var $xGnb_li = $xGnb.find('>ul>li'); var $xGnb_li = $xGnb.find('>ul>li');
$(window).resize(function(){ $(window).resize(function(){
setTimeout(function(){ setTimeout(function(){
if($(window).width() < 980 || $(window).width() > 1240){ if($(window).width() <= 980 || $(window).width() > 1240){
$xBody.removeClass('wide'); $xBody.removeClass('wide');
} else { } else {
$xBody.addClass('wide'); $xBody.addClass('wide');
} }
if($(window).width() < 980){
$xBody.addClass('mobile');
}
}, 100); }, 100);
}).resize(); }).resize();
// GNB Click toggle // GNB Click toggle
// Virtual click // Virtual click
$xGnb_li.find('>a').not('[href="#gnb"]') //.virtual $xGnb_li.find('ul').prev('a')
.bind('click focus', function(){ .bind('click focus', function(){
var $this = $(this); var $this = $(this);
// Submenu toggle // Submenu toggle
if(!$xGnb.hasClass('all')) { $xGnb_li.not($this.parent('li')).removeClass('open');
$xGnb_li.not($this.parent('li')).removeClass('open'); $(this).parent('li').toggleClass('open');
$(this).parent('li').toggleClass('open');
}
$xGnb.trigger('mouseenter'); // GNB Hover $xGnb.trigger('mouseenter'); // GNB Hover
$(window).resize();
return false; return false;
}); });
// Toggle all
$xGnb_li.find('>a[href="#gnb"]')
.click(function(){
if(!$xGnb.hasClass('all')){ // Open All
$xGnb_li.addClass('open');
$xGnb.addClass('all');
} else { // Close All
$xGnb_li.removeClass('open');
$xGnb.removeClass('all');
}
})
.focus(function(){
$xGnb.trigger('mouseenter'); // GNB Hover
});
// GNB Hover toggle // GNB Hover toggle
function contentBugFix(){ // Chrome browser rendering bug fix function contentBugFix(){ // Chrome browser rendering bug fix
$xContent.width('99.99%'); $xContent.width('99.99%');
@ -87,10 +67,8 @@ jQuery(function($){
$xGnb $xGnb
.mouseenter(function(){ // Mouseenter .mouseenter(function(){ // Mouseenter
if($(window).width() >= 980){ if($(window).width() >= 980){
setTimeout(function(){ $xBody.removeClass('wide');
$xBody.removeClass('wide'); contentBugFix();
contentBugFix();
}, 200);
} }
}) })
.mouseleave(function(){ // Mouseleave .mouseleave(function(){ // Mouseleave