mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-23 13:19:56 +09:00
Issue 1603: Admin menu navigation UX enhancement. (Desktop/Mobile)
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10341 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
c308ad67cb
commit
4d9155e861
5 changed files with 128 additions and 114 deletions
|
|
@ -152,45 +152,69 @@ jQuery(function($){
|
|||
// Global Navigation Bar
|
||||
jQuery(function($){
|
||||
|
||||
$.fn.xeMenu = function(){
|
||||
this
|
||||
.removeClass('jx')
|
||||
.attr('role', 'navigation') // WAI-ARIA role
|
||||
.find('li')
|
||||
.attr('role', 'menuitem') // WAI-ARIA role
|
||||
.find('>ul').css('height','0').end()
|
||||
.filter(':has(>ul)')
|
||||
.attr('aria-haspopup', 'true') // WAI-ARIA
|
||||
$.fn.xeMenu = function(){
|
||||
this
|
||||
.attr('role', 'navigation') // WAI-ARIA role
|
||||
.find('>.nav>li')
|
||||
.attr('role', 'menuitem') // WAI-ARIA role
|
||||
.find('>ul').css('height','0').end()
|
||||
.filter(':has(>ul)')
|
||||
.attr('aria-haspopup', 'true') // WAI-ARIA
|
||||
.end()
|
||||
.end()
|
||||
.end()
|
||||
.mouseover(function(){
|
||||
$(this)
|
||||
.addClass('active')
|
||||
.find('>ul>li>ul').css('height','auto').end()
|
||||
.find('>.bmk>.tgContent').show();
|
||||
})
|
||||
.mouseleave(function(){
|
||||
$(this)
|
||||
.removeClass('active')
|
||||
.find('>ul>li>ul').css('height','0').end()
|
||||
.find('>.bmk>.tgContent').hide();
|
||||
})
|
||||
.focusout(function(){
|
||||
var $this = $(this);
|
||||
setTimeout(function(){
|
||||
if(!$this.find(':focus').length) {
|
||||
$this.removeClass('active').find('>ul>li>ul').css('height','0');
|
||||
.find('>.nav')
|
||||
.mouseover(function(){
|
||||
$(this)
|
||||
.parent('.gnb').addClass('active').end()
|
||||
.find('>li>ul').css('height','auto').end()
|
||||
})
|
||||
.mouseleave(function(){
|
||||
$(this)
|
||||
.parent('.gnb').removeClass('active').end()
|
||||
.find('>li>ul').css('height','0').end()
|
||||
})
|
||||
.focusout(function(){
|
||||
var $this = $(this);
|
||||
setTimeout(function(){
|
||||
if(!$this.find(':focus').length) {
|
||||
$this.mouseleave();
|
||||
}
|
||||
}, 1);
|
||||
})
|
||||
.delegate('a', {
|
||||
focus : function(){
|
||||
$(this).mouseover();
|
||||
}
|
||||
}, 1);
|
||||
})
|
||||
.delegate('a', {
|
||||
focus : function(){
|
||||
$(this).mouseover();
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
this
|
||||
.find('>.bmk')
|
||||
.removeClass('active')
|
||||
.mouseover(function(){
|
||||
$(this).addClass('active')
|
||||
})
|
||||
.mouseleave(function(){
|
||||
$(this).removeClass('active')
|
||||
})
|
||||
.focusout(function(){
|
||||
var $this = $(this);
|
||||
setTimeout(function(){
|
||||
if(!$this.find(':focus').length) {
|
||||
$this.mouseleave();
|
||||
}
|
||||
}, 1);
|
||||
})
|
||||
.delegate('a', {
|
||||
focus : function(){
|
||||
$(this).mouseover();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$('div.gnb').xeMenu();
|
||||
|
||||
$('div.gnb').xeMenu();
|
||||
$('.gnb>.mnv').change(function(){
|
||||
window.location.href=$(this).find('option:selected').val();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
|
|
|||
2
modules/admin/tpl/js/admin.min.js
vendored
2
modules/admin/tpl/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue