------------------------------------------------------------
revno: 9931
committer: Tran Chau <[email protected]>
branch nick: dhis2
timestamp: Thu 2013-02-28 23:25:21 +0700
message:
Minor fix.
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.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 2013-02-28 08:20:24 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js 2013-02-28 16:25:21 +0000
@@ -1078,15 +1078,22 @@
jQuery( ".ui-datepicker-trigger").hide();
addRemoveDateButton( startdate );
addRemoveDateButton( enddate );
-
-
- $("#ui-datepicker-div").hide();
}
function addRemoveDateButton( id )
{
- jQuery("#" + id).after(function() {
- return ' <img src="../images/calendar-delete.png" align="justify" id="delete_' + id + '" onclick="jQuery( \'#' + id + '\').val(\'\');jQuery( \'#' + id + '\').change();"> ';
+ var removeId = 'delete_' + id;
+ if( jQuery("#" + removeId).length == 0 )
+ {
+ jQuery("#" + id).after(function() {
+ return ' <img src="../images/calendar-delete.png" align="justify" id="'+ removeId +'" onclick="jQuery( \'#' + id + '\').val(\'\');jQuery( \'#' + id + '\').change();"> ';
+ });
+ }
+ jQuery( "#" + id).click(function() {
+ $("#ui-datepicker-div").show();
+ });
+ jQuery( "#" + id).change(function() {
+ $("#ui-datepicker-div").hide();
});
}
_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to : [email protected]
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp