Commit graph

260 commits

Author SHA1 Message Date
Trevor Parscal
85a453204c Fixed IE bug, you must use html:msg for the msg elements that jquery.localize uses to translate things otherwise IE chokes when you insert them cause it doesn't know about the msg element. 2011-01-12 20:43:23 +00:00
Trevor Parscal
de1e452557 Fixed suggestions positioning in IE6 2011-01-12 20:04:58 +00:00
Trevor Parscal
534f6abd6b Fixed logic error - all tests were passing... :( 2011-01-11 23:15:26 +00:00
Trevor Parscal
9d999a61fc Fixed logic error that caused the test to always pass. 2011-01-11 21:55:45 +00:00
Trevor Parscal
dfabce85cf Included client in the initial payload. Restored functionality that used to exist in this plug-in that adds classes to the document's HTML element for browser and platform information. This will help reduce CSS hacks to only be used for non-JS rendered items. 2011-01-11 20:56:15 +00:00
Krinkle
85d5e617d7 Removing unneeded wraps and using $ and mw instead of jQuery or mediaWiki since r79246 enabled the private scope by default. No need for two wraps.
(the wraps had an extra indention, hence the diff will probably look huge)
2011-01-10 05:33:03 +00:00
Krinkle
acf088b883 Clean up mediawiki.special.upload.js
* (Whitespace) conventions [[Manual:Coding conventions]]
* Single quotes where possible
* Removing useless parens in some cases
* Missing semicolons (JSLint)
(Kindafollowupon r79867)
2011-01-08 16:43:25 +00:00
Krinkle
83a7822df7 Wrote jquery.colorUtil plugin.
* Introduces rgbToHsl and hslToRgb functions
* Introdoces a simple way to get a brigher or darker color
* Moved getRGB() function and colors-array from jquery.color to it so they are publically available.
* Applied fixed from JSLint to all of this
* Made jquery.color use these instead to avoid duplication and added dependency for it
2011-01-05 23:24:07 +00:00
Krinkle
8fad46e6ad * Toggle entire element if no .mw-collapsible-content is found
* Bug fixed in which a single customtoggle should trigger multiple customcollapsible elements

If no .mw-collapsible-content element is found when the toggleElement() function is called, assume that the user wants the mw-collapsible itself to be toggled. This enables custom use with table rows (in which we dont want something inside to toggle but the entire table row) - with a remote toggle.

This change makes it possible to have a togglable table-row.

The intial "collapsed" state for a mw-customtoggle is no longer executed by performing a click on the mw-customtoggle. Instead by calling the toggle function directly.
Reason being that an mw-customtoggle could have any number of special functions bound to it (be it the function to toggle another mw-customcollapsible, or perhaps a totally different function).

I considered using this method for 'normal' default togglers as well. However default togglers have more actions involved aside from just 'toggling' the element. Namely changing the innerText to the localized message and swapping classes. Those stay as they are by simply simulating a click() event on them (if the initial state should be collapsed).
2011-01-02 04:46:44 +00:00
Krinkle
0f8d4d4481 Treat premade toggle links as a custom instead of default case (ie. dont change the text) (Follow-up r78989 CR) 2010-12-27 17:37:19 +00:00
Krinkle
31c71dbdb4 The toggle link may be in any of the cells of the first row. The default will stick to the last cell but when detecting premade links, it now scans the entire first row instead of just the last cell. 2010-12-27 16:43:50 +00:00
Krinkle
c2da6eade9 adding hoverIntent plugin 2010-12-26 20:41:08 +00:00
Krinkle
d4ff136244 Added remote binding for custom collapsibles and minor improvements
* Fixed JSLint errors
* Added support for custom collapsibles that can have togglelink(s) anywhere in the document
* To prevent people from making secret toggle links (vandalism?) for things like '#content', prefix 'mw-customcollapsible-' is required
* Merged a few comments (bit less verbose)
* Adding extra check when fixing li-value. Value-attribute of an ordered list items defaults to '-1' instead of '' in Mozilla Firefox 3.
2010-12-25 03:26:09 +00:00
Krinkle
fd7afe8b90 Fixing typo from r78944 2010-12-24 16:08:42 +00:00
Krinkle
61c52fcdd5 Adding fallback for collapsible messages 2010-12-24 15:27:11 +00:00
Krinkle
ed5d9a08b0 Forgot to namespace the click handler. Unbinding all click handlers is indeed risky (Follow-up r78935 CR) 2010-12-24 15:24:28 +00:00
Krinkle
5a8133d6d9 Removing debug call. Follow-up r78935 CR 2010-12-24 14:34:27 +00:00
Krinkle
6c83eee8ac Fixing TODO from r78915
* Removed old "kr-" prefix for the plugin
* Moved function call from the bottom of the script to mw init function
2010-12-24 01:30:23 +00:00
Krinkle
1a827a0984 Improving jquery.makeCollapsible:
* Setting toggle function in a variable to easier reuse it through the plugin
* Replace "-hide" and "-show" classes with "expanded" and "collapsed" respectively
* For more flexibility, if there's a toggle-element already, bind the function to it and use it instead. Otherwise, just create one as usual. See [[betawiki:User:Krinkle/CollapsingTestpageKr#footer|CollapsingTestpageKr#Combination example]]
** It's more likely that the source has a custom position of the togglelink waiting for it to be bound, then it to be already bound.
* Some comments improved
* Message key "hide" to "collapsible-collapse" (Follow-up r78915 CR)
* Message key "show" to "collapsible-expand"
* Changed toggle-link content filling from html() to text() (message errors like <keyname> caused an HTML-element to be created)
2010-12-23 23:34:32 +00:00
Krinkle
c105152ef1 removing cursor style from JS, adding to CSS file instead 2010-12-23 19:42:26 +00:00
Krinkle
3f57784777 fixing comment in jquery.makeCollapsible.js (in mw 'jquery' is written in lowercase in filenames 2010-12-23 19:27:43 +00:00
Krinkle
9ba8bf97fa whitespace according to mw conventions + using mw.msg instead of english hardcoding 2010-12-23 19:26:30 +00:00
Krinkle
eb18151c7a adding jQuery.makeCollapsible plugin 2010-12-23 19:25:16 +00:00
Roan Kattouw
85d474d85f Fix JS errors thrown by SimpleSearch: add dependency from jquery.autoEllipsis to jquery.highlightText, and fix the latter for the RegExp.escape() -> $.escapeRE() rename 2010-12-23 14:16:20 +00:00
Trevor Parscal
0c9c79a313 Fixed RTL errors for search suggestions 2010-12-16 19:03:51 +00:00
Trevor Parscal
d6a72c6ec8 Updated cookie plugin 2010-12-08 23:14:21 +00:00
Trevor Parscal
88f330061e Removing unused plugin file 2010-12-08 19:14:21 +00:00
Brandon Harris
44a91da53a * Fix issues brought up in r75832
* Really and truly add in a couple files that were supposed to go in with r77898, and fully revert r77860 (which was a reversion of r75832). (Ran previous commit for r77898 from wrong directory. Oops.)
* Fixed issue with help box text not being parsed.
* Modified help system to remove tooltips and instead open/show hidden boxes.
  - I am not happy with this design and future revisions will iterate upon it.
  - The biggest problem is everything sitting "on top" of itself.  I dislike this a great deal and plan on changing it to be more aesthetic and natural; however, I wanted to get a version of this in that allowed for cut-and-pasting and solved the text parsing issue.
  - With javascript disabled, help text is visible by default.
* Remove redundancy in checkboxes
* Added i18n entry for "help", which wasn't there for some reason.
* Removed references to tipsy library in installer html
  - Kept tipsy library in core; this is being used elsewhere.
2010-12-06 23:13:35 +00:00
Sam Reed
bfb6c23266 (bug 26265) Many semicolons are missing from JavaScript files
And some more unterminated statements..
2010-12-06 22:34:15 +00:00
Sam Reed
f8c9b5a6d3 (bug 26265) Many semicolons are missing from JavaScript files
More unterminated statements..
2010-12-06 22:30:34 +00:00
Trevor Parscal
887d1d1660 Improves on r77710 - no purpose in using call() here. 2010-12-06 21:09:53 +00:00
Tim Starling
41b92f3343 Reverted r75832 per my comments on CR, unanswered for 19 days. Moving all help information into tooltips is a step backwards for usability. Reverted followups r75836, r75866, r76314 and r76315. 2010-12-06 07:08:31 +00:00
Trevor Parscal
4cb694ec6c Added new localize plugin which allows simple placeholder based localization of a dom selection with special <msg /> elements or elements with title-msg or alt-msg attributes. 2010-12-04 02:16:37 +00:00
Sam Reed
5437c40e1d Remove some redundant character escapes from regexes 2010-11-30 19:38:04 +00:00
Sam Reed
3070a42fca More JS documentation fixups 2010-11-30 18:26:52 +00:00
Sam Reed
a1d9af3a06 Start fixing up javascript function documentation
Switching order, renaming parameters in documentation
2010-11-30 18:19:27 +00:00
Krinkle
836dbd7bfd whitespace commit (removing trailing space) 2010-11-22 23:55:37 +00:00
Krinkle
1a95664a43 jquery.placeholder.js rewritten
* Instead of calling placeholder() and passing the placeholder-text to it (which meant having to manage text-messages in javascript as well and calling it for each different one), it is now expected that the placeholder-attribute already exists on the page generated by PHP. placeholder() is then called on all input-elements with that attribute to provide fallback for browsers that don't support it.
2010-11-19 00:12:43 +00:00
Krinkle
c563312d90 clean-up trailing spaces and tabs in js/css resources 2010-11-12 23:10:58 +00:00
Roan Kattouw
f3628a4a2a (bug 25877) Don't focus search box when clicking SimpleSearch's magnifying class button 2010-11-11 10:15:49 +00:00
Brandon Harris
d00ddeef7f * Added tipsy library
* Added associated files for tooltip display
* Added associated css rules for tooltip display
* Updated installer's help system in (most?) places to display help as tooltips instead of show/hide system
* Beginnings of visual changes (e.g., less boxes, more color)
* Modified several of the installer's widget display methods
* Added a couple new i18n values
* Fixed small bug in installer logic:
  - Password validation on new users was being executed even if there wasn't a $user object
2010-11-01 21:17:15 +00:00
Roan Kattouw
674e917ce2 Indentation fix 2010-11-01 14:25:47 +00:00
Krinkle
4074b58c3c white-space cleanup throughout $.client and mw.util and mw.util.test (r75593) 2010-10-29 15:30:54 +00:00
Krinkle
77424c1f50 adding layoutversion to $.client and isLayoutVersion to mw.util. Follow-up of r75593 2010-10-29 15:27:53 +00:00
Krinkle
e2e6fb563b moved jQuery.fn.enableCheckboxShiftClick to it's own file and renamed to jQuery.fn.checkboxShiftClick 2010-10-27 15:02:18 +00:00
Trevor Parscal
bc7172ada8 Improved on r74282 and r74333 in response to CR comments. 2010-10-06 19:05:59 +00:00
Trevor Parscal
8467176cca Moved the HTML5 placeholder attribute emulation in ext.vector.simpleSearch into it's own jQuery plugin called jquery.placeholder. 2010-10-05 23:24:56 +00:00
Trevor Parscal
a48858382a Fixed jQuery bug/enahnced jQuery to not blindly convert anything that's not a string to an integer and append 'px', resulting in values like "nullpx" and "NaNpx" which would cause errors in Internet Explorer. Now we are using ( parseInt( size ) || 0 ) + "px" so that if size is null or NaN it will be converted to 0. I've also passed this upstream (http://dev.jquery.com/ticket/7116) 2010-10-05 21:51:24 +00:00
Trevor Parscal
c769d30da7 Improved on r73046 by removing asumption of $ === jQuery. 2010-10-01 19:22:06 +00:00
Trevor Parscal
4f166d4fe8 Improves on r73032 by making more consistent use of escape sequences. 2010-10-01 19:20:27 +00:00
Trevor Parscal
86ba49df42 Resolves issue in r73046 where a jQuery plugin assumed $; wrapped it in a closure to solve this. 2010-10-01 18:05:55 +00:00
Trevor Parscal
1e8dee36f6 Removed unused scripts. 2010-09-20 23:48:27 +00:00
Trevor Parscal
659c86a019 Changed profile property names - this should be the stable API from now on. 2010-09-20 19:20:55 +00:00
Trevor Parscal
b16d2d0beb fixed comment 2010-09-20 19:12:28 +00:00
Trevor Parscal
7c97cae851 Swtiched to using a more robust object to properly store a cached profile 2010-09-15 02:34:31 +00:00
Trevor Parscal
92d8037bb9 Added collapsible tabs plugin, reworked tabIndex functions, and fixed some syntax errors. 2010-09-15 02:03:24 +00:00
Trevor Parscal
6554e106a0 Removed remnant of this being a mediaWiki module. 2010-09-15 01:48:55 +00:00
Trevor Parscal
3bb421904a Moved client library to a jQuery extension - which makes it more useful to non-mediawiki people. 2010-09-15 00:58:59 +00:00
Trevor Parscal
6a33ab3514 Added registrations for modules that were present but not registered. Also removed 2 scripts; jquery.browser is being replaced by mediWiki.util.client, and jquery.collapsibleTabs belongs to the Vector/CollapsibleTabs extension. 2010-09-09 20:31:19 +00:00
Roan Kattouw
32377424b9 Merging resourceloader branch into trunk. Full documentation is at http://www.mediawiki.org/wiki/ResourceLoader and a general overview has been posted on wikitech-li <http://lists.wikimedia.org/pipermail/wikitech-l/2010-September/049253.html>. One important change is that all JS is now loaded at the bottom, so any scripts assuming things from wikibits or whatever are present will fail. 2010-09-04 04:00:09 +00:00