Sookeresultater forsvinner naar sookefeltet er tomt og naar resultatlista blir klikke...
authorRoza Moustafa <roza.92m@hotmail.com>
Thu, 26 Nov 2015 15:35:14 +0000 (16:35 +0100)
committerRoza Moustafa <roza.92m@hotmail.com>
Thu, 26 Nov 2015 15:35:14 +0000 (16:35 +0100)
src/components/navbar/navbar.css
src/components/search/search.html
src/components/search/search.ts
src/css/map.css

index e3e1fbb..d29dea0 100644 (file)
@@ -5,7 +5,7 @@
     border-right: 0 none;
     border-top: 0 none;
     border-bottom: 1px solid darkgrey;
-    box-shadow: 0 0 2px darkgrey;
+    box-shadow: 0 0 100px darkgrey;
     border-left: 0 none;
 }
 /*
index 01162c7..c89e116 100644 (file)
                name="livesearch"
                id="livesearch"
                placeholder="Search"
+                value = ""
                 />
 
     <img class="loadingpic" [hidden]="!loading"
          src="https://www.brown.edu/sites/default/themes/pawtuxet/img/loader-larger.gif">
 
+<span [hidden]="hideDiv()">
 
-    <div  class="divresult" id="divresult" [hidden]="!orgunits.length">
-        <ul class="dropdown-menu result"  >
+    <div class="divresult" id="divresult" [hidden]="!orgunits.length" onclick="$(this).fadeOut(300);">
+        <ul id="d" class="dropdown-menu result"  >
             <li *ng-for="#orgunit of orgunits" (click)="getMoreInfo(orgunit)">
                 <a href="#">{{orgunit.name}}<br/><span>{{orgunit.lastUpdated}}</span></a>
             </li>
         </ul>
     </div>
 
+</span>
+
 
 
 </div>
 
+
 <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>
 
+<span class="someClass">
+<span [hidden]="hideDiv1()">should be hidden.</span>
+</span>
 
 
 <div>
@@ -66,5 +74,3 @@
 </ul>
 
 </div>
-
-
index 0c892aa..dd826f8 100644 (file)
@@ -32,7 +32,15 @@ export class Search {
         this.visible = !this.visible;
     }
 
+    hideDiv(){
+        if(livesearch.value == "")
+            return true;
 
+    }
+
+    hideDiv1(){
+        return true;
+    }
     /*getFilterTypes(){
         this.http.get(dhis + "/api/organisationUnitGroups/")
             .map(res => res.json())
index bb7feae..1e6678a 100644 (file)
@@ -193,3 +193,6 @@ html, body {
 
 
 
+.hide {
+    display:none;
+}