* 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 6e2e877778
commit ef0405b021
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); var args = jQuery.makeArray(arguments);
// splice in widget as 2. parameter, 1. is new node-id, now 3. is old node id // splice in widget as 2. parameter, 1. is new node-id, now 3. is old node id
args.splice(1, 0, widget); 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); return handler.apply(this, args);
}); });
} }

View File

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