r56175 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56174‎ | r56175 | r56176 >
Date:11:09, 11 September 2009
Author:catrope
Status:ok
Tags:
Comment:
svn:eol-style native
Modified paths:
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.namespaceSelect.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.namespaceSelect.js
@@ -1,20 +1,20 @@
2 -/**
3 - * Plugin that fills a <select> with namespaces
4 - */
5 -
6 -(function ($) {
7 -$.fn.namespaceSelector = function( defaultNS ) {
8 - if ( typeof defaultNS == 'undefined' )
9 - defaultNS = 0;
10 - return this.each( function() {
11 - for ( var id in wgFormattedNamespaces ) {
12 - var opt = $( '<option />' )
13 - .attr( 'value', id )
14 - .text( wgFormattedNamespaces[id] );
15 - if ( id == defaultNS )
16 - opt.attr( 'selected', 'selected' );
17 - opt.appendTo( $(this) );
18 - }
19 - });
20 -};})(jQuery);
21 -
 2+/**
 3+ * Plugin that fills a <select> with namespaces
 4+ */
 5+
 6+(function ($) {
 7+$.fn.namespaceSelector = function( defaultNS ) {
 8+ if ( typeof defaultNS == 'undefined' )
 9+ defaultNS = 0;
 10+ return this.each( function() {
 11+ for ( var id in wgFormattedNamespaces ) {
 12+ var opt = $( '<option />' )
 13+ .attr( 'value', id )
 14+ .text( wgFormattedNamespaces[id] );
 15+ if ( id == defaultNS )
 16+ opt.attr( 'selected', 'selected' );
 17+ opt.appendTo( $(this) );
 18+ }
 19+ });
 20+};})(jQuery);
 21+
Property changes on: trunk/extensions/UsabilityInitiative/js/plugins/jquery.namespaceSelect.js
___________________________________________________________________
Name: svn:eol-style
2222 + native

Status & tagging log