~dhis2-devs-core/dhis2/2.0.4

« back to all changes in this revision

Viewing changes to dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/updateDataElementGroupSet.vm

  • Committer: Lars
  • Date: 2010-04-07 15:43:41 UTC
  • Revision ID: larshelg@larshelg-laptop-20100407154341-e6svoiizsb4masgu
Using generic method for filtering in lists in datadictionary

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
        </tr>
49
49
        <tr>
50
50
                <td>
51
 
                        <select id="availableDataElementGroups" size="2" multiple="multiple" style="min-width:25em; height:25em" ondblclick="addGroupMembers()">
 
51
                        <select id="availableDataElementGroups" size="2" multiple="multiple" style="min-width:25em; height:25em" ondblclick="moveSelectedById( 'availableDataElementGroups', 'groupMembers' )">
 
52
                                #foreach( $dataElementGroup in $availableGroups )
 
53
                    <option value="$dataElementGroup.id">$encoder.htmlEncode( $dataElementGroup.name )</option>
 
54
                #end
52
55
                        </select>
53
56
                </td>
54
57
                
55
 
                <td style="text-align:center">                  
56
 
                        <input type="button" value="&gt;" title="$i18n.getString('move_selected')" onclick="addGroupMembers()"><br>
57
 
                        <input type="button" value="&lt;" title="$i18n.getString('remove_selected')" onclick="removeGroupMembers()">                    
58
 
                </td>
59
 
        
 
58
        <td style="text-align:center">          
 
59
            <input type="button" value="&gt;" title="$i18n.getString('move_selected')" style="width:50px" onclick="moveSelectedById( 'availableDataElementGroups', 'groupMembers' )"/><br/>
 
60
            <input type="button" value="&lt;" title="$i18n.getString('remove_selected')" style="width:50px" onclick="moveSelectedById( 'groupMembers', 'availableDataElementGroups' )"/><br/>
 
61
            <input type="button" value="&gt;&gt;" title="$i18n.getString('move_all')" style="width:50px" onclick="moveAllById( 'availableDataElementGroups', 'groupMembers' )"/><br/>
 
62
            <input type="button" value="&lt;&lt;" title="$i18n.getString('remove_all')" style="width:50px" onclick="moveAllById( 'groupMembers', 'availableDataElementGroups' )"/>
 
63
        </td>
 
64
    
60
65
                <td>
61
 
                        <select id="groupMembers" name="groupMembers" size="2" multiple="multiple" style="min-width:25em; height:25em" ondblclick="removeGroupMembers()" />
 
66
                        <select id="groupMembers" name="groupMembers" size="2" multiple="multiple" style="min-width:25em; height:25em" ondblclick="moveSelectedById( 'groupMembers', 'availableDataElementGroups' )">
 
67
                                #foreach( $dataElementGroup in $selectedGroups )
 
68
                    <option value="$dataElementGroup.id">$encoder.htmlEncode( $dataElementGroup.name )</option>
 
69
                #end
 
70
                        </select>
62
71
                </td>
63
72
                
64
73
                <td>
77
86
 
78
87
<script type="text/javascript">
79
88
 
80
 
        var groupMembers = new Object();
81
 
#foreach( $dataElement in $selectedGroups )
82
 
        groupMembers['$dataElement.id'] = '$encoder.jsEscape( $dataElement.name, "'" )';
83
 
#end
84
 
        var availableDataElementGroups = new Object();
85
 
#foreach( $dataElement in $availableGroups )
86
 
        availableDataElementGroups['$dataElement.id'] = '$encoder.jsEscape( $dataElement.name, "'" )';
87
 
#end
88
 
 
89
 
        initLists();
90
 
 
91
89
        var nameField = document.getElementById( 'name' );
92
90
        nameField.select();
93
91
        nameField.focus();