]> git.uio.no Git - u/erikhf/frm.git/commitdiff
Added functionality where the filter box is removed if visible when org unit is selected
authorYrjan A. F. Fraschetti <yrjanaff@1x-193-157-250-45.uio.no>
Thu, 10 Dec 2015 18:05:35 +0000 (19:05 +0100)
committerYrjan A. F. Fraschetti <yrjanaff@1x-193-157-250-45.uio.no>
Thu, 10 Dec 2015 18:05:35 +0000 (19:05 +0100)
src/components/search/search.html
src/components/search/search.ts

index 93ebcea4157585223f015812d5d0f2822197874d..3ca52b007ac4312f483305eb1c44820bbe332fd2 100644 (file)
@@ -26,7 +26,7 @@
         </div>
     </form>
 
-    <!-- Searchresult data-toggle="collapse" data-target="#dropdown-menu"-->
+    <!-- Searchresult -->
     <div class="row">
         <span [hidden]="hideDiv()">
             <div class="divresult col-md-10" id="divresult" [hidden]="checkOrgunits()">
index b68786ed09d43a03e3fdb388a94a40b20f64974c..03100fa022bc8adf153ff31dcbae925f5a1553e6 100644 (file)
@@ -39,6 +39,11 @@ export class Search {
     getMoreInfo(orgunit) {
         this.orgunits = [];
         this.newsearch.next(orgunit.id);
+        if(!this.visible){
+            this.visible = !this.visible;
+            this.resetSelector();
+            document.getElementById("dropdown-menu").style.display = "none";
+        }
         return document.getElementById("searchform").reset();
 
     }
@@ -66,7 +71,6 @@ export class Search {
     //Hide results when search bar input is erased
     hideDiv() {
         if (this.searchBar.value == ""){
-            //this.toggle();
             return true;
         }
     }