]> git.uio.no Git - u/erikhf/frm.git/blobdiff - src/components/search/search.ts
ting oppaa kart
[u/erikhf/frm.git] / src / components / search / search.ts
index b33c8b2ee6540d16af19478f79545f63b8022f78..0b8d47ef16fd1cbb6132a1ec1aac3d7973345bff 100644 (file)
@@ -1,10 +1,11 @@
 import {Component,EventEmitter, View, CORE_DIRECTIVES} from 'angular2/angular2';
 import {Http} from 'angular2/http';
 import {LiveSearch} from "./livesearch";
+import {Sidebar} from "../sidebar/sidebar";
 
 @Component({
     selector: 'mou-search',
-    directives: [CORE_DIRECTIVES, LiveSearch],
+    directives: [CORE_DIRECTIVES, LiveSearch, Sidebar],
     events: ['newsearch'],
     templateUrl: './components/search/search.html',
     styleUrls: ['./components/search/search.css']
@@ -15,20 +16,28 @@ export class Search {
     facilityType: Array<any> = [];
     facilityOwnership: Array<any> = [];
     facilityLocation: Array<any> = [];
-
+    emptySearch: any;
+    slide: any;
 
     constructor(public http:Http) {
         this.newsearch = new EventEmitter();
         this.visible = true;
+        this.emptySearch = document.getElementById("divresult");
 
     }
 
+
+
+
     getMoreInfo(orgunit) {
         this.orgunits = [];
         console.log("yolo");
         this.newsearch.next(orgunit.id);
     }
 
+
+
+
     toggle() {
         this.visible = !this.visible;
     }
@@ -41,6 +50,11 @@ export class Search {
     }
 
 
+    emptyByClick(){
+        return this.emptySearch = document.getElementById("divresult").style.visibility = "hidden";
+    }
+
+
 
     /*getFilterTypes(){
         this.http.get(dhis + "/api/organisationUnitGroups/")