From c93e746fa8ebc97eec54269b04eba29602c6ba66 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 7 Dec 2017 16:34:25 -0500 Subject: [PATCH] LP#626157 Ang2 experiments Signed-off-by: Bill Erickson --- Open-ILS/webby-src/src/app/core/auth.ts | 1 + .../app/staff/catalog/record/record.component.html | 8 ++++ .../app/staff/catalog/result/facets.component.html | 4 +- .../staff/catalog/result/pagination.component.css | 6 ++- .../staff/catalog/result/pagination.component.html | 30 ++++++++----- .../staff/catalog/result/pagination.component.ts | 2 + .../staff/catalog/result/results.component.html | 8 ++-- .../app/staff/catalog/result/results.component.ts | 6 +-- .../app/staff/catalog/search-form.component.css | 51 ++-------------------- .../app/staff/catalog/search-form.component.html | 28 ++++++------ .../src/app/staff/catalog/staff-catalog.service.ts | 3 ++ Open-ILS/webby-src/src/styles.css | 23 ++++++++++ 12 files changed, 86 insertions(+), 84 deletions(-) diff --git a/Open-ILS/webby-src/src/app/core/auth.ts b/Open-ILS/webby-src/src/app/core/auth.ts index 87d5c70888..611797abeb 100644 --- a/Open-ILS/webby-src/src/app/core/auth.ts +++ b/Open-ILS/webby-src/src/app/core/auth.ts @@ -225,6 +225,7 @@ export class EgAuthService { } logout(broadcast?: boolean) { + console.debug('logging out'); if (broadcast) { // TODO diff --git a/Open-ILS/webby-src/src/app/staff/catalog/record/record.component.html b/Open-ILS/webby-src/src/app/staff/catalog/record/record.component.html index 7b7485235c..c1e383e022 100644 --- a/Open-ILS/webby-src/src/app/staff/catalog/record/record.component.html +++ b/Open-ILS/webby-src/src/app/staff/catalog/record/record.component.html @@ -1,5 +1,13 @@
RECORD {{recordId}} + +
+
SMALL
+
MED
+
asdf
+
asdfsada
+
+ diff --git a/Open-ILS/webby-src/src/app/staff/catalog/result/facets.component.html b/Open-ILS/webby-src/src/app/staff/catalog/result/facets.component.html index 332b77c849..188ae3091e 100644 --- a/Open-ILS/webby-src/src/app/staff/catalog/result/facets.component.html +++ b/Open-ILS/webby-src/src/app/staff/catalog/result/facets.component.html @@ -14,9 +14,9 @@
-
+

{{searchContext.result.facetData[facetConf.facetClass][name].cmfLabel}} -

+
  • -
  • - +
  • +
  • -
  • - - {{page}} (current) + + {{page}} (current)
  • -
  • - +
  • +
  • diff --git a/Open-ILS/webby-src/src/app/staff/catalog/result/pagination.component.ts b/Open-ILS/webby-src/src/app/staff/catalog/result/pagination.component.ts index 2faa4db37b..ff5aabc61c 100644 --- a/Open-ILS/webby-src/src/app/staff/catalog/result/pagination.component.ts +++ b/Open-ILS/webby-src/src/app/staff/catalog/result/pagination.component.ts @@ -27,11 +27,13 @@ export class ResultPaginationComponent implements OnInit { } prevPage(): void { + console.log('HERE'); this.searchContext.pager.decrement(); this.staffCat.search(); } setPage(page: number): void { + if (this.searchContext.pager.currentPage() == page) return; this.searchContext.pager.setPage(page); this.staffCat.search(); } diff --git a/Open-ILS/webby-src/src/app/staff/catalog/result/results.component.html b/Open-ILS/webby-src/src/app/staff/catalog/result/results.component.html index e16ad856ac..9304143ceb 100644 --- a/Open-ILS/webby-src/src/app/staff/catalog/result/results.component.html +++ b/Open-ILS/webby-src/src/app/staff/catalog/result/results.component.html @@ -1,8 +1,8 @@ -
    +
    -
    -
    Search Results ({{searchContext.result.count}})
    +
    +

    Search Results ({{searchContext.result.count}})

    @@ -11,7 +11,7 @@
    -
    +
    diff --git a/Open-ILS/webby-src/src/app/staff/catalog/result/results.component.ts b/Open-ILS/webby-src/src/app/staff/catalog/result/results.component.ts index 50ad129c67..a30d6f5c10 100644 --- a/Open-ILS/webby-src/src/app/staff/catalog/result/results.component.ts +++ b/Open-ILS/webby-src/src/app/staff/catalog/result/results.component.ts @@ -70,18 +70,18 @@ export class ResultsComponent implements OnInit { // Flesh the creator / editor fields with the user object. // Handle the user fleshing here (instead of record.component so // we only need to grab one copy of each user. - let userIds: {[id:string]: boolean} = {}; + let userIds: {[id:number]: boolean} = {}; records.forEach(recSum => { if (this.userCache[recSum.creator]) { recSum.creator = this.userCache[recSum.creator]; } else { - userIds[recSum.creator] = true; + userIds[Number(recSum.creator)] = true; } if (this.userCache[recSum.editor]) { recSum.editor = this.userCache[recSum.editor]; } else { - userIds[recSum.editor] = true; + userIds[Number(recSum.editor)] = true; } }); diff --git a/Open-ILS/webby-src/src/app/staff/catalog/search-form.component.css b/Open-ILS/webby-src/src/app/staff/catalog/search-form.component.css index 1208786853..09e2da9b02 100644 --- a/Open-ILS/webby-src/src/app/staff/catalog/search-form.component.css +++ b/Open-ILS/webby-src/src/app/staff/catalog/search-form.component.css @@ -1,50 +1,5 @@ -/* -#staffcat-search-form .eg-org-selector, -#staffcat-search-form .eg-org-selector button { - width: 100%; - text-align: left -} -*/ - -/* -#staffcat-search-form select, -#staffcat-search-form optgroup, -#staffcat-search-form option { - padding: 0.15rem 0.75rem; -} -*/ - -/** TODO move these to common CSS */ -.flex-row { - display: flex; -} -.flex-cell { - flex: 1; - padding: 0px 0px 0px 7px; -} - -.flex-2 { - flex: 2 -} -.flex-3 { - flex: 3 -} -.flex-4 { - flex: 4 -} -/* --- */ - -/* -.col-2:first-child, .flex-row, .flex-cell:first-child { -*/ -.row, .row > div:first-child, .flex-row, .flex-cell:first-child { - padding-left: 0px; - margin-left: 0px; -} -.search-plus-minus { - /* Transparent background */ - background-color: rgba(0, 0, 0, 0.0); - padding-left: .25rem; - padding-right: .25rem; /* default .5rem */ +/* filter checkbox labels move to bottom */ +.checkbox label { + margin-bottom: .1rem; } diff --git a/Open-ILS/webby-src/src/app/staff/catalog/search-form.component.html b/Open-ILS/webby-src/src/app/staff/catalog/search-form.component.html index 993f4f38a0..e0135e59cc 100644 --- a/Open-ILS/webby-src/src/app/staff/catalog/search-form.component.html +++ b/Open-ILS/webby-src/src/app/staff/catalog/search-form.component.html @@ -4,8 +4,8 @@ TODO focus search input
    -
    -
    +
    +
    -
    +
    -
    +
    -
    +
    -
    - -
    -
    -
    +
    +
    -
    +
    -
    +
    -
    +
    -
    +