Commit graph

125 commits

Author SHA1 Message Date
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 05c621db7a Tests: Add cursor: pointer; to the Run button
* Its an interactive button so it should show a cursor. We do
  the same in VisualEditor.

Change-Id: I4c6cfa1cc759b5c6eae82dd17423bb9db554e298
2012-07-17 13:40:40 -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
Eranroz e63ef419f0 (bug 37484) Update removeFromToolbar to select <a> instead of <span>.
* Follows-up fbd5ef001b.

Change-Id: I95eb21ca29a2520b092d6f75ccea98f6f0d1bc32
2012-06-25 20:42:25 +02:00
TyA 5098661115 (bug 25851) Adding additional special characters
The characters are detailed in the bug report.

Patch set 2:
* Amended commit message with bug number.

Patch set 3:
* Added comments to the Cyrillic section for readability.
* Added dotted circle to Palochka to differentiate from I.
* Moved the newly added Ѐ and Ѝ near Е and И.

Change-Id: I2d944926e2769f8691626190259d2466c0e2a8ec
2012-06-13 18:18:50 +03:00
Kai_Nissen_(WMDE) fbd5ef001b (bug 34847) Changing span tags of buttons to anchor tags
To allow users navigating the text markup buttons by keyboard
the span tags have been replaced by anchor tags. Also a dummy
link target has been added to make sure screen readers recognize
these tags correctly.

Change-Id: I9ec1543f3a39b57452d72067cf85b11e9351f546
2012-06-02 13:50:43 +02:00
Demon 30b6d957e9 Merge "Fix for bug 35111" 2012-05-22 17:50:34 +00:00
Siebrand cb99b0a552 Merge "Making ltr default for characters." 2012-05-21 16:05:26 +00:00
Siebrand a0e48c6d82 Merge "fixing some RTL issues with Wikieditor dialogs." 2012-05-21 07:07:41 +00:00
Amir E. Aharoni 80067e8620 Making ltr default for characters.
Without this some conjoined ltr characters look weird in rtl wikis.

Change-Id: I7f38a18fd0d9728f69c63abd77b095a34cffbcb2
2012-05-20 23:27:06 +03:00
शंतनू 5622bdb5e1 Fix for bug 35111
Added support Devanagari characters in the WikiEditor. This includes all
characters as per http://unicode.org/charts/PDF/U0900.pdf

Change-Id: Iecab40aaf024c4ee40db142373ee94d90507b9c2
2012-05-20 18:58:42 +05:30
Amir E. Aharoni 71b0323303 Change the code of Greek to 'el'.
'hl' is not the correct code for Greek. It's 'el'.

Change-Id: I90a67ada71e2cbe2dbf8e79df02b83bae5aba998
2012-05-20 14:21:28 +03:00
Eranroz 44122de2dc fixing some RTL issues with Wikieditor dialogs.
Original support for RTL here was written before ResourceLoader, now
ResourceLoader handles it and this special code for RTL shouldn't exist
:)

Long time ago some css specific for RTL was added for supporting RTL with
body.rtl (before ResourceLoader). However now it is not needed as
ResourceLoader already flips right/left, and moreover it even causes wrong
direconality as ResourceLoader flipps the special handling for RTL.

Changes:
1. dialogs buttons were on right (in English buttons on the
right side too) => now on left side
2. Title of dialogs was in left, and close on right => now title is on
right and close on left
3. Link dialogs: the "Target Page" and the icon for "Broken/Good link" was
flipped

Change-Id: Ia85dfcfcea5945d088cffc4da6198fa506933f81
2012-05-03 22:13:23 +03:00
Trevor Parscal 96052d0d97 (bug 34885) Fixes issue where old toolbar was killed, even when the new toolbar was incompatible
Instead of wiping the old toolbar out on the server side we now just wrap the old toolbar in a div that has an inline style that prevents it from being displayed. This is only done when the toolbar is enabled. When the toolbar code runs on the client, if the toolbar ends up being incompatible, the old toolbar's wrapping div is shown. This avoids the side-effect of the old toolbar showing up momentarily while the new toolbar loads. It's a dirty hack, but we explored this extensively and it's the least evil way we could come up with that worked consistently.

Change-Id: I6fefadea4dbd01b96a0b95c50bc9ef526144dc3c
2012-04-17 15:19:20 -07:00
Krinkle 8730cde553 Merge "Don't escape $, not needed in JS" 2012-04-17 21:30:41 +00:00
Catrope aa78431fc0 Merge "Adding Tamil numerals special character insertion toolbar." 2012-04-17 21:21:40 +00:00
srikanthlogic 2dc745c7ef Adding Tamil numerals special character insertion toolbar.
Patchset 2: (Roan) Fix indentation to use tabs instead of spaces

Change-Id: Ia55da864a01a0adc6ac15d5c132832b11a4d94c2
2012-04-17 14:20:00 -07:00
Catrope 5bd7ef6a1b Merge "Moved character 25cc (dotted circle) before the diacritic." 2012-04-17 21:14:53 +00:00
Catrope c96beedf86 Merge "RTL fix for special characters insertion links." 2012-04-17 21:12:14 +00:00
Catrope 99a8b25d3b Merge "Adding pretty quotation marks for Hebrew." 2012-04-17 21:11:32 +00:00
Catrope ba2cf2f249 Don't escape $, not needed in JS
This makes jquery.wikiEditor.toolbar.config.js pass jshint (the
command-line jshint from npm that is)

Change-Id: I74d353c956c2b9616a9f80e10d5309ae9ee544db
2012-04-17 13:41:13 -07:00
Amir E. Aharoni ec24d21801 Updating the Gujarati character insertion toolbar.
New characters are added and existing characters are reordered
according to comments received from the Gujarati Language support
team.

Change-Id: I769594ec1088d2c3326477a3f1065d576c6dcdf7
2012-04-01 14:39:51 +03:00
Amir E. Aharoni f963e0f704 Adding pretty quotation marks for Hebrew.
Change-Id: Ief0aad430b4565a46f5772b6ef24e41e11e98774
2012-03-29 11:22:59 +02:00
Amir E. Aharoni e6640f53ba Moved character 25cc (dotted circle) before the diacritic.
The diacritic is supposed to appear after the dotted circle. It is
already like this in other languages.

Change-Id: Id157ab58ae41bd6e8f78c26b35b65003abc7bf7a
2012-03-29 10:15:43 +02:00
Amir E. Aharoni 7cea0eb810 RTL fix for special characters insertion links.
Added @noflip, because it's explicitly rtl. Without it, it becomes ltr.

Change-Id: Ifda0894d8745faea2dc18e4efed3a3dfa52239d8
2012-03-29 10:10:23 +02:00
Brion VIBBER 954636d7ca Merge "Added ZWNJ and ZWJ according to request at bug 30611. Split special characters from digits." 2012-03-26 22:50:21 +00:00
Amir E. Aharoni 562f1d3fbc Grouped Hebrew characters and added comments. Added required punctuation characters.
Change-Id: I353e3c12be8c2fdb8abcc1d6690b43e71717f689
2012-03-24 15:00:50 +02:00
Amir E. Aharoni aa493220fa Added ZWNJ and ZWJ according to request at bug 30611.
Split special characters from digits.

Change-Id: Ibcaaa1f5447495647ff18658c4250617f8307455
2012-03-24 12:56:08 +02:00
Sam Reed 0514d49717 More image compression for extensions 2012-03-01 02:24:49 +00:00
Roan Kattouw f26acc15c7 Add a configuration variable for disabling tracking clicks on the toolbar buttons 2012-02-23 22:29:37 +00:00
Daniel Friesen 45f3e29065 Add resize: vertical; to the textarea's css so that browsers like firefox and chrome won't allow horizontal resizing resulting in WikiEditor background showing. 2012-02-15 06:06:27 +00:00
Roan Kattouw 9061f480db (bug 32451) Clicking on a special characters section loses the selection in IE8. Patch by Lupo 2011-11-20 15:02:20 +00:00
Derk-Jan Hartman 6325d5ea3b Harden the toolbar builder for character insertion a bit against incorrect configurations.
Will now check if character is defined and will return empty string as result instead.

Added a mw.log to catch this situation for developers.
Based on patch by User:Lupo.

Bug 31673
2011-11-14 21:55:46 +00:00
Derk-Jan Hartman 2c9bbffca7 Make sure a row is closed in the toolbar.
Patch by User:Lupo
Bug 31673
2011-11-14 21:21:15 +00:00
Roan Kattouw d82577cce1 Remove stray comma per bug 31673 comment 4 2011-11-14 13:51:40 +00:00
Roan Kattouw a1cec03598 (bug 32374) Heading dropdown disappears behind textarea after closing and re-opening the Advanced section. This seems to be caused by the collapsing animation that sets position:absolute on the section, does the fadeOut animation, then after the animation sets the position 'back' to relative. However, the position was never relative to begin with, so now the absolutely positioned header dropdown has a different closest positioned anchestor and it appears things go wrong from there and cause the bug. So instead of setting the position to relative after the animation, set it back to what it actually was before, which is static (implicitly). 2011-11-12 09:08:00 +00: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
Sam Reed 7f10e92044 Swap
/*
 *

for

/**
 *
2011-10-26 03:49:06 +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
Roan Kattouw fe7b614517 (bug 31411) Remove stray comma introduced in r86853, broke WikiEditor in IE 2011-10-06 13:15:03 +00:00
Roan Kattouw bf8858349b WikiEditor: Fix bug where ext.wikiEditor would load and wrap the textarea even if the toolbar was disabled. This has been reported to me on IRC but I'm not aware of any bug report in BZ 2011-09-29 19:04:54 +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
Siebrand Mazeland 85ad75bc8c (bug 30611) Improve WikiEditor localization for Arabic script languages. Patch by Amir E. Aharoni.
Split the Arabic section in jquery.wikiEditor.toolbar.config.js into Arabic and Arabic extended. Arabic contains the core 28-letter alphabet, special letters for the Arabic language, vowels, punctuation and digits. "Arabic extended" contains most of the other letters and signs that are used by languages such as Arabic, Urdu, Balochi, etc.
2011-08-30 16:22:26 +00:00
Roan Kattouw 0af1258eef Followup r82900: per CR, use .length instead of size(), strict comparison with zero, and re-select from the DOM after removal to guard against weird interaction between .remove() and .length 2011-08-20 12:47:00 +00:00
Roan Kattouw dccf13d8c3 (bug 29750) In the special characters toolbar, add Ș (\u0218), ș (\u0129), Ț (\u021a), ț (\u021b) and remove Ţ (\u0162), ţ (\u0163), Ŀ (\u013f), ŀ (\u0140). Patch by Amir Aharoni 2011-08-14 09:29:45 +00:00