소스 검색

Fixed a problem where the advanced search for people search and help desk wasn't working in IE11.

jalbr74 6 년 전
부모
커밋
b99e36d001

+ 1 - 0
client/src/i18n/translations_en.json

@@ -40,6 +40,7 @@
   "Display_Random": "Random",
   "Display_Random": "Random",
   "Display_SearchResultsExceeded": "Search results exceeded maximum search size",
   "Display_SearchResultsExceeded": "Search results exceeded maximum search size",
   "Display_SearchResultsNone": "No results",
   "Display_SearchResultsNone": "No results",
+  "Display_SearchAttrsUnique": "Search attributes must be unique",
   "Display_SelectAttribute": "Select attribute...",
   "Display_SelectAttribute": "Select attribute...",
   "Display_SetRandomPasswordPrompt": "Set a new random password for this user?",
   "Display_SetRandomPasswordPrompt": "Set a new random password for this user?",
   "Display_StrengthMeter": "Password Strength",
   "Display_StrengthMeter": "Password Strength",

+ 2 - 1
client/src/modules/helpdesk/helpdesk-search-base.component.ts

@@ -165,7 +165,8 @@ export default abstract class HelpDeskSearchBaseComponent {
                 keys.add(searchQuery.key);
                 keys.add(searchQuery.key);
             }
             }
 
 
-            if (keys.size < this.queries.length) {
+            const duplicateSearchAttrsFound = keys.size < this.queries.length;
+            if (duplicateSearchAttrsFound) {
                 this.$translate('Display_SearchAttrsUnique')
                 this.$translate('Display_SearchAttrsUnique')
                     .then((translation: string) => {
                     .then((translation: string) => {
                         this.searchMessage = translation;
                         this.searchMessage = translation;

+ 3 - 0
client/src/modules/helpdesk/main.ts

@@ -25,6 +25,9 @@ import 'angular-translate';
 import 'angular-sanitize';
 import 'angular-sanitize';
 import '@microfocus/ng-ias/dist/ng-ias';
 import '@microfocus/ng-ias/dist/ng-ias';
 
 
+// Add a polyfill for Set() for IE11, since it's used in peoplesearch-base.component.ts
+import 'core-js/es6/set';
+
 import { bootstrap, module } from 'angular';
 import { bootstrap, module } from 'angular';
 import helpDeskModule from './helpdesk.module';
 import helpDeskModule from './helpdesk.module';
 import PeopleService from '../../services/people.service';
 import PeopleService from '../../services/people.service';

+ 3 - 0
client/src/modules/peoplesearch/main.ts

@@ -24,6 +24,9 @@ import 'angular';
 import 'angular-translate';
 import 'angular-translate';
 import '@microfocus/ng-ias/dist/ng-ias';
 import '@microfocus/ng-ias/dist/ng-ias';
 
 
+// Add a polyfill for Set() for IE11, since it's used in peoplesearch-base.component.ts
+import 'core-js/es6/set';
+
 import { bootstrap, module } from 'angular';
 import { bootstrap, module } from 'angular';
 import ConfigService from '../../services/peoplesearch-config.service';
 import ConfigService from '../../services/peoplesearch-config.service';
 import peopleSearchModule from './peoplesearch.module';
 import peopleSearchModule from './peoplesearch.module';

+ 2 - 1
client/src/modules/peoplesearch/peoplesearch-base.component.ts

@@ -222,7 +222,8 @@ abstract class PeopleSearchBaseComponent {
                 keys.add(searchQuery.key);
                 keys.add(searchQuery.key);
             }
             }
 
 
-            if (keys.size < this.queries.length) {
+            const duplicateSearchAttrsFound = keys.size < this.queries.length;
+            if (duplicateSearchAttrsFound) {
                 this.$translate('Display_SearchAttrsUnique')
                 this.$translate('Display_SearchAttrsUnique')
                     .then((translation: string) => {
                     .then((translation: string) => {
                         this.searchMessage = translation;
                         this.searchMessage = translation;

+ 1 - 0
server/src/main/java/password/pwm/i18n/Display.java

@@ -152,6 +152,7 @@ public enum Display implements PwmDisplayBundle
     Display_SearchCompleted,
     Display_SearchCompleted,
     Display_SearchResultsInfo,
     Display_SearchResultsInfo,
     Display_SearchResultsExceeded,
     Display_SearchResultsExceeded,
+    Display_SearchAttrsUnique,
     Display_SetRandomPasswordPrompt,
     Display_SetRandomPasswordPrompt,
     Display_SearchResultsNone,
     Display_SearchResultsNone,
     Display_Second,
     Display_Second,