mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
Issue 2444. GNB vertical toggle. GMB mobile toggle. #site vertical height resize.
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11431 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
dd7a630a3b
commit
5e596ba61e
8 changed files with 264 additions and 74 deletions
|
|
@ -39,18 +39,19 @@ jQuery(function($){
|
|||
var $xGnb_li = $xGnb.find('>ul>li');
|
||||
$(window).resize(function(){
|
||||
setTimeout(function(){
|
||||
if($(window).width() >= 980){ // Over than 1024px
|
||||
$xGnb.height('auto').height($xBody.height());
|
||||
} else { // Less than 1024
|
||||
$xGnb.height('auto');
|
||||
if($(window).width() < 980 || $(window).width() > 1240){
|
||||
$xBody.removeClass('wide');
|
||||
} else {
|
||||
$xBody.addClass('wide');
|
||||
}
|
||||
if($(window).width() < 980){
|
||||
$xBody.addClass('mobile');
|
||||
}
|
||||
}, 100);
|
||||
}).resize();
|
||||
// GNB Click toggle
|
||||
// Add virtual class
|
||||
$xGnb_li.find('>ul').prev('a').addClass('virtual');
|
||||
// Virtual click
|
||||
$xGnb_li.find('>a.virtual')
|
||||
$xGnb_li.find('>a').not('[href="#gnb"]') //.virtual
|
||||
.bind('click focus', function(){
|
||||
var $this = $(this);
|
||||
// Submenu toggle
|
||||
|
|
@ -58,6 +59,8 @@ jQuery(function($){
|
|||
$xGnb_li.not($this.parent('li')).removeClass('open');
|
||||
$(this).parent('li').toggleClass('open');
|
||||
}
|
||||
$xGnb.trigger('mouseenter'); // GNB Hover
|
||||
$(window).resize();
|
||||
return false;
|
||||
});
|
||||
// Toggle all
|
||||
|
|
@ -70,5 +73,43 @@ jQuery(function($){
|
|||
$xGnb_li.removeClass('open');
|
||||
$xGnb.removeClass('all');
|
||||
}
|
||||
})
|
||||
.focus(function(){
|
||||
$xGnb.trigger('mouseenter'); // GNB Hover
|
||||
});
|
||||
// GNB Hover toggle
|
||||
function contentBugFix(){ // Chrome browser rendering bug fix
|
||||
$xContent.width('99.99%');
|
||||
setTimeout(function(){
|
||||
$xContent.removeAttr('style');
|
||||
}, 0);
|
||||
}
|
||||
$xGnb
|
||||
.mouseenter(function(){ // Mouseenter
|
||||
if($(window).width() >= 980){
|
||||
setTimeout(function(){
|
||||
$xBody.removeClass('wide');
|
||||
contentBugFix();
|
||||
}, 200);
|
||||
}
|
||||
})
|
||||
.mouseleave(function(){ // Mouseleave
|
||||
if($(window).width() >= 980 && $(window).width() < 1240){
|
||||
$xBody.addClass('wide');
|
||||
contentBugFix();
|
||||
}
|
||||
});
|
||||
// GNB Mobile Toggle
|
||||
$xGnb.find('>a[href="#gnbNav"]').click(function(){
|
||||
$(this).parent('.gnb').toggleClass('open');
|
||||
return false;
|
||||
});
|
||||
// GNB Close
|
||||
$xGnb
|
||||
.prepend('<button type="button" class="close before" />')
|
||||
.append('<button type="button" class="close after" />');
|
||||
$xGnb.find('>.close').focus(function(){
|
||||
$xBody.addClass('wide');
|
||||
contentBugFix();
|
||||
});
|
||||
});
|
||||
118
modules/admin/tpl/js/admin.min.js
vendored
118
modules/admin/tpl/js/admin.min.js
vendored
|
|
@ -1,3 +1,115 @@
|
|||
jQuery(function(a){window.top.scrollTo(0,0);a(".x .skipNav>a").click(function(){a(a(this).attr("href")).attr("tabindex","0").css("outline","0").focus()});var d=a(".x .x_tabbable");d.find('.x_tab-pane:not(".x_active")').hide();d.find(".x_nav-tabs>li>a").click(function(){var b=a(this);b.parent("li").addClass("x_active").siblings().removeClass("x_active");d.find(b.attr("href")).addClass("x_active").show().siblings().removeClass("x_active").hide();return!1});var e=a(".x>.body");e.find(">.content");var b=
|
||||
e.find(">.gnb"),c=b.find(">ul>li");a(window).resize(function(){setTimeout(function(){980<=a(window).width()?b.height("auto").height(e.height()):b.height("auto")},100)}).resize();c.find(">ul").prev("a").addClass("virtual");c.find(">a.virtual").bind("click focus",function(){var d=a(this);b.hasClass("all")||(c.not(d.parent("li")).removeClass("open"),a(this).parent("li").toggleClass("open"));return!1});c.find('>a[href="#gnb"]').click(function(){b.hasClass("all")?(c.removeClass("open"),b.removeClass("all")):
|
||||
(c.addClass("open"),b.addClass("all"))})});
|
||||
/* NHN (developers@xpressengine.com) */
|
||||
jQuery(function($){
|
||||
// iSO mobile device toolbar remove
|
||||
window.top.scrollTo(0,0);
|
||||
// Skip to content
|
||||
$('.x .skipNav>a').click(function(){
|
||||
$($(this).attr('href')).attr('tabindex','0').css('outline','0').focus();
|
||||
});
|
||||
/*
|
||||
// TARGET toggle
|
||||
$('.x [data-toggle]').click(function(){
|
||||
$($(this).attr('data-toggle')).toggle();
|
||||
return false;
|
||||
});
|
||||
// TARGET show
|
||||
$('.x [data-show]').click(function(){
|
||||
$($(this).attr('data-show')).show();
|
||||
return false;
|
||||
});
|
||||
// TARGET hide
|
||||
$('.x [data-hide]').click(function(){
|
||||
$($(this).attr('data-hide')).hide();
|
||||
return false;
|
||||
});
|
||||
*/
|
||||
// Tab Navigation
|
||||
var $tabbable = $('.x .x_tabbable');
|
||||
$tabbable.find('.x_tab-pane:not(".x_active")').hide();
|
||||
$tabbable.find('.x_nav-tabs>li>a').click(function(){
|
||||
var $this = $(this);
|
||||
$this.parent('li').addClass('x_active').siblings().removeClass('x_active');
|
||||
$tabbable.find($this.attr('href')).addClass('x_active').show().siblings().removeClass('x_active').hide();
|
||||
return false;
|
||||
});
|
||||
// GNB Height 100%
|
||||
var $xBody = $('.x>.body');
|
||||
var $xContent = $xBody.find('>.content');
|
||||
var $xGnb = $xBody.find('>.gnb');
|
||||
var $xGnb_li = $xGnb.find('>ul>li');
|
||||
$(window).resize(function(){
|
||||
setTimeout(function(){
|
||||
if($(window).width() < 980 || $(window).width() > 1240){
|
||||
$xBody.removeClass('wide');
|
||||
} else {
|
||||
$xBody.addClass('wide');
|
||||
}
|
||||
if($(window).width() < 980){
|
||||
$xBody.addClass('mobile');
|
||||
}
|
||||
}, 100);
|
||||
}).resize();
|
||||
// GNB Click toggle
|
||||
// Virtual click
|
||||
$xGnb_li.find('>a').not('[href="#gnb"]') //.virtual
|
||||
.bind('click focus', function(){
|
||||
var $this = $(this);
|
||||
// Submenu toggle
|
||||
if(!$xGnb.hasClass('all')) {
|
||||
$xGnb_li.not($this.parent('li')).removeClass('open');
|
||||
$(this).parent('li').toggleClass('open');
|
||||
}
|
||||
$xGnb.trigger('mouseenter'); // GNB Hover
|
||||
$(window).resize();
|
||||
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
|
||||
function contentBugFix(){ // Chrome browser rendering bug fix
|
||||
$xContent.width('99.99%');
|
||||
setTimeout(function(){
|
||||
$xContent.removeAttr('style');
|
||||
}, 0);
|
||||
}
|
||||
$xGnb
|
||||
.mouseenter(function(){ // Mouseenter
|
||||
if($(window).width() >= 980){
|
||||
setTimeout(function(){
|
||||
$xBody.removeClass('wide');
|
||||
contentBugFix();
|
||||
}, 200);
|
||||
}
|
||||
})
|
||||
.mouseleave(function(){ // Mouseleave
|
||||
if($(window).width() >= 980 && $(window).width() < 1240){
|
||||
$xBody.addClass('wide');
|
||||
contentBugFix();
|
||||
}
|
||||
});
|
||||
// GNB Mobile Toggle
|
||||
$xGnb.find('>a[href="#gnbNav"]').click(function(){
|
||||
$(this).parent('.gnb').toggleClass('open');
|
||||
return false;
|
||||
});
|
||||
// GNB Close
|
||||
$xGnb
|
||||
.prepend('<button type="button" class="close before" />')
|
||||
.append('<button type="button" class="close after" />');
|
||||
$xGnb.find('>.close').focus(function(){
|
||||
$xBody.addClass('wide');
|
||||
contentBugFix();
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue