Commit graph

119 commits

Author SHA1 Message Date
umherirrender 7506688ca2 Remove extra comma to avoid fatal in IE7
jslint:
modules/jquery.wikiEditor.toolbar.config.js: line 818, col 43, Extra
comma. (it breaks older versions of IE)

Bug: 52715
Follow-Up: I8c5a52c74fa1bc83c662d748731f96bcd91374d0
Change-Id: I99c16f01176a954ad924a5c493e43fb47206fa4b
2013-08-23 15:09:15 +02:00
Krenair c8d0280517 Warn if you try to link to a disambiguation page
As marked by the Disambiguator extension.

Bug: 50160
Change-Id: I8c5a52c74fa1bc83c662d748731f96bcd91374d0
2013-07-15 13:47:16 -07:00
Siebrand Mazeland db7b05404f No longer use parameter in 'wikieditor-toolbar-tool-table-toomany'
The value is 1000 and this number can only be change in the JavaScript
code. It's unlikely this will be done, and if it's done, the message can
be changed easily.

Change-Id: Iff2553112af52ccb22627301c68db63595ec3cf2
2012-12-28 21:56:43 +01:00
Eranroz 8cf557addf Fix for bug 38827. Setting thumb as default format
This patch sets the "thumb" format as the default format for images added
using wikieditor toolbar, with or without dialogs enabled.

Change-Id: I707b02c63b7253bd29b960a58c0fc10e1d013fb4
2012-08-19 22:02:05 +03:00
Derk-Jan Hartman 7a498e18fb (bug 24566) Make the search and replace dialog non-modal
This has been a popular request, because people often have to
interrupt their search to make certain changes and then want to
resume.

Change-Id: Id537ffe439d4522add300d8c1355758774dca1c9
2012-08-04 16:16:25 +02:00
Amir E. Aharoni 2dfbca2b6d Adjust file size input length
The message that currently appears in the box is '(default)' or its
translation. This translation can be a lot longer than it is in English.
This change sets the length according to the length of the actual string.

Change-Id: I9f2151d39e6f3d1cc708ba71e069316c265a8d20
2012-08-02 15:27:12 +03:00
Rob Moen c535fb3fb6 (bug 38820) Fixed missing and invalid page conditional.
API returns an empty string for invalid and missing properties.
If missing / invalid property are defined, page is correctly flagged.

Change-Id: Id8b28f9ce4fc250853206019e864fe108351add9
2012-07-31 10:17:40 -07:00
Eranroz d0654ef864 (bug 24172) Adding dialog for file, (bug 24114) localize REDIRECT
Fix for bug 24172, by extending the wikieditor with a file
dialog (like the table and link dialog) for adding files with exended
syntax.
The added syntax is localised. This also fixes bug 24114, and the redirect
button now adds localised magic word.

Change-Id: I5950b530ab8c55aeba4b579cc80ce863f228d373
2012-07-27 00:59:23 -07:00
Timo Tijhof e7a0484eb5 (bug 38663) [Regression] WikiEditor "Table" dialog broken
* Fixed by casting to a String before doing the round-trip check

* While at it, improve user interface to make it harder to make mistakes
  and easier to do it "right". By making it an HTML5 "number" input specifically,
  and building in min/max settings into the UI.
  Old browsers fallback to a plain text input (like it was before).

  Most browsers implement this number input by allowing the use of the scroll wheel
  and the up/down arrows to adjust the numbers, and not allowing non-numbers or numbers
  outside the allowed range.

* Follows-up 7721909f9f

Change-Id: If32da14f80c6a0e4be3e1fe7fd0b650be4ed8a09
2012-07-26 11:30:27 -07:00
Timo Tijhof 7721909f9f WikiEditor: Linting and conventions
* Code clean up in preparation for enabling linting in the future

* Update code to use latest code conventions and best practices:
 - Make use of jQuery.Event (e.g. no need to check both e.keyCode
   and e.which)
 - jQuery: .size() -> .length
 - jQuery: (where appropiate) .attr() -> .prop()
   Setting properties like 'checked' via attr() has been deprecated
   in jQuery.
 - Whitespace
 - Single quotes instead of double quotes
 - Use literal keys in object literals instead of strings
 - Pass mediaWiki to closure, use mw. locally instead of "mediaWiki"
   global directly.
 - Fix indentation
 - Brackets around if, else and for bodies
 - Strict comparison to 0, null, false, true etc.
 - Fix missing radix parameter in parseInt
 - Use local $ instead of global $
 - Use `foo || bar` instead of `foo ? foo : bar`
 - Variable scope hoisting
 - Double/redundant variable declarations
 - ['foo'] is better written in dot notation
 - New line at EOF
 - Consistency in jQuery construction:
   Tag name for element creation $( '<div>' )
   Valid html for html parsing $( '<div foo="bar"></div>' )
 - Fix regex escape warnings per JSLint/JSHint.
   Do escape ][, don't escape ><
 - ..

* Add .jshintrc / .jshintignore

* Updated most files, but not all. Too much at once.

Change-Id: I445639b25a9688b3cdf9e5449e3d31cbcfa9c7ae
2012-07-17 13:27:27 -07:00
Roan Kattouw 432415b129 Followup r96944: rename "Replace next" button to "Replace" cause that's what it does now 2011-10-31 08:38:35 +00:00
Roan Kattouw 280ae464a4 (bug 31499) articlePathRegex (detection of external links within the same wiki) broken when wgServer is protocol-relative 2011-10-25 14:30:33 +00:00
Derk-Jan Hartman 11aabbd4a9 Fix bug 31604.
Table should now load the tablesorter if needed, and make sure that the table is sortable.
2011-10-22 17:21:03 +00:00
Siebrand Mazeland cc71ec5354 * bump version to 0.3.1
* stylize.php
2011-09-13 08:56:32 +00:00
Siebrand Mazeland 868eec7504 (bug 20919) Search & Replace: Change "Replace Next" functionality to "Replace" functionality. Patch by Amir E. Aharoni.
Submitter's comment: "Replace next" now replaces the currently selected text instead of finding the next occurrence and replacing it. To keep the location of the current occurrence, i added matchIndex to $(this).data.

I added some comments renamed a couple of variable for readability:
* s to textRemainder
* replace to actualReplacement

This is my first significant jQuery-style patch so it may have embarrassing mistakes - constructive criticism is welcome.
2011-09-13 08:53:12 +00:00
Mark A. Hershberger b18069c06a Bug #29106: Patch from Michael M. to address JS legacy globals in wikiEditor 2011-06-26 19:25:27 +00:00
Leo Koppelkamm 57721bd94e Followup to r86108 per CR: Fix two calls to legacy tablesorter 2011-04-30 18:58:17 +00:00
Leo Koppelkamm 724dccc131 Fix jumping of textbox in link-dialog. This happened when the link was being checked and the too large spinner image pushed the field down 2011-04-21 08:59:13 +00:00
Jan Paul Posma 8ca58dd46b A bit of a reorganisation that fixes bug 27164. Basically the extensive configuration in the ext.wikieditor.* functions is moved to the jquery plugins, to be able to use these configurations in other extensions which don't have a #wpTextbox1.
Please review this to check if this is the right way to do it!
2011-02-24 01:45:55 +00:00