https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113595
Revision: 113595 Author: jeroendedauw Date: 2012-03-11 22:06:51 +0000 (Sun, 11 Mar 2012) Log Message: ----------- nicified date input a little Modified Paths: -------------- trunk/extensions/EducationProgram/EducationProgram.php trunk/extensions/EducationProgram/includes/EPHTMLDateField.php trunk/extensions/EducationProgram/resources/ep.datepicker.js Added Paths: ----------- trunk/extensions/EducationProgram/resources/ep.datepicker.css trunk/extensions/EducationProgram/resources/images/ trunk/extensions/EducationProgram/resources/images/calendar.gif Modified: trunk/extensions/EducationProgram/EducationProgram.php =================================================================== --- trunk/extensions/EducationProgram/EducationProgram.php 2012-03-11 22:06:20 UTC (rev 113594) +++ trunk/extensions/EducationProgram/EducationProgram.php 2012-03-11 22:06:51 UTC (rev 113595) @@ -396,6 +396,9 @@ 'scripts' => array( 'ep.datepicker.js', ), + 'styles' => array( + 'ep.datepicker.css', + ), 'dependencies' => array( 'jquery.ui.datepicker', ), Modified: trunk/extensions/EducationProgram/includes/EPHTMLDateField.php =================================================================== --- trunk/extensions/EducationProgram/includes/EPHTMLDateField.php 2012-03-11 22:06:20 UTC (rev 113594) +++ trunk/extensions/EducationProgram/includes/EPHTMLDateField.php 2012-03-11 22:06:51 UTC (rev 113595) @@ -17,7 +17,7 @@ public function __construct( $params ) { parent::__construct( $params ); - $this->mClass .= " ep-datepicker-tr"; + $this->mClass .= " ep-datepicker-tr mwe-date"; } function getSize() { Added: trunk/extensions/EducationProgram/resources/ep.datepicker.css =================================================================== --- trunk/extensions/EducationProgram/resources/ep.datepicker.css (rev 0) +++ trunk/extensions/EducationProgram/resources/ep.datepicker.css 2012-03-11 22:06:51 UTC (rev 113595) @@ -0,0 +1,14 @@ +/** + * CSS for the Education Program MediaWiki extension. + * @see https://www.mediawiki.org/wiki/Extension:Education_Program + * + * Code borrowed from + * http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/UploadWizard/resources/uploadWizard.css?revision=111665&view=co + */ + +input.mwe-date { + /* @embed */ + background: #ffffff url('images/calendar.gif') no-repeat right center; + + direction: ltr; +} \ No newline at end of file Modified: trunk/extensions/EducationProgram/resources/ep.datepicker.js =================================================================== --- trunk/extensions/EducationProgram/resources/ep.datepicker.js 2012-03-11 22:06:20 UTC (rev 113594) +++ trunk/extensions/EducationProgram/resources/ep.datepicker.js 2012-03-11 22:06:51 UTC (rev 113595) @@ -6,12 +6,16 @@ * @author Jeroen De Dauw <jeroendedauw at gmail dot com> */ -(function( $, mw ) { +(function( $ ) { $( document ).ready( function() { $( '.ep-datepicker-tr' ).find( 'input' ).datepicker( { - 'dateFormat': 'yy-mm-dd' + dateFormat: 'yy-mm-dd', + showOn: 'focus', + changeMonth: true, + changeYear: true, + showButtonPanel: true } ); } ); Copied: trunk/extensions/EducationProgram/resources/images/calendar.gif (from rev 113573, trunk/extensions/UploadWizard/resources/images/calendar.gif) =================================================================== (Binary files differ) _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs