Yuki Takei пре 7 година
родитељ
комит
7ff9ef535e
2 измењених фајлова са 3 додато и 9 уклоњено
  1. 0 9
      resource/js/app.js
  2. 3 0
      resource/js/components/PageEditor/GrantSelector.js

+ 0 - 9
resource/js/app.js

@@ -189,15 +189,6 @@ if (pageEditorOptionsSelectorElem) {
 // render GrantSelector
 const pageEditorGrantSelectorElem = document.getElementById('page-grant-selector');
 if (pageEditorGrantSelectorElem) {
-  // let userRelatedGroups;
-  // if (userRelatedGroupsElem != null) {
-  //   let userRelatedGroupsJSONString = userRelatedGroupsElem.textContent;
-  //   if (userRelatedGroupsJSONString != null && userRelatedGroupsJSONString.length > 0) {
-  //     userRelatedGroups = JSON.parse(userRelatedGroupsJSONString || '{}', (value) => {
-  //       return new UserGroup(value);
-  //     });
-  //   }
-  // }
   const pageGrantElem = document.getElementById('page-grant');
   const pageGrantGroupElem = document.getElementById('grant-group');
   /* eslint-disable no-inner-declarations */

+ 3 - 0
resource/js/components/PageEditor/GrantSelector.js

@@ -53,6 +53,7 @@ class GrantSelector extends React.Component {
 
     //// DIRTY HACK -- 2018.05.25 Yuki Takei
     // set group name to the bootstrap-select options
+    //  cz: .selectpicker('refresh') doesn't replace data-content
     $('.page-grant-selector .group-name').text(this.getGroupName());
   }
 
@@ -139,11 +140,13 @@ class GrantSelector extends React.Component {
 
       // DIRTY HACK -- 2018.05.25 Yuki Takei
       // remove 'Only inside the group' item
+      //  cz: .selectpicker('refresh') doesn't replace data-content
       grantElems.splice(3, 1);
     }
     else {
       // DIRTY HACK -- 2018.05.25 Yuki Takei
       // remove 'Reselect the group' item
+      //  cz: .selectpicker('refresh') doesn't replace data-content
       grantElems.splice(4, 1);
     }