You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

59 lines
1.7 KiB

  1. /*
  2. * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
  3. * Copyright (c) 2013-2018 北京泉江科技有限公司
  4. * 创建人:陈彬彬
  5. * 日 期:2017.03.16
  6. * 描 述:权限验证模块
  7. */
  8. (function ($, learun) {
  9. "use strict";
  10. $.fn.lrAuthorizeJfGrid = function (op) {
  11. var _headData = [];
  12. $.each(op.headData, function (id, item) {
  13. if (!!lrModuleColumnList[item.name.toLowerCase()]) {
  14. _headData.push(item);
  15. }
  16. });
  17. op.headData = _headData;
  18. $(this).jfGrid(op);
  19. }
  20. $.fn.lrAuthorizeJfGridLei = function (op) {
  21. var _headData = [];
  22. $.each(op.headData, function (id, item) {
  23. _headData.push(item);
  24. });
  25. op.headData = _headData;
  26. $(this).jfGrid(op);
  27. }
  28. $(function () {
  29. function btnAuthorize() {
  30. if (!!lrModuleButtonList) {
  31. var $container = $('[learun-authorize="yes"]');
  32. $container.find('[id]').each(function () {
  33. var $this = $(this);
  34. var id = $this.attr('id');
  35. if (!lrModuleButtonList[id]) {
  36. $this.remove();
  37. }
  38. });
  39. $container.find('.dropdown-menu').each(function () {
  40. var $this = $(this);
  41. if ($this.find('li').length == 0) {
  42. $this.remove();
  43. }
  44. });
  45. $container.css({ 'display': 'inline-block' });
  46. }
  47. else {
  48. setTimeout(btnAuthorize, 100);
  49. }
  50. }
  51. btnAuthorize();
  52. });
  53. })(window.jQuery, top.learun);