dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19974
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8947: Small change anonymous entry form.
------------------------------------------------------------
revno: 8947
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-11-08 13:20:53 +0700
message:
Small change anonymous entry form.
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/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-11-06 08:39:16 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2012-11-08 06:20:53 +0000
@@ -469,4 +469,5 @@
events = events
left_value = Left value
right_value = Right value
-validation_rule = Validation rule
\ No newline at end of file
+validation_rule = Validation rule
+add_filter = Add filter
\ 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-11-08 04:13:48 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm 2012-11-08 06:20:53 +0000
@@ -22,16 +22,16 @@
<div>
<div id='selectDiv'>
- <table>
+ <table class='criteriaDiv'>
<tr>
<td><label>$i18n.getString( "registering_unit" )</label></td>
- <td><input type="text" id='orgunitName' name='orgunitName' #if( $orgunit ) value="$encoder.htmlEncode( $orgunit.name )" #else value="[$i18n.getString( 'please_select_village' )]" #end readonly></td>
+ <td colspan='2'><input type="text" id='orgunitName' name='orgunitName' #if( $orgunit ) value="$encoder.htmlEncode( $orgunit.name )" #else value="[$i18n.getString( 'please_select_village' )]" #end readonly></td>
</tr>
<tr>
<td>
$i18n.getString("program") <em title="$i18n.getString( "required" )" class="required">*</em></label>
</td>
- <td>
+ <td colspan='2'>
<select type="text" id="programId" name="programId" onchange='getDataElements();'>
<option value="" psid="" reportDateDes="$i18n.getString('report_date')">[$i18n.getString("please_select")]</option>
#foreach( $program in $programs )
@@ -42,23 +42,34 @@
</select>
<input type='hidden' class='stage-object-selected hidden'>
</td>
-
</tr>
<tr>
<td><label>$i18n.getString('from')</label></td>
- <td>
+ <td colspan='2'>
<input type="text" id='startDate' name='startDate'>
</td>
</tr>
<tr>
<td><label>$i18n.getString('to')</label></td>
- <td>
+ <td colspan='2'>
<input type="text" id='endDate' name='endDate'>
</td>
+ </tr>
+ <tr>
+ <td></td>
+ <td width="110px">
+ <input type="button" class='large-button' id='listBtn' value="$i18n.getString( 'update' )" onclick='validateSearchEvents( true );'>
+ </td>
<td>
- <input type="button" class='large-button' id='listBtn' value="$i18n.getString( 'list_all_events' )" onclick='validateSearchEvents( true );' style="width:140px;">
<input type="button" class='large-button' id='addBtn' value='$i18n.getString( "add_new" )' onclick="setFieldValue('isShowEventList', true);showAddEventForm();" style="width:140px;">
- <input type="button" class='large-button' id='advancedBtn' value='$i18n.getString( "search" )' onclick="jQuery('#advanced-search').toggle();" style="width:140px;">
+ </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td>
+ <input type="button" class='large-button' id='advancedBtn' value='$i18n.getString( "add_filter" )' onclick="filterDivToogle();" isShown="false">
+ </td>
+ <td>
<input type="button" id='removeBtn' value='$i18n.getString( "remove_empty_events" )' onclick="removeEmptyEvents();" style="width:140px;">
</td>
</tr>
@@ -81,7 +92,7 @@
<input type="button" class='tiny-button' id='addSearchOptionBtn' name='addSearchOptionBtn' value='+' onclick='addAttributeOption()'>
</td>
<td>
- <input type="button" class='large-button' id='searchBtn' value='$i18n.getString( "search" )' onclick='setFieldValue("isShowEventList", false);validateSearchEvents( false )'>
+ <input type="button" class='large-button' id='searchBtn' name="searchBtn" value='$i18n.getString( "filter" )' onclick='setFieldValue("isShowEventList", false);validateSearchEvents( false )'>
</td>
</tr>
</tbody>
@@ -156,8 +167,8 @@
var i18n_yes = '$encoder.jsEscape( $i18n.getString( "yes" ) , "'")';
var i18n_no = '$encoder.jsEscape( $i18n.getString( "no" ) , "'")';
var i18n_specify_search_criteria = '$encoder.jsEscape( $i18n.getString( "specify_search_criteria" ) , "'")';
-
- var i18n_data_entry = '$encoder.jsEscape( $i18n.getString( "data_entry" ) , "'")';
+ var i18n_add_filter = '$encoder.jsEscape( $i18n.getString( "add_filter" ) , "'")';
+ var i18n_clear_filter = '$encoder.jsEscape( $i18n.getString( "clear_filter" ) , "'")';
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-11-08 04:13:48 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2012-11-08 06:20:53 +0000
@@ -198,7 +198,6 @@
var input = jQuery( item );
params += '&searchingValues=de_' + input.val() + '_false_';
});
- hideById('advanced-search');
}
else{
var value = '';
@@ -430,3 +429,19 @@
});
}
}
+
+function filterDivToogle()
+{
+ jQuery('#advanced-search').toggle();
+ var isShown = jQuery('#advancedBtn').attr("isShown");
+ if( isShown=="false" ){
+ jQuery('#advancedBtn').val(i18n_clear_filter);
+ jQuery('#advancedBtn').attr("isShown", true );
+ }
+ else
+ {
+ jQuery('#advancedBtn').val(i18n_add_filter);
+ jQuery('#advancedBtn').attr("isShown", false);
+ searchEvents( true );
+ }
+}
=== 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-10-22 06:00:03 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css 2012-11-08 06:20:53 +0000
@@ -101,18 +101,24 @@
background-color: #FFCFCF
}
+.criteriaDiv
+{
+ position: relative;
+ border: 1px solid #a4d2a3;
+ background-color: #d5efd5;
+ padding: 5px;
+ margin-bottom: 10px;
+ border-radius: 3px;
+ width:450px;
+}
+
#advanced-search
{
position: relative;
border: 1px solid #a4d2a3;
- background-color: #d5efd5;
- padding-top: 10px;
- padding-right: 20px;
- padding-bottom: 5px;
- padding-left: 20px;
- margin-bottom: 15px;
+ padding: 5px;
+ margin-bottom: 10px;
border-radius: 3px;
- width:750px;
}
/*----------------------------------------------------------------------------*/