dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #30545
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15506: Add filter for attributes in available Attribute box of Tracked entity attributes displayed in list.
------------------------------------------------------------
revno: 15506
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-06-02 09:08:01 +0800
message:
Add filter for attributes in available Attribute box of Tracked entity attributes displayed in list.
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attributeInListNoProgram.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attributeVisitSchedule.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-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attributeInListNoProgram.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attributeInListNoProgram.vm 2014-06-02 00:06:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attributeInListNoProgram.vm 2014-06-02 01:08:01 +0000
@@ -1,5 +1,18 @@
<script>
jQuery(document).ready( function(){
+ jQuery("#availableAttributes").dhisAjaxSelect({
+ source: 'getAttributes.action',
+ iterator: 'attributes',
+ connectedTo: 'selectedAttributeIds',
+ handler: function(item){
+ var option = jQuery( "<option/>" );
+ option.attr( "value", item.id );
+ option.text( item.name );
+
+ return option;
+ }
+ });
+
validation( 'saveAttributeInListNoProgramForm', function(form){
form.submit();
}, function(){
@@ -24,18 +37,14 @@
<tr>
<th>$i18n.getString( "availableAttribute" )</th>
<th>$i18n.getString( "filter" )</th>
- <th>
- $i18n.getString( "selectedAttribute" )
+ <th>$i18n.getString( "selectedAttribute" )
<input type='hidden' id='hasAttributes' name='hasAttributes' class="{validate:{required:true}}">
</th>
</tr>
-
<tr>
<td>
- <select style="height:200px; width:100%;" multiple="multiple" id="availableAttributes" name="availableAttributes" size="15" ondblclick="moveSelectedById( 'availableAttributes', 'selectedAttributeIds' )" >
- #foreach($attribute in $availableAttributes)
- <option value='$attribute.id'>$attribute.displayName</option>
- #end
+ <select style="height:200px;width:100%;" multiple="multiple" id="availableAttributes" name="availableAttributes" size="15" ondblclick="moveSelectedById( 'availableAttributes', 'selectedAttributeIds' )" >
+
</select>
</td>
<td>
@@ -45,7 +54,7 @@
<input type="button" value="<<" onclick="moveAllById( 'selectedAttributeIds', 'availableAttributes' )" class='filterButton' />
</td>
<td>
- <select style="height:200px;width:100%;" multiple="multiple" id="selectedAttributeIds" name="selectedAttributeIds" size="15" ondblclick="moveSelectedById( 'selectedAttributeIds', 'availableAttributes' )" >
+ <select style="height:200px;width:100%;margin-top:22px;" multiple="multiple" id="selectedAttributeIds" name="selectedAttributeIds" size="15" ondblclick="moveSelectedById( 'selectedAttributeIds', 'availableAttributes' )" >
#foreach($attribute in $selectedAttributes)
<option value='$attribute.id'>$attribute.displayName</option>
#end
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attributeVisitSchedule.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attributeVisitSchedule.vm 2014-05-30 08:04:25 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-program/src/main/webapp/dhis-web-maintenance-program/attributeVisitSchedule.vm 2014-06-02 01:08:01 +0000
@@ -4,9 +4,9 @@
<table>
<colgroup>
- <col style='width:300px'/>
+ <col style='width:500px'/>
<col/>
- <col style='width:300px'/>
+ <col style='width:500px'/>
</colgroup>
<tr>
<th>$i18n.getString( "availableAttribute" )</th>
@@ -16,7 +16,7 @@
<tr>
<td>
- <select style='width:322px' multiple="multiple" id="availableAttributes" name="availableAttributes" size="15" ondblclick="moveSelectedById( 'availableAttributes', 'selectedAttributeIds' )" >
+ <select style="height:200px; width:100%;" multiple="multiple" id="availableAttributes" name="availableAttributes" size="15" ondblclick="moveSelectedById( 'availableAttributes', 'selectedAttributeIds' )" >
#foreach($attribute in $availableAttributes)
<option value='$attribute.id'>$attribute.name</option>
#end
@@ -29,7 +29,7 @@
<input type="button" value="<<" onclick="moveAllById( 'selectedAttributeIds', 'availableAttributes' )" class='filterButton' />
</td>
<td>
- <select style='width:322px' multiple="multiple" id="selectedAttributeIds" name="selectedAttributeIds" size="15" ondblclick="moveSelectedById( 'selectedAttributeIds', 'availableAttributes' )" >
+ <select style="height:200px; width:100%;" multiple="multiple" id="selectedAttributeIds" name="selectedAttributeIds" size="15" ondblclick="moveSelectedById( 'selectedAttributeIds', 'availableAttributes' )" >
#foreach($attribute in $selectedAttributes)
<option value='$attribute.id'>$attribute.name</option>
#end