Commit graph

50 commits

Author SHA1 Message Date
Fomafix d16dfb0ad5 Style code
* Fix errors and warnings from phpcs.
* Add commas at end of lines for arrays in PHP.
* Add space between // and comment.
* Add space between ) and {.
* Use tabs instead of spaces for indenting.
* Break lines in PHP with more than 100 characters.
* Remove double spaces and spaces at end of line.
* Remove spaces before comma.
* Fix some typos.

Change-Id: I9c014bdfa9832fa6a20d0190fe2fc668983d0fb9
2015-03-14 15:49:04 +00:00
Alex Monk 1f1ec7d4b8 Don't try to log a boolean for page.revid
It won't work.

Change-Id: I9f1a34dcdada5cd33a212ed6cb01750ccfa7abfe
2015-03-13 23:44:05 +00:00
Alex Monk 6f5c181d6c Fix name of editingSessionId
Oops.

Change-Id: I332c49c3a0c4529c20ff7d5ffe5336054349340f
2015-03-13 23:19:12 +00:00
Alex Monk 1096e18a55 Default user.editCount to 0 in the Edit schema
Otherwise it will fail to validate for anonymous users (getEditCount returns null)
as it is a required field

Change-Id: I3d438cfde172b2598955773c4c22fc2d4a502f16
2015-03-13 23:13:10 +00:00
Alex Monk 74da530f2d Schema:Edit instrumentation
Depends on Ib8612626

Bug: T88027
Change-Id: I67f1000d23cb257df29d5d4be8ae85764458e6c1
2015-03-10 14:56:45 +01:00
jenkins-bot ea569a993a Merge "Remove previewDialog" 2014-12-05 13:03:26 +00:00
Derk-Jan Hartman 360419f397 Remove previewDialog
This was never launched, and is no longer working either.

Change-Id: Ic49e84b8a91da701673949a8d441c788a4feaa22
2014-11-30 20:25:22 +01:00
Alexander Jones 55c6e1271f Add QUnit test for ext.wikiEditor.toolbar
This patch replaces the manually operated test module for ext.wikiEditor.toolbar
with one based on QUnit. The new test suite uncovered a bug with the removeFromToolbar
API function in jquery.wikiEditor.toolbar, which prevented the removal of select buttons
from the toolbar. This issue has also been fixed in this commit. .jshintrc was updated
to ignore the new QUnit global.

Bug: T39485
Change-Id: Icef3debcffa484a8d78628bcd9da0892b750bb40
2014-11-29 14:12:26 -06:00
Yuri Astrakhan 0636505d61 Declared missing var, fixed php doc & spelling, spacing
Change-Id: I7a60eeb224cc0e1c013f59df42fc4a7805df8a5b
2014-09-21 22:50:01 -04:00
Derk-Jan Hartman dbbb722210 Only add WikiEditor for content model WikiText
Together with solving bug 29908, this makes the presence of the
toolbar consistent. It is added to pages handling wikitext.

Note that we provide the CodeEditor on all JS/CSS/Lua pages.

Bug: 24713
Bug: 24041
Change-Id: Iaa6b9a6c511380ed1669d8b95cba4a3ddc6f9ab6
2014-07-28 23:12:39 +00:00
Derk-Jan Hartman f0505e6dee Prevent style jumping in WikiEditor
Add a new styles module. This module makes sure that the textarea is
already properly styled (jumping lineheight bug) before we start the
JS. Also hide the toolbar before it's styles have finished loading, so
you don't see it being constructed on the fly. Move inline styling for
the old toolbar into this stylesheet as well.

Bug: 47708
Change-Id: I40bec0a24dbd295db301e7faefb93d8991981acb
2014-05-06 15:03:01 +02:00
Derk-Jan Hartman e53521b32b WikiEditor: Remove unmaintained template editor modules
Change-Id: I47119d6cfdde4b40ff5b07be0c7d327b80598142
2014-04-03 17:11:10 +02:00
Derk-Jan Hartman 9bb94e8319 WikiEditor: Remove old unmaintained ToC module
Change-Id: I0f53a68e50fc950d7f407ee81b2bf0d81ef4948d
2014-04-03 17:02:32 +02:00
TMg 3c0aa26a0d Renaming the "Beta" label to "Editor"
The WikiEditor is the default since a long time now. It does not
make much sense to still call it "Beta". This depends on my other
change to the core preferences because of the new word that needs
to be translated.

Depends on I429c8125b8db789d2756d61249f6cf1fa7f2f51c.

Change-Id: Id8b9a47a9d83dc1acdec46cb6e993deac33cc066
2013-05-26 10:27:26 +00:00
Ori Livneh 61205be62a Remove ClickTracking calls
ClickTracking is deprecated; the config var gating this behavior is set
to false; the data is going to /dev/null; no one is interested in
analyzing it. I think it's dead, Jim.

Change-Id: I71ea8c174e5e38b28f128ccd380ed2a25ad50606
2013-03-27 13:41:05 -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
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
Catrope 336036a6b2 Revert toolbar preferences saga
This is still broken in production right now: the preference message is
missing and disabling the preference doesn't disable the toolbar.
Reverting this because it just doesn't work right now.

This reverts the following commits:

4234c5ddc7 "Fix syntax error in I1adc6b99fa3e1980d4ce3c565b5f193bcbceb526"
00eee72543 "modified as per bug 35879"
00eee72543 "(bug 30796) Dropping preferences for toolbar"

Change-Id: I882a6e0c0cc70f9afecb49746f3db01eab8808dc
2012-04-16 15:20:50 -07:00
nischay nahata 00eee72543 modified as per bug 35879
Re-added the preference for toolbar I had removed by mistake in change 4339
made global=false and user=true for toolbar,as it was before my changes

for dialogs global=true and user=false is retained as now the user cannot
control dialogs in preferences and it is always on

Patchset 3 (Roan): enable WikiEditor preference by default

Change-Id: I1adc6b99fa3e1980d4ce3c565b5f193bcbceb526
2012-04-16 11:18:43 -07:00
nischay nahata 8d01d341be (bug 30796) Dropping preferences for toolbar
sets global=true for dialog preferences and removes corresponding messages
from i18n file

Change-Id: I877c94544ebae34e69a4034cde52c763cc44503c
2012-04-05 22:50:44 +05:30
Roan Kattouw f26acc15c7 Add a configuration variable for disabling tracking clicks on the toolbar buttons 2012-02-23 22:29:37 +00:00
Sam Reed 924908c22f Followup r111796, always return true 2012-02-22 23:07:11 +00:00
Benny Situ 0609dffdf3 fix for bug34431 - Disable the old toolbar if the new toolbar is enabled 2012-02-17 22:13:11 +00:00
Sam Reed 8262e1db9a Remove trailing whitespace
Fix documentation

Remove unused global
2012-01-31 20:19:22 +00:00
Siebrand Mazeland cc71ec5354 * bump version to 0.3.1
* stylize.php
2011-09-13 08:56:32 +00:00
Jan Paul Posma 4c8f157f1a Fixes bug 28149 (but with default to true) 2011-04-22 12:10:18 +00:00
Roan Kattouw 534309c1d5 (bug 27515) Reintroduce JS variables wgVectorEnabledModules and wgWikiEditorEnabledModules for backwards compatibility 2011-03-13 10:55:33 +00:00
Roan Kattouw 24330513f7 Followup r83734 (ResourceLoaderGetConfigVars instead of MakeGlobalVariablesScript in Vector): do the same for WikiEditor 2011-03-13 10:51:45 +00:00
Michael Dale db52f1ea53 follow up to r83723 ( remove the add-media-wizard gadget ) 2011-03-11 23:01:01 +00:00
Jan Paul Posma 9d6f6e3526 1. Re-introduces check if the browser supports the dialogs, which was removed for no apparent reason in r74276.
2. Makes the isEnabled function public, to allow other extensions to use the same configuration settings as WikiEditor.
2011-02-25 00:01:57 +00:00
Roan Kattouw 9920653411 WikiEditor: Make sure that the toolbar is enabled before loading dialogs. Should fix bug 27471 2011-02-17 22:44:29 +00:00
Sam Reed 8935a98313 Remove assignment in conditional
Fixup method parameter documentation
2011-01-23 09:46:07 +00:00
Tim Starling 81f292841c Updated extensions for r77011:
* I left MwEmbed alone since it was scary.
* I left the half-completed commented-out ResourceLoader code in Maps as it was
* PrefSwitch was apparently broken, with a typo in remoteBasePath.
* ClickTracking and ProofreadPage now demostrate two different styles of multi-module registration. Choose which one you prefer.
* SemanticMediaWiki/SMW.hooks.php became empty and was deleted.
* Tested using a special script that includes extension setup files and checks $wgResourceModules for correctness.
2010-11-19 13:59:34 +00:00
Roan Kattouw 947fe69c27 (bug 25339) Allow specifying separate base paths for local and remote paths in ResourceLoaderFileModule::__construct(). Extensions can use this to properly point the resource loader to their resources in a way that doesn't depend on the extensions/ directory being a subdirectory of phase3/ on the filesystem and that respects $wgExtensionAssetsPath. Also converted all extensions using ResourceLoader to use this approach, except MWEmbed which uses way more indirection building its module registrations than I can deal with after midnight.
What actually happens here
* Add $localBasePath, $remoteBasePath params to the FileModule constructor, defaulting to $IP and $wgScriptPath respectively
* Add getLocalPath() and getRemotePath(), which use this information to build a proper FS or URL path for a file
* Make readScriptFiles() non-static so it can use these functions
* Run every single file path we use through either getLocalPath() or getRemotePath() as appropriate
** Except file dependencies, these are already prefixed. Our inability to give them special treatment caused bugs earlier
* Kill prefixFilePathList() and resolveFilePath(), no longer needed
2010-10-27 22:22:10 +00:00
Trevor Parscal 543776c990 * ResourceLoaderModule.php - added basePath argument to ResourceLoaderFileModule::__construct to help make module definitions be less repeditive.
* Vector.hooks.php, WikiEditor.hooks.php - implemented new basePath argument for ResourceLoaderFileModule::__construct
2010-10-07 23:31:30 +00:00
Trevor Parscal cb6ff96431 Got more dialogs working again 2010-10-04 21:08:41 +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 0a0f6f6e8e * Fixed the toolbar, where sprited buttons weren't receiving the correct classes.
* Changed the way dialogs toolbar buttons were being added
* Made dialog code load on the fly
2010-10-01 21:58:04 +00:00
Trevor Parscal a8a3b67566 Fixed indentation and bracing. 2010-10-01 19:14:33 +00:00
Trevor Parscal 00f4af97cd Fixed copy-paste remnants, specifically the use of the name Vector instead of WikiEditor. 2010-10-01 18:15:10 +00:00
Trevor Parscal 00a8966b90 Made ResourceLoader an instantiable object, rather than a static one, making it more modular and testable. 2010-09-29 19:04:04 +00:00
Trevor Parscal d5f8b1bc3a Using new group feature of ResourceLoaderFileModule objects. 2010-09-20 23:31:56 +00:00
Trevor Parscal 089b73aa5d * Moved ResourceLoader modules into the ext.* space - this is the convention that should be followed in the future
* Moved test resource to the modules folder and registered it
* Fixed tests file to use $ not $j
* Cleaned up syntax in module definitions
2010-09-20 20:06:18 +00:00
Trevor Parscal 527a1d3b4b Brought code from WikiEditor extension in, reorganized module/feature definitions 2010-09-16 23:41:08 +00:00
Trevor Parscal c3d1da7254 Added in conentCollector for paste-filtering support 2010-09-16 23:13:05 +00:00
Trevor Parscal 9862d7d871 Removed dependency on global variable "wgWikiEditorIconVersion" 2010-09-16 22:40:24 +00:00
Trevor Parscal ff8e204ccd Table of contents is working now - fixed dependency issues and removed some globals that are no longer needed. 2010-09-16 22:20:17 +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 46828c89e0 Initial port of UsabilityInitiative/WikiEditor extension 2010-09-15 03:02:35 +00:00