Просмотр исходного кода

# Improve/346 Disable group select-box when the user does not Choose the grant "Only inside the group"
* Fix code based on review feedback.
* Fix function name.
* Commentout unused code.(add TBD)

Tatsuya Ise 8 лет назад
Родитель
Сommit
75ec3595c5
2 измененных файлов с 17 добавлено и 2 удалено
  1. 15 0
      config/env.dev.js
  2. 2 2
      resource/js/app.js

+ 15 - 0
config/env.dev.js

@@ -7,4 +7,19 @@ module.exports = {
     // 'growi-plugin-lsx',
     // 'growi-plugin-pukiwiki-like-linker',
   ],
+  // filters for debug
+  DEBUG: [
+    'express:*',
+    'crowi:*',
+    'crowi:crowi',
+    'crowi:crowi:dev',
+    'crowi:crowi:express-init',
+    'crowi:models:external-account',
+    'crowi:routes:login',
+    'crowi:routes:login-passport',
+    'crowi:service:PassportService',
+    'crowi:routes:page',
+    'crowi:plugins:*',
+    'crowi:InterceptorManager',
+  ].join(),
 };

+ 2 - 2
resource/js/app.js

@@ -189,7 +189,7 @@ const userRelatedGroups = JSON.parse(document.getElementById('user-related-group
 const pageEditorGrantSelectorElem = document.getElementById('page-grant-selector');
 const pageGrantElem = document.getElementById('page-grant');
 const pageGrantGroupElem = document.getElementById('grant-group');
-function setGrant(newPageGrant) {
+function updatePageGrantElems(newPageGrant) {
   pageGrantElem.value = newPageGrant.grant;
   pageGrantGroupElem.value = newPageGrant.grantGroup.userGroupId || '';
 }
@@ -206,7 +206,7 @@ if (pageEditorGrantSelectorElem) {
   ReactDOM.render(
     <GrantSelector crowi={crowi}
       userRelatedGroups={userRelatedGroups} pageGrant={pageGrant}
-      onChange={setGrant} />,
+      onChange={updatePageGrantElems} />,
     pageEditorGrantSelectorElem
   );
 }