dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #20004
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8976: Load events filtered after adding a new anonymous event.
------------------------------------------------------------
revno: 8976
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-11-12 22:26:14 +0700
message:
Load events filtered after adding a new anonymous event.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationResult.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js
--
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/webapp/dhis-web-caseentry/anonymousRegistration.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm 2012-11-09 15:36:26 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm 2012-11-12 15:26:14 +0000
@@ -9,8 +9,7 @@
<input type='hidden' id='orgunitId' name='orgunitId' value='$orgunit.id'>
<input type='hidden' id='programStageInstanceId' name='programStageInstanceId' value='0'>
<input type='hidden' id='programStageId' name='programStageId' class='stage-object-selected'>
-<input type='hidden' id='isShowEventList' name='isShowEventList'>
-<input type='hidden' id='filter' name='filter' value='false'>
+<input type='hidden' id='listAll' name='listAll' value="true">
<select multiple id='displayInReports' name='displayInReports' class='hidden'></select>
@@ -53,7 +52,7 @@
</td>
<td>
<input type="button" class='large-button' id='advancedBtn' value='$i18n.getString( "filter" )' onclick="showFilterForm();" style="width:140px;">
- <input type="button" class='large-button' id='listBtn' value="$i18n.getString( 'update' )" onclick='setFieldValue("isShowEventList", false);updateEvents();'>
+ <input type="button" class='large-button' id='listBtn' value="$i18n.getString( 'update' )" onclick='updateEvents();'>
</td>
</tr>
<tr id='minimized-advanced-search' class="hidden">
@@ -83,7 +82,7 @@
<input type="button" class='large-button' id='addSearchOptionBtn' name='addSearchOptionBtn' value="$i18n.getString('add')" onclick='addAttributeOption()'>
</td>
<td rowspan='30' valign='bottom' align='right'>
- <input type="button" class='large-button' id='addSearchOptionBtn' name='addSearchOptionBtn' value="$i18n.getString('clear_all')" onclick='removeAllOption()'>
+ <input type="button" class='large-button' id='clearAllBtn' name='clearAllBtnaddSearchOptionBtn' value="$i18n.getString('clear_all')" onclick='removeAllOption()'>
</td>
</tr>
<tr id='advSearchBox0'>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationResult.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationResult.vm 2012-11-02 04:25:31 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationResult.vm 2012-11-12 15:26:14 +0000
@@ -67,6 +67,7 @@
<h2>$i18n.getString('no_aggregate_date_values_are_added_or_update_in_other_facilities')</h2>
<div id='contentDetails'></div>
#else
+ <input type="button" value="$i18n.getString( 'back' )" onclick="backBtnOnClick();" style="width:10em">
<h2>$i18n.getString('no_aggregate_date_values_are_added_or_update_in_all_facilities')</h2>
#end
<script>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm 2012-11-02 11:17:00 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/dataEntryForm.vm 2012-11-12 15:26:14 +0000
@@ -14,7 +14,7 @@
entryFormContainerOnReady();
});
</script>
-
+$programStageInstance.organisationUnit.name
<div id='entryFormContainer'>
<input type='hidden' id='incidentDate' value='$!format.formatDate($programStageInstance.programInstance.dateOfIncident)'>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2012-11-09 15:15:25 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2012-11-12 15:26:14 +0000
@@ -5,7 +5,7 @@
hideById('advanced-search');
hideById('listDiv');
showById('mainLinkLbl');
- setFieldValue("filter", false);
+ setFieldValue("listAll", true);
setFieldValue("startDate", '');
setFieldValue("endDate", '');
jQuery('#advancedSearchTB [name=searchText]').val('');
@@ -101,7 +101,6 @@
enableCriteriaDiv();
validateSearchEvents( true );
- setFieldValue('isShowEventList', true);
});
}
@@ -137,6 +136,7 @@
function autocompletedFilterField( idField, searchObjectId )
{
var input = jQuery( "#" + idField );
+ input.css("width","237px");
input.autocomplete({
delay: 0,
minLength: 0,
@@ -207,7 +207,7 @@
function validateSearchEvents( listAll )
{
var flag = true;
- if( !listAll )
+ if( listAll=="false" )
{
if( getFieldValue('startDate')=="" || getFieldValue('endDate')=="" ){
showWarningMessage( i18n_specify_a_date );
@@ -237,7 +237,7 @@
{
hideById('dataEntryInfor');
hideById('listDiv');
- setFieldValue('isShowEventList', listAll );
+ setFieldValue('listAll', listAll );
var params = '';
jQuery( '#displayInReports option' ).each( function( i, item ){
@@ -245,7 +245,7 @@
params += '&searchingValues=de_' + input.val() + '_false_';
});
- if(listAll){
+ if(listAll=='true'){
params += '&startDate=';
params += '&endDate=';
}
@@ -395,7 +395,7 @@
showById('selectDiv');
showById('searchDiv');
showById('listDiv');
- searchEvents( getFieldValue('isShowEventList') );
+ searchEvents( getFieldValue('listAll') );
}
function showAddEventForm()
@@ -498,17 +498,18 @@
showById('advanced-search');
hideById('minimized-advanced-search');
disable('advancedBtn');
- setFieldValue('filter', true);
}
function removeAllOption()
{
enable('advancedBtn');
setFieldValue('filter', false);
- jQuery('#advancedBtn').val(i18n_add_filter);
jQuery('#advancedBtn').attr("isShown", false);
jQuery( '#advancedSearchTB tr' ).each( function( i, row ){
- if(i==0){
+ if(i>2){
+ jQuery(this).remove();
+ }
+ else if(i==2){
jQuery( this ).find(':input').each( function( idx, item ){
var input = jQuery( item );
if( input.attr('type') != 'button'){
@@ -516,10 +517,9 @@
}
});
}
- else{
- jQuery(this).remove();
- }
});
+ jQuery('#searchObjectId').val("");
+ jQuery('#searchText').val("");
hideById('advanced-search');
hideById('minimized-advanced-search');
searchEvents( false );