LP1831788 dialog dismissal and i18n repairs
authorBill Erickson <berickxx@gmail.com>
Wed, 31 Jul 2019 18:56:43 +0000 (14:56 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Thu, 1 Aug 2019 13:49:54 +0000 (09:49 -0400)
Update sandbox dialog error handling to treat all error conditions as
errors.  Dialogs no longer produce an error on dismissal, they just
complete the obvservable.

Add i18n-placeholder attributes to some grid filter placeholder text.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Open-ILS/src/eg2/src/app/share/grid/grid-filter-control.component.html
Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.ts

index 6367fb6..742cdca 100644 (file)
@@ -14,7 +14,8 @@
             </div>
           </div>
         </div>
-        <eg-combobox [idlClass]="col.idlFieldDef.class" (onChange)="applyLinkFilter($event, col)" placeholder="Enter value to filter by"></eg-combobox>
+        <eg-combobox [idlClass]="col.idlFieldDef.class" (onChange)="applyLinkFilter($event, col)" 
+          i18n-placeholder placeholder="Enter value to filter by"></eg-combobox>
       </div>
     </div>
     <div *ngSwitchCase="'bool'">
@@ -67,7 +68,8 @@
             </div>
           </div>
         </div>
-        <input type="text" class="form-control" [(ngModel)]="col.filterValue" (keyup.enter)="applyFilter(col)" [disabled]="col.filterInputDisabled" placeholder="Enter value to filter by">
+        <input type="text" class="form-control" [(ngModel)]="col.filterValue" (keyup.enter)="applyFilter(col)" 
+          [disabled]="col.filterInputDisabled" i18n-placeholder placeholder="Enter value to filter by">
       </div>
     </div>
     <div *ngSwitchCase="'int'">
             </div>
           </div>
         </div>
-        <eg-org-select [applyOrgId]="col.filterValue" (onChange)="applyOrgFilter($event, col)" placeholder="Enter library to filter by" #ousel></eg-org-select>
+        <eg-org-select [applyOrgId]="col.filterValue" (onChange)="applyOrgFilter($event, col)" 
+          i18n-placeholder placeholder="Enter library to filter by" #ousel></eg-org-select>
       </div>
     </div>
     <div *ngSwitchDefault>I don't know how to filter {{col.name}} - {{col.datatype}}</div>
index 1d47a07..163a1cb 100644 (file)
@@ -351,13 +351,11 @@ export class SandboxComponent implements OnInit {
                     resolve(ok);
                 },
                 rejection => {
-                    if (!rejection.dismissed) {
-                        this.updateFailedString.current()
-                            .then(str => this.toast.danger(str));
-                        reject(rejection);
-                    }
+                    this.updateFailedString.current()
+                        .then(str => this.toast.danger(str));
+                    reject(rejection);
                 }
-            )
+            );
         });
     }
 }