dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #08689
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2145: Minor fix.
------------------------------------------------------------
revno: 2145
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2010-11-23 10:20:24 +0700
message:
Minor fix.
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/orgunittree.vm
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/orgunittree.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/orgunittree.vm 2010-11-22 02:55:36 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ouwt/orgunittree.vm 2010-11-23 03:20:24 +0000
@@ -3,14 +3,17 @@
$(document).ready(function(){
$("#searchIcon").click(function(){
$("#searchSpan").toggle();
- $("#searchSpan").focus();
+ $("#searchField").focus();
+ byId('visited').value = ( byId('visited').value==0 ) ? 1 : 0 ;
});
+
});
</script>
+<input type='hidden' id='visited' name='visited' value='0'>
<img id="searchIcon" src="../images/search.png" style="cursor: pointer" title="$i18n.getString( 'locate_organisation_unit_by_code' )">
-<span id="searchSpan"><input type="text" id="searchField" name="key" style="width:130px" onchange="getOrgunitByCode();"><input type="button" value="Find" onclick="getOrgunitByCode()"></span>
+<span id="searchSpan" style="display:none"><input type="text" id="searchField" name="key" style="width:130px" onchange="getOrgunitByCode();"><input type="button" value="Find" onclick="getOrgunitByCode()"></span>
#macro( parseNode $node )
#if( $node.hasChildren )
@@ -48,4 +51,16 @@
#end
</ul>
</div>
-#end
\ No newline at end of file
+#end
+
+<script>
+
+ var visited = byId('visited').value;
+ if(visited == 0 ){
+ byId('visited').value = 1;
+ byId('searchSpan').style.display = 'none';
+ }else{
+ $("#searchSpan").show();
+ }
+
+</script>
\ No newline at end of file