dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #20556
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9425: Add filter data elements in section entry form (patient)
------------------------------------------------------------
revno: 9425
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-01-03 16:04:36 +0700
message:
Add filter data elements in section entry form (patient)
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/sectionDataEntryForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties
--
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-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2012-12-21 04:01:53 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2013-01-03 09:04:36 +0000
@@ -36,7 +36,6 @@
village=Village
registration_date=Date of registration
full_name=Full name
-entry=Entry
available_data_elements=Available data elements
selected_data_elements=Selected data elements
nr=Number
@@ -487,4 +486,5 @@
percent_overdue = Percent Overdue
scheduled = Scheduled
start = Start
-total_persons_enrolled=Total number of persons enrolled
\ No newline at end of file
+total_persons_enrolled=Total number of persons enrolled
+value = Value
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2012-12-21 13:42:06 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2013-01-03 09:04:36 +0000
@@ -1774,4 +1774,48 @@
else{
loadPatientList();
}
+}
+
+// ----------------------------------------------
+// Data entry section
+// ----------------------------------------------
+
+function filterInSection( $this )
+{
+ var $tbody = $this.parent().parent().parent().parent().parent().find("tbody");
+ var $trTarget = $tbody.find("tr");
+
+ if ( $this.val() == '' )
+ {
+ $trTarget.show();
+ }
+ else
+ {
+ var $trTargetChildren = $trTarget.find( 'td:first-child' );
+
+ $trTargetChildren.each( function( idx, item )
+ {
+ if( $( item ).find( 'span' ).length != 0 )
+ {
+ var text1 = $this.val().toUpperCase();
+ var text2 = $( item ).find( 'span' ).html().toUpperCase();
+
+ if ( text2.indexOf( text1 ) >= 0 )
+ {
+ $( item ).parent().show();
+ }
+ else
+ {
+ $( item ).parent().hide();
+ }
+ }
+ } );
+ }
+
+ refreshZebraStripes( $tbody );
+}
+
+function refreshZebraStripes( $tbody )
+{
+ $tbody.find( 'tr:visible:odd' ).find( 'td:first-child' ).removeClass( 'reg' ).addClass( 'reg' );
}
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/sectionDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/sectionDataEntryForm.vm 2012-12-10 12:54:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/sectionDataEntryForm.vm 2013-01-03 09:04:36 +0000
@@ -16,14 +16,18 @@
<col width="18%" />
#end
</colgroup>
-
+
+ <thead>
<tr>
- <th>$i18n.getString( "data_element" )</th>
- <th>$i18n.getString( "entry" )</th>
+ <td>
+ <input type="text" class="sectionFilter" placeholder="$encoder.jsEscape( $i18n.getString( "filter_in_section" ) , "'")" onkeyup="filterInSection($(this));" >
+ </td>
+ <th>$i18n.getString( "value" )</th>
#if( $programStage.program.displayProvidedOtherFacility=='true')
<th>$i18n.getString( "provided_elsewhere" )</th>
#end
</tr>
+ </thead>
#set( $dataElementRowCount = 0 )
#set( $mark = true )
#set( $tabIndex = 1 )
@@ -35,9 +39,8 @@
#set( $patientDataValue = $patientDataValueMap.get( $key ) )
<tr #alternate( $mark )>
##data element name
- <td class='text-column' align='center'>
- <span id="value[$programStageDataElement.dataElement.id].name" title="$!encoder.htmlEncode( $programStageDataElement.dataElement.description )">
- $encoder.htmlEncode( $programStageDataElement.dataElement.formNameFallback )
+ <td id="$key-cell" class='text-column' align='center'>
+ <span id="$key-dataelement">${encoder.htmlEncode( $programStageDataElement.dataElement.getFormNameFallback() )}</span>
#if ( $programStageDataElement.compulsory )
<em title="$i18n.getString( "required" )" class="required">*</em>
#end
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2012-12-26 03:02:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2013-01-03 09:04:36 +0000
@@ -301,12 +301,6 @@
schedule_automated_aggregation = Automated Aggregation
schedule_automated_aggregation_form = Schedule automated aggregation
intro_schedule_automated_aggregation = Schedule an automated person aggregation process, e.g. to run all pre-defined aggregation queries every midnight.
-aggregation_period_types = Aggregation period types
-financial_yearly = Financial Yearly
-organisation_unit_group_set_aggregation_level = Organisation unit group set aggregation level
-aggregate_task_strategy = Aggregate task strategy
-last_12_months_daily = Last 12 months daily
-last_6_months_daily_6_to_12_months_weekly = Last 6 months daily + 6 to 12 months weekly
execute_tasks_confirmation=Are you sure you want to execute all tasks now? Task processing might fully utilize your system resources and slow down other operations.
executing = Executing
add_single_rule = Add single rule