Commit graph

38 commits

Author SHA1 Message Date
Derk-Jan Hartman f64a3c26c6 Enable WikiEditor toolbar on iOS
Since we now have a full fledged mobile solution, I think we should
strive to have the site 'proper' work as much on any platform as
possible.

WikiEditor traditionally was not loaded on iOS.
No one really knows why this was not loaded. It can have been bugs or
just to 'slim down'. It works on iOS 6 and iOS 7, so for that reason
I'm now changing the blacklist in this respect. It might work with
earlier versions, but I can't really test that right now.

Bug: 63277
Change-Id: I605eb0e093b84203f1157d9e20788eaa0040ddbf
2014-05-26 14:34:17 +00:00
Fomafix cfcfa69fe4 Apply coding conventions for JavaScript
Change-Id: Ibae64ca7aa52c2283ff81bd942be80c83a4089f7
2014-04-30 10:59:01 +00:00
jenkins-bot c964783792 Merge "Revert "Revert "Preserve textarea state when building WikiEditor UI""" 2014-04-29 22:45:57 +00:00
Mwalker b5696dc435 Revert "Revert "Preserve textarea state when building WikiEditor UI""
Ib97f47ef1d66420682bd429c9c12e66c3392e77d Didn't cause
problems so this is now safe to reapply (to wmf2).

This reverts commit 908e7cc56c.

Change-Id: I510536959b58ff0adacd7908f6150c95bfdb3ec1
2014-04-29 22:43:32 +00:00
jenkins-bot 38b2328296 Merge "Revert "Preserve textarea state when building WikiEditor UI"" 2014-04-25 20:12:25 +00:00
Mwalker 908e7cc56c Revert "Preserve textarea state when building WikiEditor UI"
Sadly this caused bug 64289; so we're going to revert this for now;
then redeploy this and Ib97f47ef1d66420682bd429c9c12e66c3392e77d
in one of the swats next week.

This reverts commit effd98be7e.

Change-Id: Idde3e51e894f8c92f47fb06f0cf08d01e82ccb48
2014-04-25 20:12:09 +00:00
jenkins-bot 3bd860d220 Merge "Cleanup borders of wikiEditor" 2014-04-16 19:50:20 +00:00
Derk-Jan Hartman effd98be7e Preserve textarea state when building WikiEditor UI
When we are wrapping the textarea in the Editor UI, the focus state,
cursor position and the scrollposition might get lost. This is
especially annoying on slower machines, where users might have started
using the textarea before the WikiEditor UI was constructed.

Bug: 41911
Change-Id: Ie472c6c88d98f7ba89873a2db73463ef01bd995a
2014-04-16 08:40:19 +02:00
Derk-Jan Hartman 12e5de632e Cleanup borders of wikiEditor
We had some crazy stuff here with negative margins, border boxes and
what not. There were some problems with IE versions, zooming in and out
in pages and with the side by side preview.

This should take care of those. Mostly it moves the borders inside the
elements that are 100%. This was also required because of the
side-by-side preview which was using a dirty trick to hide the border at
the top

Bug: 26828
Change-Id: I3c3466fac53df3e79de6f12f404005e55409fa7c
2014-04-08 15:32:00 +00:00
Derk-Jan Hartman 952d6b9d8f WikiEditor: Remove unmaintained beta iframe mode
Change-Id: I2d7369116b92d674d791e420750a906a17a46bac
2014-04-03 17:20:49 +02:00
Fomafix 895f737b87 Workaround for a scrolling bug in IE8
Bug: 61908
Change-Id: I69dbfa267b26916628181553b213f05add909c99
2014-02-25 12:41:12 +00:00
Ori Livneh f5b2b18a01 mw.loader#version -> mw.loader#getVersion
mw.loader#version was removed in I57d340015.

Change-Id: Icb8e591c379b083cfc5f05a1a24320e0f13f7d12
2014-02-18 14:54:29 -08:00
umherirrender 37a1deb799 document.selection is undefined in IE11
IE11 replaced document.selection by window.getSelection, which breaks
dialogs in WikiEditor, because document.selection.createRange was
accessed without check. Inserting this check unbreaks the dialogs.

Bug: 57489
Change-Id: I70d49fb43bbf7602f43e9a8086ecd32027cb6d6f
2014-01-05 17:49:54 +01:00
Timo Tijhof 1a2daca06a Kranitor: Make JSHint pass
eqeqeq:
* Change loose comparisons to strict comparisons where
  it seems safe to use a strict comparision instead.
  Mostly comparisons to strings or objects, and comparisons to
  numbers where the other value is known to be a number, too.
  E.g. foo == 'string', bar == node, indexOf() != -1.
* Add eqeqeq:false to files where there are non-obvious usages
  left.

onevar, quotmark:
* Disabled in files with lots of style violations.

unused:
* Remove unused variables that have no side-effects in their
  assigned expression.

Coding style cleanups on affected lines where trivial.

Change-Id: I5db155a632740e24cb52dba2177c7fc35d5aebd5
2013-11-10 07:36:03 +00:00
Helder.wiki 1b797b7f6a Use mediaWiki.message( ... ).plain()
Bug: 42107
Change-Id: Ic17aa1ff18528cec402bef08cace6987529f2782
2013-09-28 09:10:11 -03: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
Sam Reed 7f10e92044 Swap
/*
 *

for

/**
 *
2011-10-26 03:49:06 +00:00
Siebrand Mazeland cc71ec5354 * bump version to 0.3.1
* stylize.php
2011-09-13 08:56:32 +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
Brion Vibber 2b22c37b88 * (bug 29322) Move some iframe-specific code in WikiEditor JS to its proper module 2011-06-09 18:10:02 +00:00
Brion Vibber 85ec51cce0 Fix for WikiEditor iframe extension on IE: use $.inArray() instead of Array.indexOf(), which is not in earlier JS standards as implemented in IE 8.
Use of Array.indexOf was added in r74271 when the iframe bits were broken out to an extension.
2011-06-09 00:20:13 +00:00
Krinkle 40bb0c72b5 Extension:WikiEditor Code quality, JSHint validation and JSPERF
- Leaked globals
- Strict comparison to 0, false and ''
- Missing semicolon
- Variable name collision
- Minor improvements in caching (in a few places "var $that" cached $(this), but wasn't actually used)
- Replace calls to deprecated $j with $
- Checking undefined by strictly comparing references instead of a string comparison and typeof (speed)

(see bug 29106)
2011-06-06 23:18:13 +00:00
Jan Paul Posma 6e998359f0 Fixes bug 24088: WikiEditor toolbar RTL icons 2011-04-25 12:26:20 +00:00
Roan Kattouw ee3a8e68b0 WikiEditor: Add missing message and shut up a source of JS errors 2011-02-23 20:50:52 +00:00
Roan Kattouw 9eaa77a549 WikiEditor: Use wgExtensionAssetsPath instead of wgScriptPath + '/extensions' 2011-02-16 14:52:34 +00:00
Roan Kattouw b7f45b1e01 WikiEditor: Add some var statements to code introduced in r74271 2011-02-08 07:04:12 +00:00
Roan Kattouw 94c2e2f19d WikiEditor: Fix usage of $.client 2011-02-07 21:59:01 +00:00
Sam Reed a3cba4154c Remove a couple of commas 2010-12-06 11:07:50 +00:00
Trevor Parscal bb88f087b4 Mostly reverted r75487, making use of a new version of mediaWiki.msg. 2010-10-27 00:16:32 +00:00
Trevor Parscal 55a8f66322 Updated use of mediaWiki.msg to mediaWiki.message 2010-10-26 23:42:23 +00:00
Trevor Parscal 49eb154f2c * Fixed mistake made in r74271 where some functions were moved from core jquery.wikiEditor into jquery.wikiEditor.iframe, causing errors for textarea mode. These changes properly split the functions, allowing the iframe to override the textarea functions, and using $.client to only execute them on IE. (tested in IE7)
* Also fixed IE bug, where "delete window.myThing;" fails but "delete myThing;" succeeds.
2010-10-05 20:54:38 +00:00
Trevor Parscal c92c4436a5 Fixed autoMsg misusing mediaWiki.msg.get 2010-10-04 21:17:08 +00:00
Trevor Parscal 0a71513db4 * Introduced the concept of context extensions
* Abstracted the requirements concept being used to hack in the iframe as a context extension requirement
* Removed some hardcoding for iframe stuff
* Moved about 60k of JavaScript code out of the main wikiEditor script, and into an iframe only context extension.
2010-10-04 20:12:30 +00:00
Trevor Parscal fd441d4b6d Remapped image and html paths to new extension location. 2010-09-16 22:54:59 +00:00
Trevor Parscal 9862d7d871 Removed dependency on global variable "wgWikiEditorIconVersion" 2010-09-16 22:40:24 +00:00
Trevor Parscal 6b8e5f2f54 This extension now functions. iframe dependendt modules need more work still. 2010-09-16 21:11:46 +00:00
Trevor Parscal a9c45c88e0 Lots of refactoring. This still does not work! But it's getting close. 2010-09-15 22:40:50 +00:00
Trevor Parscal 9d278e8dee Copied over all the resources needed to make WikiEditor stand on it's own two feet. Lots more to do as far as organizing and fleshing out the extensions's PHP bits. 2010-09-15 03:08:35 +00:00