http://www.mediawiki.org/wiki/Special:Code/MediaWiki/99517

Revision: 99517
Author:   catrope
Date:     2011-10-11 18:25:09 +0000 (Tue, 11 Oct 2011)
Log Message:
-----------
Various fixes for Contest.php:
* Fix doc comment typo
* Fix version comparison
* Change Contest_VERSION constant to all-caps (CONTEST_VERSION) and make it a 
proper version string without the space
* Split out the timepicker module. Still need to rename the files
* Split out the contestChallanges module. Still need to rename challange to 
challenge everywhere
* Remove unnecessary JUI button dependency for contestChallange/welcome

Modified Paths:
--------------
    trunk/extensions/Contest/Contest.php

Modified: trunk/extensions/Contest/Contest.php
===================================================================
--- trunk/extensions/Contest/Contest.php        2011-10-11 18:22:19 UTC (rev 
99516)
+++ trunk/extensions/Contest/Contest.php        2011-10-11 18:25:09 UTC (rev 
99517)
@@ -15,7 +15,7 @@
  */
 
 /**
- * This documenation group collects source code files belonging to Contest.
+ * This documentation group collects source code files belonging to Contest.
  *
  * @defgroup Contest Contest
  */
@@ -24,16 +24,16 @@
        die( 'Not an entry point.' );
 }
 
-if ( version_compare( $wgVersion, '1.18', '<' ) ) {
+if ( version_compare( $wgVersion, '1.18blah', '<' ) ) {
        die( '<b>Error:</b> Contest requires MediaWiki 1.18 or above.' );
 }
 
-define( 'Contest_VERSION', '0.1 alpha' );
+define( 'CONTEST_VERSION', '0.1alpha' );
 
 $wgExtensionCredits['other'][] = array(
        'path' => __FILE__,
        'name' => 'Contest',
-       'version' => Contest_VERSION,
+       'version' => CONTEST_VERSION,
        'author' => array(
                '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De 
Dauw]',
        ),
@@ -153,14 +153,23 @@
        )
 );
 
+$wgResourceModules['jquery.ui.timepicker'] = $moduleTemplate + array(
+       'scripts' => array(
+               'jquery-ui-timepicker-addon.js', // TODO: rename to 
jquery.ui.timepicker.js
+       ),
+       'styles' => array(
+               'jquery-ui-timepicker-addon.css', // TODO rename
+       ),
+       'dependencies' => array(
+               'jquery.ui.slider',
+               'jquery.ui.datepicker'
+       )
+);
+
 $wgResourceModules['contest.special.editcontest'] = $moduleTemplate + array(
        'scripts' => array(
-               'jquery-ui-timepicker-addon.js',
                'contest.special.editcontest.js',
        ),
-       'styles' => array(
-               'jquery-ui-timepicker-addon.css',
-       ),
        'messages' => array(
                'contest-edit-delete',
                'contest-edit-add-first',
@@ -172,21 +181,25 @@
        ),
        'dependencies' => array(
                'jquery.ui.button',
-               'jquery.ui.slider',
-               'jquery.ui.datepicker'
+               'jquery.ui.timepicker'
        )
 );
 
+$wgResourceModules['jquery.contestChallanges'] = $moduleTemplate + array(
+       'scripts' => array(
+               'jquery.contestChallanges.js' // TODO rename
+       )
+);
+
 $wgResourceModules['contest.special.welcome'] = $moduleTemplate + array(
        'scripts' => array(
-               'contest.special.welcome.js',
-               'jquery.contestChallanges.js'
+               'contest.special.welcome.js'
        ),
        'styles' => array(
                'contest.special.welcome.css',
        ),
        'dependencies' => array(
-               'jquery.ui.button'
+               'jquery.contestChallanges',
        ),
        'messages' => array(
                'contest-welcome-select-header'


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to