(function ($, zou) { "use strict"; $.fn.lrAuthorizeJfGrid = function (op) { var _headData = []; $.each(op.headData, function (id, item) { if (!!lrModuleColumnList[item.name.toLowerCase()]) { _headData.push(item); } }); op.headData = _headData; $(this).jfGrid(op); } $(function () { function btnAuthorize() { if (!!lrModuleButtonList) { var $container = $('[z-authorize="yes"]'); $container.find('[id]').each(function () { var $this = $(this); var id = $this.attr('id'); if (!lrModuleButtonList[id]) { $this.remove(); } }); $container.find('.dropdown-menu').each(function () { var $this = $(this); if ($this.find('li').length == 0) { $this.remove(); } }); $container.css({ 'display': 'inline-block' }); } else { setTimeout(btnAuthorize,100); } } btnAuthorize(); }); })(window.jQuery, top.zou);