dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #17949
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7358: Small changes in Anonymous data entry.
------------------------------------------------------------
revno: 7358
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2012-06-23 22:48:45 +0700
message:
Small changes in Anonymous data entry.
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/anonymousRegistration.vm
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/commons.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstancesList.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/select.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css
--
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-06-23 11:05:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2012-06-23 15:48:45 +0000
@@ -364,4 +364,5 @@
list_all_events = List All Events
search_events_by_dataelements = Search events by data elements
list_all_events = List all events
-specify_data_element = Please specify a data element
\ No newline at end of file
+specify_data_element = Please specify a data element
+advanced_search = Advanced search
\ No newline at end of file
=== 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-06-23 11:05:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm 2012-06-23 15:48:45 +0000
@@ -36,43 +36,47 @@
#end
#end
</select>
+ </td>
+ <td>
<input type="button" id='listBtn' value="$i18n.getString( 'list_all_events' )" onclick='validateSearchEvents( true );'>
+ </td>
+ <td>
<input type="button" id='addBtn' value='$i18n.getString( "add_new" )' onclick="showAddEventForm();">
</td>
+ <td>
+ <input type="button" id='advancedSearch' value='$i18n.getString( "advanced_search" )' onclick="jQuery('#advanced-search').slideToggle();">
+ </td>
</tr>
- <tr><td> </td></tr>
+ </table>
+
+ <table id='advanced-search' class='hidden'>
<tr>
<td>$i18n.getString('use_data_from_level')</td>
- <td colspan='2'>
- <input type="radio" id='facilityLB1' name="facilityLB" value="selected" checked> $i18n.getString('selected')
- <input type="radio" id='facilityLB2' name="facilityLB" value="childrenOnly"> $i18n.getString('children_only')
- <input type="radio" id='facilityLB3' name="facilityLB" value="all"> $i18n.getString('all')
- </td>
+ <td><input type="radio" id='facilityLB1' name="facilityLB" value="selected" checked> $i18n.getString('selected')</td>
+ <td><input type="radio" id='facilityLB2' name="facilityLB" value="childrenOnly"> $i18n.getString('children_only')</td>
+ <td><input type="radio" id='facilityLB3' name="facilityLB" value="all"> $i18n.getString('all')</td>
</tr>
<tr>
<td>$i18n.getString('show_hierachy_from_level')</td>
- <td colspan='2'>
#foreach( $level in $levels )
- <input type="radio" id='level${level.level}' name="level" value="${level.level}" checked> $level.name
+ <td><input type="radio" id='level${level.level}' name="level" value="${level.level}" checked> $level.name</td>
#end
- <td>
</tr>
<tr>
<td>$i18n.getString('report_date')</td>
- <td><input type="text" id='startDate' name='startDate' style='width:238px;'>
- $i18n.getString('to')
- <input type="text" id='endDate' name='endDate' style='width:238px;'>
- </td>
+ <td colspan='3'> <input type="text" id='startDate' name='startDate' style='width:240px'></td>
+ <td>$i18n.getString('to') <input type="text" id='endDate' name='endDate' style='width:240px'></td>
<td><input type="button" id='searchBtn' class='large-button' value='$i18n.getString( "search" )' onclick='validateSearchEvents( false )'></td>
</tr>
<tr>
<td valign="top">$i18n.getString('data_elements')</td>
- <td colspan='2'>
+ #set($cols = $levels.size() + 3)
+ <td colspan='$cols'>
<table id='advancedSearchTB'>
<tbody>
<tr id='advSearchBox0'>
<td id='searchingAttributeIdTD' >
- <select id="dataElementId" name="dataElementId" style='margin-right:15px;'></select>
+ <select id="dataElementId" name="dataElementId" style='margin-right:18px;'></select>
</td>
<td>
<input type="text" id="searchText" name="searchText" value="$!searchText" style='margin-right:30px;'>
@@ -128,6 +132,8 @@
var i18n_comfirm_delete_event = '$encoder.jsEscape( $i18n.getString( "comfirm_delete_event" ) , "'")';
var i18n_delete_event_success = '$encoder.jsEscape( $i18n.getString( "delete_event_success" ) , "'")';
var i18n_report_date = '$encoder.jsEscape( $i18n.getString( "report_date" ) , "'")';
+ var i18n_search_events_by_dataelements = '$encoder.jsEscape( $i18n.getString( "search_events_by_dataelements" ) , "'")';
+ var i18n_list_all_events = '$encoder.jsEscape( $i18n.getString( "list_all_events" ) , "'")';
isAjax = true;
contentDiv = '';
=== 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-06-23 11:05:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2012-06-23 15:48:45 +0000
@@ -119,8 +119,6 @@
})
}
-
-
params += '&facilityLB=' + $('input[name=facilityLB]:checked').val();
params += '&level=' + $('input[name=level]:checked').val();
params += '&orgunitIds=' + getFieldValue('orgunitId');
@@ -138,6 +136,10 @@
hideById('loaderDiv');
hideById('dataEntryInfor');
setInnerHTML( 'listDiv', html );
+
+ var searchInfor = (listAll) ? i18n_list_all_events : i18n_search_events_by_dataelements;
+ setInnerHTML( 'searchInforTD', searchInfor);
+
showById('listDiv');
}
});
=== 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-06-20 09:46:37 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2012-06-23 15:48:45 +0000
@@ -101,11 +101,11 @@
}
else if ( attributeId=='-2' )
{
- element.replaceWith( genderSelector );
+ element.replaceWith( getGenderSelector() );
}
else if ( valueType=='YES/NO' )
{
- element.replaceWith( trueFalseBox );
+ element.replaceWith( getTrueFalseBox() );
}
else
{
@@ -116,10 +116,28 @@
function getDateField( container )
{
var dateField = '<select id="dateOperator" style="width:30px;" name="dateOperator" ><option value=">"> > </option><option value="="> = </option><option value="<"> < </option></select>';
- dateField += '<input type="text" id="searchText_' + container + '" name="searchText" maxlength="30" style="width:15.6em" onkeyup="searchPatientsOnKeyUp( event );">';
+ dateField += '<input type="text" id="searchText_' + container + '" name="searchText" maxlength="30" style="width:210px;" onkeyup="searchPatientsOnKeyUp( event );">';
return dateField;
}
+
+function getTrueFalseBox()
+{
+ var trueFalseBox = '<select id="searchText" name="searchText">';
+ trueFalseBox += '<option value="true">' + i18n_yes + '</option>';
+ trueFalseBox += '<option value="false">' + i18n_no + '</option>';
+ trueFalseBox += '</select>';
+ return trueFalseBox;
+}
+function getGenderSelector()
+{
+ var genderSelector = '<select id="searchText" name="searchText">';
+ genderSelector += '<option value="M">' + i18n_male + '</option>';
+ genderSelector += '<option value="F">' + i18n_female + '</option>';
+ genderSelector += '</select>';
+ return genderSelector;
+}
+
//-----------------------------------------------------------------------------
// Search Patient
//-----------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstancesList.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstancesList.vm 2012-06-23 11:05:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programStageInstancesList.vm 2012-06-23 15:48:45 +0000
@@ -3,13 +3,7 @@
<td class='text-column' >$i18n.getString( "search_result_matching_the_search_criteria" ):</td>
<td> </td>
<td> </td>
- <td>
- #if($!listAll)
- $i18n.getString( "list_all_events" )
- #else
- $i18n.getString( "search_events_by_dataelements" )
- #end
- </td>
+ <td id='searchInforTD'></td>
</tr>
<tr>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/select.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/select.vm 2012-06-20 09:46:37 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/select.vm 2012-06-23 15:48:45 +0000
@@ -21,7 +21,7 @@
<tbody>
<tr id='advSearchBox0'>
<td id='searchingAttributeIdTD'>
- <select id="searchingAttributeId" name="searchingAttributeId" style="width:20.2em" #if( $patientAttributes.size() == 0 ) disabled="disabled" #end onchange="searchingAttributeOnChange(this)">
+ <select id="searchingAttributeId" name="searchingAttributeId" #if( $patientAttributes.size() == 0 ) disabled="disabled" #end onchange="searchingAttributeOnChange(this)">
<option value="">$i18n.getString( "search_by_name_identifier" )</option>
<option value="0">$i18n.getString( "search_by_program" )</option>
<option value="-1">$i18n.getString( "date_of_birth" )</option>
@@ -35,8 +35,8 @@
<em title="$i18n.getString( "required" )" class="required">*</em></label>
</td>
<td>
- <input type="text" id="searchText" name="searchText" maxlength="30" style="width:20em" value="$!searchText" onkeyup='searchPatientsOnKeyUp( event );'>
-
+ <input type="text" id="searchText" name="searchText" value="$!searchText" onkeyup='searchPatientsOnKeyUp( event );'>
+
</td>
<td></td>
<td><input type="button" class='small-button' value='+' onclick='addAttributeOption();'>
@@ -88,24 +88,13 @@
var i18n_yes = '$encoder.jsEscape( $i18n.getString( "yes" ) , "'")';
var i18n_no = '$encoder.jsEscape( $i18n.getString( "no" ) , "'")';
var i18n_events = '$encoder.jsEscape( $i18n.getString( "events" ) , "'")';
+ var i18n_male = '$encoder.jsEscape( $i18n.getString( "male" ) , "'")';
+ var i18n_female = '$encoder.jsEscape( $i18n.getString( "female" ) , "'")';
selection.setListenerFunction( organisationUnitSelected );
-
- var searchTextBox = '<input type="text" id="searchText" name="searchText" maxlength="30" style="width:20em" onkeyup="searchPatientsOnKeyUp( event );">';
-
- var trueFalseBox = '<select id="searchText" name="searchText" style="width:20.2em" >';
- trueFalseBox += '<option value="true">' + i18n_yes + '</option>';
- trueFalseBox += '<option value="false">' + i18n_no + '</option>';
- trueFalseBox += '</select>';
-
- var programComboBox = '<select id="searchText" name="searchText" style="width:20.2em" >';
-
- var genderSelector = '<select id="searchText" name="searchText" style="width:20.2em" >';
- genderSelector += '<option value="M">$i18n.getString( "male" )</option>';
- genderSelector += '<option value="F">$i18n.getString( "female" )</option>';
- genderSelector += '</select>';
-
+ var searchTextBox = '<input type="text" id="searchText" name="searchText" onkeyup="searchPatientsOnKeyUp( event );">';
+ var programComboBox = '<select id="searchText" name="searchText">';
#foreach ( $program in $programs )
programComboBox += '<option value="$program.id">$program.name</option>';
#end
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm 2012-06-20 09:46:37 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm 2012-06-23 15:48:45 +0000
@@ -19,7 +19,7 @@
<tbody>
<tr id='advSearchBox0'>
<td id='searchingAttributeIdTD'>
- <select id="searchingAttributeId" name="searchingAttributeId" style="width:20.2em" #if( $patientAttributes.size() == 0 ) disabled="disabled" #end onchange="searchingAttributeOnChange(this)">
+ <select id="searchingAttributeId" name="searchingAttributeId" #if( $patientAttributes.size() == 0 ) disabled="disabled" #end onchange="searchingAttributeOnChange(this)">
<option value="">$i18n.getString( "search_by_name_identifier" )</option>
<option value="0">$i18n.getString( "search_by_program" )</option>
<option value="-1">$i18n.getString( "date_of_birth" )</option>
@@ -33,7 +33,7 @@
<em title="$i18n.getString( "required" )" class="required">*</em></label>
</td>
<td>
- <input type="text" id="searchText" name="searchText" maxlength="30" style="width:20em" value="$!searchText" onkeyup='searchPatientsOnKeyUp( event );'>
+ <input type="text" id="searchText" name="searchText" value="$!searchText" onkeyup='searchPatientsOnKeyUp( event );'>
</td>
<td></td>
@@ -125,6 +125,8 @@
var i18n_error_required_field = '$encoder.jsEscape( $i18n.getString( "error_required_field" ) , "'")';
var i18n_violate_validation = '$encoder.jsEscape( $i18n.getString( "violate_validation" ) , "'")';
var i18n_date_is_greater_then_or_equals_due_date = '$encoder.jsEscape( $i18n.getString( "date_is_greater_then_or_equals_due_date" ) , "'")';
+ var i18n_male = '$encoder.jsEscape( $i18n.getString( "male" ) , "'")';
+ var i18n_female = '$encoder.jsEscape( $i18n.getString( "female" ) , "'")';
var i18n_violate_validation = '$encoder.jsEscape( $i18n.getString( "violate_validation" ) , "'")';
var i18n_show_all_items = '$encoder.jsEscape( $i18n.getString( "show_all_items" ) , "'")';
@@ -140,19 +142,8 @@
// Search field
// ----------------------------------------------------------------
- var searchTextBox = '<input type="text" id="searchText" name="searchText" maxlength="30" style="width:20em" onkeyup="searchPatientsOnKeyUp( event );">';
-
- var trueFalseBox = '<select id="searchText" name="searchText" style="width:20.2em" >';
- trueFalseBox += '<option value="true">' + i18n_yes + '</option>';
- trueFalseBox += '<option value="false">' + i18n_no + '</option>';
- trueFalseBox += '</select>';
-
- var genderSelector = '<select id="searchText" name="searchText" style="width:20.2em" >';
- genderSelector += '<option value="M">$i18n.getString( "male" )</option>';
- genderSelector += '<option value="F">$i18n.getString( "female" )</option>';
- genderSelector += '</select>';
-
- var programComboBox = '<select id="searchText" name="searchText" style="width:20.2em" >';
+ var searchTextBox = '<input type="text" id="searchText" name="searchText" onkeyup="searchPatientsOnKeyUp( event );">';
+ var programComboBox = '<select id="searchText" name="searchText" >';
#foreach ( $program in $programs )
programComboBox += '<option value="$program.id">$program.name</option>';
#end
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css 2012-06-23 11:05:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css 2012-06-23 15:48:45 +0000
@@ -3,7 +3,7 @@
/*----------------------------------------------------------------------------*/
input[type="button"], input[type="submit"] {
- width: 128px;
+ width: 130px;
}
input.small-button[type="button"] {
@@ -15,7 +15,7 @@
}
input[type="text"] {
- width: 255px;
+ width: 260px;
}
select {
@@ -68,6 +68,18 @@
.errorCell{background-color: #FFCFCF}
+#advanced-search
+{
+ position: relative;
+ border: 1px solid #a4d2a3;
+ background-color: #d5efd5;
+ padding-top: 10px;
+ padding-bottom: 5px;
+ padding-left: 20px;
+ margin-bottom: 15px;
+ border-radius: 3px;
+}
+
/*----------------------------------------------------------------------------*/
/* button list
/*----------------------------------------------------------------------------*/