| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
* Fixes bug 33305
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/106992
|
|
|
|
|
|
|
|
|
|
| |
- new recommended closure format
- fixing repeated var statements, or var statement inside blocks (there is no block scope in JavaScript) and moving them to the top of the function
- line breaking, indention, white space
- and more.. see also https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/106991
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/96151
|
|
|
|
|
|
|
|
|
| |
* bug 30710
Also makes it easier to do unit testing, this way the module can be included and the test can initialize it if and when it wants to.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/96150
|
|
|
|
|
|
|
|
|
|
|
| |
global replace (d'oh!)
Now works with parameters containing multiple spaces. :)
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/95451
|
|
|
|
|
|
|
|
|
|
| |
$.param() produces query string form encoding using the traditional '+' encoding for space; mediawiki.util.getParamValue() was using only decodeURIComponent() to do unescaping, which is not required by spec to handle '+'. Explicitly replacing '+' with '%20' before the decode nicely resolves this.
Added a test case to qunit tests for mediawiki.util module.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/95332
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Although jQuery covers for us in most cases (since .prop didn't exist before jQuery 1.6 and many people abused .attr in laziness of doing their own loop and setting the property manually). It's better to know what we're doing and call the function we intend to call. Both because jQuery may decide to stop rerouting common mistakes to .prop and because it makes code more readable.
* Aside from switching to prop, for boolean properties also replacing null/undefined with false and 'propname' with true. This is no longer being covered by jQuery when using prop directly (as it shouldn't). When an element is created the HTML specification says that the attribute should be set to it's name (ie. '<foo selected="selected">'), the properties however must remain boolean.
* Changing the attribute value for a boolean property (ie. checkbox.setAttribute( 'checked', 'checked' ) does not make the checkbox enabled. All it does is set the attribute. The reason this works with jQuery's attr() is because jQuery calls .prop internally after a bunch of checking inside attr().
-- Reference --
The list of keys that .attr and .removeAttr jQuery is currently (as of jQuery 1.6.1) remapping to use .prop and .removeProp can be found here:
https://github.com/jquery/jquery/blob/b22c9046529852c7ce567df13397849e11e2b9cc/src/attributes.js#L425
{
tabindex: "tabIndex",
readonly: "readOnly",
"for": "htmlFor",
"class": "className",
maxlength: "maxLength",
cellspacing: "cellSpacing",
cellpadding: "cellPadding",
rowspan: "rowSpan",
colspan: "colSpan",
usemap: "useMap",
frameborder: "frameBorder",
contenteditable: "contentEditable"
}
In addition to those, jQuery also maps these boolean properties to .prop when they are passed to .attr:
rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
(source: https://github.com/jquery/jquery/blob/b22c9046529852c7ce567df13397849e11e2b9cc/src/attributes.js#L9 )
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/94386
|
|
|
|
|
|
|
|
|
|
|
| |
- jQuery changed to $ in some files because there is a closure that creates a locally scoped $, but the jQuery var is globally scoped, meaning using jQuery instead of $ inside that closure could result in interacting with a different instance of jQuery than the uses of $ in that same closure.
- In mwExtension wrap the code inside a closure which it is missing. Also take this chance to fix the whitespace style `fn( arg )` instead of `fn(arg)` on the isArray I added.
This is partially a followup to r94331.
Note: The jquery plugins inside the jquery/ folder look fine for use of jQuery within closures, except for mockjax.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/94332
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/94247
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/93805
|
|
|
|
|
|
|
|
|
|
|
| |
through BugZilla.
* (bug 27427) mw.util.getParamValue shouldn't return value from hash even if param is only present in hash.
(Follows-up r93516)
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/93517
|
|
|
|
|
|
|
|
|
|
|
|
| |
* size() -> length
* strict comparison to undefined instead of typeof + string comparison
* merge var statements
* strict comparison to 0 and ''
* dot notation
* trailing whitespace
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/93364
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- No functional changes
- Whitespace correction
- Comment fixes
- Combine var statements
- A few [[JSPERF]]ies
- Using mw instead of mediaWiki
- Putting global alias on top, to avoid a ReferenceError in case the immediately invoked "new function(){}" refers to mw during the construction
- "class" -> "constructor"
- caching "typeof dependencies" in mw.loader.using
- fix var "group" collision in mw.loader.work
- move var statements to top of functions
- fixing some occurrences of var statements in for-loops by declaring them before the loop
- Remove space before slash in html-fragement for jQuery html regex in <link /> and <br />
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/92933
|
|
|
|
|
|
|
|
|
|
|
|
| |
- redundant and makes it even more confusing than jQuery's "inArray" already was.
- Reverts r92261
- Fixed usage in /trunk/*
-- http://toolserver.org/~krinkle/wikimedia-svn-search/view.php?id=245&hash=4ef50cd2f7017954e562155ccceba878
While at it, also took take of the r92297 fixme. Item argument must be before array argument.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/92752
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Partial revert of r92264. mw.ajaxCategories has nothing to do with mediawiki.util.init, moved into separate initiation module, only loaded when ajax categories is enabled.
* Removing instantiation from the script. mw.ajaxCategories is now a public accessible constructor
* Fix Uncaught ReferenceError: wgUserGroups is not defined
($wgLegacyJavaScriptGlobals = false;)
* Renamimng stripIllegals() to clean(), adding '#' to the regex as those are not allowed either.
* Combining var statements by separating them with comma's ( var foo, bar, baz; ) instead of "var foo; var bar; var baz;"svn up
* Using dot.notation for objects instead of array-like['string'] keys
* Whitespace conventions
* Using inArray utility instead of indexOf (cross-browser support, mostly IE6)
** $.inArray uses Array.prototype.indexOf if available, otherwise fallback to a loop. mw.util.inArray is a wrapper around $.inArray to return a boolean value (since inArray/indexOf may return 0)
* Don't use $( '#bodyContent' ) (skin specific) but mw.util.$content
* Using mw.Title
* Re-using helper functions from the outer-closure instead of re-declaring them privately for every instance again (performance!)
Follows-up: r92112, r92151, r92264
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/92288
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/92264
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/92261
|
|
|
|
|
|
|
| |
loading of modules with uninitialized data triggers errors in console and marks the entire revision black in TestSwarm.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/92253
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/92238
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
version worked fine but shouldn't be used.
Follows-up:
* r75275: Introduced the updateTooltipAccessKeys function in the new library but didn't call it on document ready and left the deprecated one in the onloadhook-run in wikibits.js untouched
* r75287: Introduced jquery.checkboxShiftClick and called on-load but left the load call for the legacy version untouched. Depending on the load order at any given time it may not have been used.
Also reordering the if-else case in mw.util.updateTooltipAccessKeys to allow a call without arguments ("undefined instanceof Foo" throws exception)
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/91660
|
|
|
|
|
|
|
| |
non-Mac Firefox 2+ accesskey tooltip. However, this code IS NOT YET USED which is very suspicious. An earlier version of this code is wikibits.js is still being used for some reason, which indicates a maintenance problem.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/91652
|
|
|
|
|
|
|
|
|
|
| |
* (bug 29723) mw.util.wikiGetlink() should default to wgPageName
* Solution by mybugs.mail
* Adding unit tests
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/91500
|
|
|
|
|
|
|
|
| |
* Remove redundant mw>mediaWiki passing through IIFE
* Using local alias to global mw.util
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/91497
|
|
|
|
|
|
|
|
|
|
| |
"vectorTabs" portlets
* Patch by Erwin Dokter
* This unbreaks test introduced in r90728
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/90729
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First step towards cleaning up mw.util.init and removing bugus dependancies on mediawiki.util which are just added there in order to load them on every page and do something on-load.
Introducing mediawiki.page.startup (in the head) and mediawiki.page.ready (on the bottom)
Moved the following to them:
* document.ready from jquery.cient
-- Shouldn't have been in the plugin itself in the first place
* jquery.placeholder
* jquery.makeCollapsible
* mediawiki.action.view.tablesorting
* jquery.checkboxShiftClick
(This also solves part of bug 26799)
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/90605
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/90063
|
|
|
|
|
|
|
| |
after their PHP counterparts Language and wfMessage respectively.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/75486
|
|
|
|
|
|
|
| |
+ updated the test suite
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/75336
|
|
|
|
|
|
|
| |
Special:MWUtilTest?debug=true
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/75325
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/75294
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/75287
|
|
whitespace cleanup in mediawiki.js
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/75275
|