~mortenoh/+junk/dhis2-detailed-import-export

« back to all changes in this revision

Viewing changes to local/in/dhis-web-dashboard/src/main/webapp/dhis-web-dashboard/menuWithTreeForTA.vm

  • Committer: larshelge at gmail
  • Date: 2009-03-03 16:46:36 UTC
  • Revision ID: larshelge@gmail.com-20090303164636-2sjlrquo7ib1gf7r
Initial check-in

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#parse( "/dhis-web-dashboard/menu.vm" )
 
2
 
 
3
#parse( "/dhis-web-commons/ouwt/orgunittree.vm" )
 
4
 
 
5
<!-- The script that registeres selctions in the orgunit tree -->
 
6
<script type="text/javascript">
 
7
 
 
8
function orgUnitHasBeenSelected( orgUnitIds )
 
9
{    
 
10
 
 
11
    var orgUnitid = ""+orgUnitIds;
 
12
    var orgUnitName = orgUnits.get(orgUnitid);
 
13
    if(orgUnitName == null) return;  
 
14
                var index = document.generateForm.orgUnitListCB.options.length;
 
15
                var i=0;
 
16
                for(i=0;i<index;i++)
 
17
                {
 
18
                                if(orgUnitIds == document.generateForm.orgUnitListCB.options[i].value) return; 
 
19
                }
 
20
                document.generateForm.orgUnitListCB.options[index] = new Option(orgUnitName,orgUnitIds,false,false);
 
21
}
 
22
 
 
23
selection.setListenerFunction( orgUnitHasBeenSelected );
 
24
 
 
25
</script>