Commit graph

906 commits

Author SHA1 Message Date
James D. Forrester 11dfcd269c Enable the language tool as a Beta Feature
Change-Id: I14560b758c664081110c76a709a7279c9840cc11
2014-04-23 17:46:27 -07:00
Krenair 62e07f8008 Add support for SimpleCaptcha
Bug: 64328
Change-Id: I04dd82e72184dcef6a660c0886b16a1086ed0b26
2014-04-23 23:30:52 +01:00
jenkins-bot fe04b902fb Merge "Add checkboxes to set some metadata on page metadata panel" 2014-04-21 23:34:27 +00:00
Krenair 021152586b Add checkboxes to set some metadata on page metadata panel
Also fixes some errors in I752705f6
And while we're there, clean up some mostly duplicate functions

Bug: 57169
Bug: 57170
Bug: 57171
Bug: 57172
Change-Id: I1e3dca3868a267e91bccb0ae277012c26ca82174
2014-04-21 16:29:31 -07:00
Roan Kattouw ba455643fc [BREAKING CHANGE] Update VE core to master (cb2e61b)
Update dialogs and inspectors for breaking change in VE core

New changes:
a553012 [BREAKING CHANGE] Merge dialog and inspector actions into window actions
f9a0419 Localisation updates from https://translatewiki.net.
cbe81a0 Fix path to spinner in ve.ui.SpecialCharacterInspector.css

Change-Id: Icf90ace6442364283b66b234e3c78fc65212f070
2014-04-21 15:32:59 -07:00
Amir E. Aharoni 595524f7a6 Add GENDER support to visualeditor-editconflict
Change-Id: I3257d56107772c26a41e0b2bfcc71509cd1c9284
2014-04-21 16:47:23 +03:00
Amir E. Aharoni e21b4db424 Add GENDER to visualeditor-dialog-transclusion-no-template-description
Change-Id: I0ba67a8a705cd652a75bbf72892056813705e7d6
2014-04-19 00:04:39 +03:00
Roan Kattouw 654d641c5f Update VE core submodule to master (33ca43b)
Reorganize stylesheets in VE-MW to match JS directory structures,
and update VisualEditor.php for similar reorganization in VE core.

New changes:
c6ed962 Reorganize stylesheets

Change-Id: I4f1070643744fb2ee6726cb03e012e31a9a05c64
2014-04-18 13:28:31 -07:00
James D. Forrester e09e6c9f28 Create MWLiveExtensionInspector base class
Most of the code stolen from MWMathInspector and genericised.

Also fix issues with fragment not wrapping the new node correctly.

Bug: 58286
Bug: 58045
Change-Id: I708c4cb012becf8c493d5b65a051c0b13f7a11ac
2014-04-17 17:58:56 -07:00
Trevor Parscal 926700fbca Re-split the transclusion dialog
We used to have two dialogs; a complex one, and a subclass that dumbed it
down - this was rubbish.

Then we merged them together - this was a'ight.

Now we have two dialogs again; a simple one, and a subclass that fancies
it up a bit - this is wicked keen broham.

Change-Id: I4b2ba31bed5c4f80940623702d635cacd19e0a66
2014-04-17 01:39:18 +00:00
Roan Kattouw 9312501824 Update VE core submodule to master (2d96306)
Add reference to DimensionsWidget.css

New changes:
2d96306 [BREAKING CHANGE] Separate Widget styles properly

Change-Id: I84c1a3576b8eca74d483e26a4affd21f790040ad
2014-04-16 16:02:51 -07:00
jenkins-bot d20ff82e5c Merge "Use updated tab labels on description pages for files in foreign repos" 2014-04-11 19:11:10 +00:00
Ed Sanders 0e51180709 Update VE core submodule to master (55a5cdc): use new ve.ui.Dialogs and ve.ui.Inspectors
Move various bits of code from initialize to setup as required.

MWDialog is now useless so use ve.ui.Dialog directly.

New changes:
0b2d03f [BREAKING CHANGE] Pass fragments, not surfaces, to windows (reprise)
0101ac4 Update OOjs UI to v0.1.0-pre (ac6848398c)

Change-Id: I0fae3e5ff2bd0da5b74c244af226b07b1f5883bd
2014-04-09 20:28:30 -07:00
Roan Kattouw f2422d916c Update VE core submodule to master (c150259) for scalable changes
ve.dm.Scalable is now a computational model for image scaling and
size manipulation. This commit adjusts the nodes and the edit and
insertion dialog to handle the new scalable model, and by that
use a centralized computational engine for all scaling and size
changes.

New changes:
3ec19fb8 Refactor Scalable functionality

Change-Id: I017a017924f544cc8bc9b7d8245335759ae0e890
2014-04-09 17:29:49 -07:00
Trevor Parscal 70655da2b9 Limit the number of initially visible parameters in the parameter search widget
* Truncate beyond 3 parameters
* Add a special option class that, when clicked, shows the remaining parameters
* Use a special option class for the no parameters item instead of hacking the normal one
* Simplify the design of the no parameters item: no icon, centered text

Change-Id: Ia8259e91b42a59c2b08019df36217d485208ad99
2014-04-09 12:56:02 -07:00
Krenair 99640bf1a7 Use updated tab labels on description pages for files in foreign repos
See I4a43b759

Bug: 63666
Change-Id: Ie4aeddde4909f455472dc5239156c23200033ee8
2014-04-09 00:26:29 +01:00
Trevor Parscal 9556467595 Revert edit mode tool's onSelect method
Turns out surfaces don't have access to targets after all.

Bug: 63503
Change-Id: Ib14291ce4efe4b3dd5579cd270828936b6a175ae
2014-04-04 00:04:29 +00:00
Ed Sanders 391e247c90 Show the debug bar in MW if ve.debug is set
Depends on Ide1487250e in core.

Change-Id: Ia31e498b565c4db79026e0e40f515a2b65bbbde2
2014-04-02 17:33:29 -07:00
Roan Kattouw 03c5822b6b Update VE core submodule to master (c5f4f78)
Also update tools for changes in VE core.

New changes:
e4de14b Make tools use commands
e029817 Make getToolsForNode place primary commands first

Change-Id: I66575ee6d49e6b2f5a5f789978da98bb55e6dc5e
2014-04-02 16:30:12 -07:00
Roan Kattouw 39f8019c47 Update VE core submodule to master (9484b81)
New changes:
b045c0c Localisation updates from https://translatewiki.net.
3221c45 Introduce ve.ui.Tool
c3a2a85 Detect document focus properly and allow null selection in model
03fed20 Localisation updates from https://translatewiki.net.
07dfc7d Actually use getRelative[Content|Structural]Offset wrappers
8fced5f Show VE demo error in VE
547e3d2 Localisation updates from https://translatewiki.net.
d6316f5 Fix handlesOwnChildren check in getRelativeOffset
e23f1ab Style link inspector on mobile
5968559 Localisation updates from https://translatewiki.net.
4bce90c Bump jscs to 0.4.1
7e39f49 Disable certain tools when surface has no range
edde8ca Emit event when insertion annotations change
2a89173 Update OOjs UI to v0.1.0-pre (8986c46d35)
103c4b9 Support null ranges in the demo debug bar
9eb3810 Adjust loop counters in word break detection when removing item
914e002 Skip over handlesOwnChildren nodes in newFromAnnotation
ef6096a Improve hasFocus check to compare the anchorNode to the parent
18171bf Revert "Improve hasFocus check to compare the anchorNode to the parent"
3950cef Revert "Detect document focus properly and allow null selection in model"
1c4cac4 Revert "Fix handlesOwnChildren check in getRelativeOffset"

Change-Id: Ic3054c668866307a5cfbb74f23efd82ceb2f0ee3
2014-04-02 16:15:01 -07:00
Ed Sanders 803a6aff9c Convert double quotes to single quotes in VisualEditor.php
Change-Id: I5ed5624a15606616bf596e56153a69e8c85a700a
2014-04-01 14:54:35 -07:00
James D. Forrester e56b425120 Update VE core submodule to master (e972bb7)
New changes:
e972bb7 Split-up theme-specific styles

Local changes:
* Split-up theme-specific styles

Change-Id: I4af6c03413d49cb05031d439caf340ddef996355
2014-03-28 12:56:19 -07:00
Trevor Parscal 7e80d5dfa8 Rename CSS file to relate to actual style names
Change-Id: Iece39a7cb34ea4a51e5aba10df60ea870bf912f8
2014-03-28 11:56:02 -07:00
Roan Kattouw c0f47ec725 Bring CommandHelpDialog CSS back
It was renamed but the new file was never added to VisualEditor.php?!?

Bug: 63018
Change-Id: I057992f1a4245d7b2bb5be6f3923414013746760
2014-03-26 15:32:29 -07:00
Trevor Parscal c385c01096 Use "Insert citation" label for apply button of CitationDialog
* Create a method to produce the correct label
* Override that method in the citation dialog subclass

Change-Id: Ic74a23dcf30aae201f3d6c312b760cf058aadf11
2014-03-24 17:16:43 -07:00
Trevor Parscal be199c0bf2 Ultra-mega-hyper-citation editing on crack
Objectives:
* Allow users on-wiki to create tools and dialogs for citation templates
of their choosing
* Allow editing of citation templates directly, without having to go
through the reference dialog
* Provide citation template tools within reference editing that use the
same titles and icons as the citation tools do, but don't wrap the
inserted content in a ref tag

Changes:

* Reference list was cloning the DOM element it was inserting into its
view before the generated content node could finish rendering, so it
never ended up showing the finished rendering in the reference list
* Documenting hack about use of reference list node's destroy method,
and how we are depending on destroy not canceling generated content
rendering
* Introduced reference model
* Added saving/updating method to transclusion model
* Added getPartsList method to dm transclusion node, which caches the
result and invalidates the cache on update
* Added citation dialog, which extends transclusion dialog
* Added cite group to toolbars, cite-template in reference dialog toolbar
* Factored out getting the node to edit and saving changes procedures in
transclusion dialog so they could be extended in citation dialog
* Updated uses of autoAdd as per changes in oojs-ui (Ic353f91)
* Renamed MWDialogTool file since there was only one tool in it
* Expanded TransclusionDialogTool file out since there is now more logic
to it
* Switched to using ve.dm.MWReferenceModel instead of plain objects in
reference search widget

Configuration:

If you add to MediaWiki:Visualeditor-cite-tool-definition.json the
following code you will magically be presented with a delightful array
of citation options:

[
    { "name": "web", "icon": "ref-cite-web", "template": "Cite web" },
    { "name": "book", "icon": "ref-cite-book", "template": "Cite book" },
    { "name": "news", "icon": "ref-cite-news", "template": "Cite news" },
    { "name": "journal", "icon": "ref-cite-journal", "template": "Cite journal" }
]

...or...

[
    {
         "name": "any-name",
         "icon": "any-ooui-icon",
         "template": "Any template",
         "title": "Any title text"
     }
]

The title text is derived either from the title property or from the name
property by pre-pending the string 'visualeditor-cite-tool-name-' to
generate a message key. Titles for 'web', 'book', 'news' and 'journal' are
provided. The icon is a normal oo-ui-icon name, and more icons can be
added, as usual, by adding a class called .oo-ui-icon-{icon name} to
MediaWiki:Common.css. 'ref-cite-web', 'ref-cite-book', 'ref-cite-news'
and 'ref-cite-journal' are provided. The template name is simply the name
of the template without its namespace prefix.

Depends on Ic353f91 in oojs-ui

Bug: 50110
Bug: 50768
Change-Id: Id401d973b8d5fe2faec481cc777c17a24fd19dd4
2014-03-24 19:24:38 +00:00
Trevor Parscal 46e7f55ba5 Update VE core submodule to master (1adc9f5)
New changes:
e02cb87 Fix left-over autoAdd property that didn't get fixed with Idaf3041
74037b0 Split up omnibus CSS files into per-item ones
1adc9f5 Localisation updates from https://translatewiki.net.

Change-Id: I71498cd0b990aebd85dabb68afb3485350b8ac36
2014-03-21 16:42:33 -07:00
James D. Forrester f8720326b0 Split out omnibus CSS files
Change-Id: I195a0e4091cf2d003c325e9c653dd634e7096779
2014-03-21 20:14:52 +00:00
jenkins-bot 0c8cb151fb Merge "Remove the math inspector code" 2014-03-20 05:34:31 +00:00
jenkins-bot 24c0082093 Merge "Display links to nonexistent pages as red" 2014-03-20 02:44:22 +00:00
Roan Kattouw 78a52f1f80 Display links to nonexistent pages as red
* Add ve.init.mw.LinkCache to track page existence and
  transparently query it
* Populate it with initial data from the parser cache
  if available, obtained in the VE API module
* Use linkCache data in link annotation rendering

This doesn't yet integrate the LinkCache with other
components like the link inspector. That should be
done so we can deduplicate the existence checks.

Additionally, we should generalize LinkCache and use
it for the category existence/status checks as well.

Bug: 37901
Change-Id: I9fd43e8c3864dd375cf6dadfdeedd05e4fe9cf3b
2014-03-20 02:42:33 +00:00
James D. Forrester aea64bf2df Remove the math inspector code
Moved to the Math extension in I8e582ee6deadc2750

Change-Id: Iab0c56246626de1e0f6ab770e777c0a28756fa75
2014-03-19 19:27:25 -07:00
Rob Moen ec40953722 Mixin ClickableNode and add primary command names
Created ve.ui.MWCommandRegistery, added inspector and dialog commands

Change-Id: I6b45018bdb719e36a85a785d4e08d32ee4b9b0a3
2014-03-20 00:33:38 +00:00
James D. Forrester a55b94a73c Update VE core submodule to master (8c7b4e2)
New changes:
f5d1e2a Create mixin that tries to execute primary node command
8c7b4e2 Actually add ClickableNode places

Change-Id: I7b641c620fbf28a4e98865c7d4e152d554017e70
2014-03-19 17:25:23 -07:00
James D. Forrester 903c19ef06 Disable VisualEditor on Page Translation output pages
Also, we warn the user that Here Be Dragons™ when they're editing a Page
Translation /source/ page.

Bug: 50284
Change-Id: I841ccb8461d31358640a16301a6a78750a660d36
2014-03-19 15:25:24 -07:00
jenkins-bot fbdc55dc78 Merge "Table of contents widget" 2014-03-14 22:31:10 +00:00
Rob Moen eba7d58dd1 Table of contents widget
TOC Widget is created in the mw target view class.
Adding and removing a heading rebuilds the TOC Widget based
on the the order of the page heading nodes.

TOC Widget considers TOC page settings and displays in the default manor
unless forced or disabled.

TOC Widget still needs to be finalized by being placed in the surface.
This could be a problem until we have a CE node for it to live in or
have some DM work added.  Roan and I have discussed how to go forward.

To enable the widget you must add the following to LocalSettings.php:
$wgVisualEditorEnableTocWidget = true;

Change-Id: I488cfbbdb060e50d81f51e0f757e67d0114b8936
2014-03-14 15:20:19 -07:00
Trevor Parscal 42ba981e27 Update VE core submodule to master (520299e)
New changes:
dd15f23 Split ve.ui.Surface into DesktopSurface and MobileSurface
16283f4 Add OOjs UI's sco.json i18n file
ef94038 Split ve.ui.Context into DesktopContext and MobileContext

Minor adjustments to point to desktop and mobile Surface or Context.

Change-Id: I7cf6f99a5a1216a28a7146afcd4deb68c7eac38e
2014-03-14 13:13:02 -07:00
jenkins-bot 4c67908f97 Merge "Create remaining meta items in DM" 2014-03-13 02:12:52 +00:00
James D. Forrester e85d840d64 Create remaining meta items in DM
Add meta items for the four remaining mwPageProp behavioural flags from Parsoid
that are added by MediaWiki core. These are each waiting for UX implementation,
based on the lack of context information in MWMetaDialog about the page, or
about the wiki:

* __NOGALLERY__
* __HIDDENCAT__

  — These only make sense in a Category: page.

* __NOTITLECONVERT__ // __NOTC__
* __NOCONTENTCONVERT__ // __NOCC__

  — These only make sense on wikis that have content or title conversion.

Change-Id: I752705f65cfbd79c7f3f71270659793996868aff
2014-03-13 01:57:48 +00:00
jenkins-bot 3a378ccc6c Merge "More gracefully handle situations where Parsoid returns a timeout failure code (HTTP 504)" 2014-03-13 00:54:29 +00:00
Krenair e04099b63d More gracefully handle situations where Parsoid returns a timeout failure code (HTTP 504)
Bug: 50475
Change-Id: I36d0dc2c44a509d4e40ecadcfb5e3df81e01bca9
2014-03-13 00:44:39 +00:00
James D. Forrester e68e93ed59 Make references list dialog small, and vary 'insert' vs. 'apply' button text
Change-Id: I4bbe60ae6a978e73ca55bf55cddbdaca05c56414
2014-03-12 17:01:03 -07:00
jenkins-bot b13844b051 Merge "Add fallback template description with link to template page" 2014-03-12 23:25:23 +00:00
jenkins-bot 13811925b9 Merge "Update VE core submodule to master (8c017ae)" 2014-03-12 23:23:22 +00:00
Trevor Parscal ba2e316964 Add fallback template description with link to template page
Shown when there's no template data.

Someday in the future, we will support adding a description inline. Not
yet. Calm down.

Change-Id: I18c0a591b60de53bc124d82c688d71d30ad1d5dd
2014-03-12 23:21:29 +00:00
Roan Kattouw 0072aeb9a1 Update VE core submodule to master (8c017ae)
Also update VE-MW for the comment changes in VE core

New changes:
4ad6a3d Add text direction to SA demo
89503e8 ve.ce.Node: Emphasise slug transition with increasing outline offset
864046e Update oojs to v1.0.8
65d1338 Localisation updates from https://translatewiki.net.
b66d482 Stop special-casing comments and recognize them as tagName='#comment' instead
09dda12 ve.ce.getDomText: Document node types and use .data instead of .nodeValue
b0a3b2a Make ve.dm.Converter assertions actually display message
ef791cc Make 'comment' its own metaitem type
d5ef0d7 ve.dm.Converter: Refer to nodes instead of elements where appropiate
c22c8af Fix JS error when pressing Enter with selection across multiple paragraphs
a26a708 Add ve.dm.Transaction.newFromReplacement
a9e136e Don't cause needless surface refreshes on overwriting.
6fd35ee Split part of getOpeningHtmlTag out to getHtmlAttributes
2c31f67 ve.ce.Surface: Document version number in focus workaround for Opera
e069e74 Add some more characters to the special character inserter

Change-Id: I859805fb261468e8fae9454c4992115369066b49
2014-03-12 16:15:54 -07:00
Trevor Parscal 91f38fdaf2 Keep label and disabled state of transclusion dialog apply button in sync
* Use "Insert template" when adding a single template
* Use "Insert transclusion" when adding a multi-part template
* Use "Apply changes" when working with an existing tranclusion
* Use "Loading..." and disable while waiting for template data
* Disable when the transclusion has only a template placeholder

Bug: 50998
Change-Id: Ib2fb3d8711ed6d3ef41cc0db55740c95394dd3f9
2014-03-12 14:56:26 -07:00
James D. Forrester d076d9e4a2 Enable VisualEditor by default in NS_USER as well as $wgContentNamespaces
Initially we were only deploying to $wgContentNamespaces, but it's highly likely
that users will want to edit their own user pages in VE anyway. Note that this is
how it's been deployed for Wikimedia for a year now.

Additionally, this helps fix a bug in the browser tests that assumed NS_USER was
a VE-able namespace when that was only true in production config, and not for new
wikis (such as created during automated setup).

Bug: 57104
Change-Id: Icebc24f82fb49e9e80388b6202efa366360ce33c
2014-03-10 17:13:50 -07:00
jenkins-bot fb483849e6 Merge "Abstract tracking and specify which target it came from" 2014-03-08 01:01:08 +00:00
jenkins-bot d86b6a0f02 Merge "Re-enable VisualEditor's toolbar icons on mobile." 2014-03-07 21:55:23 +00:00
jrobson 2ea1eec10c Re-enable VisualEditor's toolbar icons on mobile.
The experience should be consistent between mobile and desktop.
We should explore re-styling these buttons to look like
Ib3c94d19231b018a509b78269001223ad0568795 in desktop as well
at a later date.

Change-Id: Ic9e4c5d12c3c75fcb195432c9155ec0a7eecac04
2014-03-07 10:59:09 -08:00
Rob Moen 4bd80b625e Abstract tracking and specify which target it came from
Split tracking out of the base target and from viewPageTarget

Primary reasons for this change:
 * Makes it possible to resolve an issue with tracking in mobile
 * Lets us reuse the viewPage save workflow tracking
 * Support existing and new targets with tracking
 * Simplification of target classes

Change-Id: I036e4f2129d929db0a3b9a4baa87c946a4b194a9
2014-03-06 09:50:11 -08:00
James D. Forrester ac6f143838 Re-label "Transclusion" button to "Template", as that's now the default
Not removing the existing message for "Transclusion" for now in case
that's needed later.

Bug: 55434
Change-Id: I0ee722e821051970b4a445b5a7a0e93f144f3185
2014-03-06 02:44:14 +00:00
Trevor Parscal 37f4996392 Merge TransclusionDialogs into one
* Automatically select single mode when possible
* Allow dynamic switching when possible
* Hide most of the controls and information when in single mode
* Allow parameter model to be instantiated without name and value args
* Place add param buttons at the bottom of template and param pages
  which are only visible when in single mode and on the last page

Change-Id: Iaffbf1863b808c8089dfcf09a976d165f28c8b74
2014-03-05 18:15:17 -08:00
Krenair a4112ce30d Make new category suggestion section for hidden categories
Change-Id: If60437ce886c03ca1fb75ba23590e9cdb6c2d78b
2014-03-05 17:30:13 -08:00
Roan Kattouw 19f7afb70e Update VE core submodule to master (165594b)
Remove GroupButtonWidget since it was removed in VE core.

New changes:
22edcd9 Special character inspector styling

Change-Id: I385d6b655686c753262258714dec06f8b1e5fc10
2014-03-05 15:39:10 -08:00
Moriel Schottlender 89aecd54ba Deal with 'none'/'border' and default size in media edit
There are several conditions to defaultSize behavior of thumbnails and
frameless images and other images when it comes to default size. In the
same principle is 'border' which is not quite a type despite the fact
it 'behaves' as such in wikitext (and has a unique identifier that comes
instead of the other types.

This commit aims to organize this behavior for the user in an
understandable manner.

* Add 'basic' image type for images that have no specified type ('none')
* Handle the difference in 'default' size behavior between basic images
  and thumbnails/frameless. The thumb/frameless images have the default
  wiki size. Other images' default size is their original dimensions.
* Force wiki-configured default size for thumbnails and frameless images
  in the DM. This is done because at the moment Parsoid's output is of
  Wikipedia's default size rather than the local wiki's. The size is
  adapted if needed, directly in the DM.
* Added 'border' as a pseudo-type checkbox flag that sets css class
  'mw-image-border' is for parsoid rendering on save.
* Add 'make full size' to the size widget select and treat it as a faux
  default button for basic and frame images.

Bug: 62013
Bug: 62024
Bug: 61155
Bug: 61059
Bug: 61282
Change-Id: I6778705306f0dd6bb96afeb91383089a4ddab7ed
2014-03-05 03:53:46 +00:00
Roan Kattouw 810fc7df16 Update VE core submodule to master (74be717)
Also add MW configuration for ModelRegistry back, was removed in core.

New changes:
564c459 Localisation updates from https://translatewiki.net.
f30e061 Consistency in test header comments
74be717 Remove MW-specific config and genericise tests in ModelRegistry

Bug: 53148
Change-Id: I67e77bd41bbff52f88632ff9e4cf5e4c48251174
2014-03-03 11:24:56 -08:00
jenkins-bot eb10020f27 Merge "Add tooltip to page options menu widget in the toolbar" 2014-03-01 01:35:46 +00:00
Trevor Parscal ec004d16be Move parameter adding to a placeholder page
Parameter placeholder pages are generated for parameter with empty
string as their name.

Change-Id: I56c3df1ada6c4f41ebf6466ca280a2333da60071
2014-02-28 17:20:24 -08:00
Trevor Parscal 85e0bf533a Use template name as dialog title whenever possible
Change-Id: I4235f6ed68e1f95c4593caa23ada734fb8493426
2014-03-01 00:57:55 +00:00
Trevor Parscal cb5a9b948c Redesign template parameter pages to be more space efficient
* Show label, input and remove control on a single line
* Right align label to conserve vertical space without sacrificing
  fill-out speed
* Show description in gray text below the input
* Show remove button only when page is active
* Make description lighter when page is innactive

Change-Id: Iaa09f3bf909ccd415de7af8f428495fef3046893
2014-03-01 00:52:06 +00:00
James D. Forrester 3efa7490d6 Add tooltip to page options menu widget in the toolbar
Currently "Page options" but better suggestions are welcome.

Bug: 61892
Change-Id: I5cf7a4cabaaf7a5d5d0bd1b806f8d95ea4d88033
2014-02-28 11:26:47 -08:00
Ed Sanders 09c0611484 Fix-up mwcore split: Split out MWDialogTool
Because everything was broken.

Follows-up I6374854eaa1 which split up mwcore into smaller parts but
left MWDialogTool still as one file part of mwcore. Since the various
ve.dm classes are now part of the other modules that depend on mwcore,
the MWDialogTool classes were pointing at classes that don't exist yet
(e.g. ".modelClasses = [ ve.dm.MWBlockImageNode ];").

Change-Id: Ic05b173d730a8a0f6539fdcd818aaf674d2a4019
2014-02-27 16:33:19 +00:00
jenkins-bot 43abad6193 Merge "Mark hidden categories as different in the meta-data dialog" 2014-02-27 02:12:58 +00:00
Krenair 5fc0faa7e8 Mark hidden categories as different in the meta-data dialog
This gives users a clue to understand why they won't display in the
category box at the foot of the page.

Bug: 50763
Change-Id: I1cf3a76bbf6370e7f67ec16f0a931f6ea4ba9d28
2014-02-27 02:08:48 +00:00
Roan Kattouw efe925067c Followup 0f45399: move some forgotten files out of mwcore
Transclusion/TemplateModel classes to mwtransclusion, CE
LinkAnnotations to mwlink.

Change-Id: I4fdef01ce50a78e109a6297d287da49ca8e41d08
2014-02-26 17:42:00 -08:00
jenkins-bot 66df1ec1b5 Merge "Track edits where user switched into wikitext editor from VE" 2014-02-27 01:35:56 +00:00
Krenair 952a239866 Track edits where user switched into wikitext editor from VE
By adding a tag called 'visualeditor-switched'.

Bug: 56465
Change-Id: I1426d300499b59ca55c9b97fc1560f4adbfa9295
2014-02-27 01:33:40 +00:00
James D. Forrester 532077b57f Don't use a changeable tooltip for edit notices
We can't change tooltips once they're set for buttons like this (they're
static), so for values that can change we need to use language that does
not need plurals.

Bug: 61891
Change-Id: I78e5576e348ee92bc39315fd494b3398ae2c14bf
2014-02-27 01:20:43 +00:00
James D. Forrester 0f45399082 Split up ext.visualEditor.mwcore into smaller parts
Core retains core functionality, including text styling and architectural
items like dialogs.

The new modules are:
* mwformatting
* mwimage
* mwlink
* mwmeta
* mwreference
* mwtransclusion

The new modules are loaded in ViewPageTarget (for desktop), except for
mwlinks which is included from MWTarget (for desktop and mobile), per the
needs of the Mobile team.

Also, mwgallery was moved to desktop-only loading status.

Some styles which were loaded in mwcore but only used in modules is now
loaded in said modules.

This does not split up ext.visualEditor.core yet, which is left as an
exercise for the fool-hardy.

Bug: 61075
Change-Id: I6374854eaa13af824c11078d2f7004dc8a211a30
2014-02-26 16:31:15 -08:00
jenkins-bot 84fb866ed7 Merge "Set up wiki-default image size" 2014-02-26 20:31:49 +00:00
Trevor Parscal e2f6d798b8 Rename MWTemplateParameter* classes to MWParameter*
* The name was getting super long, and the Template prefix doesn't
  appear to be important.
* Soon we will add a placeholder class, which would have been
  MWTemplateParameterPlaceholder, but now just MWParameterPlaceholder
  which seems a little less ridiculous.

Change-Id: Ie2dfe0d4c7b960cd554f89fa6340173e8786c88a
2014-02-26 10:54:45 +00:00
Moriel Schottlender b54575a797 Set up wiki-default image size
This commit makes several adjustments to make sure default size is being
handled correctly:

* Add wiki's default size configuration parameter to the
  VisualEditor.hooks.php file so it can be called from VE.
* Make sure new images are inserted with default size and are
  marked 'defaultSize = true' for the DM to handle.
* Force default size if 'defaultSize=true' in the DM
* Add a 'default|custom' switch to the media edit dialog for size
  inputs. When 'default' is chosen, the media size widget will be
  emptied, displaying its placeholders (default size)
* When the size widget's values are 0 it will automatically turn to
  default size values. If the value started default and the user
  typed in a size, it will automatically override default and use
  custom size.

Bug: 47804
Change-Id: Ib973ea2afa96090a4ba61b2b55ee63457f1329c1
2014-02-25 16:26:15 -05:00
Ed Sanders 0ca90d8965 Ensure VE init runs after mw.util.init
VE init sets up access keys in some cases, but they have not
been set to the correct string for the browser until mw.util.init
has been called, so add a dependency on mw.page.startup to the
init module.

Change-Id: I494b364b485e678122e7f235df88b80fb503fa94
2014-02-21 18:28:37 +00:00
Moriel Schottlender e2f06d4875 Revamp media edit dialog's position widget
Added checkbox to set position (left/center/right) or none if unchecked.
Also handle 'default' position based on the wiki direction.

Bug: 61155
Change-Id: Iddd78c98929759a13d2dc5a774e72b59cbe28c36
2014-02-20 15:47:23 -08:00
Krinkle 2dd888814a Revert "Converting ViewPageTarget CSS files to LESS"
We don't yet have any way to test or verify anything with less. Not the less
syntax, not the less compilation, not the resulting css code quality.

Using it at this point doesn't seem worth the cost of not having any of that.

This reverts commit 17ddf031fe.

Change-Id: I7e8ab90f7a9f77f5cf6d7baeab586d4e0332042e
2014-02-20 22:55:49 +00:00
kaldari 17ddf031fe Converting ViewPageTarget CSS files to LESS
Just doing simple nesting for now. No mix-ins or variables.

There are no actual style changes in this commit.

Change-Id: Ied29358d39703ca6d2c896c2d44d9cf397d51d4e
2014-02-20 13:55:29 -08:00
jenkins-bot 4a0674609b Merge "Split VE-MW's ve.ce.Node.css file into per-node files" 2014-02-20 21:48:07 +00:00
James D. Forrester c6bcc10d6c Split VE-MW's ve.ce.Node.css file into per-node files
Bug: 61075
Change-Id: I9bfa43e23c95a916ae082c33693f33492670445e
2014-02-20 13:44:03 -08:00
James D. Forrester 0390da9dbc Remove SyntaxHighlight code
Unused. Will move instead to the SyntaxHighlight extension.

Change-Id: If4d786b55aca45a517c098f3282ba553da0ceb9c
2014-02-20 11:59:37 -08:00
jenkins-bot 327380c501 Merge "Let users set __NEWEDITSECTION__ & __NONEWEDITSECTION__ status" 2014-02-20 03:23:33 +00:00
James D. Forrester ffbe2565bb Let users set __NEWEDITSECTION__ & __NONEWEDITSECTION__ status
Add a trinary option to the page settings pane of the meta dialog that
lets users set the page to have __NEWEDITSECTION__, __NONEWEDITSECTION__,
or neither (and so have default behaviour).

Bug: 57168
Change-Id: I3198409c6aaa4cbce7e26fd56d390ffc91e91eef
2014-02-19 19:21:49 -08:00
jenkins-bot 78bdbb4c43 Merge "Let users set __NOINDEX__ & __INDEX__ status" 2014-02-20 01:50:29 +00:00
James D. Forrester 051c3498ae Let users set __NOINDEX__ & __INDEX__ status
Add a trinary option to the page settings pane of the meta dialog that
lets users set the page to have __INDEX__, __NOINDEX__ or neither (and so
have the default behaviour).

Bug: 57167
Change-Id: I30d483b5b6c3df7ee56a52c744bbdc610a01873d
2014-02-19 17:48:03 -08:00
jenkins-bot 71984326d1 Merge "Show placeholder text in group input box on reference list dialog" 2014-02-20 00:43:57 +00:00
jenkins-bot 3e0a88c03d Merge "Add MW-specific keyboard shortcut help" 2014-02-19 23:57:45 +00:00
Ed Sanders 2ce113f0c7 Add MW-specific keyboard shortcut help
For now just accessKey+S for save.

Change-Id: Idf4fa31b98d1fa9ea62d9a9f2937ae7496a9a201
2014-02-19 23:53:22 +00:00
jenkins-bot 01570025d3 Merge "Show preview of edit summary in review screen" 2014-02-19 23:07:19 +00:00
Krenair 675d91b7e8 Show preview of edit summary in review screen
Bug: 42139
Change-Id: I0bbfd0dd993da67295dea47129ca9f398f318b64
2014-02-19 15:03:04 -08:00
jenkins-bot 0d2ea63596 Merge "Use accesskey=s on the save buttons" 2014-02-19 21:42:13 +00:00
kaldari 9f1179938c Move some skin styling from ve.ce.Node.css to a shared skin css file
The styling of the image thumbnails should be controlled at the
skin level, not by the generic VE styles. Moving the thumb/figure
styles from ve.ce.Node.css to ViewPageTarget-shared.css. Otherwise
no changes to the styles themselves.

Also adding minerva (the mobile skin) to the list of supported skins.

Bug: 60542
Change-Id: I67ab6d5b91cee7e587f61df26e7dae74c1068788
2014-02-19 13:30:30 -08:00
Krenair ec8234f183 Use accesskey=s on the save buttons
Bug: 50897
Change-Id: I31d6b9ea065b3be85ed07fba7437bed71010512b
2014-02-19 19:34:13 +00:00
Krenair 9c40de10b1 Show placeholder text in group input box on reference list dialog
Set to "General references" for now.

Bug: 59180
Change-Id: I39c3692c71674ff656617500aa22ec7191db2e96
2014-02-18 20:56:45 +00:00
jenkins-bot 4944dff419 Merge "Let users set #REDIRECT and __STATICREDIRECT__ status" 2014-02-14 03:46:12 +00:00
jenkins-bot 912fda938d Merge "Explain what the number on the edit summary screen means" 2014-02-13 01:09:33 +00:00
James D. Forrester 5af9f61520 Let users set #REDIRECT and __STATICREDIRECT__ status
Adds setting and unsetting the #REDIRECT status of the page from the page
settings pane of the meta dialog, and toggle whether this is a static
redirect (i.e., it is not automatically changed when its target is moved).

If the page has a redirect set, the meta dialog will be shown on opening
the page so that users can adjust the redirect more swiftly.

Bug: 47328
Bug: 50878
Bug: 57173
Change-Id: Ibd89cf04486799f292b9fd045dae5bc23fcf6fd4
2014-02-12 15:24:12 -08:00
James D. Forrester e4f983356b Add tooltips to the drop-down menus explaining what they do
Needs Ic967b88d55daf48d365487e17f76488b3f02c60f to work properly.

Bug: 59719
Change-Id: I449be926e830de241a870d96bf30c835f60ca77d
2014-02-12 22:07:24 +00:00
Krenair c4903ac684 Explain what the number on the edit summary screen means
Bug: 50902
Change-Id: Ic548e624c1e7375b3151cc9d2f051a5bc665c759
2014-02-09 03:14:09 +00:00
jenkins-bot 6907654de1 Merge "Add image type change to media edit dialog" 2014-02-08 00:45:49 +00:00
Moriel Schottlender 19c584d166 Add image type change to media edit dialog
Adding a type change to the media edit dialog. Also changing SelectWidgets
to ButtonSelectWidgets for consistency.

Bug: 38129
Change-Id: I9c855e6381d970b5f08460822366f6333af24f82
2014-02-07 16:41:50 -08:00
jenkins-bot 50b6de4866 Merge "Mark disambiguation and redirect pages in the link inspector" 2014-02-08 00:09:26 +00:00
Krenair 60d8021765 Mark disambiguation and redirect pages in the link inspector
Bug: 50240
Change-Id: If975398e4d6b13eea6207ee80b33067e65acd724
2014-02-07 23:48:41 +00:00
Antoine Musso ae5e922837 Global setting for Parsoid HTTP proxy
On sites using $wgHTTPProxy, any curl requests made via MWHttpRequest
would be passed through that proxy. The Parsoid daemon is most probably
reachable directly, hence we want to be able to disable the proxy.
This can be done using the new $wgVisualEditorParsoidHTTPProxy which is
passed to MWHttpRequest in VisualEditor API.

Change-Id: I855249950b1b368ae0afe662154eb48e5b1a14f2
2014-02-07 14:45:56 -08:00
James D. Forrester 2d834ec8c6 Blacklist Amazon Silk
User agent strings from http://docs.aws.amazon.com/silk/latest/developerguide/user-agent.html
Relies on I853e8861

Bug: 50777
Change-Id: I8830d56b9460a72d9a9880fb7120f338dd0f598c
2014-02-07 22:21:35 +00:00
jrobson 239bae7512 Allow better toolbar customisation for VisualEditor
The toolbar in very desktop vector skin specific
In mobile we want to have more control over the toolbar,
and its placement.
* Thus make setUpToolbar abstract
And move the function to ViewPageTarget

* Introduce ve.init.mw.Target.static.iconModuleStyles to
allow the use of different icons
* Update the mobile toolbar to only have B and I tools

Change-Id: I4c72b4b9128b3a74de8b8b5bce7664fbb315216b
2014-02-06 15:45:08 -08:00
Moriel Schottlender b522994344 Adding position setting to media edit dialog
This adds an image position/alignment to the media edit dialog.

Bug: 51293
Change-Id: I15fbd1ed0998a9093fa039b76624395d661af05b
2014-02-05 20:56:37 +00:00
Moriel Schottlender e8205a7133 Adding alternate text to media edit dialog
Adding an option to add or edit alt text to images in the media edit
dialog.

Bug: 38129
Change-Id: I6d339781822175c40c66a4689ec6e1a873cb081d
2014-02-05 20:56:30 +00:00
Ed Sanders fb4f7d3e24 The great image scaling rewrite of 2014 (MW)
Implement new logic in ve.Scalable from I5b4f0f91b.

Also update VE core submodule to master (57ed8d3).

New changes:
59a0afe The great image scaling rewrite of 2014

Change-Id: I24a2976036310d3814cc7d1853a68745e0499bd5
2014-02-05 12:55:11 -08:00
James D. Forrester 87dd841150 Add placeholder for gallery editor
Change-Id: Id351cea8614282924eb9b1644693f7cd71fd9fa4
2014-02-03 14:05:49 -08:00
Moriel Schottlender 8130acebfd Changing image size in MWMediaEditDialog
Adding the ability to edit image size in the media edit dialog.
The size is now a separate widget.

The following changes were made:
* The dialog was changed to a booklet with 'general settings' and
  'advanced settings', in preparation for other edit features.
* The original image maximum size is fetched from the API and cached.
* Maximum size is limited to the image's original maximum size.
* Aspect ratio is kept when changing height or width, using original
  image size to preserve a sane ratio through the MediaSizeWidget.
* If an error is found in the size, the image will retain its previously
  set dimensions.

Depends on MediaSizeWidget: I3d0f9348a52

Bug: 38129
Change-Id: I2946fb21c46ce05583b219f665ef68928188899e
2014-01-22 18:43:45 -08:00
Trevor Parscal 7994eae8c2 MediaWiki language inspector updates
* Add ULS, which was removed from VE core
* Add experimental mwlanguage module which adds ULS integration
* Hook in ULS to the existing language widget

Also update VE core submodule with changes:
* 1e92abe Generic language inspector

Bug: 47759
Change-Id: I325a4dcc316d0334fadfcaa46ad3acd45c6bf84b
2014-01-18 01:02:23 +00:00
jenkins-bot adf8249688 Merge "Ultra-basic gallery editing" 2014-01-15 23:27:06 +00:00
James D. Forrester 842688c51b Ultra-basic gallery editing
'Cos Erik doesn't like things he can't edit.

Change-Id: I1d9fb1215bb16b1245eddd87c977fb5bfdee4da9
2014-01-15 15:13:12 -08:00
jenkins-bot c8a1e16749 Merge "Display indicators for required parameters in template dialog" 2014-01-15 22:23:20 +00:00
Trevor Parscal c8f7845def Display indicators for required parameters in template dialog
Update submodule for changes in OOUI (I1c047b55c7a0d5cf3e0aa0cc3f9a4da7d45c0304)

Change-Id: I8f84a9ae277e5093356f591f7a56e8cebf4a1893
2014-01-15 14:15:21 -08:00
Ed Sanders a703086e61 Keyboard shortcuts MW integration
Also adds a button to the utilities menu.

Depends on I806343b42c5fc63d.

Bug: 52844
Change-Id: Ia488362f4b8c9b99b615c84a7341d97e28bdb295
2014-01-15 14:04:06 -08:00
jenkins-bot 38c0206c53 Merge "Refactor extraModules to $wgVisualEditorPreferenceModules" 2014-01-09 12:38:48 +00:00
Roan Kattouw 8d5ee0e3a0 Unwrap unnecessary array_key_exists() in BetaFeatures hook registration
Change-Id: Ib4ea05729854c6e9e2da36073451d51a10d0febd
2014-01-08 11:31:09 +08:00
jenkins-bot 2016380ac5 Merge "Let users set __NOEDITSECTION__ status" 2014-01-06 09:45:49 +00:00
James D. Forrester 707f7c93a5 Let users set __NOEDITSECTION__ status
Adds a checkbox to the page settings pane of the meta dialog that lets
users set or unset the __NOEDITSECTION__ flag on the page.

Change-Id: If1eca58e28d214021f5f5582856e595d4d0fbc43
2014-01-06 17:42:57 +08:00
Roan Kattouw dc882baab6 Refactor extraModules to $wgVisualEditorPreferenceModules
Instead of having a hard-coded array of preference-triggered modules
that we need to maintain in multiple places, manage this data in one
place in a configuration variable, and explicitly declare the preference
and module names rather than interpolating both of them from a name.

This allows extensions to add preference-triggered modules, and it
allows them to have preference names and module names that aren't
prefixed with 'visualeditor-enable-' and 'ext.visualEditor.' respectively.

Change-Id: I9eb14349cd39125d5c11ffb44c962cc5febb6ba0
2014-01-06 16:57:45 +08:00
James D. Forrester 0ffd654bed Bump copyright like it's 2014
Change-Id: Ic469ebda2c061dc7da0b4c1625f43a7be55da4fa
2014-01-05 20:06:50 +08:00
Roan Kattouw 9d8a5f0f2d Fix path to VE core i18n
Hadn't been properly updated for the repo split

Change-Id: I1d6db13aeab9012b3a87a5f43d1a32fd510615cd
2014-01-05 11:02:35 +00:00
James D. Forrester 0fadc2bc77 Let users set __NOTOC__ & __FORCETOC__ status
This creates a new panel in the meta dialog, "Page settings", where page-
level settings will be, err, set. For now, this exposes just the
behavioural switches for the presence/absence of the Table Of Contents –
__NOTOC__ and __FORCETOC__.

As part of this change, the meta dialog is renamed to "Options" to be
less confusing, and the icon for the meta dialog is changed to the
generic one for dialogs, which was previously unused. The page settings
pane is provided first in this list, given that the categories pane
(amongst others) is now directly accessible through the toolbar menu.

Bug: 56866
Bug: 56867
Change-Id: I33ce05c19d2e19b249e1cefd26fd0e3697d0085d
2014-01-05 18:56:53 +08:00
Roan Kattouw 880a972166 Use JSON support in core for i18n messages
Replace VisualEditor.i18n.php with a shim that uses the
LocalisationCacheRecache hook to read messages from JSON files
and add cache dependencies.

Change-Id: Ib8490d3e327ddf5852827c24ee2aa2916c8af072
2014-01-05 18:41:43 +08:00
James D. Forrester b657a02aee Give name of our licence in $wgExtensionCredits
Change-Id: Idd8f3427130dbc38e39ff4f2b7a16d68c93d0793
2014-01-05 11:00:35 +08:00
Roan Kattouw ee743f869d Use submodule for VisualEditor core
* Add lib/ve.
* Remove modules provided by VisualEditor core.
* Update paths.
* Remove VisualEditor core specific things from Gruntfile.
* Remove entries from external.js already in lib/ve/.docs/external.js.
* Implement build script to compose a jsduck index that includes
  all of VisualEditor core. Right now it includes VisualEditor's
  index as-is, and because those patterns (e.g. ve.dm.*Node) will
  also MW subclasses this means our category page will include
  MW classes under "VisualEditor (core)" (before the repo split,
  this was intentional).
  This is inevitable unless we list every class individually, or
  (the plan) until we move the MW subclasses out of the ve.*
  namespace and into mw.* somewhere.

Bug: 45342
Change-Id: Iff45cd555430634c9fc341fd3b177c1e0625300b
2013-12-20 09:18:41 +00:00
Roan Kattouw c41b60021d Move libraries to the lib/ directory
Didn't move unicodejs because it doesn't have its own repo
and is currently mastered in this repo

Change-Id: I14ab4bd641077d993ac235d8bcdcf8e50a1a72a7
2013-12-19 23:02:52 +01:00
Roan Kattouw abd85fda36 Fix mw.util dependencies
ext.visualEditor.base doesn't and shouldn't depend on mw.util,
but some other modules do. viewPageTarget.init has a dependency
on mw.util meaning that if VE is loaded through it, we'll always
be fine, but for correctness (and support for other targets),
explicitly indicate the dependency on mw.util for every module that
uses it.

Change-Id: I63821938d899897088799bde4d46b04cd2f9a3e2
2013-12-17 20:56:19 +00:00
Roan Kattouw b61813b935 Move visualeditor-languages-tool message from ve to ve-mw
I intially thought it was associated with the language inspector, but
it's not, it's the label for the languages pane in the meta dialog.

Change-Id: I478e3951862a25eee056e3df6cc3c9f9f7d9d935
2013-12-17 20:56:13 +00:00
Roan Kattouw fb3a75b85d Split ext.visualEditor.mwcore out of ext.visualEditor.core
* Split files according to ve / ve-mw paths
* Split messages according to msgs-ve / msgs-ve-mw
* Update dependencies accordingly
* Remove ve-mw/ hack in makeStaticLoader.php, no longer needed

Bug: 45342
Change-Id: I6cb89606c307e27e237a1e9b56b94dfdcd310f41
2013-12-17 20:56:03 +00:00
Roan Kattouw 94879a98b7 Use jquery.i18n for standalone i18n
VisualEditor.php:
* Make jquery.i18n a dependency of ext.visualEditor.standalone

makeStaticLoader.php:
* Remove ve.init.platform.addMessages() call with PHP-generated messages
* Add fake module for jquery.i18n
** Needed because the module might come from MW core
** Also add special treatment for fallbacks.js and language scripts

ve.init.sa.Platform.js:
* Remove basic message system, replace with jquery.i18n
* Add initialize method that loads messages for current language and
  fallbacks

ve.init.sa.Target.js:
* Wait for the platform to initialize before actually doing things
* Add .setup() method to allow callers to short-circuit this process
** This is convenient for callers of ve.init.sa.Target in the test suite

ve.ce.test.js:
* Use existing ve.test.utils function for creating a surface

ve.test.utils.js:
* Call .setup() on the target so we can get a surface synchronously

ve.init.Platform.test.js:
* Make these tests async, wait for the platform to initialize
* Allow for missing messages to be output either as <foo> (MW)
  or foo (jquery.i18n)
* Get rid of message clearing code, namespace test messages instead

Change-Id: Iac7dfd327eadf9b503a61510574d35d748faac92
2013-12-17 21:16:26 +01:00
Roan Kattouw 4c98f753a0 makeStaticLoader: Update fake standalone init module
* Don't add ext.visualEditor.base to it, and strip of ve-mw stuff
** .base doesn't contain ve-mw stuff any more, so no stripping needed
** Instead of appending .base, just load .base and create a
   separate fake module for Standalone init.

* Don't manually register .sa files
** Instead use ext.visualEditor.standalone, it's right there.
** Add missing CSS file to .standalone.

* Documented the purpose of 'Dependencies' and removed scripts
  from that fake module that don't fall under that rationale and
  instead add them as regular modules (rangy, unicodejs).

* Removed weird 'jquery' dependency in 'ext.visualEditor.core'
  module. This is strongly recommended against, and might
  actually cause jQuery to be reloaded due to outstanding bugs
  in core with the state machine in the startup queue (jquery, mediawiki).

* Unlist unused 'jquery.client' dependency in makeStaticLoader.
  As per the module definitions in VisualEditor.php, this is
  only used by the .mediawiki module. Grepped modules/ve/ and
  found 0 uses.

* Update dependency order to roughly match the dependency tree
  as it is specified in ResourceLoader (e.g. rangy is for .core,
  not .base).

* Keep fake modules out of ResourceLoader.

Change-Id: I2a31543e5ad2fc39f5980fea855172108eda4428
2013-12-12 03:34:42 +01:00
James D. Forrester bd94ff92bb Initial re-styling of the toolbar
Move all text styles, and the remove styles button, into a new 'list' toolbar
group, using the text-styles icon. Less-used text styles (strikethrough, code
and underline) are demoted, with remove styles at the end, and bold and italic
promoted.

Now re-label the "More" catch-all to now be "Insert", which is what's left.

Change-Id: I66a1bba347ea64e540106b1090995b3117a8b1b2
2013-12-11 23:41:12 +00:00
Roan Kattouw 536df35ed1 Add language code to language dialog
Bonus: give both the language name and page name
lang and dir attributes.

Further bonus: reintroduce message that was deleted
earlier with all of its original translations.

Change-Id: Id137ff9a069799b6c09574b72f450eac6665d144
2013-12-11 02:42:20 +00:00
jenkins-bot 9bf0f5b93e Merge "Show full language names in the MW language dialog" 2013-12-10 17:00:53 +00:00
Ed Sanders 1a5bdd5bd2 Show full language names in the MW language dialog
Bug: 54086
Change-Id: I099ac552638d666a447eb3aeaef68329ffacdfce
2013-12-06 13:10:33 +00:00
Moriel Schottlender cf237b882e Insert special character tool
A tool to add special characters and diacritics to text.

Also added a new button type ve.ui.GroupButtonWidget that includes a
group of PushButtonWidget objects and returna the individual button's
value upon click

Wikis can edit <visualeditor-specialcharinspector-characterlist-insert>,
a JSON string, to include their own desird special characters to insert
through the tool.

Bug: 50296
Change-Id: I26d1f437feef1c8b61ed3be5f74ef524b33baf49
2013-12-05 22:51:14 -08:00
Trevor Parscal 51e096d6f2 Refactor Transclusion and Meta dialogs to use BookletLayout
Use OOJS-UI's newly-extended paged dialogs (in e08eb2a03b) to refactor
how the Transclusion and Meta dialogs work, splitting out the code for
each of the panels into its own file and simplifying extensibility.

The Meta dialog (ve.ui.MWMetaDialog) now has two self-managing panels:
* ve.ui.MWCategoriesPage for categories and the default sort key
* ve.ui.MWLanguagesPage for language links

The Transclusion dialog (ve.ui.MWTransclusionDialog) now has four:
* ve.ui.MWTemplatePage for a template's primary panel
* ve.ui.MWTemplateParameterPage for each parameter of a template
* ve.ui.MWTemplatePlaceholderPage for a placeholder to insert a template
* ve.ui.MWTransclusionContentPage for non-template transclusion

Additionally, the Transclusion dialog has been slightly cleaned up:
* Replace add/remove events with replace events in transclusion model
* Actually return and resolve a promise (as documented)
* Get rid of "origin" info in template models
* Add method for adding required parts

TODO:

* Decide how and when we will choose between advanced transclusion and
  template dialogs
* Work out design issues with how template descriptions will be visible
  and how adding parameters will work if only showing parameters in
  outline
* Add preview to template dialog
* Consider ways to further improve pages for use in continuous mode

WARNING:

* Right now the template dialog gets overridden by the advanced
  transclusion dialog because they have the same symbolic name and the
  latter is registered later than the former. To test the template
  dialog, just change the symbolic name of the advanced transclusion
  dialog.

Change-Id: I51e74b322aec9a4c3918e6f792bdb3d318060979
2013-12-05 16:26:26 -08:00
Roan Kattouw 0f01f951bb Conditionally register oojs and oojs-ui
Only register them if they aren't already registered, so we're compatible
with versions of MW core with and without oojs.

Change-Id: I5dbb480e8330ceaf0531c194b8ef6cc6c65f537e
2013-12-04 18:28:59 -08:00
Roan Kattouw b3eb415e37 Remove ooui-inspector-* messages
Move existing uses over to the already existing visualeditor-inspector-*
messages.

Change-Id: I6da7f3d61256d1c2b4c1f9583da8bc59a2d7473d
2013-12-04 19:04:51 +00:00
James D. Forrester 769f3ef0db Blacklist all versions of IE, as IE11 is now out
… and is completely broken still.

Change-Id: Ib8ddd40892688bd919ccc9d690e7bd3f2de6645e
2013-12-02 19:29:08 -08:00
Rob Moen f1fa56165d Create base MobileView config and target refactor
Changes include:
* Target mobile for ve dependencies
* Create mobile view constructor
** Some tools like dialogs are excluded for now
* Refactor mw.target to permit code reuse
** Split out pageTarget view functionality from core init methods

Change-Id: I786b63ab57518fc6af7761501259ed66592f70e3
2013-12-02 17:59:27 -08:00
Roan Kattouw 93b645a453 Make autonumbered external links inspectable
When the target of an autonumbered link is changed to a URL, it's kept
as an autonumbered link and its target is updated. When the target is
changed to a MediaWiki page, the autonumbered link is removed and
replaced with an internal link with the text set to the target.
So for instance, if you inspect [http://www.example.com] and change
its target to "Foo", the result will be [[Foo]].

The core of this commit adds support for inspecting nodes to
ve.ui.LinkInspector. This support should probably move into a
class in between AnnotationInspector and LinkInspector, perhaps
called HybridInspector or something, but I'm deferring that for now.

LinkInspector allows changes to inspected nodes to be reflected either
as attribute changes on the node, or by replacing the node with something
else. MWLinkInspector uses this feature to replace the autonumbered
external link node with an internal link annotation when the target is
set to an external link.

Bug: 53505
Change-Id: Icb404af84c24574438e4de3ef05bbd1993b593f7
2013-11-30 00:14:41 -08:00
jenkins-bot c18534bcad Merge changes If814e178,Id133431e,I38d63e31,I16d575b6
* changes:
  Plain text paste with paste special
  Use rare unicode characters for paste placeholders
  Rich paste
  Add fixUpInsertion to newFromDocumentReplace
2013-11-26 21:07:46 +00:00
Ed Sanders 7cec9ae04a Rich paste
Allow pasting of rich (HTML) content.

ve.ce.Surface
* Use a sliced document clone for converting to DM HTML (copy)
* Add full context to pasteTarget before copying
* Add ve-pasteProtect class to spans to prevent them being dropped
* Implement external paste by converting HTML to data and inserting
  with newFromDocumentInsertion
* Remove clipboard key placeholder after read so they aren't picked
  up by rich paste. Hash no longer includes the placeholder.
* Detect the corruption of important spans and fallback to clipboard
  data HTML if available.

ve.dm.LinearData
* Add clone method for copy

ve.dm.ElementLinearData
* Add compareUnannotated for use by context diffing.
* Add sanitize method for cleaning data according to a set of rules.

ve.dm.Transaction
* Add range parameter for inserting a range of a document only,
  e.g. stripping the paste context.

ve.dm.Document
* Implement sliced document clone creation so that DM HTML
  is generated correctly in onCopy

ve.dm.DocumentSlice
* Replaces LinearDataSlice. Now has two ranges for balanced data
  and data with a full context.

ve.init.Target.js
* Define default, loose, paste rules (just remove aliens).

ve.init.mw.ViewPageTarget
* Define strict MW paste rules:
  + no links, spans, underlines
  + no images, divs, aliens
  + strip extra HTML attribues

ve.init.sa.Target, ve.init.mw.ViewPageTarget, ve.ui.Surface
* Pass through and store paste rules.

Bug: 41193
Bug: 48170
Bug: 50128
Bug: 53828
Change-Id: I38d63e31ee3e3ee11707e3fffed5174e1d633b42
2013-11-26 18:23:12 +00:00
jenkins-bot 153ca79518 Merge "Implement serialization cache in VisualEditor API" 2013-11-22 16:39:40 +00:00
Roan Kattouw fd4495e2df Pass the mw.user directly into {{GENDER:}}
Apparently we can do that ^^

Change-Id: I646bc7df29ad2ae605148089a53f1b5b238dca22
2013-11-20 10:51:32 +00:00
Roan Kattouw 0f21329770 Implement serialization cache in VisualEditor API
Add paction=serializeforcache, which serializes the given HTML, stores
the resulting wikitext in memcached, and returns a cache key. This
cache key can then be passed instead of HTML to paction=diff or
action=visualeditoredit for quick diff/save operations using the
cached wikitext, or to paction=serialize to just retrieve the wikitext.

This lays the groundwork for front-loading serialization in the editor,
and for avoiding the double serialization that occurs when the user
first views the diff, then saves.


Bug: 55979
Bug: 56011
Change-Id: I223b1717890632c39e2509967149551f807119f8
2013-11-20 10:26:47 +00:00
Timo Tijhof 4cbf220bd8 Use __DIR__ instead of dirname( __FILE__ )
Change-Id: I7ea4cb82ec7b3c6077a7485b0fb618d4c1dd00f9
2013-11-20 09:39:02 +00:00
Timo Tijhof de979ff293 Replace raw oojs-ui files with v0.1.0-pre (0267100ab3)
Change-Id: I792bc0335269976ff29433227b6fa562a1026aeb
2013-11-20 10:27:48 +05:30
kaldari 0aeab0d573 Restoring messages that seem to have been deleted prematurely.
ooui-inspector-close-tooltip and ooui-inspector-remove-tooltip are
still in use by OO.ui.

Change-Id: I241acc5f2b7822adeeab626efc1c5b12384ae54b
2013-11-18 15:15:16 +05:30
Trevor Parscal 3dcba7679a Add OO.ui.ToggleWidget
Compact toggle widget with short labels for on/off states.

Change-Id: I582e81126d5f1564302409c1b262e28e4a9505ac
2013-11-12 16:54:35 -08:00
Trevor Parscal 4192cbc4d5 Window refactor
Changes:

* Cleanup the window API to use more consistent and intuitive methods - we
  now use initialize/setup/teardown instead of
  initialize/onSetup/onOpen/onClose as methods which are overridden, and
  use open/close methods to control the window
* Change events around to have opening/open and closing/close events which
  act as before/after points during the opening/closing process
* Make WindowSet and Context respond to windows being opened, rather than
  opening them directly
* Fix a LinkInspector creation mode bug where the initial text doesn't get
  reset
* Move inspector, a VisualEditor concept, back to VE
* Cleanup naming of SurfaceDialog, SurfaceToolbar, etc. to use shorter
  names, they were given Surface* names when the generic ones were also in
  VE, but now the generic ones are in OO, so they can return to their
  original names

Change-Id: I82c4fed8bcb3fb5630938c8bc4dd9b2d5f1a8c1d
2013-11-08 12:33:25 -08:00
jenkins-bot 71efc9c2cb Merge "Support private wikis by forwarding Cookie: headers to Parsoid" 2013-11-05 19:00:30 +00:00
Roan Kattouw 6eabc783c3 Support private wikis by forwarding Cookie: headers to Parsoid
If configured to do so, the VE API will forward the Cookie: header to
Parsoid. This allows VisualEditor to be used on read-restricted wikis.

Bug: 44483
Change-Id: If4a0cf1e5785b332ec9b014b783412805cf8af75
2013-11-01 11:14:04 -07:00
jenkins-bot 1cb87f73d4 Merge "Button tool to switch to edit source with changes" 2013-10-31 17:49:45 +00:00
Ed Sanders 7b2cacbe57 Button tool to switch to edit source with changes
By serialising the current DOM, and injecting it into a form we can
end up in the source editor with our VE changes converted.

Bug: 50687
Change-Id: Iafcc02a737d9c6c3a59dce1caff130d47ca25650
2013-10-31 10:46:51 -07:00
James D. Forrester 211727a2fd Add visualeditor-enable-mwmath preference to default user prefs
Stopping a warning for an undefined index created by I28862f3e62f5c.

Change-Id: Ic4ce78c769706332dc399d9b876af01c84845b9b
2013-10-30 17:07:09 -05:00
Trevor Parscal a3295f0939 Allow direct opening of pages in the meta dialog
Objectives:

* Hamburger menu in actions area of toolbar
* Add tools that open specific pages in the meta dialog
* Fix support for using setPage in ve.ui.PagedOutlineLayout
* Allow passing setup config objects through window open calls
* Add dialog action, similar to inspector action
* Fix incorrect or missing documentation

Change-Id: I2d2c9b87554fb2a0c90ed6944a58b38a37efa712
2013-10-29 05:58:06 +00:00
Trevor Parscal e83dc3f8fc Use a toolbar for the actions buttons in ve.init.mw.ViewPageTarget
Change-Id: I260059802379d8cab8ca175b7d7d32813e3ff10a
2013-10-29 05:57:52 +00:00
Trevor Parscal 0ee35c99d0 Add OO.ui.PopupTool
Tool that launches a popup when clicked.

Change-Id: Ie35b51f8160ad3fb844491e2799656413d4029c0
2013-10-29 05:57:40 +00:00
Trevor Parscal 6774cd74f3 Detangle triggers from OOUI
Changes:

* Pass toolGroup into tools instead of toolbar
* Split tool labels into title and accel
* Make toolbars provide accelerator labels
* Remove getLabelText method since it's not being used and is likely not useful
* Make tools update their own labels
* Only show accelerator information for triggers that are active in the surface
* Make surface toolbars listen to commands being added and update tools accordingly
* Introduce command object to encapsulate command info

Change-Id: Ieac4bfa63b63ac0a9dee154af3007a33b4d447ff
2013-10-29 05:50:30 +00:00
Trevor Parscal d2dfb9ac4f Split oojs-ui from ve.ui
* Move and rename generic parts of ve.ui to OO.ui
* We now have a UI test suite because ve.Element (outside ve.ui)
  is now part of oojs-ui, so it needs a test suite.
* Added to the MW test run (just like we do for unicodejs).
* Updated csslint config (also added ve-mw and syntaxhighlight
  which were missing).

oojs-ui still depends on the TriggerRegistry in VE, this is addressed
in a follow-up commit.

Change-Id: Iec147155c1ddf20b73a4d15d87b8742207032312
2013-10-28 22:40:08 -07:00
jenkins-bot 044e2e289c Merge "Split ext.visualEditor.experimental into specific modules" 2013-10-24 14:05:33 +00:00
Roan Kattouw 412eb34de8 Split ext.visualEditor.experimental into specific modules
Math, hiero, language and alienextension are now each in their own
module. Kept the experimental module for backwards compatibility,
it just has all of its constituent modules as dependencies.

MWExperimentalTool.js was split up, and ExperimentalTool.js was
renamed to LanguageInspectorTool.js.

Change-Id: I63b49dfbdb59dc9a494049553cc0c01e89e48826
2013-10-23 16:20:30 -07:00
James D. Forrester 89f039f62d Add Moriel Schottlender to AUTHORS.txt and authors string
Change-Id: Id6e540aaa4d7b51e068a41f8eceba6b386fa2064
2013-10-23 11:24:03 -07:00
Roan Kattouw 36fc3b5911 Rename oo.js to oojs.js per library name
Change-Id: I9f02a4438a18243022506b5a2fcc445af03aa945
2013-10-22 19:18:32 +00:00
Trevor Parscal 26a1d8986b Remove ve.Factory and ve.Registry and use oojs instead
Change-Id: I2717300e6cc6102296a2b8d063d344fa5897c825
2013-10-22 19:15:18 +00:00
Trevor Parscal 6018e77d70 Use OO.EventEmitter instead of ve.EventEmitter
Change-Id: Ie35e5f51a8d3c0d7f4fa46230b7b37112df610b9
2013-10-22 16:57:33 +00:00
jenkins-bot 324b04137b Merge "Add requirements to BetaFeatures hook" 2013-10-21 15:18:24 +00:00
Roan Kattouw d3c706ff93 Add a node type for numbered external links
Since I0f0a826c in Parsoid, numbered external links are now empty
<a rel="mw:ExtLink"></a> tags. This means we have to put in a node type
for them to prevent them from being considered empty annotations and
getting converted to alienMeta.

MWNumberedExternalLinkNode is protected and focusable to avoid making
the link text (which isn't editable) clickable. It isn't inspectable
yet, we need to work on that.

Bug: 53505
Change-Id: I83f69695f3974089e51a84e799f31ab6ed879e05
2013-10-18 22:31:45 +02:00
Trevor Parscal 81bbba4932 Split out popup functionality from ve.ui.PopupButtonWidget to ve.ui.PopuppableElement
Change-Id: I522d852d81d9674723a3262da3f030417f4fc3be
2013-10-17 10:21:03 -07:00
Ed Sanders 8a40585847 Re-render images after resize
Using the MW APIs get a resized version of the image and use
GeneratedContentNode to cache the url.

Bug: 55697
Change-Id: I418f7e1464663f447d46de7ffc29aa5f52d23b12
2013-10-16 16:38:31 +01:00
Trevor Parscal bb03e8f17e Misc UI fixes
* Followup 75270e24: use this.surface directly in MWMetaDialog
* Document that MWDialogTools need a SurfaceToolbar
* Namespace CE events and CSS classes with ve-ce- rather than ve-ui-
* Namespace SurfaceToolbar CSS classes correctly and put them in their
  own CSS file

Change-Id: I9e70917d9c220b39e68833f67ed49fae7f7cbe6a
2013-10-16 12:40:40 +02:00
Ed Sanders e8082ba968 Add requirements to BetaFeatures hook
Change-Id: Ifc809f49e1cf03015dbb295b6b092b4181edc38b
2013-10-11 14:50:41 +01:00
Roan Kattouw 75bee13db5 Remove SyntaxHighlight from the experimental set
This completely disables it while we fix the issues it causes.

Bug: 55533
Bug: 55453
Change-Id: I76e5d81957187535aab870e6ddbd1dbbb88f1315
2013-10-10 01:28:14 +02:00
jenkins-bot 6c3ee0dca7 Merge "Move skin support into $wgVisualEditorSupportedSkins" 2013-10-08 00:27:23 +00:00
Ed Sanders 972c9a46b7 Make the save dialog an actual dialog
Major changes:
* Create a MW specific save dialog class
* Widgetize save dialog elements
* Simplification of viewPageTarget

Minor changes:
* Added getWindow method to windowSet and setTitle methods to window class
* Add transition css properties to dialog styles

Bug: 48566
Bug: 50722
Bug: 51918
Bug: 52175
Bug: 53313
Change-Id: I8c0db01fb8477a9b3d3dfe2a6073ac67869ce40e
2013-10-07 15:59:00 -07:00
James D. Forrester 0bff45959f Move skin support into $wgVisualEditorSupportedSkins
$supportedSkins is mostly an artefact of the currently-unrefactored init code that
will have a sub-class for each skin (so skin's maintainers can add VisualEditor
support without hacking around inside VisualEditor itself), but until then let's
split it out into a global configuration variable at least, so that they have a
hope.

Change-Id: I0742cea6469678c5599768340dfb1f6d2f4debf4
2013-10-07 15:55:22 -07:00
jenkins-bot bcbefc63cc Merge "Track DOM retrieved events" 2013-10-07 22:15:07 +00:00
jenkins-bot 1e0c24da49 Merge "Make dialogs, inspectors windows and window sets generic" 2013-10-07 18:55:07 +00:00
Trevor Parscal 4aa86d0f87 Make dialogs, inspectors windows and window sets generic
Objective:
* Remove surface dependencies in dialogs, inspectors, windows and window sets
* Introduce surface-specific versions of dialogs, inspectors and window sets

Change-Id: I2db59127d2085b02e173a3605e174317e419e213
2013-10-07 10:37:47 -07:00
jenkins-bot 00b6de429b Merge "Use FlatLinearData for storing converter results" 2013-10-07 14:47:21 +00:00
Ed Sanders 44b1fdebe4 Use FlatLinearData for storing converter results
Previously we returned ElementLinearData from the converter, then
stripped out the MetaLinearData. This meant that before processing
the ElementLinearData from the converter actually contained metadata
which is confusing.

The new document constructor stores the converter results in a
FlatLinearData object and simultaneously populates element and meta
data stores.

Also in this commit I have moved various methods from ElementLinearData
to FlatLinearData, from which ElementLinearData inherits.

Change-Id: I64561bde2c31d8f703c13ac7b0a0c5f7ade9f3d4
2013-10-06 20:27:32 +01:00
Ori Livneh e8aad4d4a7 Track DOM retrieved events
When the editor finishes retrieving the target DOM, fire a 'DOM retrieved'
analytic event with the following properties:

* Response time in millisecond.
* Response size in bytes.
* Whether request was a cache hit.
* Value of X-Parsoid-Performance header (or null if unset).

jQuery.byteLength is now a dependency for ext.visualEditor.mediawiki.

Change-Id: I74d3964238927645e847b6e215991bd6b1ebad59
2013-10-05 23:24:06 -07:00
Trevor Parscal 6ec34a3dee Toolbar action widgetization and UI refactoring
Objectives:

* Use widgets to render toolbar actions
* Remove labels next to help notices and edit notices buttons
* Add a close button to the help notices and edit notices

Overview:

* ve.ui.ButtonWidget is now abstract, use ve.ui.PushButtonWidget instead
* ve.ui.IconButtonWidget now inherits from ve.ui.ButtonWidget
* ve.ui.PopupWidget's display method no longer takes x and y arguments
* Fixup naming issues in MWCategoryPopupWidget
* Fixup naming issues with some ve-init-mw CSS classes
* Rename ve-mw/ui/styles/ve.ui.Widget.css to ve.ui.MWWidget.css
* Change uses of "callout" to "tail"
* Add hyperlink functionality to buttons
* Make buttons accessible through focusing, but make unfocusable by
  clicking
* Add head option to popup for rendering a title and close button

Bug: 52386
Change-Id: Iea2c8df1be64d40f9c039873d89ee540cc56e687
2013-10-04 16:26:13 -07:00
jenkins-bot e1c49ace99 Merge "Refactor ve.ui.PagedDialog" 2013-10-04 20:25:43 +00:00
Kyle Florence 4efc6cadb7 Refactor ve.ui.PagedDialog
This commit extracts the page and outline handling logic from
ve.ui.PagedDialog (RIP) and moves it into two layouts: ve.ui.PagedLayout
and ve.ui.PagedOutlineLayout, respectively. These layouts are now implemented
inside the dialogs that used to mixin the ve.ui.PagedDialog class. This
brings a much cleaner separation of concerns between Dialogs and Layouts
and allows the use of page handling logic without the accompanying
outline logic.

Change-Id: I5efa2f893f4b7e962438b3aff34b737573bbd5ca
2013-10-04 12:09:15 -07:00
jenkins-bot c21c8556fc Merge "Make ve.Factory require static name property" 2013-10-03 22:03:26 +00:00
Trevor Parscal 61ddfb76e4 Make ve.Factory require static name property
Objective:
* Make ve.Factory behave like ve.NamedClassFactory
* Remove the only remaining use of ve.Factory (actions)
* Remove ve.NamedClassFactory

Change-Id: Ie302ef5ea31081de7ab0db6091058a59946aef4c
2013-10-03 14:52:19 -07:00
jenkins-bot dd9511f249 Merge "Change ve.dm.DocumentSlice to a mixin to ve.dm.LinearData" 2013-10-03 18:45:55 +00:00
Ed Sanders 5c31d3215b Change ve.dm.DocumentSlice to a mixin to ve.dm.LinearData
Document slice only ever contained linear data, with extra functionality
to preserve the range. It pre-dated LinearData, but now we should
refactor it to reflect its purpose.

Change-Id: Ifc908f7526c83a43a51372c8d2494d7260e7facd
2013-10-03 19:38:59 +01:00
jenkins-bot 0c3014c968 Merge "Add specific message for empty ref group list" 2013-10-02 21:05:07 +00:00
Ed Sanders 912e0b1aef Add specific message for empty ref group list
Currently we just say 'group ""' which is a bit weird, so
instead have a specific message which talks about the
'default group'.

Bug: 51873
Change-Id: I4a17f15ee18175fac11b36b102a06cc9714426ee
2013-10-02 14:01:37 -07:00
Tongbo Sui 62ec9d92e2 SyntaxHighlight node support
Update: Switched to generic ve.ui.Toolbar and ve.ui.Tool for consistency
with VE in general. Changed searchbox to floating and hidden by default.
Call for search using shortcut key. Overriden ESC key.

Node handler for <syntaxhighlight>'s Rdfa type.
Embedded in VisualEditor.php with its own ResourceLoader module.
Use $wgVisualEditorEnableExperimentalCode in LocalSettings.php
to load the module.

Supported languages (for testing): text, javascript

Features:
(1) Internal mechanisms:
	(1.1) Tokenizer. Tokenize input code string.
	(1.2) Highlighter. Highlight based on predefined rules.
	(1.3) Syntax checker. Validate based on predefined rules.
(2) SimpleSurface:
	(2.1) Auto indenter. Works with (){}[] blocks.
	(2.2) Reformatter. Reformats spaces and remove trailing
	whitespaces.
	(2.3) Language selection dropdown.
	(2.4) Basic editing. Insert, deletion, selection.
	(2.5) Clipboard & edit history support.
		(2.5.1) Undo (Ctrl + Z), redo (Ctrl + Y)
		(2.5.2) Copy (Ctrl + C), cut (Ctrl + X), paste (Ctrl + V)
	(2.6) Search & replace. Ctrl + F to quickly move focus to search
	box.

Bug 47742

Change-Id: I4adede9e05fd2236cee50ce03f597e8ff6b1914d
2013-10-02 11:01:06 -07:00
jenkins-bot 48c60153a6 Merge "Extend SurfaceToolbar into TargetToolbar" 2013-09-23 23:48:41 +00:00
jenkins-bot ede7dad318 Merge "Don't break core's parserTests if VisualEditor is installed" 2013-09-18 19:57:30 +00:00
C. Scott Ananian 21cd7bad53 Don't break core's parserTests if VisualEditor is installed
VisualEditor's hook changes the edit section link, which changes the
output of certain parser tests so that they no longer match the
expected text.  Use the `ParserTestsGlobal` hook (which cleans up
after itself when the parserTests ends) to disable the
`onDoEditSectionLink` hook when we're running parserTests to avoid
the spurious failures.

Change-Id: Ic958d88f443ac37ba304d3256e2bb5ea2fde820d
2013-09-18 13:03:40 -04:00
Ed Sanders 4d1d632ebd Extend SurfaceToolbar into TargetToolbar
Toolbars may want to control the target as well as the surface (spoiler alert!).
The new TargetToolbar has a pointer to its target as well as its surface.

Change-Id: I928316d9e23ac3f3de3e76c34ef0ac3d27855ab3
2013-09-17 17:05:01 +01:00
Trevor Parscal 143b086c74 Scroll into view support
Objectives:

* Scroll when needed to show highlighted (with keyboard) or selected (by
  any means) options in select widgets
* Allow clipping and automatic scrolling for certain elements when they
  are otherwise going to be rendered partially out of view

Changes:

*.php
* Add links to new file

ve.ui.Widget.css, ve.ui.Dialog.css
* Removed unneeded x-axis overflow rules

ve.ui.ClippableElement.js, ve.ui.Element.css
* New mixin, adds visible area clipping support to an element

ve.ui.PopupToolGroup.js, ve.ui.MenuWidget.js
* Mixin clippable element

ve.ui.OptionWidget.js, ve.ui.OutlineItemWidget.js
* Add scroll-into-view configuration for option widgets

ve.ui.SearchWidget.js
* Scroll items into view when highlighting with keyboard

ve.Element.js
* Add getBorders, getDimensions, getClosestScrollableContainer and
  scrollIntoView static methods
* Add getClosestScrollableElementContainer and scrollElementIntoView
  methods

Bug: 53610
Change-Id: Ie21faa973a68f517c7cfce8bd879b5317f536365
2013-09-16 16:46:58 -07:00
James D. Forrester 1a1ef97336 Move text style tools out of experimental
These were meant to have been de-experimental-ised with the toolbar
commit; oh well. This moves the following text styles from being in
"experimental" mode to being regular annotations:

* Code
* Strikethrough
* Subscript
* Superscript
* Underline

Change-Id: I21be2dc844b47b825d7a1e48a592067166ecd122
2013-09-11 19:41:14 -07:00
Ed Sanders 4f768f3734 Integrate with BetaPreferences
Look at logo Michael.

Bug: 52686
Change-Id: I3cfada2ea264184698de5f322c1fe5041b37b8c8
2013-09-10 10:20:14 -07:00
Ed Sanders 0c52ab64e1 Sort i18n messages
Change-Id: Ic736fd63aa76c324edb67b303aadb269221ab213
2013-09-05 15:35:06 -07:00
jenkins-bot 8dfa827a97 Merge "ve.EventSequencer: Post-event listening" 2013-09-04 20:08:42 +00:00
David Chan 793172e41e ve.EventSequencer: Post-event listening
modules/ve/ve.EventSequencer.js
* Class to sequence pre-event and post-event listening correctly

demos/ve/eventSequencer.html
* Plain HTML example page for testing EventSequencer and event sequences

Change-Id: I4ddb10a30c2f44015136a7978a185d0b13f0690b
2013-09-04 11:20:46 -07:00
Trevor Parscal 8dfbc5baa5 Make tools generic and add fancy tool groups
Objectives:

* Got rid of mw prefixing in tools, inspectors and dialogs
* Simplify tool classes so they can be generically used as items in bars, lists and menus
* Add support for a catch-all toolbar group
* Simplify tool registration, leaning on tool classes' static name property
* Move default commands to command registry
* Move default triggers to trigger registry
* Get language tool working in standalone

Change-Id: Ic97a636f9a193374728629931b6702bee1b3416a
2013-09-03 11:27:39 -07:00
Ed Sanders a72099af66 Expose version information in the client
By passing in the information via a ResourceLoaderModule this
gets around any concerns with performance (version information
is read from the file system).

The version information is appended to the beta toolbar dialog.

Bug: 53050
Change-Id: I7836e1d4003416cbb7e18e3435aa87d82fd5c2e2
2013-08-29 18:19:40 -07:00
Timo Tijhof bdd1a73eaa data: Rename MessagesModule to DataModule
Also..
* removed an incorrrect comment referring to the old module
  name (standalone didn't use the VisualEditorMessagesModule).
* made it use debug mode to determine whether to minify or
  prettify the js code.

Change-Id: I493007649fba27e7faab0cf743eded5f68714c50
2013-08-29 18:07:35 -07:00
Ed Sanders 62c7358af9 Add David to author lists
Change-Id: If46dc34381e5cc7c3fbfc9886868cd1a63bf7a47
2013-08-29 11:11:10 -07:00
Roan Kattouw a03c512f33 Actually move the experimental LanguageInspector messages into the experimental module
Change-Id: I91453bfa535b1b5a8c6c495a5857977a646434d6
2013-08-28 17:25:52 -07:00
jenkins-bot 916d1c2b69 Merge "Create a subscript tool" 2013-08-16 02:16:25 +00:00
jenkins-bot c01499fb66 Merge "Create a superscript tool" 2013-08-16 02:15:42 +00:00
jenkins-bot ffc513fcf3 Merge "Create an underline tool" 2013-08-16 02:13:02 +00:00
Ori Livneh 825322d4ac Use internal ve.track to log events
This patch rounds off change I29740fa7a by replacing calls to EventLogging's
eventLog.logEvent with calls to VisualEditor's ve.track. ve.track publishes
events by providing an interface, ve.trackRegisterHandler, which event handlers
use to subscribe to VisualEditor events. By making it the responsibility of the
web analytics framework to register itself as a handler, VisualEditor can
remain decoupled from (and indeed ignorant of) any particular event logging
implementation. This allows VisualEditor to be integrated with many different
web analytics platforms with nothing more than a bit of glue code for mapping
ve's event semantics to those of the target platform.

The practical difference that this makes is that it frees VisualEditor from
having to know about EventLogging or from having to load EventLogging
components, which means we can remove quite a lot of gnarly code. My current
plan is to migrate the code for registering and loading the 'Edit'
schema module to Extension:CoreEvents, which is also where I'll commit the
handler for VE events. (CoreEvents exists precisely to provide an organized
place for persistent but WMF-particular instrumentation.)

Once this patch is merged and deployed, the following two configuration
variables may be removed from mediawiki-config:

- $wgVisualEditorEnableSplitTest
- $wgVisualEditorEnableEventLogging

Change-Id: Idfdf692668d2adfbe029e8f0c4ff9e96c60ff741
2013-08-15 19:43:36 +00:00
James D. Forrester 23af88edc3 Create a subscript tool
Bug: 51612
Change-Id: Ia05e09a411213cbc035ad9dd3d3156d57f8e102c
2013-08-15 19:40:15 +00:00
jenkins-bot cec28fe287 Merge "Add ve.track, a generic dispatch of analytic events" 2013-08-15 19:39:24 +00:00
James D. Forrester 34a37471c6 Create a superscript tool
Bug: 51611
Change-Id: I74b6418542927eeeb7e80d664a30fcaf07b93a13
2013-08-15 12:36:35 -07:00
Steven Zhang 3c65d830f2 Create an underline tool
Bug: 51609
Change-Id: I65246d7eeb154950c35a1cb70909a113080c2323
2013-08-15 12:16:01 -07:00
jenkins-bot c84c47aeba Merge "Prevent the creation of invalid MWInternalLinks" 2013-08-14 21:58:27 +00:00
Ed Sanders ad3a7c95c8 Alien extensions
VisualEditor.i18n.php, VisualEditor.php
* Button title
* New experimental files

ve.*.MWAlienExtensionNode.js
* Very basic extension of ve.*.MWExtensionNode

ve.ui.MWAlienExtensionInspector.js
* Default to inline-block for wrapper. Should probably
  get rid of styled wrappers for GeneratedContent eventually.

ve.ui.MWAlienExtensionInspector.js
* Basic extension of MWExtensionInspector. Override title to
  use tag name e.g. '<easytimeline>'. Could be changed in future
  to 'Extension: easytimeline' or similar.

*.png, *.svg, *Icons*.css, ve.ui.MWAlienExtensionButtonTool.js
* Angle bracket icon for button (open to suggestions)

ve.ui.MWInspector.css
* Make extension inspector text input tall by default.

Change-Id: I07f0686839192cad3cd8dfd3233ae907fe5cdf6a
2013-08-08 14:27:49 +08:00
Roan Kattouw 8f2c897c11 Don't set a group for VE ResourceLoader modules
The grouping behavior is unnecessary for the main payload, and
actively hurting us for the init-init module.

Change-Id: I111e28e5c759bf43412c5b1432ec9c8a2102d7dc
2013-08-07 18:20:01 +08:00
Ed Sanders 0d1617a627 Hieroglyphics support
Mostly as a demonstration of how easy this is with MWExtensionNode.

The icon was chosen with the following criteria:
1. Recognisable (the ankh is quite common in popular culture, right?)
2. Doesn't look idiotic to academics (I've consulted an Egyptology
   PhD and they can confirm it's not the glyph for penis)
3. Renders well at <16x16

That said it does look a little like a stick man...

Bug: 43118

Change-Id: I9f9e8af501401866bfeecf0eec3690a705fbd4db
2013-08-07 09:43:04 +00:00
Ed Sanders 671c7d3b25 Create base MWExtensionNode for simple extension support
MWMath and other simple extensions all behave in a similar way, e.g.
<tagname>Foreign syntax</tagname>.

This creates a base class that should make supporting such extensions,
and editing their contents in a plain text box, very simple.

Change-Id: Icc0acb33fe32704f71dacb552d9dfa3142eaef2b
2013-08-07 17:39:31 +08:00
peter-coti 5014e122e3 Create strikethrough text style button
Experimental to avoid making toolbar too long

Bug: 51610
Change-Id: I1eb5b1361d6058a6e1533ab62c0aa7e21c9fc090
2013-08-07 16:14:19 +08:00
Trevor Parscal 2717ea1645 Add ve.ui.ToolGroup and use within toolbar setup
Objectives:

* Use a class for toolbar groups to add more functionality later
* Rename addTools method to setup

Changes:

*.php
* Add link to new file
* Move ui element classes up for more general use

ve.init.mw.ViewPageTarget.js, ve.init.sa.Target.js, ve.ui.Context.js,
ve.ui.SurfaceWidget.js
* Update use of addTools method

ve.ui.Tool.css, ve.ui.Toolbar.css
* Move styles between sheets

ve.ui.Toolbar.js
* Rename addTools to setup
* Use ve.ui.ToolGroup objects when building tools

ve.ui.ToolGroup.js
* New class, encapsulates tools

Change-Id: Ic3a643634a80a8ac7d6f6f47f031d001c7efaee7
2013-08-07 05:08:20 +00:00
Ori Livneh 246c655b28 Add ve.track, a generic dispatch of analytic events
This patch adds ve.track; it provides a means for VisualEditor code to log
various changes of state that are of potential analytic interest. This is done
without coupling VisualEditor to a particular analytics framework by providing
a method, ve.hook.registerHandler, by which event data may be routed to a
particular analytic framework for processing and dispatch.

ve.track uses a $.Callbacks-like object for tracking analytic events which can
remember an arbitrary number of past events. This is done by maintaining an
array containing the arguments of past calls and maintaining a counter for each
callback indicating its position in the queue (i.e., how many events it has
already received.) This ensures handlers are called for each event, including
events which were fired before the handler was registered. This allows the
load-order of VE and analytics components to remain unspecified.

Change-Id: I29740fa7a0ac403e484e0acee6dfcadaf6fc4566
2013-08-03 02:51:07 +00:00
Trevor Parscal a226716d70 Split ve.ui.Toolbar and ve.ui.SurfaceToolbar
Objective:

* Make it possible to make a toolbar without a surface

Changes:

*.php
* Links to new file

ve.ui.Toolbar.js, ve.ui.SurfaceToolbar.js
* Split toolbar into generic and surface specific classes

*.js
* Update symbol names

Change-Id: Ice063a2fb67b5ce5155cdc96a0d47af49eee48cb
2013-08-02 14:33:25 -07:00
jenkins-bot 390ce7db3f Merge "Beta welcome dialog" 2013-08-02 04:12:06 +00:00
jenkins-bot 07a513ac9d Merge "Move edit tab generation into PHP and make it more configurable" 2013-08-02 04:10:46 +00:00
Rob Moen 5231d05bbe Beta welcome dialog
For configured wikis, show a dialog that welcomes the user to the
amazing and fantabulous world of VisualEditing, which is not only full of
wonderment and joy but also may lead to increased popularity and love.

The dialog only shows up once (uses a cookie).

Change-Id: I8e7c4dc2c63b36594378a543b9d66291395eebcf
2013-08-01 21:08:15 -07:00
Roan Kattouw ced2a8aa59 Move edit tab generation into PHP and make it more configurable
* Generate the edit tabs and the section edit links in PHP, with a
  fallback in JS for cases where we don't have them yet due to
  caching. But only change things if VE is enabled, and have the JS
  correct the state if the wrong cached HTML comes through.
* Make the order of the tabs/links and the messages to use as captions
  configurable
* Make the edit tabs and section edit links always be present in the
  page (regardless of namespace, user prefs, etc.) but be hidden and
  have JS unhide them (using html.ve-available) if appropriate
* Add appendix messages so we can do a superscript "beta" even in places
  where we can't use HTML in the message

VisualEditor.php:
* Add new hook registrations
* Remove edit link caption messages from the init init module because
  they're now added dynamically in VisualEditor.hooks.php
* Add a noscript CSS module so we can hide some things in JS-less
  environments
* Remove $wgVisualEditorTabLayout and replace it with
  $wgVisualEditorPosition
* Add config vars for link captions, with null causing us to use
  the default caption
* Add config vars for link caption appendices. Too many config vars
  but we'll clean that up later

VisualEditor.hooks.php:
* Dynamically add tab messages to the init init module
* Remove unused globals in onBeforePageDisplay()
* Add noscript CSS module
* Add a SkinTemplateNavigation hook that changes and reorders the edit
  tabs as appropriate
* Add a DoEditSectionLink hook that overwrites the edit section links
* Export the new config variables to JS

VisualEditor.i18n.php:
* Add beta appendix message
* Add a message for the default VE edit section link

ve.init.mw.ViewPageTarget.init.css:
* Remove the animation on the edit section links
* Darken the color of the brackets and the pipe from #ccc to #555
* Style the beta message to be superscript-like (but not real <sup> to
  avoid moving the baseline)

ve.init.mw.ViewPageTarget.noscript.css:
* Hide the VE edit tab, the pipe and the VE edit section link initally
  unless and until JS unhides

ve.init.mw.ViewPageTarget.init.js:
* Toggle .ve-not-available / .ve-available
* Edit tabs
** Only generate the the edit tabs if they're not already there from PHP
** Rewrite the edit tab generation to mirror what's being done in PHP
* Section edit links
** Same as for edit tabs
** Also add mw-visualeditor-expanded to pad the brackets

ve.init.mw.ViewPageTarget.js:
* #ca-ve-edit is now always the VE tab (and #ca-edit always the
  edit source tab) so update the .selected behavior accordingly

Change-Id: Idcb15faea7fabe5fe7578b1508079969b27d2469
2013-08-01 21:08:13 -07:00
Ed Sanders 04c0a0d2ee Prevent the creation of invalid MWInternalLinks
By testing against a regex of legal title characters we can determine
if the entered text is a valid internal link. If it isn't we should
prevent the link inpsector from creating/changing the annotation.

Bug: 33094
Change-Id: Ia1df602601e4e82fc351279e432c28c425f5157a
2013-08-01 17:38:55 +01:00
Matthew Flaschen 3ff9c21063 Remove obsolete comment about GuidedTour and EventLogging
The AddNewAccount hook does not require them.

Change-Id: I2ce7f0de0f059fdf24522240aaf08d1c6faaecab
2013-08-01 02:49:37 -04:00
Ori Livneh 56649046d9 Remove registration of nonexistent hook function
Hook was part of survey code which I removed in I8be6198a6. I neglected to
remove the statement which registered the hook handler, however.

Change-Id: Ia4e2a7854b3a2a5cbbe4da7657f7afe18f3c1d6a
2013-07-31 21:09:01 -07:00
Ori Livneh e98d54078b Remove gender micro-survey from VisualEditor
The 'ext.visualEditor.genderSurvey' module was introduced in I2b4aba6a9
for the purpose of instrumenting a short-lived microsurvey that would be
concomitant with the deployment of VisualEditor. The survey has now run
its course; this patch removes its code.

Change-Id: I8be6198a66957d792757a5312e9e71b3c8cdd1e3
2013-07-31 00:22:09 -07:00
jenkins-bot 6828804d27 Merge "Language Inspector UI" 2013-07-31 07:14:56 +00:00
Ed Sanders 0d30e1e77d MWMath cleanup
VisualEditor.php
* Add CSS file

ve.ce.MWMathNode.js
* Wrap the image in a span, so GenerateContentNode doesn't
  try to nest an image inside an image
* Remove unnecessary attribute setting
* Only pass unwrapped image to deferred.resolve
* Retrigger MathJax rendering

ve.ce.Node.css
* Use inline-block for image wrapper

ve.dm.MWMathNode.js
* Mixin GeneratedContentNode and implement getHash
* Copy over functionality of MWTransclusionNode:
  + Just store data-mw for attributes
  + Store orignal(DomElement|MW|Index) for selser

ve.init.mw.ViewPageTarget.js
* Add mwMath to the toolbar

ve.ui.MWMathInspector.js
* Remove static.InputWidget, not required in this architecture
* Use multiline TextInputWidget
* Only update mw attribute
* Allow creation of new math nodes

ve.ui.MWInspector.css
* Set height of TextInputWidget

Change-Id: I520f8ccc9f89a2ce70aa1d9e02ed0c6cacbecc2f
2013-07-30 23:47:37 +01:00
jenkins-bot 0ec6008c32 Merge changes Icce6c192,If1bcc3ee
* changes:
  Make <nowiki>s non-experimental again
  Don't compare annotations directly with ve.compare()
2013-07-29 19:47:26 +00:00
Roan Kattouw 75f2029f2d Fix 429587d: set default value for visualeditor-enable to 0, not 1
With our current config, 429587d would have enabled VisualEditor by
default on all wikis, which is not what we want to do. We can make the
-enable preference default to true in the extension if we really want
to, but that requires a change to wmf-config as well.

Change-Id: I95664588e5e4e3d6caed90e1c83accc9434ecd49
2013-07-29 09:13:22 -07:00
Moriel Schottlender 59079978ff Language Inspector UI
This is the language inspector UI engine with ULS core.
The Language Inspector works alongside ULS to choose and change language
blocks in text. The inspector was based on ve.ui.TextInputWidget and
now changed to inherit ve.ui.Widget and display details in a table
instead of an input textbox.

Added jQuery.ULS module:
* Repository: https://github.com/wikimedia/jquery.uls
* Latest Commit 728f112ffc90b03b50c0109487886a2647f12020
* Taken 'src' / 'images' and 'css' folders into modules/jquery.uls

Bug: 47759
Change-Id: I3c9fd6c135c05a54f6c7fc28c5962fc0a6677806
2013-07-29 00:38:59 -04:00
James D. Forrester b64b6a1ab6 Make <nowiki>s non-experimental again
Change-Id: Icce6c19243b82c46a6c48004065d93453bb4f8eb
2013-07-28 00:10:48 +00:00
Timo Tijhof 429587df7d VisualEditor.php: Set default preferences values
This not being here caused and causes various unexpected
scenarios to evolve around preferences being falsy (undefined)
or set to 0, and inability to distinguish between a user having
not set the preference, the preference not existing due to cache
or the preference being disabled explictly by the user.

Change-Id: Ie50b63ba5064e85d26dad8b622554bbe809c2634
2013-07-26 22:26:17 +02:00
Timo Tijhof 2e091b0509 VisualEditor.php: Re-order and clean up
Match the conventional layout for this file.

Change-Id: Ic437c1a9423af47a3a1f3068afec6daa4ba7eefc
2013-07-26 22:25:52 +02:00
jenkins-bot d9615e711b Merge "Make sure 'user.options' is loaded before 'ext.visualEditor.viewPageTarget.init'" 2013-07-26 19:42:57 +00:00
jenkins-bot b8ea6a22ac Merge "Code annotation button" 2013-07-26 19:41:34 +00:00
Ed Sanders fadd7c46a2 Code annotation button
Pretty straightforward, although we should start thinking about
grouping/hiding 'advanced' formatting options in the toolbar.

Making this button experimental for now until we've come up with
a way to deal with this problem.

Bug: 51590
Change-Id: Ieb1935b742aced4b883d8a194e6cb69be68473d0
2013-07-26 12:36:34 -07:00
Roan Kattouw e49df7f9d9 Infrastructure for loading plugins in the MW integration
Server-side, plugins can register themselves by adding to
$wgVisualEditorPluginModules. This is the recommended way for
MW extensions to extend VE. Client-side, plugins can register
themselves through mw.libs.ve.addPlugin(), which takes a string
(RL module name) or a callback.

When VisualEditor loads, we load the registered plugin modules in
parallel with ext.visualEditor.core. Note that they're loaded in
parallel, not after, and so the plugins should explicitly depend
on ext.visualEditor.core if they use or extend classes in VE core.
Once the modules finish loading and user and site scripts have run,
we execute the registered plugin callbacks. These callbacks can
optionally return a promise. We gather these promises and wait for
all of them to be resolved, then initialize the editor.

This allows Gadgets to extend VE by top-loading a small module that
depends on ext.visualEditor.viewPageTarget.init and calls
mw.libs.ve.addPlugin( 'ext.gadget.bottomHalfGadget' ); , the bottom
half being a hidden Gadget that depends on ext.visualEditor.core and
contains the actual code. The addPlugin() call needs to be in a
top-loading module because otherwise there's no guarantee that the
plugin will be registered before the user clicks edit and VE loads.

User and site scripts can extend VE by simply calling addPlugin()
directly, as mw.libs.ve is already present when user scripts run (since
it's top-loaded) and VE waits for 'user' and 'site' to run before
executing plugins.

If user/site scripts need to load additional JS files, they can load
these with $.getScript() and return the corresponding promise:
mw.libs.ve.addPlugin( function() { return $.getScript( 'URL' ); } );

For a diagram of all this, see
https://www.mediawiki.org/wiki/File:VE-plugin-infrastructure.jpg :)

VisualEditor.php:
* Add $wgVisualEditorPluginModules

VisualEditor.hooks.php:
* Expose $wgVisualEditorPluginModules in JS

ve.init.mw.ViewPageTarget.init.js:
* Add mw.libs.ve.addPlugin function that just stores the registered
  values in an array and passes them into the mw.Target when it's
  being initialized

ve.init.mw.Target.js:
* Add $wgVisualEditorPluginModules to the set of modules to load when
  initializing VE
* Add a Deferred (this.modulesReady) to track module loading
* Add addPlugin() and addPlugins() methods that add to either
  this.modules or this.pluginCallbacks
* In load(), instead of mw.loader.load()ing this.modules, use using()
  to load this.modules plus user and site, and fire onModulesReady()
  when they're loaded
* In onModulesReady(), execute the registered callbacks, gather the
  returned promises, wait for all of them to be resolved, then resolve
  this.modulesReady
* Fire onReady based on this.modulesReady being resolved, rather than
  using a second using() call

Bug: 50514
Change-Id: Ib7d87a17eaac6ecdb8b0803b13840d7ee58902df
2013-07-26 19:31:56 +00:00
Helder.wiki f568439b0e Make sure 'user.options' is loaded before 'ext.visualEditor.viewPageTarget.init'
The function init.isAvailable uses mw.user.options, so this dependency needs
to be specified.

Change-Id: Ia2c87a32f692da2347ad670cdbcf6d6e6d171f15
2013-07-26 10:54:29 -03:00
James D. Forrester 98977e02a8 Put <nowiki> edting in experimental for now
Bug: 51948
Change-Id: I18c89e8fba04a1ad515e5db611381a4c937853e5
2013-07-24 09:21:09 -07:00
jenkins-bot 12b250a929 Merge "Handle meta-only transclusions as meta items" 2013-07-24 14:29:21 +00:00
Ed Sanders cdfed7039f Handle meta-only transclusions as meta items
To achieve this we need to evaluate the DOM contents of
transclusion nodes to see if it consists solely of meta items
and whitespace.

To check for meta items we do a model registry match, but with an
additional parameter to exclude mwTransclusion types as a possible
result (as the first item may be a meta tag, but with a mw:Transclusion
typeof attribute).

Bug: 51322
Change-Id: I89a220350fb7e10e15f3682d21438539196a5846
2013-07-24 14:27:24 +00:00
Timo Tijhof a81beef27a mw.ViewPageTarget.init: Move conditionals client-side
Load the module always and have the conditionals on the
client-side so that we can change these without running into
problems with the new conditions not being rolled-out quickly
for anonymous users because the load queue is in the HTML
and cached for 30+ days.

This also allows us to fix above problem retroactively in wmf
production by just adding a mw.loader.load for this module
in something like MediaWiki:Common.js or something else that is
already in the cached load queue (temporarily, until the cache
has rolled over).

Removed unreachable code for loading ext.visualEditor.splitTest.

Change-Id: I21114960a88d224747447f2dc83d17d160f5f066
2013-07-23 20:25:37 +02:00
jenkins-bot 21e47c5a33 Merge changes I2edc46b6,Iea905f2b,Ia572fd06,Id81da87b,I98a7d3eb
* changes:
  Add a node class for mw:Nowiki
  Move getHashObject() from dm.Node up into dm.Model
  Allow annotations to render nothing
  Pass child DOM elements to annotations' toDomElements()
  Process annotations bottom-up rather than top-down in data->DOM
2013-07-19 19:11:38 +00:00
Trevor Parscal 61ba07d409 Reference dialog commingling
Objectives:

* Merge reference insert and edit dialogs
* Change workflow to put editing/creating a new reference first
* Add secondary page in dialog for selecting an existing reference

Changes:

*.php
* Cleanup unused files/messages

ve.ui.Dialog.css
* In the footer; make primary, constructive and destructive buttons
  appear on the right; all others on the left

ve.ui.MWReferenceSearchWidget.js
* Fix documentation
* Remove create option and reuse section header items

ve.ui.MWReferenceInsertButtonTool.js,
ve.ui.MWReferenceEditButtonTool.js,
ve.ui.MWReferenceButtonTool.js
* Merge reference button tools

ve.ui.MWDialog.css
* Remove body styles, use padded option of layout instead
* Update selectors as per merging of dialogs

ve.ui.MWReferenceInsertDialog.js
ve.ui.MWReferenceEditDialog.js
ve.ui.MWReferenceDialog.js
* Merge reference dialogs
* Add buttons to switch between edit and select mode

ve.init.mw.ViewPageTarget.js
* Update reference button name as per merging of tools

ve.ui.SurfaceWidget.js
* New widget!
* Encapsulates a "sub-surface"

Bug: 51152
Bug: 50458
Change-Id: I8265febf4fd8f64d2ac40470ff033bac68b24d99
2013-07-18 14:14:14 -07:00
Helder.wiki 1cff9d9c1d Default $wgVisualEditorNamespaces to $wgContentNamespaces
The domains which contains articles are those from $wgContentNamespaces,
which by default is just array( NS_MAIN ).

Bug: 51527
Change-Id: I1f1356f1950c542ae05095a9ebd7b3d66ceb4e40
2013-07-17 09:23:22 -03:00
Roan Kattouw 7294c65a2e Add a node class for mw:Nowiki
These represent <nowiki> tags. If the user doesn't edit the text inside
the nowiki, we round-trip the <span typeof="mw:Nowiki"> wrapper cleanly,
but if they do edit it, we unwrap it. This then triggers re-escaping
in Parsoid, and prevents cases where the user edits the text to no
longer need escaping but Parsoid still wraps it in <nowiki> because
of the <span typeof="mw:Nowiki"> wrapper.

In order to detect whether the contents have changed, the nowiki
annotation stores a copy of its contents. To avoid infinite recursion,
we have to exclude this attribute for hash generation.

Bug: 47678
Change-Id: I2edc46b6d87d2f91e952efcb09c0edae5166958f
2013-07-16 19:35:24 -07:00
jenkins-bot ee5c90f8b0 Merge changes Icdc2730e,I9e4264a7
* changes:
  mw.ViewPageTarget: Add support for spam blacklist
  mw.ViewPageTarget: Swap captcha and badtoken logic in onSaveError
2013-07-16 22:52:06 +00:00
jenkins-bot 3675ca4cc8 Merge "Create MWResizeableNode mixin to control defaultSize flag" 2013-07-16 22:51:24 +00:00
Ed Sanders 56ef8cb5b5 Create MWResizeableNode mixin to control defaultSize flag
Previously wasn't being updated to 'false' after a width/height
attribute change.

Bug: 50645
Change-Id: Id5dcd6998e0125757238426f8052505d131d712d
2013-07-16 23:13:40 +01:00
Timo Tijhof 16831b16d1 mw.ViewPageTarget: Add support for spam blacklist
Bug: 50826
Change-Id: Icdc2730e5fc644c9030a6648702e071934f5ad62
2013-07-16 23:39:27 +02:00
Timo Tijhof b40cd4daf1 Remove 'visualeditor-feedback-link' from RL module
It is already loaded by VisualEditorMessagesModule in
content-language. It was added here in error and caused it to
be replaced with the user language version at run time.

Bug: 47730
Change-Id: I82304bea0a5eadbe254beccd1899621d0bd0be46
2013-07-16 23:28:28 +02:00
Trevor Parscal 09f920fcac Remove field set label on reference edit dialog
Objective:

* Allow fieldsets to not have labels
* Remove label from reference edit dialog field set

Changes:

ve.ui.Layout.css
* Only apply negative top margin if fieldset label is being used

ve.ui.FieldsetLayout.js
* Only add label element to DOM if icon or label are used

ve.ui.MWReferenceEditDialog.js
* Remove label from reference edit dialog's first fieldset

*.php
* Remove unused message

Change-Id: I4a36e819ec6ef73aad80d3fb2f06000cb35ec109
2013-07-15 23:44:07 +00:00
Timo Tijhof 45c79f8c23 mw.ViewPageTarget: Refetch token if session expired
* Rephrased visualeditor-savedialog-error-badtoken to emphasise
  that it is the old session that become invalid, not the one
  the user started browsing with since in a different window.
* If the session changed, the user will be asked whether they
  agree to save with this new session instead.
* We explictly update mw.config so that future save attempts
  in the same window compare against the correct environment.
  Without this there are two problems when saving and then
  making a second edit in the same window and saving that:
  - It will bring up the same question again (user A -> user B),
    which is annoying.
  - If the user logged back in again (new session, but for
    user A again) it would silently try with that new token
    without asking, thus saving as user A when the user still
    thinks it switched to user B. It switching back automatically
    is not obvious since we asked them from A->B, so we should
    also ask the other way around.
  This can be reproduced by opending ve-edit logged-in, then
  logging out in a new window, save, confirm anon, save,
  open edit again, log back in in a new window, save open edit
  in the old window, confirm new logged-in, save.

Bug: 50424
Change-Id: Id055eca1886f85aeaf615f645de29898afc0373c
2013-07-15 21:40:18 +02:00
Ed Sanders abf3671723 Warn users when they are typing wikitext
Without making the code much more complex (and possibly create
performance issues) the warning will fire on pages which already
contain escaped wikitext (when that text is edited). I think this
should be a small enough minority that it won't be an major annoyance.

Bug: 49820
Change-Id: I0f67ec04b890f4add9247be6126bdc086b6ae72f
2013-07-14 19:27:32 -07:00
Trevor Parscal a4491c12f8 Make link inspector re-usable by splitting it up
Objective:

* Make the majority of link inspector, which is generic to any annotation,
  usable for other annotation inspectors

This was merged earlier (f7107fa20d) but broke master, so it was
reverted (092fa74dee). This commit also incorporates 5dcf5d1c49.

Change-Id: Ib9190dee66ce064d69962f9c4c5b3a710be8ad07
2013-07-12 17:58:04 +00:00
Timo Tijhof c292e326e8 mw.ViewPageTarget: Improve error message for badtoken error
Previously all it did was surface api response error.info,
which surfaced underneath the edit summary form as mere:
"Error: Invalid token".

Bug: 50424
Change-Id: I60169b42701ae3b88e54626c4ff7050549e6ef55
2013-07-11 16:20:26 -07:00
Timo Tijhof 46f40dc696 api: Split save action into separate API module
This allows us to make the token no longer a requirement
for non-save actions while still using the built-in system
for token verification.

Update documentation for "oldid" since it is not required even
outside (paction=save). In fact, if we require it VE loading
fails because it doesn't pass oldid unless it has to when
restoring a specific version.

Bug: 50424
Change-Id: I7b1b50a43648b1cc40a984340846efdb0ba2ecc9
2013-07-11 15:37:23 -07:00
jenkins-bot 691d9fe462 Merge "Language Inspector: CE / DM" 2013-07-10 19:13:40 +00:00
Moriel Schottlender fdcec169d1 Language Inspector: CE / DM
This is the infrastructure for the Language Inspector prototype, defining
the dm and ce pieces of the <span lang='xx' dir='yy'> annotations. It also
sets up a visual indicator for language blocks (with informational tooltip
for the user while editing. The UI is built on top of this.

Bug: 47759
Change-Id: I239eef5124e29369ea9c5d8c0f49b2f6a61bc053
2013-07-10 12:11:27 -07:00
Roan Kattouw e9ca44c86c Transplant CSS from the main document to each iframe
We previously manually loaded CSS into these frames, which is flawed
because it completely bypasses ResourceLoader (so CSSJanus didn't flip
them, necessitating a bunch of hacks for RTL), and doesn't pull in
MediaWiki styles (so templates inside references don't render correctly).
Instead, this commit copies all styles from the main document into each
frame's document, inlining what it can.

Loading all styles in dialogs and inspectors caused some problems,
initially. We didn't namespace our styles for dialogs vs. inspectors
at all; the only reason inspector styles weren't being applied to dialogs
and vice versa was because we controlled which files were being loaded
in which context. This commit namespaces the inspector and dialog styles
where needed so they don't conflict and try to override each other.

Tested in Vector and Monobook, but not in Apex and not in RTL.

ve.init.mw.ViewPageTarget*.css:
* Namespace styles that are only intended for the main document
* Undo Monobook's font-size: x-small; in frames

*Dialog.js:
* Remove addLocalStylesheet() calls, we don't need those any more
** ve.ui.MWDialog seems to be unneeded now, we may want to remove it

*.css:
* Remove @noflip-ped RTL rules where they were just flipped versions of
  their LTR counterparts

ve.ui.Dialog.css, ve.ui.Inspector.css:
* Namespace styles with .ve-ui-dialog-content / .ve-ui-inspector-content

ve.ui.Frame.css:
* Move the margin:0 and padding:0 here (were in the frame <body>'s style
  attribute) and add background:none to prevent frames from getting
  the skin's background (grey in Vector, a book in Monobook)

ve.ui.Dialog.js, ve.ui.Inspector.js:
* Add ve-ui-dialog-content / ve-ui-inspector-content class to the
  frame's content <div> so we can restrict styles to only apply in
  dialogs / inspectors

ve.ui.Frame.js:
* Replace infrastructure for @import-ing stylesheets with transplantation
* Remove code polling to see when the stylesheets were loaded
** We can't do this in the new approach AFAIK, since all styles in the
   frame are either inlined or inaccessible due to the same-origin policy
** We also shouldn't need it because the browser should have cached the
   styles when it loaded the main document
* Apply ve-ui-frame-body class to the frame's <body> so we can style it
** Move inline padding:0;margin:0; into ve.ui.Frame.css
** Move the ve-ltr/ve-rtl class up to the <body>

ve.ui.Window.js:
* Remove infrastructure registering stylesheet URLs to load

Change-Id: I4a37115301811ad860f4578344a04873ea8c2b69
2013-07-09 16:13:28 -07:00
Catrope 30ebc9a656 Revert "Add support for <blockquote> elements"
Whoops, merged too soon. The dropdown part of it doesn't
actually work right.

This reverts commit 3c51ebad93.

Change-Id: Ieafbf18ca8a43b07e33a787772abbc77aef63e4c
2013-07-09 21:35:47 +00:00
James D. Forrester 3c51ebad93 Add support for <blockquote> elements
Bug: 51009
Change-Id: I7ba1635e4f856a021e1a7a2d26a8714230c9364a
2013-07-09 13:15:06 -07:00
jenkins-bot 67d1629754 Merge changes I4d7533af,Ib909c5fb
* changes:
  Math Node UI
  Math Node Matcher
2013-07-07 07:36:00 +00:00
Trevor Parscal 37240aca59 Math Node UI
Show an inspector with inputwidget when the user clicks a math
node. The data of the math equation is shown in the
edit box, it can re-render the math tag image when
the inspector is closed, and save the change when
saving the page.

TODO:
* Change the icon from link to math
* Translate title by translatewiki in i18n
* Other further UI improvements

Change-Id: I4d7533af25186cc39cc4bc6a4326d222ffd6db19
2013-07-07 07:32:11 +00:00
jiabao 7eb6efa3b7 Math Node Matcher
This patch creates two files handling math node matching,
which are:
ve.dm.MWMathNode.js - a basic version of toDataElement
and toDomElement functions work
ve.ce.MWMathNode.js - math formulas in VisualEditor are
clickable and render as img tags

Change-Id: Ib909c5fb02e385c88050f42d02d207ab6a97d0dd
2013-07-07 07:32:02 +00:00
jenkins-bot 4d6ec16c35 Merge "Add missing ve-mw ve.ce.Node.css" 2013-07-05 18:46:13 +00:00
Timo Tijhof eddd0b384a mw.ViewPageTarget.init: Move edit section to top init
Since we're now only loading the light-weight init on page load,
the section editing wasn't just deferred to after page load (like
it was before), but wasn't happening at all until you clicked
"Edit" (at which point the library loads). It only worked when
going back to "View" after "Edit".

Contrary to tab layout, edit section handling needs to be
accessible both in the top init and in the main target class
because we need to run it both at run time and after the user
has saved a page when we show them the updated page without
refresh. This is why we need to transfer the method at run time
and give the main class access to it as well.
Can't wait for bug 50707 to get rid of this mess...

Bug: 50731
Bug: 49993
Change-Id: Iab9c81222df7f1084179c3643d158374a89ca14b
2013-07-05 18:29:12 +00:00
Timo Tijhof 0396fc5035 mw.ViewPageTarget.init: Add missing "accesskey-ca-editsource" message
Added the wrong one, message "accesskey-ca-ve-editsource"
doesn't even exist. It worked locally but that was probably
a lucky race condition or cache.

Follows-up 10fd1a3, b21fe5f.

Bug: 50725
Change-Id: Ie87f8c6861dfe010c038ddb103aa5ea56cd57d24
2013-07-05 08:02:43 +02:00
Timo Tijhof ddc7648096 Add missing ve-mw ve.ce.Node.css
Follows-up 92c38ea, which duplicated the existing one but forgot
to change the path from 've' to 've-mw'.

Change-Id: Ia95d26501aa9ab52e33394500bb51a733acf4658
2013-07-04 05:10:48 +02:00
jenkins-bot 817d24dd50 Merge "Revert "Make link inspector re-usable by splitting it up"" 2013-07-04 01:42:13 +00:00
Catrope 092fa74dee Revert "Make link inspector re-usable by splitting it up"
Breaks MWLinkInspector initialization behavior

This reverts commit f7107fa20d.

Change-Id: If93d1092eeb14f6ba23e6368834a6f80df765d21
2013-07-03 18:39:31 -07:00
Timo Tijhof 10fd1a3f55 mw.ViewPageTarget.init: Add msg key "accesskey-ca-ve-editsource"
Was accidentally removed in Ic8b0004ab5288fa9.

Change-Id: I003e11f7b9ff44982ccc869fecf7e30300202574
2013-07-04 02:07:46 +02:00
jenkins-bot 7c58fc9394 Merge "Split off setup from the rest of mw.ViewPageTarget" 2013-07-03 23:26:53 +00:00
Timo Tijhof b21fe5fbc1 Split off setup from the rest of mw.ViewPageTarget
Initialisation initialisation? It's time to rename ve.init
to ve.platform and ve.init.Platform to ve.platform.Environment,
but that'll come later.

* Moved support detection and skin set up to separate class-less
  file.
* Swapped usage of ve.msg for mw.msg.
* Callback of edit tab now does an mw.loader call to fetch
  the actual VisualEditor libraries.
  Though mw.loader won't load the same thing twice, we would
  bind a callback each time. To avoid instantiating ViewPageTarget
  more than once we use a Deferred.

Bug: 50542
Bug: 50608
Bug: 50612
Change-Id: Ic8b0004ab5288fa91bb29d496485b93ffd8d977e
2013-07-04 01:18:28 +02:00
Trevor Parscal f7107fa20d Make link inspector re-usable by splitting it up
Objective:

* Make the majority of link inspector, which is generic to any annotation, usable for other annotation inspectors

Change-Id: I1f7e9c13537105da7aa0351c9c92e8af5eb5a3f4
2013-07-03 15:13:47 -07:00
Roan Kattouw 92c38eab85 The great directory split of 2013
Move all MW-specific files into the ve-mw directory, in preparation
for moving them out into a separate repo.

All MW-specific files were moved into a parallel directory structure
in modules/ve-mw . Files with both generic and MW-specific things were
split up. Files in ve/init/mw/ were moved to ve-mw/init/ rather than
ve-mw/init/mw ; they're still named ve.init.mw.* but we should change
that. Some of the test files for core classes had MW-specific test cases,
so those were split up and the test runner was duplicated; we should
refactor our tests to use data providers so we can add cases more easily.

Split files:
* ve.ce.Node.css
* ve.ce.ContentBranchNode.test.js (MWEntityNode)
* ve.ce.Document.test.js (some core test cases genericized)
* ve.dm.InternalList.test.js (uses mwReference test document)
* ve.dm.SurfaceFragment.test.js, ve.ui.FormatAction.test.js
** Made core tests use heading instead of mwHeading
** Updated core tests because normal headings don't break out of lists
** Moved test runners into ve.test.utils.js
* ve.ui.Icons-*.css
* ve.ui.Dialog.css (MW parts into ve.ui.MWDialog.css)
* ve.ui.Tool.css
* ve.ui.Widget.css (move ve-ui-rtl and ve-ui-ltr to ve.ui.css)

ve.dm.Converter.test.js: Moved runner functions into ve.test.utils.js

ve.dm.example.js:
* Refactored createExampleDocument so mwExample can use it
* Removed wgExtensionAssetsPath detection, moved into mw-preload.js
* Genericized withMeta example document (original version copied to mwExample)
* Moved references example document to mwExample

ve.dm.mwExample.js:
* Move withMeta and references example documents from ve.dm.example.js
* Add createExampleDocument function

ve-mw/test/index.php: Runner for MW-specific tests only

ve-mw/test/mw-preload.js: Sets VE_TESTDIR for Special:JavaScriptTest only

ve.ui.Window.js:
* Remove magic path interpolation in addLocalStyleSheets()
* Pass full(er) paths to addLocalStyleSheets(), here and in subclasses

ve.ui.MWDialog.js: Subclass of Dialog that adds MW versions of stylesheets

ve.ui.MW*Dialog.js:
* Subclass MWDialog rather than Dialog
* Load both core and MW versions of stylesheets that have both

ve.ui.PagedDialog.js: Converted to a mixin rather than an abstract base class
* Don't inherit ve.ui.Dialog
* Rather than overriding initialize(), provide initializePages() which the
  host class is supposed to call from its initialize()
* Rename onOutlineSelect to onPageOutlineSelect

ve.ui.MWMetaDialog.js, ve.ui.MWTransclusionDialog.js:
* Use PagedDialog as a mixin rather than a base class, inherit MWDialog

bullet-icon.png: Unused, deleted

Stuff we should do later:
* Refactor tests to use data providers
* Write utility function for SVG compat check
* Separate omnibus CSS files such as ve.ui.Widget.css
* Separate omnibus RL modules
* Use icon classes in ViewPageTarget

Change-Id: I1b28f8ba7f2d2513e5c634927a854686fb9dd5a5
2013-07-02 20:51:38 -07:00
Trevor Parscal 4568274949 Template parameter adding
Objective:

* Allow browsing, searching and adding documented parameters

Changes:

ve.ui.MWTransclusionDialog.js
* Replace regular text input with ve.ui.ParameterSearchWidget
* Fix uses of $(), this.frame.$$ is correct

ve.ui.Dialog.css
* Change rules for addParameterFieldset to make search widget auto-size vertically

ve.ui.Widget.css
* Add styles for ve.ui.MWParameterResultWidget

ve.ui.MWParameterSearchWidget.js, ve.ui.MWParameterResultWidget.js
* New classes
* Provides a way to search and select parameter for a template
* Displays parameter label, name, aliases and description

*.php
* Links to new files and messages

Change-Id: Ie5dbe8c44ce5d64c4b49b09517fb66cd30dd7304
2013-07-02 13:40:54 -07:00
jenkins-bot 518dd6247c Merge "Add GuidedTour survey about user gender" 2013-07-01 22:46:52 +00:00
Matthew Flaschen 3b4b0c3c89 Add GuidedTour survey about user gender
Disabled by default, enabled with $wgVisualEditorEnableGenderSurvey.

Change-Id: I2b4aba6a95a33474c3e68423d478aa78e57d86ad
2013-07-02 00:13:38 +02:00
jenkins-bot 3b6b29c1a5 Merge "mw.ViewPageTarget: Show save errors in save dialog instead of alert" 2013-07-01 18:38:23 +00:00
James D. Forrester 662d35178f Add user guide link to beta icon drop down
As part of this, put the 'help' icon next to the beta icon, make the
text not greyed-out (now that it's an actual action) and provide the
link.

On hover, all three items get underlined, which is irritating, however.

Bug: 50476
Change-Id: Id65968072b7134f5864bbd96acf34fd0c23fe17c
2013-07-01 11:07:08 -07:00
Timo Tijhof 1f1a1970be mw.ViewPageTarget: Show save errors in save dialog instead of alert
To trigger a save rejection from the api, set:
 $wgSpamRegex = '/spam/i';
and making an edit adding the word "spam" to a page.

Class changes:
* Rename message system in the save dialog from "warning" to
  "message" as it will now contain both warnings and errors.
  (css class, class property, method names, ..)

Localisation:
* Remove ugly hardcoded and wikitext-requiring "'''Warning:'''"
  prefix from the warning message, instead have a message for the
  word "Warning" and re-use this in #showMessage for each message
  of type "warning" (bolding applied in code instead of in i18n).
* Rename visualeditor-savedialog-dirtywarning to
  visualeditor-savedialog-warning-dirty and remove from
  VisualEditorMessagesModule.php as it no longer requires pre-
  processing from the server.

Clean up:
* Re-alphabetise the order of some messages.
* Clean up duplication and redundant logic in mw.Target#onSaveError
  and mw.ViewPageTarget#onSaveError.

Bug: 50350
Change-Id: I3daf631fb0d62ba88e05aa50c77c9940d61395a0
2013-07-01 16:41:12 +02:00
jenkins-bot 20cfc02e6b Merge "Add ability to disable for anonymous users" 2013-06-30 03:57:23 +00:00
James D. Forrester 778b8d3f9e Add ability to disable for anonymous users
This adds a new config variable, $wgVisualEditorDisableForAnons,
defaulting to 'false', which disables VisualEditor for not-logged-in
users. This only makes sense where the visualeditor-enable setting is
set to 'on' for all users; it will be used but briefly.

Bug: 50000
Change-Id: I7418c7d96a79b17e717abfba1af8c5df3141e591
2013-06-29 20:55:47 -07:00
Timo Tijhof 4e546796aa mw: Implement support for ConfirmEdit and FancyCaptcha
* 'captcha' property from ConfirmEdit API is already exposed
  in ApiEdit and ApiVisualEditor through the 'edit' property
  in our response data.
* Add parameters 'captchaid' and 'captchaword' to ApiVisualEditor
  and mw.ViewPageTarget#getSaveOptions. ApiVisualEditor will
  forward these to ApiEdit which forwards them to FancyCaptcha.
* We display the captcha through a saveDialog warning.

Bug: 50356
Change-Id: Ia7d2102cba89d00ec8508e846061023b330ece4f
2013-06-29 20:42:23 -07:00
Ed Sanders 9df1a59818 Disable inspection of references with unknown contents
Ed & Roan:
 Disable editing of references of which we are unable to find the
 source (e.g. <ref name="x"> without a target, or when the target is
 currently nested in something we don't yet process such as inside a
 <references> block or a template).

Timo:
 Improve UI to not be a regular focusable node where the inspector just
 won't show up but add a not-allowed cursor and explanatory tooltip.

James:
 Fix messages to refer to VisualEditor instead of "the" VisualEditor.

Change-Id: Ib2bca092ce13c9187fa8b27ad6a6404cae02aea2
2013-06-27 20:34:32 -07:00
Trevor Parscal 0aac4c7e60 Reference insertion, new and existing
Objectives:

* Split reference dialog (at least for now) an edit and an insert dialog
* Add reference search widget for selecting an existing source, or
  choosing to add a new one
* Abstract reference names, don't allow editing them and generate them
  when needed
* When editing groups, move the internal item and update all references
  to it
* Resolve name conflicts when moving a reference to a new group by
  generating a new list key

Bonus:

* Add getNodeGroups method to internal list
* Add getUniqueListKey method to internal list
* Add destroy functionality to ce.node to release events and references

Bug: 49733
Change-Id: Ib244ff6ad9b4cee1decfd9b9e1d3d4e9cdcfb78c
2013-06-27 18:11:31 -07:00
Trevor Parscal ed7d42592f Move some of MediaSelectWidget into SearchWidget
Objectives:

* Break apart MediaSelectWidget for re-use
* Rename classes to follow search/result naming scheme

Change-Id: I65aab3dc3d41e31af13e2754e77b7dd185ac90f1
2013-06-27 23:51:09 +00:00
jenkins-bot 73e460c5bb Merge "ve.ui.ViewRegistry annihilation" 2013-06-27 01:51:53 +00:00
Trevor Parscal 6b5310c562 ve.ui.ViewRegistry annihilation
Objectives:
* Associate models with tools, rather than dialogs and inspectors
* Move tool/model association utilities to ve.ui.ToolFactory
* Obliterate the view registry

Notes:

The only special case for leaving modelClasses definitions in place is
for the linkInspector. It uses these for selection expansion.
Because tools can now override the static canEditModel method, we can
dynamically evaluate a model, rather than be restricted to only
comparing classes. This will be useful for disabling editors for models
that are for some reason incomplete or otherwise broken and cannot be
safely edited.

Change-Id: I7adf254990112d90f1f808593a9111afc7a116b5
2013-06-26 16:52:10 -07:00
jenkins-bot d323477b21 Merge "Show "edit source" section edit links in addition to VE ones" 2013-06-26 20:43:03 +00:00
James D. Forrester eafe5d844c Discourage (ab)use of H1s, and relabel them
Re-label the headings in the MWFormatDropdownTool with MW-specific
headings per bug 43334, reduce the size of the dropdown's contents a
little to make the headings less vibrant, and move the H1 option to the
end of the list to further discourage its use.

Note that there are some issues with the underlying structure here and our
ability to split the repos into VE-core and VE-MW will need this to be
refactored.

Bug: 43334
Change-Id: I5a58b4dcebd6ceae0ffcd24f663429f25bdc3db9
2013-06-26 19:19:51 +00:00
Trevor Parscal c1ea21739f Show "edit source" section edit links in addition to VE ones
Objective:

* Provide quick access to section edit links for both source and visual
  editing

Story:

After using this prototype of my mockup, I realized how bad my mockup
was. Hooray for prototyping!

The issues were twofold:

1. Adding down-arrows to the edit links made the page look worse, and
was sure to incite rage and panic throughout the community.
2. The menu was just too heavy. Matmarex made an observation early on
after seeing it, that it wasn't very "Vector", and while I agreed, at
the time I didn't have any better ideas.

Thank you to Matma Rex for prototyping this feature. Aparently there was
also a previous attempt (I13bbb9549). We appreciate your help.

The new design is simple.

* Section edit links look normal
* On hover or focus, the edit source link also appears next to it

To make the two links look separate, we needed a divider. To make the
divider look good we needed to add space around it. To balance the
space, we needed to add space to the brackets. To avoid changing the
view, we needed to only add space to the brackets on hover. To avoid
the text moving around, we needed to make the brackets move away from
the text, rather than the text move away from the brackets. To make
this change smooth, we needed to use transitions. To make the links not
force the heading to wrap in one state but not the other, we needed to
reserve the space, using visibility rather than display. To reserve the
space we had to use closing brackets as spacers, hiding/showing one of
them on mouse enter/leave and leaving the other always hidden. To avoid
the right bracket from getting clipped by the edge of the screen when in
expanded mode, we needed to add a bit of padding to the right side of the
section edit link top level span. To prevent the extra links from
flashing as you move your mouse down the page, we needed to wait 100ms
before showing or hiding them due to mouse enter/leave.

We use negative margins to move the brackets. Animation implemented
using CSS transitions. We bring the pipe divider in from the core
'pipe-separator' message.

To style the brackets independently we needed to wrap them in spans and
add classes to them. Change Id27555c6 in core will make the wrapping
unnecessary, but the two should still get along just fine.

Interestingly, we needed to @noflip the bracket styles because CSS
Janus flipping is triggered on UI language, but the brackets need to be
styled according to the content language.

Changes:

ve.init.mw.ViewPageTarget.css
* Add styles for extra section edit link components

ve.init.mw.ViewPageTarget.js
* Add edit source link, and make it visible when the mouse is over the
heading or either section edit link is focused

*.php
* Links to new messages

Bug: 48429
Change-Id: I4b9c47fd65a700a81c880144247fec524edff7e5
2013-06-26 12:13:44 -07:00
Timo Tijhof a16b55fc3b Remove unused mw.notify msg keys from ext.visualEditor.core module
These 3 mw-notify message keys:
* visualeditor-notification-saved
* visualeditor-notification-created
* visualeditor-notification-restored

Are only used by ve.init.mw.ViewPageTarget.js, which is part
of ext.visualEditor.viewPageTarget, not ext.visualEditor.core.

Change-Id: Ib094c0a2934856b90349a9f8890a20feebf0837c
2013-06-23 02:37:32 -07:00
Roan Kattouw 121a7569d8 Move references out of experimental
Bug: 39599
Change-Id: I1551ddaa3d52c4827c7dcac2a02e31859769890a
2013-06-22 20:29:55 -07:00
Timo Tijhof 8a2c9431e6 Create ref list insertion tool
Fixes (follows-up I1b48ef5240, I6daff5c596):
* Invalid html passed to jQuery constructor.
* Use prop() instead of attr() for boolean values.
* Use append() instead of html() when appending nodes instead
  of parsing html.
* Rename shadowed variable name clash 'mw' to 'mwData'.
* Fix odd construction where we parse '{}' to create an empty
  object.
* Have ve.ce.MWReferenceListNode#update perform changes off-document
  in a detached tree.
* Fix deep property access that can fail. mwData is set to
  either JSON parse of data-mw attr or empty object.
  Accessing mwData.attrs.group needs to be guarded by whether
  mw.attrs is indeed set.
* Have `mw` and `about` attribtue in references list roundtrip
  (especially mw which can data we aren't editing/re-creating).
* Add missing 'refGroup' property to MWReferenceListNode's
  data element (similar to what MWReferenceNode already has).

Change-Id: I67e4f378ccd04e97361d8e58ae57db5353075756
2013-06-22 20:23:22 -07:00
jenkins-bot 3cff0f37be Merge "Media content message should be in general, not experimental, code" 2013-06-19 16:06:38 +00:00
James D. Forrester 437c7cd093 Media content message should be in general, not experimental, code
Change-Id: I41f61eb9dd9dccee8bb0be3e12736b5f713dca45
2013-06-19 08:56:00 -07:00
jenkins-bot 7289df9674 Merge "Make media insertion queries less horrible" 2013-06-19 01:19:43 +00:00
Trevor Parscal bf268e82a5 Make media insertion queries less horrible
Objectives:

* Clear this.titles when resetting, otherwise results are shown once and
  then blacklisted forever.
* Attach done() before always(), so done() gets called first and not
  after always() has dereferenced the request object.
* Remove use of imaginary variables like this.loading, which were never
  set, and were referencing even more imaginary methods on other imaginary
  objects like this.request.abort()...

Change-Id: Ifbe74346f68b6a91f425b56a2696fd1e46b61e02
2013-06-18 18:17:05 -07:00
Inez Korczyński a886952563 Support for editing captions of block images
Bug: 38129
Change-Id: I02207e78f5c28eaccd9bc97a48baa78280192255
2013-06-18 17:57:10 -07:00
James D. Forrester ce587e2453 Move transclusion editing from experimental to core
Change-Id: Ibd0915e367d105170e6b88e3b46c2d54659ce962
2013-06-18 17:31:30 -07:00
Trevor Parscal 23b2da91fd Template and content adding
Objectives:

* Allow adding content or templates within a transclusion
* Add template placeholder to model and view which resolves to nothing
  when saving (thus disappearing if not resolved)

Changes:

*.php
* Add links to new messages and files

ve.ui.OutlineControlsWidget.js
* Organize controls into "adders" and "movers"

ve.ui.Widget.css
* Add styles for adders/movers sections of outline controls
* Make adders appear on hover to reduce clutter

ve.ui.Icons-*.css
* Add icon for "add item"

ve.ui.Dialog.css
* Add styles for add template fieldsets
* Make placeholder items in the outline italic

ve.ui.PagedDialog.js
* Pass adders config to outline controls

ve.ui.MWTransclusionDialog.js
* Add support for adding content and templates

ve.dm.MWTransclusionModel.js
* Add addPlaceholder method

ve.dm.MWTemplatePlaceholderModel.js
* New class, pretty much an empty part
* Using this makes the UI much easier to work with - no need to special
  case the outline control for new items
* Because it's not supported specifically in
  ve.dm.MWTransclusionModel.getPlainObject, it produces nothing and goes
  away naturally on apply

Change-Id: I3478560fb53ba2ccd3fb26bafb6a61e6415565eb
2013-06-18 23:37:44 +00:00
Roan Kattouw f33d9864dc Move notification messages to correct module
They're called from ViewPageTarget, so that's where they should be
registered.

Change-Id: I294aad1b43021bdadae24319b99f93cd960fe908
2013-06-18 12:19:06 -07:00
Ori Livneh ccfb14b99d Split test: instrument edit events for standard editor interface
This change adds 'page-edit-impression', 'page-save-(attempt/success)',
and '(section-)edit-link-click' events to the standard (non-VE) editor
interface, mirroring the events we added to VE. This makes the event data
usable for split-test analysis.

Change-Id: I51c441d61daa18d58ca7f62a9e5f07902a099050
2013-06-17 14:14:57 -07:00
jenkins-bot 7445b4931f Merge "Add ability to run a 50% split user test with VisualEditor as default" 2013-06-17 18:12:12 +00:00
David Chan a1eb56c14f splitClusters uses Grapheme Cluster Boundary rules
unicodejs.graphemebreak.js
* New file: singleton class with splitClusters method
* On load, builds graphemeBreakRegexp from unicodejs.graphemebreakproperties.js

unicodejs.js
* Remove old splitClusters method (was just a placeholder)
* Change "conjunction" -> "disjunction", for consistency and correctness

unicodejs.textstring.js
* Use new splitClusters method

modules/ve/ve.js
* Use new splitClusters method

unicodejs.wordbreak.text.js
* Add new splitClusters test
* Refactor charRangeArrayRegexp test to use splitClusters

PHP files
* add unicodejs.graphemebreak.js, unicodejs.graphemebreakproperties.js

.docs/categories.json
* add unicodeJS.wordbreak class

Change-Id: I8f512e2fc2c46eb4b5f00994a8dac88f3c8f7dd2
2013-06-16 21:46:02 +01:00
James D. Forrester 3818966063 Add ability to run a 50% split user test with VisualEditor as default
Will only run if $wgVisualEditorEnableSplitTest is set to true. To be removed
once VisualEditor is fully deployed.

Bug: 49604
Change-Id: I5c603ece309d61641d32ccc9eff5ea2890d5b816
2013-06-14 19:33:25 -07:00
Trevor Parscal fc8c46dd74 Reference name and group editing
Objective:

* Allow editing reference groups and names in the reference dialog

Bonus:

* Modify attribute transaction builder to support multiple attribute
  changes in a single transaction

Changes:

ve.ui.MWReferenceDialog.js
* Load ref name and group from model
* Save ref name and group, if changed, to model

ve.ui.ListAction.js, ve.ui.Transaction.test.js, ve.ce.ResizableNode.js
* Update use of newFromAttributeChange to newFromAttributeChanges

ve.dm.SurfaceFragment.test.js
* Add test for new changeAttributes method

ve.dm.InternalList.js
* Missing new line at end of file

ve.dm.Transaction.js
* Change newFromAttributeChange to accept an list of attribute changes and
  produce a single transaction that applies one or more attribute changes
  at once

ve.dm.SurfaceFragment.js
* Fix bug in getCoveredNodes where the wrong mode name was being used
* Add changeAttributes method, which applies attributes to all covered
  nodes and allows filtering of which types of nodes the attributes are
  applied to

ve.dm.MWReferenceNode.js
* Actually write key and group back to DOM
* Separate onRoot functionality into addToInternalList so it can be called
  separately (similarly onUnroot/removeFromInternalList)

ve.ce.MWReferenceListNode.js
* Clone internal item CE node before appending to avoid rendering bug.

*.php
* Add links to messages and sort them

Change-Id: Ic4121e4fcfc09265d5863af6f078cdeb77926c8e
2013-06-14 15:29:56 -07:00
jenkins-bot 3e1e544e48 Merge "Add group field to reference dialog" 2013-06-14 22:24:38 +00:00
jenkins-bot 86406d5e48 Merge "Outline controls" 2013-06-14 21:47:36 +00:00
Trevor Parscal ac26f5fc69 Outline controls
Objectives:

* Allow reordering items in outline widgets using an outline control
  widget
* Use an outline control widget to reorder transclusion parts

Changes:

ve.ui.SelectWidget.js
* Emit add and remove events

ve.ui.OutlineItemWidget.js
* Add movable config options
* Add isMovable method

ve.ui.OutlineControlsWidget.js
* New class
* Displays move up/down buttons which are synchronized with an outline
  widget
* Doesn't actually move items (since an outline widget is probably
  data-driven) just emits events

ve.ui.Widget.css
* Add disabled style for icon button widgets
* Add styles for outline controls widget

ve.ui.Icons*.css
* Add missing icon styles

ve.ui.Dialog.css
* Add styles for outline and controls in editable paged dialogs

ve.ui.GroupElement.js
* Fix bug where items are insertions are in the wrong place when "moving"
  them

ve.ui.PagedDialog.js
* Add editable config option which shows outline controls under the
  outline
* Pass through movable config option when creating pages

ve.ui.MWTranclusionDialog.js
* Configure paged dialog outline as editable
* Add initialize method to connect outline controls widget events
* Make addPart method automatically add parameters when templates are
  added
* Add handler for outline controls move event which re-orders parts
* Make parts movable (params are automatically ordered, so they aren't
  movable)

ve.dm.MWTransclusionModel.js
* Add addPart method and use it within the addContent and addTemplate
  methods
* Fix documentation lies
* Add getPartFromId method

*.php
* Add links to new files and messages

Change-Id: I919d4c3e9b85d07a97a99c0b2e8739a859bdf2b1
2013-06-14 11:56:30 -07:00
Trevor Parscal acea97263b Add group field to reference dialog
Change-Id: Icf9ea348cd97bdb09ddf18769f53c01ea5a8b7ef
2013-06-14 10:30:03 -07:00
Roan Kattouw 3674c8937b Send section edit links to VE by default
Add a preference to disable this behavior. Requires rewording by James.

Bug: 49260
Change-Id: I5ce7ea8c1e47e8243b619fc61aa957f767d22b48
2013-06-13 15:04:02 -07:00
jenkins-bot dc4ceb9f56 Merge "Add ability to log analytic events using EventLogging" 2013-06-13 17:20:21 +00:00
Ori Livneh efba2cf8da Add ability to log analytic events using EventLogging
This change adds a '$wgVisualEditorEnableEventLogging' configuration
variable, accessible client-side as
'wgVisualEditorConfig.enableEventLogging'.

When true, the 'schema.Edit' ResourceLoader module will be loaded on the
page, and calls to ViewPageTarget.logEvent will forward to
mw.eventLog#logEvent.

When false, the module is not loaded, and ViewPageTarget.logEvent is a
no-op.

The change also adds a few calls to ViewPageTarget.logEvent to log certain
editor actions, documented in https://meta.wikimedia.org/wiki/Schema:Edit.

Change-Id: Iccd171d7cde15b0302d1b4c292bcbcc2a4b337ef
2013-06-13 10:14:53 -07:00
jenkins-bot 628fd18930 Merge "Category popup fixes" 2013-06-13 15:30:07 +00:00
Trevor Parscal e2b7504b8e Category popup fixes
Objectives:

* Make category popup show "Category" rather than missing message -
this is more similar to other popups like inspectors, which identify
what that thing is that you are working on
* Fix alignment of icon and label in category popup

Changes:

ve.ui.Widget.css
* Make popup title align properly with the remove button

ve.ui.MWCategoryPopupWidget.js
* Update message key

*.php
* Add new message

Change-Id: Ia8051125bbc9bde47ceb931e1ebf42b2955481ff
2013-06-12 16:44:10 -07:00
Trevor Parscal d3a2fab2c4 Transclusion editing
Objectives:

* Rename just about every use of "template" to "transclusion"
* Make a proper data structure for transclusions
* Abstract away template data
* Use more template data in the user interface
* Allow adding parameters
* Allow removing templates, parameters and content

Changes:

ve.ui.Dialog.css
* Add rule to place add param controls on a single line

ve.ui.MWTemplateDialogs.js
* Move template spec loading into transclusion class
* Add remove button for parts and parameters
* Add parameter adding form
* Use template data for labels and descriptions

ve.dm.*
* Add new transclusion data structures

*.php
* Add links to new files

*.*
* Rename all things "template" to "transclusion"

Bug: 39598
Bug: 49403
Change-Id: I3bcf924a3e179cb65f19e833277a39dfd3dad8bd
2013-06-12 16:39:13 -07:00
James D. Forrester 9d40239e06 Media display and insertion no longer an experimental feature
Media item dialog for settings; drag-and-drop placement; caption
editing still to come.

Bug: 37870
Change-Id: I547e06dcdb92e19f0159660314187c4f1a62f3ed
2013-06-12 12:39:35 -07:00
James D. Forrester 4b315cb4af Sort out i18n strings
Sort them alphabetically; trim unused ones; give descriptions for missing ones;
only use the needed messages in the ResourceLoader payload.

Change-Id: I2af295a009121236d46c0705f85d3722dfb72aae
2013-06-12 12:15:01 -07:00
Trevor Parscal 8f9d2a607e Cleanup unused dialogs
Objectives:
* Remove unused dialogs

Changes:

*.js
* Remove unused stuff
*.php
* Cleanup links to files and messages

Change-Id: Ie670afa3aef1757151e385bf922464b85f662a7d
2013-06-12 11:49:44 -07:00
James D. Forrester 198caeb603 Replace alpha notice with beta label hiding the feedback link
Bug: 48428
Change-Id: I725beec4e76dadfb1ccca873758f8f37b7f58a73
2013-06-11 18:17:10 -07:00
Trevor Parscal 0c935f69af Improve langlinks styling in meta dialog
Change-Id: I88d6d374d34dc08ecf46053cfc639c03ec23f8bf
2013-06-11 14:02:28 -07:00
jenkins-bot 03ed1a5a7f Merge "Match non-BMP characters in wordbreak regexes" 2013-06-10 22:19:15 +00:00
David Chan 6dacf615c0 Match non-BMP characters in wordbreak regexes
unicodejs.js:
* charRangeArrayRegexp to write surrogate-aware regexps
* private helper functions

unicodejs.wordbreak.test.js:
* test charRangeArrayRegexp
* corrected tests for non-BMP wordbreaks

unicodejs.wordbreak.js:
* use new surrogate-aware regexps

unicodejs.wordbreakproperties.js:
* generated from Unicode data

unicodejs.graphemebreakproperties.js:
* generated from Unicode data

unicodejs.wordbreak.groups.js:
* delete as no longer used

unicodejs-properties.py:
* generate unicodejs.wordbreakproperties.js from Unicode data
* generate unicodejs.graphemebreakproperties.js from Unicode data

index.php:
* update script tag links

/VisualEditor.php:
* update script tag links

/demos/ve/index.php:
* update script tag links

/maintenance/makeStaticLoader.php:
* update script tag links

Change-Id: I39c0386a85b0cf21d68d3385b84018a5d7648de5
2013-06-10 23:16:23 +01:00
Timo Tijhof a0d764b8ee mw: Remove 'Report problem' feature
Removed the "report" slide from the mw.ViewPageTarget save
dialog and everything that becomes obsolete as a result of it:

* JS saveDialogReviewWrongButton, which pointed to the report
     slide (was already hidden as of I90de95f6337ee).
* JS ve.init.mw.Target#reportProblem.
* JS ve.init.mw.ViewPageTarget#diffHtml.
* JS ve.dm.ElementLinearData#getUsedStoreValues.
* PHP mw.config wgVisualEditorConfig.reportProblemURL.
* PHP $wgVisualEditorParsoidProblemReportURL.
* I18N visualeditor-savedialog-title-report.
* I18N visualeditor-savedialog-label-review-wrong

Change-Id: I8a5e0ab2060d7c14086bba413d4c7d73b29c9b97
2013-06-08 01:11:27 +02:00
Timo Tijhof d5868a0f13 mw.ViewPageTarget: Make 'review' step optional in save flow
Summary:

Instead of having a button "Review and save" that opens with a
diff and leads the user to the "Report a bug" and "Save page"
slides respectively, make it more like the default EditPage.

There is now a "Save page" button that opens with the save
form with a button to "Review changes" (diff) or "Save page".

The "Report a bug" slide has been unlinked from the UI and is
no longer accessible for now.

As a result of the UI no longer requesting a diff upfront this
also means we will no longer detect "nochanges" event (when it
turns out the submittted revision matches the latest version).

This is unfortunate as it was a nice feature to detect it
before the user spends time writing the edit summary) but it
is the same as how the default EditPage works.

Changes:

Improved interface messages.

Adapted "nochanges" caption to the new context (it is no
longer shown when clicking "Save page", it is now shown as a
result of clicking "Show changes").

Now that the "save" slide is accessible from multiple paths
it is needed to keep track of slide changes in a history
array. Previously the slide tree was 1 level deep with
everything descending from "review". Now it starts at "save"
and can go in multiple directions including a loop from
save>review>save. We also need to toggle the "Prev" button
based on history instead of based on whether or not we are
on the "first" slide.

Hid the "saveDialogReviewWrongButton" from the review slide.
We're approaching wider launches and this will not scale to
a wider audience.

Bug: 49258
Change-Id: I90de95f6337eeddd794b75d56543d8d152421a6f
2013-06-08 01:05:05 +02:00
Trevor Parscal 1fd7e85846 Image insertion
Objective:

* Allow inserting images from local wiki and commons

Changes:

ve.init.mw.ViewPageTarget.js
* Add media insert button to toolbar

ve.init.mw.Platform.js
* Add getMediaSources method - defaults to local wiki and commons

ve.ui.MWMediaInsertDialog.js
* New dialog for inserting media
* Uses a media select widget and inserts block images

ve.ui.Dialog.css
* Added styling for media select widget in media insert dialog

ve.ui.Widget.css
* Added styles for media select widget and media select item widget

ve.ui.MWMediaInsertButtonTool.js
* New tool for inserting media

ve.ui.MediaSelectItemWidget.js
* New item widget for media select widgets

ve.ui.MediaSelectWidget.js
* New widget for searching for and selecting media items

ve.ui.TextInputWidget.js
* Added isPending method

VisualEditor.i18n.php
* New messages for media insert dialog

VisualEditor.php
* Added links to new files and messages

PhantomJS--

Change-Id: Ia803ff3ef518782ce76802d2dab7559686a1bb0a
2013-06-06 17:36:55 -07:00
jenkins-bot c73fdd7a4e Merge "Meta dialog messages were left in experimental mode" 2013-06-06 23:45:04 +00:00
jenkins-bot 351af0f5fe Merge "oojs: Integrate with OOJS v1.0.0" 2013-06-06 23:42:47 +00:00
James D. Forrester 5bde1df44c Meta dialog messages were left in experimental mode
The messages 'visualeditor-dialogbutton-meta-tooltip' and 'visualeditor
-dialog-meta-title' were left in the experimental block rather than
production, so didn't appear in live. My fault, sorry.

Change-Id: I4d2f8d9ee0900d1d3ee635f348f2cc1491287f3d
2013-06-06 23:41:23 +00:00
jenkins-bot 002e8d9095 Merge "Pending input refactor" 2013-06-06 21:47:09 +00:00
Trevor Parscal 8a8a337ce5 Pending input refactor
Objective:

* Make all text inputs have the ability to be "pending", not just ones
  with a special mixin

Changes:

* Delete pending input widget
* Move pending input widget implementation to text input widget
* Update all uses of pending input widget
* Make pending image a reusable "texture"
* Update styles of text input widget for pending state
* Get rid of checking for mixin since all text inputs can be pending now

Bonus:

* Get rid of unused images, including .psd and .ai files
* Add transparency texture
* Fix input widget not using documented config value
* Fix documentation in select widget (lies!)

Change-Id: Ib46ab01dc39d706e5c25fd473dee0edce51b7e44
2013-06-06 21:17:35 +00:00
Timo Tijhof 908d1a8c19 oojs: Integrate with OOJS v1.0.0
To make integration and testing easier keeping references and
tests unchanged.

Change-Id: Ie808eaf0ffb754ba9c6be13810cfec2385d8de36
2013-06-06 17:29:55 +02:00
James D. Forrester 760470ab38 Give users a read-only view of language links
This makes the 'category' section of the meta-data panel less lonely, and
prompts us to actually do this at some point quite soon (or encourage others
so to do).

Bug: 48814

Change-Id: I5b8fdfb78a2117839277a683db47fe97107d87b0
2013-06-05 20:22:58 -07:00
Timo Tijhof 52025855ae mw.ViewPageTarget: Make tabLayout configurable server-side
Bug: 46871
Change-Id: I3fcb0c2903ae62d61ff789b5504e0ea23932121b
2013-06-05 15:58:27 -07:00