Follow-up on r76972, renaming files inside the folder accordingly
authorKrinkle <krinkle@users.mediawiki.org>
Thu, 18 Nov 2010 22:04:22 +0000 (22:04 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Thu, 18 Nov 2010 22:04:22 +0000 (22:04 +0000)
resources/mediawiki.special/mediawiki.special.preferences.css [new file with mode: 0644]
resources/mediawiki.special/mediawiki.special.preferences.js [new file with mode: 0644]
resources/mediawiki.special/mediawiki.special.search.js [new file with mode: 0644]
resources/mediawiki.special/mediawiki.specials.preferences.css [deleted file]
resources/mediawiki.special/mediawiki.specials.preferences.js [deleted file]
resources/mediawiki.special/mediawiki.specials.search.js [deleted file]

diff --git a/resources/mediawiki.special/mediawiki.special.preferences.css b/resources/mediawiki.special/mediawiki.special.preferences.css
new file mode 100644 (file)
index 0000000..b6298a5
--- /dev/null
@@ -0,0 +1,21 @@
+#mw-emailaddress-validity {
+       padding: 2px 1em;
+}
+body.ltr #mw-emailaddress-validity {
+       border-bottom-right-radius:0.8em;
+       border-top-right-radius:0.8em;
+}
+body.rtl #mw-emailaddress-validity {
+       border-bottom-left-radius:0.8em;
+       border-top-left-radius:0.8em;
+}
+#mw-emailaddress-validity.valid {
+       border: 1px solid #80FF80;
+       background-color: #C0FFC0;
+       color: black;
+}
+#mw-emailaddress-validity.invalid {
+       border: 1px solid #FF8080;
+       background-color: #FFC0C0;
+       color: black;
+}
diff --git a/resources/mediawiki.special/mediawiki.special.preferences.js b/resources/mediawiki.special/mediawiki.special.preferences.js
new file mode 100644 (file)
index 0000000..5df2a3c
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+ * JavaScript for Special:Preferences
+ */
+
+$( '#prefsubmit' ).attr( 'id', 'prefcontrol' );
+$( '#preferences' )
+       .addClass( 'jsprefs' )
+       .before( $( '<ul id="preftoc"></ul>' ) )
+       .children( 'fieldset' )
+       .hide()
+       .addClass( 'prefsection' )
+       .children( 'legend' )
+       .addClass( 'mainLegend' )
+       .each( function( i ) {
+               $(this).parent().attr( 'id', 'prefsection-' + i );
+               if ( i === 0 ) {
+                       $(this).parent().show();
+               }
+               $( '#preftoc' ).append(
+                       $( '<li></li>' )
+                               .addClass( i === 0 ? 'selected' : null )
+                               .append(
+                                       $( '<a></a>')
+                                               .text( $(this).text() )
+                                               .attr( 'href', '#prefsection-' + i )
+                                               .mousedown( function( e ) {
+                                                       $(this).parent().parent().find( 'li' ).removeClass( 'selected' );
+                                                       $(this).parent().addClass( 'selected' );
+                                                       e.preventDefault();
+                                                       return false;
+                                               } )
+                                               .click( function( e ) {
+                                                       $( '#preferences > fieldset' ).hide();
+                                                       $( '#prefsection-' + i ).show();
+                                                       e.preventDefault();
+                                                       return false;
+                                               } )
+                               )
+               );
+       } );
+
+// Lame tip to let user know if its email is valid. See bug 22449
+$( '#mw-input-emailaddress' )
+       .keyup( function () {
+               if( $( "#mw-emailaddress-validity" ).length == 0 ) {
+                       $(this).after( '<label for="mw-input-emailaddress" id="mw-emailaddress-validity"></label>' );
+               }
+               var isValid = wfValidateEmail( $(this).val() );
+               var class_to_add    = isValid ? 'valid' : 'invalid';
+               var class_to_remove = isValid ? 'invalid' : 'valid';
+               $( '#mw-emailaddress-validity' )
+                       .text( isValid ? 'Looks valid' : 'Valid address required!' )
+                       .addClass( class_to_add )
+                       .removeClass( class_to_remove );
+       } );
+
+/**
+ *  Validate a string as representing a valid e-mail address
+ * according to HTML5 specification. Please note the specification
+ * does not validate a domain with one character.
+ *
+ * FIXME: should be moved to a JavaScript validation module.
+ */
+wfValidateEmail = function( mailtxt ) {
+       if( mailtxt == '' ) { return null; }
+
+       /**
+        * HTML 5 define a string as valid e-mail address if it matches
+        * the ABNF :
+        *   1 * ( atext / "." ) "@" ldh-str 1*( "." ldh-str )
+        * With:
+        * - atext   : defined in RFC 5322 section 3.2.3
+        * - ldh-str : defined in RFC 1034 section 3.5
+        *
+        * (see STD 68 / RFC 5234 http://tools.ietf.org/html/std68):
+        */
+
+       /**
+        * First, define the RFC 5322 'atext' which is pretty easy :
+        * atext = ALPHA / DIGIT /    ; Printable US-ASCII
+                       "!" / "#" /        ;  characters not including
+                       "$" / "%" /        ;  specials.  Used for atoms.
+                       "&" / "'" /
+                       "*" / "+" /
+                       "-" / "/" /
+                       "=" / "?" /
+                       "^" / "_" /
+                       "`" / "{" /
+                       "|" / "}" /
+                       "~"
+       */
+       var rfc5322_atext   = "a-z0-9!#$%&'*+-/=?^_`{|}—~" ;
+
+       /**
+        * Next define the RFC 1034 'ldh-str'
+        *   <domain> ::= <subdomain> | " "
+        *   <subdomain> ::= <label> | <subdomain> "." <label>
+        *   <label> ::= <letter> [ [ <ldh-str> ] <let-dig> ]
+        *   <ldh-str> ::= <let-dig-hyp> | <let-dig-hyp> <ldh-str>
+        *   <let-dig-hyp> ::= <let-dig> | "-"
+        *   <let-dig> ::= <letter> | <digit>
+        */
+       var rfc1034_ldh_str = "a-z0-9-" ;
+
+       var HTML5_email_regexp = new RegExp(
+               // start of string
+               '^'
+               +
+               // User part which is liberal :p
+               '[' + rfc5322_atext + '\\.' + ']' + '+'
+               +
+               // "apostrophe"
+               '@'
+               +
+               // Domain first part
+               '[' + rfc1034_ldh_str + ']+'
+               +
+               // Second part and following are separated by a dot
+               '(\\.[' + rfc1034_ldh_str + ']+)+'
+               +
+               // End of string
+               '$',
+               // RegExp is case insensitive
+               'i'
+               );
+       return mailtxt.match( HTML5_email_regexp );
+};
diff --git a/resources/mediawiki.special/mediawiki.special.search.js b/resources/mediawiki.special/mediawiki.special.search.js
new file mode 100644 (file)
index 0000000..1b56857
--- /dev/null
@@ -0,0 +1,8 @@
+/*
+ * JavaScript for Specical:Search
+ */
+
+// Emulate HTML5 autofocus behavior in non HTML5 compliant browsers
+if ( !( 'autofocus' in document.createElement( 'input' ) ) ) {
+       $( 'input[autofocus]' ).focus();
+}
diff --git a/resources/mediawiki.special/mediawiki.specials.preferences.css b/resources/mediawiki.special/mediawiki.specials.preferences.css
deleted file mode 100644 (file)
index b6298a5..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#mw-emailaddress-validity {
-       padding: 2px 1em;
-}
-body.ltr #mw-emailaddress-validity {
-       border-bottom-right-radius:0.8em;
-       border-top-right-radius:0.8em;
-}
-body.rtl #mw-emailaddress-validity {
-       border-bottom-left-radius:0.8em;
-       border-top-left-radius:0.8em;
-}
-#mw-emailaddress-validity.valid {
-       border: 1px solid #80FF80;
-       background-color: #C0FFC0;
-       color: black;
-}
-#mw-emailaddress-validity.invalid {
-       border: 1px solid #FF8080;
-       background-color: #FFC0C0;
-       color: black;
-}
diff --git a/resources/mediawiki.special/mediawiki.specials.preferences.js b/resources/mediawiki.special/mediawiki.specials.preferences.js
deleted file mode 100644 (file)
index 5df2a3c..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * JavaScript for Special:Preferences
- */
-
-$( '#prefsubmit' ).attr( 'id', 'prefcontrol' );
-$( '#preferences' )
-       .addClass( 'jsprefs' )
-       .before( $( '<ul id="preftoc"></ul>' ) )
-       .children( 'fieldset' )
-       .hide()
-       .addClass( 'prefsection' )
-       .children( 'legend' )
-       .addClass( 'mainLegend' )
-       .each( function( i ) {
-               $(this).parent().attr( 'id', 'prefsection-' + i );
-               if ( i === 0 ) {
-                       $(this).parent().show();
-               }
-               $( '#preftoc' ).append(
-                       $( '<li></li>' )
-                               .addClass( i === 0 ? 'selected' : null )
-                               .append(
-                                       $( '<a></a>')
-                                               .text( $(this).text() )
-                                               .attr( 'href', '#prefsection-' + i )
-                                               .mousedown( function( e ) {
-                                                       $(this).parent().parent().find( 'li' ).removeClass( 'selected' );
-                                                       $(this).parent().addClass( 'selected' );
-                                                       e.preventDefault();
-                                                       return false;
-                                               } )
-                                               .click( function( e ) {
-                                                       $( '#preferences > fieldset' ).hide();
-                                                       $( '#prefsection-' + i ).show();
-                                                       e.preventDefault();
-                                                       return false;
-                                               } )
-                               )
-               );
-       } );
-
-// Lame tip to let user know if its email is valid. See bug 22449
-$( '#mw-input-emailaddress' )
-       .keyup( function () {
-               if( $( "#mw-emailaddress-validity" ).length == 0 ) {
-                       $(this).after( '<label for="mw-input-emailaddress" id="mw-emailaddress-validity"></label>' );
-               }
-               var isValid = wfValidateEmail( $(this).val() );
-               var class_to_add    = isValid ? 'valid' : 'invalid';
-               var class_to_remove = isValid ? 'invalid' : 'valid';
-               $( '#mw-emailaddress-validity' )
-                       .text( isValid ? 'Looks valid' : 'Valid address required!' )
-                       .addClass( class_to_add )
-                       .removeClass( class_to_remove );
-       } );
-
-/**
- *  Validate a string as representing a valid e-mail address
- * according to HTML5 specification. Please note the specification
- * does not validate a domain with one character.
- *
- * FIXME: should be moved to a JavaScript validation module.
- */
-wfValidateEmail = function( mailtxt ) {
-       if( mailtxt == '' ) { return null; }
-
-       /**
-        * HTML 5 define a string as valid e-mail address if it matches
-        * the ABNF :
-        *   1 * ( atext / "." ) "@" ldh-str 1*( "." ldh-str )
-        * With:
-        * - atext   : defined in RFC 5322 section 3.2.3
-        * - ldh-str : defined in RFC 1034 section 3.5
-        *
-        * (see STD 68 / RFC 5234 http://tools.ietf.org/html/std68):
-        */
-
-       /**
-        * First, define the RFC 5322 'atext' which is pretty easy :
-        * atext = ALPHA / DIGIT /    ; Printable US-ASCII
-                       "!" / "#" /        ;  characters not including
-                       "$" / "%" /        ;  specials.  Used for atoms.
-                       "&" / "'" /
-                       "*" / "+" /
-                       "-" / "/" /
-                       "=" / "?" /
-                       "^" / "_" /
-                       "`" / "{" /
-                       "|" / "}" /
-                       "~"
-       */
-       var rfc5322_atext   = "a-z0-9!#$%&'*+-/=?^_`{|}—~" ;
-
-       /**
-        * Next define the RFC 1034 'ldh-str'
-        *   <domain> ::= <subdomain> | " "
-        *   <subdomain> ::= <label> | <subdomain> "." <label>
-        *   <label> ::= <letter> [ [ <ldh-str> ] <let-dig> ]
-        *   <ldh-str> ::= <let-dig-hyp> | <let-dig-hyp> <ldh-str>
-        *   <let-dig-hyp> ::= <let-dig> | "-"
-        *   <let-dig> ::= <letter> | <digit>
-        */
-       var rfc1034_ldh_str = "a-z0-9-" ;
-
-       var HTML5_email_regexp = new RegExp(
-               // start of string
-               '^'
-               +
-               // User part which is liberal :p
-               '[' + rfc5322_atext + '\\.' + ']' + '+'
-               +
-               // "apostrophe"
-               '@'
-               +
-               // Domain first part
-               '[' + rfc1034_ldh_str + ']+'
-               +
-               // Second part and following are separated by a dot
-               '(\\.[' + rfc1034_ldh_str + ']+)+'
-               +
-               // End of string
-               '$',
-               // RegExp is case insensitive
-               'i'
-               );
-       return mailtxt.match( HTML5_email_regexp );
-};
diff --git a/resources/mediawiki.special/mediawiki.specials.search.js b/resources/mediawiki.special/mediawiki.specials.search.js
deleted file mode 100644 (file)
index 1b56857..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- * JavaScript for Specical:Search
- */
-
-// Emulate HTML5 autofocus behavior in non HTML5 compliant browsers
-if ( !( 'autofocus' in document.createElement( 'input' ) ) ) {
-       $( 'input[autofocus]' ).focus();
-}