mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-17 15:53:28 +00:00
repair the mobile menu's bug (#2268)
This commit is contained in:
committed by
Daniel Pan
parent
1e0c9984e6
commit
54a01b495b
@@ -601,7 +601,12 @@ var DropDownMenu = {
|
|||||||
//if mobile : bind the popmenu event
|
//if mobile : bind the popmenu event
|
||||||
if ($(".sf2-mobile-menu-toggle").length) {
|
if ($(".sf2-mobile-menu-toggle").length) {
|
||||||
$(".sf2-mobile-menu-toggle").on('click',function(){
|
$(".sf2-mobile-menu-toggle").on('click',function(){
|
||||||
|
var isDisplay = $('.sf2-mobile-menu').css('display') === "block" ? true : false;
|
||||||
|
if (isDisplay) {
|
||||||
|
_this.clickToClosePopMenu();
|
||||||
|
} else {
|
||||||
_this.clickToShowPopMenu();
|
_this.clickToShowPopMenu();
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
})
|
})
|
||||||
$(document).on('click', function(e){
|
$(document).on('click', function(e){
|
||||||
@@ -667,12 +672,10 @@ var DropDownMenu = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
clickToClosePopMenu: function() {
|
clickToClosePopMenu: function() {
|
||||||
$(".sf2-mobile-menu-mask").hide();
|
|
||||||
$(".sf2-mobile-menu").hide();
|
$(".sf2-mobile-menu").hide();
|
||||||
},
|
},
|
||||||
|
|
||||||
clickToShowPopMenu: function() {
|
clickToShowPopMenu: function() {
|
||||||
$(".sf2-mobile-menu-mask").show();
|
|
||||||
$(".sf2-mobile-menu").show();
|
$(".sf2-mobile-menu").show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user