changeset 61:6adf95d9a190 webpack

fix missing resultInfo. add column template for WITNESS.
author Robert Casties <casties@mpiwg-berlin.mpg.de>
date Mon, 24 Apr 2017 19:39:25 +0200
parents 7b9d616695d3
children 7787ca310644
files src/app/ismi-result-types.ts src/app/query-select.component.ts
diffstat 2 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/app/ismi-result-types.ts	Wed Mar 29 20:58:57 2017 +0200
+++ b/src/app/ismi-result-types.ts	Mon Apr 24 19:39:25 2017 +0200
@@ -10,5 +10,8 @@
     ]),
     'TEXT': new ResultType('TEXT', 'ismi_id', [
         'ismi_id', 'full_title_translit', 'full_title', 'creation_date'
+    ]),
+    'WITNESS': new ResultType('WITNESS', 'ismi_id', [
+         'ismi_id', '_label', 'creation_date'
     ])
 }
--- a/src/app/query-select.component.ts	Wed Mar 29 20:58:57 2017 +0200
+++ b/src/app/query-select.component.ts	Mon Apr 24 19:39:25 2017 +0200
@@ -99,7 +99,13 @@
     
     setup() {
         console.log("query-select setup step=", this.queryStep);
-        var step = this._queryService.state.steps[this.index]; // i-1?
+        // get result info from last step
+        let laststep = this._queryService.state.steps[this.index-1];
+        if (laststep != null) {
+            this.resultInfo = laststep.resultInfo;
+        }
+        // set up current step
+        let step = this._queryService.state.steps[this.index]; // i-1?
         if (step != null) {
             this.setQueryStep(step);
         }
@@ -225,8 +231,8 @@
         this.selectedMode = mode;
         if (mode.id === 'id_is') {
             /*
-         * id_is
-         */
+             * id_is
+             */
             this.queryInput = step.params.value;
             
         } else if (mode.id === 'type_is') {
@@ -275,6 +281,5 @@
             this.queryInput = step.params.value;
         }
         // TODO: implement other modes
-        this.resultInfo = step.resultInfo;
     }
 }