* Set vars in return this.each loop. This is the defacto standard plugin structure
but somehow it slipped through this one (it's a 2 line wrapper, easy to miss).
* Added unit test (which failed before this commit)
* Fixes:
-- (bug 35294) jquery.byteLimit shouldn't set element specific variables outside the "return this.each" loop.
* Move translate() out of the if-block, no need to re-define
* `else` after return in `if`
* update js coding style
* remove bogus '=' in comment
* line-wrapping of long arrays
Changed order of feature-detection checks so we prefer the IE method over the Mozilla method in encapsulateSelection. Fixes a problem where IE9 triggered the Mozilla mode, then mysteriously scrolled to the top of the page.
(IE9 and IE10 add a lot of standard and semi-standard HTML APIs, so this sort of thing happens from time to time. :)
I am reverting, for now, two recent additions made to the table sorting:
- r111884 fractions
- r111829 IP addresses
Both need to be polished a bit more before landing in trunk. Please reapply
in a branch then once reviewed we can merge it in trunk, that will avoid
us a lot of "spam".
* Intended to preserver scroll-state (which is shifted when an element to the bottom gains height). However too unstable to be more handy that it is annoying when it is not.
* Follows-up r107982
* Previously mw.log and mw.Debug both were in a fixed container on the bottom, overlapping each other. mw.log did increase the body's padding-bottom to account for the height so that all content is still visible, but it was still a problem when mw.Debug came along.
* This plugin adds a single fixed position element to bottom of the body, to which other stuff like mw.log and mw.Debug can append a non-fixed position container. That will take care of it.
* Method update() will re-check the padding and scroll position and fix where needed
* Reduces code a little bit
Problem was per CR comment https://www.mediawiki.org/wiki/Special:Code/MediaWiki/104671#c26836 -- parameter count check changed in upstream jquery.bind(), causing the way we passed params to break if the optional 'data' parameter was left out.
Added QUnit test cases for jquery.delayedBind() with and without the optional 'data' parameter.
Undoes r104671 since the issue it was working around is fixed.
* Various fixes to limit the selector to the current table and avoid selecting similar elements from other, nested, tables.
* Should fix bug 32049
* Follows-up r97150 and likely some other refactoring commits
Follows up to the test cases added in r100391. jquery.textSelection's getCaretPosition() for IE needs to focus the textarea first in order to get consistent results when there's an empty selection -- getSelection() which returns the text already does this.
Because focus had previously been stolen by the drop-down menus in WikiEditor's toolbar, the saveCursorAndScrollTop() was getting a bogus result from getCaretPosition, saving that, then restoring the bad selection (wiping out the original caret position) right before going ahead with the encapsulateText call.
Now seems to get the correct caret position, and also doesn't appear to interfere with selections.
* Apply code conventions (mostly whitespace and missing semi-colons)
* Minor other nitpicks
-- '! important' -> '!important'
-- Ucfirst -> lc; for color names and keywords
-- Remove uses of system color keywords (they are deprecated) [1] Most had fixed fallbacks already. Using those now.
-- Remove version query string (foo.png?2), last modified in r66151. Now obsolete with ResourceLoader
-- 0px to 0 where possible
-- Remove commented out css rules and declarations without any comment (debug stuff like /*div{ border:1px solid Red !important;}*/)
-- Remove empty blocks ( .foo { } )
[1] https://developer.mozilla.org/en/CSS/color_value#System_Colors