Made filterbutton toggle from ts and not html
authorYrjan A. F. Fraschetti <yrjanaff@1x-193-157-250-45.uio.no>
Thu, 10 Dec 2015 17:57:29 +0000 (18:57 +0100)
committerYrjan A. F. Fraschetti <yrjanaff@1x-193-157-250-45.uio.no>
Thu, 10 Dec 2015 17:57:29 +0000 (18:57 +0100)
src/components/search/search.html
src/components/search/search.ts

index 30c915a..93ebcea 100644 (file)
                     value=""/>
 
             <!--Show or hide, and empty filtermenu-->
-            <button type="button" class="filterbutton col-md-2" (click)="toggle()"
-                    data-toggle="collapse" data-target="#dropdown-menu">
+            <button type="button" class="filterbutton col-md-2" (click)="toggle()">
                 {{ visible ? '&xdtri;' : '&khcy;' }}
             </button>
         </div>
     </form>
 
-    <!-- Searchresult -->
+    <!-- Searchresult data-toggle="collapse" data-target="#dropdown-menu"-->
     <div class="row">
         <span [hidden]="hideDiv()">
             <div class="divresult col-md-10" id="divresult" [hidden]="checkOrgunits()">
index 0fa876e..b68786e 100644 (file)
@@ -48,6 +48,10 @@ export class Search {
         this.visible = !this.visible;
         if (this.visible) {
             this.resetSelector();
+            document.getElementById("dropdown-menu").style.display = "none";
+        }
+        else{
+            document.getElementById("dropdown-menu").style.display = "block";
         }
     }