Made Survey date picker more i18n-generic until we support proper i18n

This commit is contained in:
Patrick Donelan 2009-05-12 00:21:21 +00:00
parent d916aa5dd2
commit 4332b57ba2
2 changed files with 3 additions and 27 deletions

View file

@ -1732,31 +1732,6 @@ sub prepareShowSurveyTemplate {
return to_json( { type => 'displayquestions', section => $section, questions => $questions, html => $out } );
}
##-------------------------------------------------------------------
#
#=head2 loadBothJSON($rId)
#
#Loads both the Survey and the appropriate response objects from JSON.
#
#=head3 $rId
#
#The reponse id to load.
#
#=cut
#
#sub loadBothJSON {
# my $self = shift;
# my $rId = shift;
## if ( defined $self->surveyJSON and defined $self->responseJSON ) { return; }
# my $ref = $self->session->db->buildArrayRefOfHashRefs( "
# select s.surveyJSON,r.responseJSON
# from Survey s, Survey_response r
# where s.assetId = ? and r.Survey_responseId = ?",
# [ $self->getId, $rId ] );
# $self->surveyJSON( $ref->[0]->{surveyJSON} );
# $self->responseJSON( $ref->[0]->{responseJSON}, $rId );
#}
#-------------------------------------------------------------------
=head2 persistSurveyJSON ( )

View file

@ -365,7 +365,7 @@ if (typeof Survey === "undefined") {
var date = selected[0];
var year = date[0], month = date[1], day = date[2];
var input = document.getElementById(id);
input.value = month + "/" + day + "/" + year;
input.value = year + "/" + month + "/" + day; // until we can i18n this, use ISO
obj[0].hide();
}
@ -675,7 +675,8 @@ if (typeof Survey === "undefined") {
var calid = ans.id + 'container';
var c = new YAHOO.widget.Calendar(calid, {
title: 'Choose a date:',
close: true
close: true,
navigator: true
});
c.selectEvent.subscribe(selectCalendar, [c, ans.id], true);
c.render();