r73051 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73050‎ | r73051 | r73052 >
Date:02:36, 15 September 2010
Author:tparscal
Status:ok
Tags:
Comment:
Resolved all dependencies - now any one module can be enabled. Replaced last remaining references to mw.usability.*
Modified paths:
  • /trunk/extensions/Vector/Vector.hooks.php (modified) (history)
  • /trunk/extensions/Vector/modules/vector.simpleSearch.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Vector/modules/vector.simpleSearch.js
@@ -8,7 +8,7 @@
99
1010 $( document ).ready( function() {
1111
12 - var mod = {
 12+ var map = {
1313 'browsers': {
1414 // Left-to-right languages
1515 'ltr': {
@@ -29,7 +29,7 @@
3030 }
3131 }
3232 };
33 - if ( !$.wikiEditor.isSupported( mod ) ) {
 33+ if ( !$.client.test( map ) ) {
3434 return true;
3535 }
3636
@@ -37,7 +37,7 @@
3838 // if the placeholder attribute is supported, use it
3939 if ( 'placeholder' in document.createElement( 'input' ) ) {
4040 $( 'div#simpleSearch > input#searchInput' )
41 - .attr( 'placeholder', mw.usability.getMsg( 'vector-simplesearch-search' ) );
 41+ .attr( 'placeholder', mediaWiki.msg.get( 'vector-simplesearch-search' ) );
4242 } else {
4343 $( 'div#simpleSearch > input#searchInput' )
4444 .each( function() {
@@ -46,7 +46,7 @@
4747 .bind( 'blur', function() {
4848 if ( $input.val().length == 0 ) {
4949 $input
50 - .val( mw.usability.getMsg( 'vector-simplesearch-search' ) )
 50+ .val( mediaWiki.msg.get( 'vector-simplesearch-search' ) )
5151 .addClass( 'placeholder' );
5252 }
5353 } )
@@ -116,7 +116,7 @@
117117 $(this).show()
118118 $label = $( '<div />' )
119119 .addClass( 'special-label' )
120 - .text( mw.usability.getMsg( 'vector-simplesearch-containing' ) )
 120+ .text( mediaWiki.msg.get( 'vector-simplesearch-containing' ) )
121121 .appendTo( $(this) );
122122 $query = $( '<div />' )
123123 .addClass( 'special-query' )
Index: trunk/extensions/Vector/Vector.hooks.php
@@ -23,8 +23,6 @@
2424 'jquery.client',
2525 'jquery.cookie',
2626 'jquery.tabIndex',
27 - 'jquery.collapsibleTabs',
28 - 'jquery.delayedBind',
2927 ),
3028 ),
3129 'preferences' => array(
@@ -44,6 +42,10 @@
4543 'name' => 'vector.collapsibleTabs',
4644 'resources' => array(
4745 'scripts' => 'extensions/Vector/modules/vector.collapsibleTabs.js',
 46+ 'dependencies' => array(
 47+ 'jquery.collapsibleTabs',
 48+ 'jquery.delayedBind',
 49+ ),
4850 ),
4951 ),
5052 'editwarning' => array(
@@ -69,7 +71,11 @@
7072 'resources' => array(
7173 'scripts' => 'extensions/Vector/modules/vector.expandableSearch.js',
7274 'styles' => 'extensions/Vector/modules/vector.expandableSearch.css',
73 - 'dependencies' => array( 'jquery.client' ),
 75+ 'dependencies' => array(
 76+ 'jquery.client',
 77+ 'jquery.expandableField',
 78+ 'jquery.delayedBind',
 79+ ),
7480 ),
7581 'preferences' => array(
7682 'requirements' => array( 'vector-simplesearch' => true ),
@@ -90,6 +96,11 @@
9197 'vector-simplesearch-search',
9298 'vector-simplesearch-containing',
9399 ),
 100+ 'dependencies' => array(
 101+ 'jquery.client',
 102+ 'jquery.suggestions',
 103+ 'jquery.autoEllipsis',
 104+ ),
94105 ),
95106 'preferences' => array(
96107 'requirements' => array( 'vector-simplesearch' => true, 'disablesuggest' => false ),

Status & tagging log