module-group.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. {template "common/header"}
  2. <div class="we7-step">
  3. <ul>
  4. <li ><span class="content">1 安装应用</span></li>
  5. <li class="active"><span class="content">2 分配应用权限</span> </li>
  6. <li><span class="content">3 安装成功</span> </li>
  7. </ul>
  8. </div>
  9. <div id="js-module-group" class="module-group-page clearfix" ng-controller="moduleGroup" ng-cloak>
  10. <img src="{php echo tomedia($module['logo'])}" class="module-img" alt="">{if !empty($module['title'])}{$module['title']}{else}模板{/if}
  11. <div class="we7-header">
  12. 分配应用权限组(这里来定义哪些应用权限组可使用{if !empty($module['title'])}{$module['title']} 功能{else}该模板{/if})
  13. </div>
  14. <div class="alert we7-page-alert we7-margin-top hidden">
  15. 如果不选择可用权限组,则默认加入所有权限组
  16. </div>
  17. <form class="form we7-form we7-margin-top" action="" method="post" id="form1">
  18. <div class="form-group">
  19. <label class="col-sm-1 control-label">应用权限组</label>
  20. <div class="col-sm-11 form-controls">
  21. <div class="we7-group-show " ng-repeat="extend in moduleGroupList.groups" ng-if="extend.checked == 1">
  22. <input type="checkbox" name="group[]" checked value="{{extend.id}}">
  23. <div class="name">
  24. {{extend.name}}
  25. </div>
  26. <div class="group-app-list">
  27. <div class="group-app-item" ng-repeat="module in extend.modules_all">
  28. <img ng-src="{{module.logo}}" class="module-img" alt="">
  29. <div class="info">
  30. <div class="title text-over">
  31. {{module.title}}
  32. </div>
  33. <div class="type-list">
  34. <i ng-class="itme.icon" ng-repeat="itme in module.group_support | moduleInfo" ></i>
  35. </div>
  36. </div>
  37. </div>
  38. <div class="group-app-item" ng-repeat="module in extend.templates">
  39. <img ng-src="{{module.logo}}" class="template-img" alt="">
  40. <div class="info">
  41. <div class="title">
  42. {{module.title}}
  43. </div>
  44. <div class="type-list">
  45. <i class="wi wi-template"></i>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. <a class="action"></a>
  51. <a href="" class="remove" ng-click="extend.checked = 0"><i class="wi wi-error"></i></a>
  52. </div>
  53. <we7-modal-app module-list="moduleGroupList" multiple="true" on-confirm="groupConfirm()">
  54. <div class="add-new-block" >
  55. <i class="wi wi-plus"></i> 添加应用权限组
  56. </div>
  57. </we7-modal-app>
  58. </div>
  59. </div>
  60. <input type="hidden" name="flag" value="1">
  61. <input type="hidden" name="upgrade_flag" value="1">
  62. <input type="hidden" name="tid" value="{$tid}">
  63. <input type="hidden" name="support" value="{$module_support_name}">
  64. <div class="form-group col-sm-offset-1">
  65. <input type="submit" class="btn btn-primary" name="submit" value="确定继续安装{$module['title']}">
  66. </div>
  67. </form>
  68. <div class="distribution-steps">
  69. <div class="we7-margin-bottom-sm font-lg">分配应用权限的流程说明</div>
  70. <div class="steps-container">
  71. <div>
  72. <div class="num">1</div>
  73. <div class="title">
  74. <span class="wi wi-appjurisdiction"></span>添加应用权限组
  75. </div>
  76. <div class="content">
  77. 设置应用权限组名称,选择需要添加的公众号应用、小程序应用、微站模板,保存提交。
  78. <div><a href="{php echo url('module/group/post')}" class="color-default">去添加应用组 ></a></div>
  79. </div>
  80. </div>
  81. <div>
  82. <div class="num">2</div>
  83. <div class="title">
  84. <span class="wi wi-distribution"></span>分配应用到应用权限组
  85. </div>
  86. <div class="content">
  87. 选择上方相应的应用权限组,把应用添加到组中。或者到应用权限中编辑应用权限组。
  88. <div><a href="{php echo url('module/group')}" class="color-default">选择/去编辑应用组 ></a></div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. <script>
  94. angular.module('moduleApp').value('config', {
  95. module_group: {php echo !empty($module_group) ? json_encode($module_group) : 'null'}
  96. });
  97. angular.module('moduleApp').controller('moduleGroup', ['$scope', 'config', function ($scope, config) {
  98. $scope.moduleGroupList = {
  99. groups: config.module_group
  100. }
  101. $scope.loadChange = function() {
  102. $('.we7-group-show').each(function() {
  103. $(this).removeClass('low');
  104. $(this).removeClass('closed');
  105. if($(this).find('.group-app-list').outerHeight() > 70) {
  106. $(this).removeClass('low');
  107. $(this).addClass('closed');
  108. $(this).find('.action').on('click', function() {
  109. $(this).parent().toggleClass('closed')
  110. })
  111. } else {
  112. $(this).addClass('low');
  113. $(this).removeClass('closed');
  114. }
  115. })
  116. }
  117. // 添加应用权限组
  118. $scope.groupConfirm = function() {
  119. setTimeout(function(){
  120. $scope.loadChange()
  121. }, 20)
  122. }
  123. }]);
  124. angular.bootstrap($('#js-module-group'), ['moduleApp']);
  125. </script>
  126. </div>
  127. {template 'common/footer'}