Commit graph

2519 commits

Author SHA1 Message Date
Roan Kattouw e144e55972 Followup 31bafa1: forgot to rename 'data' to 'args' for citation commands
Bug: 73001
Change-Id: I8cc436cbe16955130d25b2385e3f561fd2ffb4d5
2014-11-05 13:46:54 -08:00
jenkins-bot ca7ef3be1f Merge "Remove the loading spinner at the end, not halfway through loading" 2014-11-05 21:00:53 +00:00
Ed Sanders 0efbfa7e21 Use hasOwnProperty instead of 'key in obj'
Change-Id: I48f044c547b48a97cdfb31f7b887dca0ed7e341b
2014-11-05 20:54:50 +00:00
Roan Kattouw ccd9142262 Remove the loading spinner at the end, not halfway through loading
We were attaching its removal to the wrong promise in 2 of the 3
places where it was being called.

Also this file is horrible and should be refactored. A lot.

Change-Id: If74b1629266f22e2d110305b139bef4a8e69b13b
2014-11-05 12:50:40 -08:00
Translation updater bot 58ba085453 Localisation updates from https://translatewiki.net.
Change-Id: Icaf0b9a1ce7848d97c1466cdbc1cff4d4335e54a
2014-11-05 21:50:17 +01:00
Cmcmahon f8b34e4e89 QA: remove stuff now that iframes are gone
Change-Id: I6d520acd9d1e18d803f7e44f5ea45502658f14d9
2014-11-05 10:01:55 -07:00
jenkins-bot 06387f7f54 Merge "Revert "Clear selection after tearing down surface to work around Firefox bug"" 2014-11-05 01:39:16 +00:00
Catrope c8396eb65f Revert "Clear selection after tearing down surface to work around Firefox bug"
Superseded by I051ef92eeea9 in VE core.

This reverts commit d68eae6c8d.

Change-Id: Ie5e0a6169cfe3634e20a3b88e8aeb980b4094e10
2014-11-04 17:20:30 -08:00
jenkins-bot d6c3a4aa92 Merge "Kill MWCategoryWidget#onLookupEnter" 2014-11-05 01:18:15 +00:00
Roan Kattouw a5e9e1f456 Fix indicator alignment in MWCategoryItemWidget
We were setting the height to 2.25em which just happened
to be right, but it depended on the browser's default
line-height being a certain value. Now that that's changed
with unisolation, the alignment breaks.

Instead of using a magic value, use height: 100%; so it
takes the parent's height. We don't even have to make the
parent position: relative; because it already is.

Also change the width to 2em, which is a much more defensible
value than 2.25em. Previously 2.25em kind of made sense because
that was also the height (resulting in a square box), but
now we don't have that excuse any more.

Bug: 72962
Change-Id: Id617bfaafefd1fc1530fbee29be5d935ec486b92
2014-11-04 16:53:11 -08:00
jenkins-bot 309305b03e Merge "[BrowserTest] WIP adding cases to test other options under Page Settings to options.feature" 2014-11-04 23:04:40 +00:00
ryasmeen@wikimedia.org 4aa8be0e71 [BrowserTest] WIP adding cases to test other options under Page Settings to options.feature
Also:
* Fixed a typo in options_steps.rb
* Disabled Metrics/ClassLength Rubocop cop.

Change-Id: I7128ba8f7ebf9c63aef9399a9cdf24831e1a2d38
2014-11-04 15:01:45 -08:00
Translation updater bot f9517993de Localisation updates from https://translatewiki.net.
Change-Id: If507707479641bfd07e950f03136b46e53f3c62f
2014-11-04 23:33:19 +01:00
James D. Forrester 31bafa183d Update VE core submodule to master (a942301)
New changes:
2cc219a Update OOjs UI to v0.1.0-pre (571f26d0ab)
3543cb7 Protect against offset=-1 in insertContent()
7a3d456 [BREAKING CHANGE] Move selection restrictions from tools to commands
3d847bb Disable desktop context on table selections
41282dd Missed function rename from RangeFix change
dd6c8b8 Support toDomElements returning an empty array
9be6464 Placholder -> placeholder
9bdd0a8 Restore basic styling to toolbar in core target (only)

Local changes:
Move selection restrictions from tools to commands

Change-Id: I88f3d04946bd1d03ed001d747475a8b495a0f64c
2014-11-04 14:11:04 -08:00
Alex Monk b1e47365d0 Kill MWCategoryWidget#onLookupEnter
This code was somehow broken by Ia47bc897 (wtf, how?)
Actually removing it seems to do no harm (wtf?), as far as I've been able to tell...

Bug: 72906
Change-Id: If7eb34a20cc8060b594a567278241b02a8ee327a
2014-11-04 20:35:55 +00:00
Roan Kattouw c23208371a Followup 0165a53: don't store an mw.Title object instead of a string in TemplateModel
0165a53 overlooked the fact that 'name' is also passed to
the MWTemplateModel constructor, and there it really does
always need to be a string, not magically either a string
or an mw.Title object. Oops :(

Bug: 72961
Change-Id: I0b20f0768aae4d9cc9f7af268abd0a704b6adc3a
2014-11-04 10:58:53 -08:00
Roan Kattouw 362d0ebcdf Followup 0165a53: fix typo causing undefined to be passed to mw.Title
Bug: 72948
Change-Id: I1942f153f18c5a182de38a0e067ec5a92abeefd3
2014-11-04 10:53:58 -08:00
Cmcmahon 3b53b23fb1 [BrowserTest] no iframes for switch mode test
Change-Id: I99e4686144ded173f8d91be87f02a4c144284237
2014-11-04 08:06:33 -07:00
Cmcmahon 0f2310a49d [BrowserTest] no more iframes for "no review" message
Change-Id: I9f7429eff32043c26264faa48404e6f573330b7f
2014-11-04 07:46:24 -07:00
jenkins-bot bb96a9083f Merge "Replacing MWTitleInputWidget.getValue() with MWTitleInputWidget.getTitle()" 2014-11-04 01:18:38 +00:00
suchetag 0165a53044 Replacing MWTitleInputWidget.getValue() with MWTitleInputWidget.getTitle()
Now that we have .getTitle() as a method in MWTitleInputWidget, replacing the callers
of MWTitleInputWidget.getValue() with .getTitle(). This fixes a bug in the .getTitle()
method in MWTitleInputWidget which was not taking the namespaces into account before.

Also fixes: the error when entering "Talk:" as a template title. The button to add template
remains disabled when "Talk:" is given as an input to the title here.

Bug: 71998
Change-Id: I1e629a61ec8b035d93a4b7acfecab81934019166
2014-11-03 17:05:51 -08:00
Cmcmahon 666001ba1c [BrowserTest] no more iframes for transclusion
Change-Id: Ifc50a50e98de18612e6ab4b548b1cf6ec05bc825
2014-11-03 16:27:17 -07:00
Cmcmahon aab1680244 [BrowserTest] no more iframes for switch modes test
Change-Id: Ifebc458f9ff9583954226d86759753b0314db649
2014-11-03 15:51:55 -07:00
Cmcmahon 396d74053b [BrowserTest] no more iframes for References
Change-Id: I7f5cf7b991cfcfd3ebebe0f17bb594802fe7dea0
2014-11-03 15:41:38 -07:00
jenkins-bot b70f2176fa Merge "[BrowserTest] no more iframes for options" 2014-11-03 22:20:55 +00:00
Cmcmahon 9b6e21cf0b [BrowserTest] no more iframes for options
Change-Id: Iee2c88f693edb68017154a497aea05d16eb7453c
2014-11-03 15:18:44 -07:00
jenkins-bot aab271f6e7 Merge "MWReferenceGroupInputWidget: Remove dummy call to onInputChange()" 2014-11-03 22:09:44 +00:00
Cmcmahon 6907583418 [BrowserTest] no more iframes
Change-Id: I8090f95ccd1cf2744649084c863e6034db062d87
2014-11-03 14:45:52 -07:00
Cmcmahon fcfb847276 [BrowserTest] no more iframes for Media test
Change-Id: I724e071935f383185fdc44cf1a139931f8ded557
2014-11-03 14:37:59 -07:00
Cmcmahon a51783983f [BrowserTest] no more iframes for Links test
Change-Id: I72c01981b332a32711e929543a61a780de962a2e
2014-11-03 14:18:21 -07:00
Roan Kattouw fe2895b145 MWReferenceGroupInputWidget: Remove dummy call to onInputChange()
This was needed to make the ComboBoxWidget initialize
its selection, but Idcbf38c53 makes that happen automatically.

Depends on Idcbf38c53 in oojs-ui.

Bug: 72783
Change-Id: I8d3a014f862ece7f4f201af205a8a7ca6c365eaa
2014-11-03 21:12:17 +00:00
jenkins-bot 48cfd29886 Merge "[BrowserTest] click More button, no iframes" 2014-11-03 20:59:37 +00:00
Cmcmahon 61f8cf7ca5 [BrowserTest] click More button, no iframes
Change-Id: I1426f4dcfb65d6e38be5f7e495e9600f98894525
2014-11-03 13:57:29 -07:00
James D. Forrester d0e62e1ab3 MWGalleryInspectorTool: Provide the tool in the toolbar
Now that the toolbar hides extra features by default, we don't need to
use autoAddToGroup and autoAddToCatchall over-rides.

Change-Id: I493f7d46a3f77e7c62af05f8e05ae4dde7147e4b
2014-11-03 11:19:04 -08:00
jenkins-bot 35a7931f10 Merge "[BrowserTest] no more iframes for Cite test" 2014-11-03 19:11:48 +00:00
Cmcmahon 3b57451863 [BrowserTest] no more iframes for Cite test
Change-Id: Ic31521dc8124818df1451a57ae396ca2e9c6beef
2014-11-03 11:57:55 -07:00
jenkins-bot b5e235ea85 Merge "Clean up LookupInputWidget subclasses and use new functionality" 2014-11-03 18:41:48 +00:00
Roan Kattouw a0167c08c7 Clean up LookupInputWidget subclasses and use new functionality
MWCategoryInputWidget:
* Use @inheritdoc
* Don't modify data parameter in getLookupCacheItemFromData()

MWLinkTargetInputWidget:
* Remove this.choosing in favor of setLookupsDisabled()
* Explicitly close menu on choose
* Remove manual emission of change events
** This looks ridiculous, it doesn't seem to be necessary,
   and it causes infinite event loops. But I'm very curious
   why this was added in the first place.
* Remove onLookupInputChange override that is now unnecessary
* Use {} rather than [] for fake empty result
* Prevent programmatic focus from opening the menu

MWTitleInputWidget:
* On choose, close menu and disable lookups while changing value
* Use @inheritdoc
* Remove mentions of "template" from getTitle() documentation

Bug fixed:
* When choosing a suggestion in MWTitleInputWidget,
  new suggestions would be loaded and the menu would reopen

Depends on Iecae9b582 in oojs-ui.

Change-Id: I716f99bb464a5cebd4f17701197f768e4e0e02a9
2014-11-03 10:39:03 -08:00
jenkins-bot e69bc55473 Merge "Pass $overlay to redirectTargetInput in MWSettingsPage" 2014-11-03 18:38:05 +00:00
Cmcmahon 282afbbb2f [BrowserTest] Resume Editing no longer in iframe
Also workaround for Bug 72911

Change-Id: Idbff05837dd97ace534ec732c0ba56b6b523bbe0
2014-11-03 11:02:23 -07:00
Cmcmahon df039a6ee9 [BrowserTest] stuff moved out of the iframe to the main page
step-wise update, probably more changes to come

Change-Id: Ia40c03dd59ab0b28af56176b6da4d30a1e66a195
2014-11-03 10:31:26 -07:00
Translation updater bot 3b3af61679 Localisation updates from https://translatewiki.net.
Change-Id: I13815ef4879f33268d517514dae14d4430340709
2014-11-02 22:00:55 +01:00
Translation updater bot 77454fb02a Localisation updates from https://translatewiki.net.
Change-Id: Ia873b55332f36f07e80bd384e2d10c0b51c183b1
2014-11-01 22:40:04 +01:00
Alex Monk 0dde78bd54 Pass $overlay to redirectTargetInput in MWSettingsPage
So the TOC options don't display over the top of suggestions for it

Bug: 72838
Change-Id: I73f0f9e3a44a9f641b6bed2a42cac2c8293cc5c9
2014-11-01 04:49:36 +00:00
jenkins-bot 8f8613f27b Merge "MWTransclusionDialog: Blur active input when switching modes" 2014-10-31 22:55:24 +00:00
jenkins-bot 1509e318a7 Merge "Add forgotten $overlay pass-through in MWReferenceDialog" 2014-10-31 22:54:15 +00:00
Translation updater bot b33ab8da4b Localisation updates from https://translatewiki.net.
Change-Id: Ice9530a321aba7e64d27c138569c2a7f94ec36a0
2014-10-31 21:47:26 +01:00
jenkins-bot 4df619c813 Merge "Update "page was last modified on date, at time" footer line when saving" 2014-10-31 05:24:58 +00:00
Roan Kattouw c324ed8b9a MWTransclusionDialog: Blur active input when switching modes
When show/hide options is clicked, the inputs in the main pane
move as the outline transitions in or out. This causes any dropdowns
below these inputs to become mispositioned: they don't move
because they're in an overlay.

To work around this problem, blur the active input when show/hide
options is clicked, so any dropdown attached to it is closed.
I tried blurring and immediately refocusing the active input to
force the dropdown to reposition itself, but that looks awkward
because of the transition (we'd have to wait for the transition
to complete before repositioning it, and during the transition
it'll stay open in the wrong place).

Bug: 72789
Change-Id: Ibd963690573af905066839f7276077089fa893c6
2014-10-31 04:19:41 +00:00
Alex Monk b2af92870a Update "page was last modified on date, at time" footer line when saving
Bug: 52403
Change-Id: I11e00066000e927f0551691d05fe11fe2ae125b0
2014-10-31 01:00:04 +00:00
Translation updater bot 7957ffa53c Localisation updates from https://translatewiki.net.
Change-Id: I1c44ba77871aa8807735127d04a7565acf0db6e7
2014-10-30 23:32:21 +01:00
Roan Kattouw 884aa1f243 Add forgotten $overlay pass-through in MWReferenceDialog
We were doing this for the exact same widget in
MWReferenceListDialog, but not here.

Bug: 72785
Change-Id: I4a905b944be44ec1aec5cdba7580283ec18c5c7c
2014-10-30 14:50:10 -07:00
Alex Monk b71bb51171 Remove more references to ve.bind
Seems some of them have crept back in since I1a7fc7f2 (and we missed one somehow)

Bug: 72156
Change-Id: I5631fb7d5963d06aeb238c1daa44344b2060ef1a
2014-10-30 20:55:44 +00:00
jenkins-bot c83961842c Merge "Preserve original data inside parameter objects too" 2014-10-30 20:47:32 +00:00
jenkins-bot 9a1ed3ce3d Merge "Toolbar: Make styling and insert menus collapsible" 2014-10-30 19:56:08 +00:00
James D. Forrester 6626450419 Toolbar: Make styling and insert menus collapsible
Also re-synchronise toolbar in MWMediaDialog and MWReferenceDialog.

Change-Id: I8cd5f0d9f7e188fa1a7ab8d34a2796340f5e99b7
2014-10-30 12:22:20 -07:00
Roan Kattouw a054a753be Preserve original data inside parameter objects too
Parsoid has added a "key" property to parameter objects,
so now we have to preserve that rather than regenerating
all parameter objects.

Do this by changing the existing use of this.originalData
to a deep extend.

Change-Id: Ib4d31c2e0f7b567da1a148b51c42e688a2590b8e
Bonus: avoid modifying this.originalData
2014-10-30 11:59:42 -07:00
Roan Kattouw 190ba17b74 Also add tableCaption to mwTable parentNodeTypes hack
Change-Id: Ic7e387bdb774699746e6bafb62daf9c843af77b5
2014-10-30 11:38:26 -07:00
jenkins-bot 3806a2838c Merge "Clear selection after tearing down surface to work around Firefox bug" 2014-10-29 23:21:36 +00:00
jenkins-bot 48e40fe3c2 Merge "MWTransclusionModel: Exclude parts serialising to '' from the plain object" 2014-10-29 23:20:48 +00:00
jenkins-bot 51df4d0f05 Merge "Add i18n for API module help" 2014-10-29 22:42:57 +00:00
Roan Kattouw f35d577acb Followup e0981a3: don't pass undefined to getClassAttrFromAttributes()
Change-Id: I987345cd923d1b128573f5669d4d0dd4e82db1c9
2014-10-29 14:50:50 -07:00
Translation updater bot 7ea182fa79 Localisation updates from https://translatewiki.net.
Change-Id: I21dc334f17f93a3c3d89d8d961fafda2ee288180
2014-10-29 22:08:10 +01:00
Brad Jorsch 7d4ecc09c8 Add i18n for API module help
MediaWiki core change I04b1a384 added support for i18n of API module
help. This takes advantage of that while still maintaining backwards
compatibility with earlier versions of MediaWiki.

Once support for MediaWiki before 1.25 is dropped, the methods marked
deprecated in this patch may be removed.

Change-Id: I67395aff48185f3e09da31b51a08aa2541fe6a17
2014-10-29 13:59:41 -07:00
jenkins-bot dcb14bc9bf Merge "Hide page status indicators even if they aren't :visible" 2014-10-29 20:59:00 +00:00
Bartosz Dziewoński 2a55baaef7 Hide page status indicators even if they aren't :visible
The container is zero-height and zero-width, so jQuery doesn't
consider it :visible, and yet it still takes up visual space.

Bug: 72693
Change-Id: I3bed5394a2a64a9f7f0a331f850aa412b5b11b7d
2014-10-29 21:52:38 +01:00
Ed Sanders e0981a327f Create mwTables with wikitable attribute by default
Change-Id: I094b1823248e16dd3b9a0a10ba13104f14798621
2014-10-29 12:52:24 -07:00
James D. Forrester cc8f6970a5 Update VE core submodule to master (f4ff1d6)
New changes:
d845991 Data model implementation for tables
a27c148 ContentEditable implementation for tables
3c47428 Actions and context menus for manipulating tables
543ca54 Support annotation tool on table selections
149cf3d Supporting copy paste of single table cells
25c9eee Table header/data format tools
e557e46 Merge cells tool
afcf2d9 Allow custom type and attributes when creating a table

Local changes:
Add the files and messages for table editing

Change-Id: I6e6c33b96d3089049a0fd5385191caa83df5756b
2014-10-29 11:52:09 -07:00
Ed Sanders cfee8047e4 Use ClassAttributeNode mixin in MWBlockImageNode
This functionality was factored out into core for this purpose.

Depends on I2db6563 in core.

Change-Id: I4fc42e1468a9f0860c7c13e73967204bdf5ad78d
2014-10-29 18:28:33 +00:00
suchetag c6f7f361c2 Introducing isValid() in MWTitileInputWidget
A method isValid() is added to MWTitleInputWidget which would validate the titles given as inputs

Bug: 71249
Change-Id: I7749165652bd3c0bb08ca42289a425fe8e25483d
2014-10-29 11:13:42 -07:00
suchetag 9191465039 Introducing getTitle() in MWTitleInputWidget
A method for getTitle() is added which can return the valid title,
or, it can return null, in case the value isn't a valid title

Bug: 72468
Change-Id: I8a13afc9a66c167fe25010743c0d9e1424133d96
2014-10-29 18:12:04 +00:00
Amir E. Aharoni b4e98c1490 [BrowserTest] Disable two failing scenarios
To allow other screenshots to be created.

Change-Id: I3e892baa9cb2c8c1303fab232a2b1c64ebdd8f26
2014-10-29 09:44:55 +00:00
Alex Monk a982d2d3fe MWTransclusionModel: Exclude parts serialising to '' from the plain object
So we get rid of empty content nodes

Bug: 63341
Change-Id: I1d49cc709bf92cc53ba064d148a76650c5143935
2014-10-29 01:08:41 +00:00
Roan Kattouw d68eae6c8d Clear selection after tearing down surface to work around Firefox bug
Bug: 71852
Change-Id: I3b4f0f755ece5c9e5444f8abadb1950a3f4ef318
2014-10-28 11:23:06 -07:00
jenkins-bot d73a692f57 Merge "Show warning on reference dialog when editing a reference used in more than one place" 2014-10-28 17:36:07 +00:00
jenkins-bot 538c8769a6 Merge "Move core/MW messages to correct sections" 2014-10-28 17:31:50 +00:00
jenkins-bot 78b2a2885c Merge "Pass $overlay to widgets that need it" 2014-10-28 17:30:57 +00:00
Ed Sanders b89510c18b Move core/MW messages to correct sections
Also bring in visualeditor-version-label message from core.

Change-Id: I91ceba0e0550239a10329b327b5c6b5a01e460a9
2014-10-28 17:30:19 +00:00
jenkins-bot 5eb0baf55d Merge "Sprinke some child selectors around in MWTransclusionDialog.css" 2014-10-28 16:55:27 +00:00
jenkins-bot 1cc342a462 Merge "Put icons back in template parameter search" 2014-10-28 16:48:52 +00:00
Translation updater bot 47115a9e4e Localisation updates from https://translatewiki.net.
Change-Id: I84552cda584f0078f60955c1872178b820beefe7
2014-10-28 15:21:02 +01:00
Alex Monk 3846e20463 Show warning on reference dialog when editing a reference used in more than one place
Bug: 52792
Change-Id: I2b183c3867ddb601041f9989964aa6f78b5f37e4
2014-10-28 12:58:50 +00:00
jenkins-bot ef90da1484 Merge "Override overflow: hidden; for <h3>s in the command help dialog" 2014-10-28 09:58:03 +00:00
Roan Kattouw 97dcee132d Put icons back in template parameter search
These disappeared when DecoratedOptionWidget was split
out of OptionWidget in I508c1555 in oojs-ui back in July,
and apparently no one noticed.

Make MWParameterResultWidget and MWMoreParameterResultWidget
inherit DecoratedOptionWidget instead of OptionWidget so
the icon config parameter is recognized again.

Change-Id: I08d8a0466c211a29eb62043131725073dece4eb5
2014-10-28 01:32:22 +00:00
Roan Kattouw 5876014c8f Override overflow: hidden; for <h3>s in the command help dialog
When this dialog is not isolated, MediaWiki's overflow: hidden;
rules for headings cut off part of the text in the <h3>s.

Compensates for Id425c56d9d24 in VE core.

Change-Id: Id9f6bd2bdbed0c6fe57e897c2415c3eceff900a6
2014-10-27 17:51:46 -07:00
Roan Kattouw 33c5b38b64 Remove oo-ui-{ltr,rtl} special-casing for parameter icons
It works both with and without in isolated dialogs,
but styling things this way breaks in non-isolated dialogs.

Change-Id: Ia498b48d8c199f50df326ddeb61d958cbe2c520d
2014-10-27 17:49:42 -07:00
Roan Kattouw d0f273d6db Sprinke some child selectors around in MWTransclusionDialog.css
Indiscriminately styling all .oo-ui-widget elements with a
descendant selector is very evil, use a child selector instead.
The use of a descendant selector broke inline dropdowns.

Change-Id: I25c5007ef1ffab9e59c46c3b11270b8f77610327
2014-10-27 17:38:20 -07:00
Roan Kattouw 61e8115e8b Pass $overlay to widgets that need it
Also change this.$overlay (which doesn't even exist) to
config.$overlay in MWTemplatePlaceholderPage and document it.

Compensates for I39df86373ea in oojs-ui.

Change-Id: I4a233c058439d6cfb38d80ece890c8fe57d58f49
2014-10-27 17:36:19 -07:00
jenkins-bot 0dad360036 Merge "Disable parameter add icon when there's no transclusion parts" 2014-10-27 20:39:46 +00:00
Alex Monk d128378f5a Disable parameter add icon when there's no transclusion parts
Would put this code in onBookletLayoutSet, but that doesn't appear to be
getting called in this case.

Have to detect whether or not we should be changing the disabled status, rather
than just setting it straight away, which would break every other case where
onBookletLayoutSet is called.

Bug: 63158
Change-Id: I6f62479291424d9b2ee0e42481dec9d085169c63
2014-10-27 20:33:35 +00:00
Translation updater bot dfd00e83c6 Localisation updates from https://translatewiki.net.
Change-Id: I5d874f7c0cfa4bdfcca99b7336efe9de03cfb356
2014-10-27 20:21:32 +01:00
jenkins-bot 4e8cf83265 Merge "Apply pre-save transform to template previews" 2014-10-27 18:38:40 +00:00
jenkins-bot 20b20bc97c Merge "Move autoValue logic from ui.MWParameterPage to dm.MWParameterModel" 2014-10-27 18:15:08 +00:00
jenkins-bot 1f4e77bc05 Merge "Allow removing all parts from a transclusion to remove the transclusion" 2014-10-27 18:13:08 +00:00
Ed Sanders ab365ccacc Fix selection check in wikitext warning
Change-Id: I2f084eb4ee29bd166b05163cd2d6e64e0a4f136d
2014-10-27 16:21:24 +00:00
Alex Monk 8120dac27b Move autoValue logic from ui.MWParameterPage to dm.MWParameterModel
Also add missing MWParameterModel#getDefaultValue

Bug: 72404
Change-Id: I4bb117d419f3845f44e321f848e95bb246a24e24
2014-10-27 03:31:36 +00:00
jenkins-bot 358268be7a Merge "Make sure initialHash exists before checking its value" 2014-10-27 03:25:10 +00:00
Translation updater bot f4a5139012 Localisation updates from https://translatewiki.net.
Change-Id: Icb816a369cf513f88bc05a6792f6ed7aa484fbad
2014-10-25 22:48:51 +02:00
Alex Monk c4dfd834dd Allow removing all parts from a transclusion to remove the transclusion
Rather than make a new function to determine whether it should be apply-able or
not (and run some checks again), move the enable/disable call into a new
function to do these checks and set the result.

Bug: 72191
Change-Id: I133afa1784e1afd44054f93ed84018894f7c6400
2014-10-25 00:13:29 +01:00
Moriel Schottlender b8f96bb512 Make sure initialHash exists before checking its value
(Followup on If17b50cc4a39993)
Make sure initialHash is set before checking and changing its value
in the MWImageModel method. If a user chooses a brand new image to
insert into the document (an insertion rather than update) then the
initial hash is empty, and changing its values will fail with an
error message.

Bug: 72492
Change-Id: I3f9ea74891cc0ab77a07fa5d4e9cbc591f5b93e6
2014-10-24 16:18:06 -04:00
jenkins-bot 5d6ee06b84 Merge "Fix wikitext warning: Get range from selection before trying to find start" 2014-10-24 17:27:44 +00:00
Alex Monk 4639a1c044 Fix wikitext warning: Get range from selection before trying to find start
Bug: 72475
Change-Id: Ib43d9c6b9b46be461354b3b5bbdf9d5de90887a6
2014-10-24 17:18:08 +01:00
Marielle Volz 2ac7959849 Methods for new "maps" property in TD Root
Methods for new "maps" property in
Template Data JSON root added to
the Template Specification Model

* Added maps property to MWTemplateSpecModel
* Maps filled in extend function
* Added getter function for maps

Depends on I3bf5e002

Change-Id: Ic555093625358d8fc4cb1ca8c68793b5912e8ced
2014-10-24 14:23:46 +01:00
suchetag 0b983d9f82 Add template button remains disabled when entering space as a template
Bug: 71998
Change-Id: I69edcf7ece1ccd02df8fbae20a8149e8a1981a44
2014-10-24 06:54:00 +05:30
Translation updater bot 263f28b09d Localisation updates from https://translatewiki.net.
Change-Id: I812e93679a651cabb7cb96ee14757e2ba601be27
2014-10-23 23:27:41 +02:00
jenkins-bot 7c8931f655 Merge "Update initialHash after getting defaultDimensions in image model" 2014-10-23 20:00:20 +00:00
Roan Kattouw 36060a2782 Apply pre-save transform to template previews
Because autoValues often involve {{subst:}}

Bug: 71157
Change-Id: I2787f2595f8c4b8838a3e9ac9ba898af0b43b58e
2014-10-22 15:47:51 -07:00
Roan Kattouw 2d3bf973d2 Actually set parameter autoValues as values
The autoValue was displayed in the UI but was never
actually written into the template model, unless you
changed the text input and then undid your change.

Bug: 71157
Change-Id: I08e2ba88c24fdee030104c6fb9baafb558ce8a80
2014-10-22 15:46:20 -07:00
jenkins-bot 5a3c2a9f4c Merge "MWLinkNodeInspector: Provide an open button here too" 2014-10-22 03:04:15 +00:00
jenkins-bot eaa3b222f7 Merge "Open the linkNode inspector when pressing Ctrl+K on a link node" 2014-10-22 03:03:32 +00:00
James D. Forrester 7149cc5279 MWLinkNodeInspector: Provide an open button here too
Also add validation now that we need it for the open button.

Bug: 71904
Change-Id: I50515671bb3ff08da8dc6c247c9959c27957c867
2014-10-21 20:00:27 -07:00
Roan Kattouw 4bc24e795d Open the linkNode inspector when pressing Ctrl+K on a link node
* Introduced MWLinkAction which opens the right link inspector
  based on what is selected.
* Added MWLinkInspectorTool overriding core's 'link' tool that
  executes MWLinkAction
* Removed MWLinkNodeInspectorTool and linkNode command,
  they're unneeded now

Bug: 72150
Change-Id: I03bd6ab1f67f31a6e6cb717cf4298e80e64637b7
2014-10-21 19:47:42 -07:00
jenkins-bot 9d25c2823d Merge "Drop nonexistent &redirect= parameter from API requests" 2014-10-22 01:38:32 +00:00
jenkins-bot d0c794b08d Merge "Disable the reuse citation tool when selection is null" 2014-10-22 01:36:32 +00:00
Roan Kattouw 942440c7df Drop nonexistent &redirect= parameter from API requests
The correct parameter is &redirects=. Which we really don't want
to use anyway, because if Foo->Bar, using &redirects=1 would
cause a search for "Fo" to return "Bar" as a search suggestion
with no explanation why (and "Foo" wouldn't be visible).

This isn't unsurmountable, we could put in handling similar to
how the category widget handles redirects, but what this code
is trying to do by passing this parameter is definitely wrong.

Change-Id: Idd12c03aaef897d7c1dc70b2a7692e7d71980efe
2014-10-21 18:34:27 -07:00
Roan Kattouw ecc4c6e188 Disable the reuse citation tool when selection is null
This was broken when requiresRange was renamed to requiresSelection
and MWUseExistingReferenceDialogTool wasn't updated.

Change-Id: Ia1018520fc253e2f09755d5e85a94a325df80005
2014-10-21 18:33:19 -07:00
jenkins-bot c724bf3e0e Merge "[BrowserTest] Add "Then…" steps to Cite Basic test" 2014-10-22 01:01:59 +00:00
Cmcmahon 0a3ac40288 [BrowserTest] Add "Then…" steps to Cite Basic test
Change-Id: I43b28e8c95d3da0c3b94a8ea12ff3c376eedb1b5
2014-10-22 01:00:08 +00:00
jenkins-bot 827d1fe45b Merge "CategoryPopupWidget: Track popup hiding again so sortkey changes are applied" 2014-10-22 00:13:19 +00:00
Moriel Schottlender 14e1de1009 Update initialHash after getting defaultDimensions in image model
On initialization, the image model has an initial scalable that has
the given currentDimensions from Parsoid; these are usually correct.
However, in cases where the wiki settings do not fit the user settings
and the images appear smaller or bigger in practice than the values
of the wiki-defaults, the initial hash will store the wrong values.

We will only know what the real values for the comparison will be
after we get them from the API and the calculation; only at that
point we can update the image model initial hash.

This is important so that later the dialog can properly understand
whether to enable the "apply" button if a user changed an image
to custom size and then back to default.

Change-Id: If17b50cc4a39993f98a20a3fec3ddf5d8cb400b3
2014-10-22 00:11:43 +00:00
Alex Monk d7a5f4c1ac CategoryPopupWidget: Track popup hiding again so sortkey changes are applied
OOjs UI killed the 'hide' event that was running this code in the dialog refactor
back in July (Id121fc3a), but left it documented (along with 'show').

Just use the 'toggle' event instead.

Bug: 72168
Change-Id: I172fac81c4cbb89505522011aed57db57ccbc52f
2014-10-21 17:10:42 -07:00
jenkins-bot e1b20bee65 Merge "Make spinner appear immediately when clicking edit" 2014-10-21 21:53:54 +00:00
suchetag 5c0c117537 Make spinner appear immediately when clicking edit
Moved the spinner code from ViewPageTarget to ViewPageTarget.init to make it appear immediately on clicking edit.
Bonus: also fixes the URL to add the parameter vesection when clicking a section edit link.

Bug: 65453
Change-Id: Ica33de675203cc0f0594b8362731c4e98a644313
2014-10-22 03:20:40 +05:30
Translation updater bot 7501dd9d58 Localisation updates from https://translatewiki.net.
Change-Id: I40092ea7751ae443901e706eaabfa66bdb287dc9
2014-10-21 23:03:05 +02:00
jenkins-bot dee3bc2357 Merge "ve.ui.MWFormatTool: Update heading size CSS for new OOUI version" 2014-10-21 20:30:00 +00:00
Cmcmahon bc76c6ea3e [BrowserTest] create simple test for Basic Citation
We can make this more sophisticated later, but right now it
accurately checks that upon clicking Basic citation, the user
sees a true VisualEditor UI

Change-Id: Icea910e2bc1bbd4277a7e8eee08f2b0e49661062
2014-10-21 12:10:19 -07:00
Željko Filipin 32736ae679 [BrowserTest] Prepare repository for running RuboCop after every push to Gerrit
For now ignoring all problems.

Bug: 69245
Change-Id: I4f5db441725062c1ea1ad8ba0955f18f49973583
2014-10-21 17:35:04 +02:00
Translation updater bot 6cd473b761 Merge "Localisation updates from https://translatewiki.net." 2014-10-20 20:28:49 +00:00
Translation updater bot 1db77fffe0 Localisation updates from https://translatewiki.net.
Change-Id: Ia8d13da4a5ed0a8ed0f97b38f06b41b8a2456a81
2014-10-20 22:27:57 +02:00
James D. Forrester e20b47f84b Update VE core submodule to master (db78bdd)
New changes:
69ecc8e Remove MW-specific mobile hack from core
e556440 doc: Use wildcards for Desktop/Mobile …Context and …Surface for simplicity of extension

Local change:
Bring in MobileContext hack to filter out all tools except links and citations from core where
it didn't belong.

Change-Id: Ica837abd45f0ff02b49a44da617bc1fd8e9872d4
2014-10-20 12:43:39 -07:00
James D. Forrester 4fd4367d6a Update VE core submodule to master (f8a563a)
New changes:
e251898 [BREAKING CHANGE] Allow tools to specify which selection types they support

Local changes:
New requiresSelection api for tools

Change-Id: Idc3f62d60bfb5710f786734c342f71b1c73fd4c0
2014-10-20 12:15:29 -07:00
Translation updater bot 442d498d49 Localisation updates from https://translatewiki.net.
Change-Id: Ibb4d696776239590fd6539ff5e4361d4fcd6b096
2014-10-19 22:11:09 +02:00
Bartosz Dziewoński 2c325fa4f2 ve.ui.MWFormatTool: Update heading size CSS for new OOUI version
* Use .oo-ui-tool-title-text selector rather than .oo-ui-tool-title
  to avoid styling accelerator keys.
* Divide all sizes by 0.8, as we no longer need to match the font-size
  rule on .oo-ui-tool-title.
* Add CSS for heading1 (which differs between Vector and core VE)
  and heading2 (because it looks silly if it's missing).

Change-Id: I12226f0a674037f904149cc10893f5c154767bfc
2014-10-19 21:13:21 +02:00
jenkins-bot 6a12cac9a2 Merge "Use relative positioning for category popups, move out of overlay" 2014-10-17 22:57:35 +00:00
jenkins-bot 8fceff493a Merge "Only validate required template params after blur" 2014-10-17 21:28:20 +00:00
jenkins-bot a0754e25eb Merge "[BrowserTest] Fix class name for ve-ui-contextMenuWidget" 2014-10-17 19:38:18 +00:00
Translation updater bot 22095c45e3 Localisation updates from https://translatewiki.net.
Change-Id: Idda9bd559f794a0e9c5d5e3e11a07b22224d9262
2014-10-17 21:18:43 +02:00
Ed Sanders ecdfeb3892 [BrowserTest] Fix class name for ve-ui-contextMenuWidget
Change-Id: Ia189ee285b5614ada69844b06545847caf21fd77
2014-10-17 19:12:42 +00:00
Alex Monk 55164d4027 Don't try to check page existence of external links in transclusion nodes
Only internal links

See bug 71900 comment 1

Change-Id: I35c9bea4c3735bdcdf8e4eda4f2a24567596e639
2014-10-17 19:49:32 +01:00
Alex Monk d087052ada Only validate required template params after blur
Bug: 72096
Change-Id: Ib699f8d89af02c9109a5711bd2c3ab4ef664d8ea
2014-10-17 17:59:13 +01:00
Translation updater bot af84e6c35b Localisation updates from https://translatewiki.net.
Change-Id: I481f44162954c26600a98c5fce0ff1c35fb5362d
2014-10-16 23:06:50 +02:00
jenkins-bot 38718a9f3e Merge "[BrowserTest] update for autopopulated fields" 2014-10-16 17:48:07 +00:00
jenkins-bot 1a68f45682 Merge "Replacing push.apply in VE-MW with ve.batchPush from VE core" 2014-10-16 17:44:51 +00:00
suchetag e3d185dd90 Replacing push.apply in VE-MW with ve.batchPush from VE core
Bug: 66206
Change-Id: Ifabfd0f28b8133e40ce822ed768442ab6a4d39ad
2014-10-16 23:12:22 +05:30
Cmcmahon ceab7f8f76 [BrowserTest] update for autopopulated fields
Website citation now auto-populates

accessdate = {{CURRENTMONTHNAME}} {{CURRENTYEAR}}

along with whatever the user puts in that field

Change-Id: Id72558f972be1ecc490fb196c941961871c21cf2
2014-10-16 10:09:04 -07:00
Roan Kattouw 7157488e20 Use relative positioning for category popups, move out of overlay
Instead of putting these popups in an overlay, put them
in the category widget. This makes scrolling work more
nicely, and makes things easier to deal with in general.

This requires that the popup position itself using
getRelativePosition(), because it's no longer in an
overlay. This also means these popups should now position
themselves correctly no matter where they are.

Change-Id: I09a1e5891a897d634c41d386a2307fe3df2a9157
2014-10-15 22:58:05 -07:00
Trevor Parscal 77eae16b88 Apply mw-body-content styles to SurfaceWidget
Changes:
* Override ve.ui.SurfaceWidget for use in MW
* Add mw-body-content class to surface view container
* Assert 1em sizing for surface view container to prevent
  mw-body-content from applying its own sizing
* Add new scripts and styles to RL config

Bug: 71652
Change-Id: Iac86facdc0c7a0e48c0f3617e2f6c2e7f001525e
2014-10-15 23:58:46 +00:00
Translation updater bot e4a3b90190 Localisation updates from https://translatewiki.net.
Change-Id: I53ef5ec22f1da3561daeac04af07754553767ce7
2014-10-15 22:09:26 +02:00
jenkins-bot 1b6a234d09 Merge "Put category popups in the inner overlay for now" 2014-10-15 00:17:47 +00:00
Roan Kattouw 267212c531 Put category popups in the inner overlay for now
We really shouldn't need the inner overlay for this,
we should be able to deal with popups being in
oo-ui-window-overlay. But for now, we're not, and
this fixes the current problems.

Depends on If16d16d2b in oojs-ui.

Bug: 72052
Change-Id: Ie06056b96db19ac4caf1f9c0e3a1c49cfddc6682
2014-10-14 17:02:51 -07:00