dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15411
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5564: fixed bug in databrowser, fromDate/toDate was not posted since they were disabled by the datepick...
------------------------------------------------------------
revno: 5564
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-12-23 14:07:59 +0100
message:
fixed bug in databrowser, fromDate/toDate was not posted since they were disabled by the datepicker method in commons.js, now enables dates on submit
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataBrowser.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataBrowserForm.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-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2011-12-22 13:09:31 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2011-12-23 13:07:59 +0000
@@ -940,7 +940,7 @@
}
/**
- * Create jQuery datepicker for start date and end ate text with id * *
+ * Create jQuery datepicker for start date and end date text with id
*
* @param startdate the id of input field which you want enter start date *
* @param enddate the id of input field which you want enter end date *
@@ -978,6 +978,7 @@
dates.not(this).datepicker("option", option, date);
}
});
+
jQuery( "#" + startdate ).attr("disabled", true );
jQuery( "#" + enddate ).attr("disabled", true );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataBrowser.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataBrowser.js 2011-04-05 06:02:03 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataBrowser.js 2011-12-23 13:07:59 +0000
@@ -43,7 +43,13 @@
{
setHeaderDelayMessage( i18n_please_select_org_unit );
}
- else form.submit();
+ else
+ {
+ $( "#fromDate").removeAttr("disabled");
+ $( "#toDate").removeAttr("disabled");
+
+ form.submit();
+ }
}
// -----------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataBrowserForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataBrowserForm.js 2011-05-24 09:08:25 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/dataBrowserForm.js 2011-12-23 13:07:59 +0000
@@ -1,18 +1,20 @@
-jQuery(document).ready(function() {
-
- selectionTreeSelection.setListenerFunction( organisationUnitModeSelected );
- selectionTreeSelection.setMultipleSelectionAllowed( false );
- selectionTree.clearSelectedOrganisationUnits();
- selectionTree.buildSelectionTree();
-
- datePickerInRange('fromDate', 'toDate');
-
- validation2('databrowser', function(form) {
- validateBeforeSubmit(form);
- }, {
- 'rules' : getValidationRules("dataBrowser")
- });
-});
+jQuery( document ).ready( function ()
+{
+
+ selectionTreeSelection.setListenerFunction( organisationUnitModeSelected );
+ selectionTreeSelection.setMultipleSelectionAllowed( false );
+ selectionTree.clearSelectedOrganisationUnits();
+ selectionTree.buildSelectionTree();
+
+ datePickerInRange( 'fromDate', 'toDate' );
+
+ validation2( 'databrowser', function ( form )
+ {
+ validateBeforeSubmit( form );
+ }, {
+ 'rules':getValidationRules( "dataBrowser" )
+ } );
+} );
var flag;
window.onload = modeHandler;