* Mobile template: Close sidemenu after clicking on items in sidebar

This commit is contained in:
Hadi Nategh 2016-09-21 17:39:38 +02:00
parent e43a0cf4fb
commit 56df11b5da
2 changed files with 3 additions and 0 deletions

View File

@ -278,6 +278,8 @@ var et2_tree = (function(){ "use strict"; return et2_inputWidget.extend(
var args = jQuery.makeArray(arguments);
// splice in widget as 2. parameter, 1. is new node-id, now 3. is old node id
args.splice(1, 0, widget);
// try to close mobile sidemenu after clicking on node
if (egwIsMobile() && typeof args[2] == 'string') framework.toggleMenu('on');
return handler.apply(this, args);
});
}

View File

@ -46,6 +46,7 @@
open: function()
{
this._super.apply(this,arguments);
jQuery('.egw_fw_ui_sidemenu_listitem', this.contentDiv).click(function(){framework.toggleMenu('on');});
framework.toggleMenu('on');
}
});