1
0
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:
shanshuirenjia
2018-08-08 16:53:26 +08:00
committed by Daniel Pan
parent 1e0c9984e6
commit 54a01b495b

View File

@@ -601,7 +601,12 @@ var DropDownMenu = {
//if mobile : bind the popmenu event
if ($(".sf2-mobile-menu-toggle").length) {
$(".sf2-mobile-menu-toggle").on('click',function(){
var isDisplay = $('.sf2-mobile-menu').css('display') === "block" ? true : false;
if (isDisplay) {
_this.clickToClosePopMenu();
} else {
_this.clickToShowPopMenu();
}
return false;
})
$(document).on('click', function(e){
@@ -667,12 +672,10 @@ var DropDownMenu = {
},
clickToClosePopMenu: function() {
$(".sf2-mobile-menu-mask").hide();
$(".sf2-mobile-menu").hide();
},
clickToShowPopMenu: function() {
$(".sf2-mobile-menu-mask").show();
$(".sf2-mobile-menu").show();
}
}