Toomme filtering ved aa klikke vekk dropdown meny
authorRoza Moustafa <roza.92m@hotmail.com>
Thu, 26 Nov 2015 13:16:47 +0000 (14:16 +0100)
committerRoza Moustafa <roza.92m@hotmail.com>
Thu, 26 Nov 2015 13:16:47 +0000 (14:16 +0100)
src/components/search/search.html
src/components/search/search.ts
src/css/map.css

index e989414..01162c7 100644 (file)
@@ -12,6 +12,7 @@
                id="livesearch"
                placeholder="Search"
                 />
+
     <img class="loadingpic" [hidden]="!loading"
          src="https://www.brown.edu/sites/default/themes/pawtuxet/img/loader-larger.gif">
 
 
 </div>
 
-<button type="button" class="knapp" data-toggle="collapse" data-target="#dropdown-menu">
-
-
-    <!--pil opp og ned-->
+<button type="button" class="knapp" (click)="toggle()" onclick="$('#ownershipSelector, #typeSelector, #locationSelector').prop('selectedIndex',0);" data-toggle="collapse" data-target="#dropdown-menu">
+            {{ visible ? '&xdtri;' : '&cross;' }}
+</button>
 
-    <div class="zippy">
-        <div (click)="toggle()" class="zippy__title">
-            {{ visible ? '&xdtri;' : '&xutri;' }} {{title}}
-        </div>
-        <div [hidden]="!visible" class="zippy__content">
-            <content></content>
-        </div>
-    </div>
 
-</button>
 
 <div>
 <ul id="dropdown-menu" class="dropdown-menu">
+    <li>Facility</li>
+    <li class="dropdown-header">Ownerships</li>
     <li><select class="form-control filtervalg" id="ownershipSelector" (click)="setFilter()">
-        <option value="">-- All Facility Ownerships --</option>
-        <option value="Mission">Mission</option>
+        <option value=""> All </option>
+        <option [value]="Mission">Mission</option>
         <option value="NGO">NGO</option>
         <option value="Private Clinic">Private Clinic</option>
         <option value="Public facilities">Public facilities</option>
     </select></li>
+    <li class="dropdown-header">Types</li>
     <li><select class="form-control filtervalg" id="typeSelector" (click)="setFilter()">
-        <option value="">-- All Facility Types --</option>
+        <option value=""> All </option>
         <option value="CHC">CHC</option>
         <option value="CHP">CHP</option>
         <option value="Clinic">Clinic</option>
         <option value="Hospital">Hospital</option>
         <option value="MCHP">MCHP</option>
     </select></li>
+    <li role="separator" class="divider"></li>
+    <li class="dropdown-header">Locations </li>
     <li><select class="form-control filtervalg" id="locationSelector" (click)="setFilter()">
-        <option value="">-- All locations --</option>
+        <option value=""> All </option>
         <option value="Rural">Rural</option>
         <option value="Urban">Urban</option>
     </select></li>
+
 </ul>
 
 </div>
 
+
index ac7a7c1..0c892aa 100644 (file)
@@ -28,12 +28,11 @@ export class Search {
         this.newsearch.next(orgunit.id);
     }
 
-    //pil opp og ned
-
     toggle() {
         this.visible = !this.visible;
     }
 
+
     /*getFilterTypes(){
         this.http.get(dhis + "/api/organisationUnitGroups/")
             .map(res => res.json())
index 3e6a6d9..bb7feae 100644 (file)
@@ -184,9 +184,12 @@ html, body {
     border: 1px solid darkgrey;
     color: black;
     outline: none;
-    background: white;
+    background: #BAB8B8;
     box-sizing: border-box;
     transition: all 0.15s;
 }
 
 
+
+
+