Commit graph

518 commits

Author SHA1 Message Date
Ed Sanders 7e0d4daf3d Allow pressing 'escape' from all pages of save dialog
Bonus: Add 'Resume editing' button to review changes page

Change-Id: Ief200c8aa2e2c8363bf6c9be3544ec1c56e07ff4
2015-09-21 22:59:21 +01:00
Ed Sanders a1147f764b Make save dialog variable height
Change-Id: I90437b3130d08441e5c93b2a34fd9083106a14b3
2015-09-21 17:52:19 +01:00
jenkins-bot 664e2db006 Merge "MWWelcomeDialog: .html, not .text, as we're inserting HTML" 2015-09-18 21:20:41 +00:00
jenkins-bot 377944f6e9 Merge "Exclude citefromid and cite-(book,journal,...) commands from ref dialog" 2015-09-18 16:05:05 +00:00
James D. Forrester 48c849ca5b MWWelcomeDialog: .html, not .text, as we're inserting HTML
Change-Id: I2cc35af4c6ed59ec1b5df991af1568c85c050fae
2015-09-16 14:54:11 -07:00
James D. Forrester 9b0779da9b MWWelcomeDialog: Split text, tweak styling
Change-Id: If15dc9fe4a01e81cf7d85e2670878bbd5899f068
2015-09-16 10:16:44 -07:00
James D. Forrester e5e1810f02 MWWelcomeDialog: Alter to be welcoming, use a nice image
Drop beta-ness as users don't care and it confuses them. Leaving the preference
alone for now.

Bug: T99963
Bug: T112354
Change-Id: I0e039dec54d528fce24226e76b931b593dd13a9e
2015-09-14 18:29:07 -07:00
Ed Sanders b900adfe74 Exclude citefromid and cite-(book,journal,...) commands from ref dialog
So that users can't place references in references.

Change-Id: I7953f8137dc5422ecd0cee648a30e2c181fbb43c
2015-09-09 12:42:39 +01:00
jenkins-bot f6a2e3658c Merge "Abstract mwExtension behaviour into MWExtensionWindow" 2015-09-05 21:26:31 +00:00
Ed Sanders 8815d1397f Abstract mwExtension behaviour into MWExtensionWindow
Allows us to create an MWExtensionDialog base class that shares
the logic.

Change-Id: I53c8f1713a3513d2635cfd736ec8fc3f9616d864
2015-09-05 18:18:24 +01:00
Alex Monk 6d94d060ac Bump Schema:Edit to revision 13457736
* Remove page.length
* Add action.abort.type = switchnochange

Needs to be deployed at the same time as Ib99700ac

Bug: T111420
Change-Id: I7ee245157d4de6c220d7cdf54cd1dd69ff836f15
2015-09-04 00:51:05 +00:00
jenkins-bot 64c73a4ac6 Merge "ve.dm.MWReferenceModel: Require parent document" 2015-08-27 15:38:01 +00:00
Roan Kattouw e4d2d4785e ve.dm.MWImageModel: Require parent document
Add a parentDoc parameter to the MWImageModel constructor and use
it to inherit language, direction and HTML document. Remove
getLang(), setLang(), getDir() and setDir() whose only purpose
was to propagate the language and direction from the parent document
in a hacky way.

Also add a parentDoc parameter to newFromImageAttributes(), replacing
the lang and dir parameters. Remove the unused and ill-conceived
caption parameter.

This causes caption documents to always have an HTML document
for URL resolution. Previously, this worked when editing existing
images because a document generated by cloneFromRange() (which
propagates the HTML document) was passed into setCaptionDocument(),
but it didn't work when creating new images.

Bug: T109599
Change-Id: Ida36862092cd779ffc2f04c0ecbc1164f8d71453
2015-08-27 00:09:21 -07:00
Roan Kattouw f11fbee278 ve.dm.MWReferenceModel: Require parent document
Add a parentDoc parameter to the MWReferenceModel constructor and use
it to inherit language, direction and HTML document. Remove
getLang(), setLang(), getDir() and setDir() whose only purpose
was to propagate the language and direction from the parent document
in a hacky way.

This causes ReferenceModel documents to always have an HTML document
for URL resolution. Previously, this worked when editing existing
references because the newFromReferenceNode() code path calls
cloneFromRange() which propagates the HTML document, but it didn't work
when creating new references.

Bug: T109599
Change-Id: I5d9d34d4343be8428318fa0b795fa54c110e34f4
2015-08-26 23:48:45 -07:00
Roan Kattouw 6eee029159 MWSaveDialog: Use .moveCursorToEnd() instead of ve.selectEnd()
ve.selectEnd() removed by I44f43f312c78 in VE core.
Depends on Ia63e6c6a0 in OOjs UI.

Change-Id: Ic7ed8a24abd8288d68cf89839a553a569081e8c7
2015-08-26 23:51:58 +00:00
Ed Sanders 6e44d8a7c0 Use mw.Title to localise file: prefix on new images
Bug: T110104
Change-Id: I25e28367bf4b00a0447c941b7359ebff5fe59147
2015-08-25 17:17:49 +01:00
James D. Forrester bf520fee03 build: Enable jscs jsDoc rules 'require*Types' and make pass
Change-Id: I60c769f1cb028e4f4da7aeb04ed2383b689ddbc8
2015-08-19 11:38:35 -07:00
James D. Forrester 00d3226be1 build: Enable jscs jsDoc rule 'checkParamNames' and make pass
Change-Id: Ifcd3f67524c32148ff3591263d6374b31ee57d3b
2015-08-19 11:33:59 -07:00
James D. Forrester 85f91f394e build: Enable jscs jsDoc rule 'requireNewlineAfterDescription' and make pass
Change-Id: I7c0fabc93834d19198caea8f5dd1834e9e473d0a
2015-08-19 11:21:01 -07:00
James D. Forrester 945242a55a build: Enable jscs jsDoc rule 'checkAnnotations' and make pass
Change-Id: I76abb1eb1f3e1a2e8a4c03f577a080f4889b3a6d
2015-08-19 11:09:34 -07:00
James D. Forrester f5c6f61163 build: Enable jscs rule 'requireSpacesInsideBrackets' and make pass
Change-Id: I846d36c15e1b1f810d2ef7fd422f8412790bcb0f
2015-08-19 10:33:02 -07:00
Alex Monk 5e02fe9f7c Save dialog: Don't try to pass in undefined checkboxes fields to setupCheckboxes
checkboxFields in the setup data is optional, it's only actually set up by
DesktopArticleTarget's overridden openSaveDialog function, not mobile's
(or presumably other Target classes).

Bug: T109501
Change-Id: Ibc5f821be822fa3704bbfb55345687dd7795e203
2015-08-18 20:34:32 +00:00
Ed Sanders 960ecf8103 Convert save checkboxes to OOUI widgets
Anything with type=checkbox is coverted, and its label is found,
either by for=id or by finding a wrapping label.

All other inputs are stored in $otherFields for form building.

Bug: T86617
Bug: T70572
Change-Id: I94376fef18d02d2058bb548c11ae17f3dec7268c
2015-08-17 18:37:06 +01:00
jenkins-bot e6fe32902d Merge "Don't reset edit summary every time we open the save dialog" 2015-08-11 22:45:41 +00:00
Alex Monk 45a2beeaff Don't reset edit summary every time we open the save dialog
We were setting the edit summary box to the contents of the 'summary' parameter
every time the save dialog opened, but actually we only want to pay attention
to that the first time the save dialog opens.

Bug: T108329
Change-Id: Ic7b456ca8d7dd7cef8bc27629e3655ce9b97e755
2015-08-11 20:39:31 +01:00
jenkins-bot 788788f11d Merge "Don't error when we try to close a reference/media dialog with inspectors still open" 2015-08-11 19:01:41 +00:00
Bartosz Dziewoński 7bef835dfb ve.ui.MWMediaDialog: Remove dead code with 'HACK' comments
I am unable to find any trace of a .oo-ui-dialog-content-footless
CSS class anywhere.

Change-Id: I9a363c1305ca8f5ce25b8684daf0cb6d6c79bf73
2015-08-11 00:07:52 +02:00
Bartosz Dziewoński bfb5ba34ad ve.ui.MWMediaDialog: Remove weird spinner relicts
This seems to be dead code.

* ve.ui.MWMediaSearchWidget does not have a #$spinner property.
* .ve-specialchar-spinner class does not have any styles defined.

Change-Id: I6fd35274bc1444303b67f8138ab875f0c6da7e4a
2015-08-10 23:47:20 +02:00
Ed Sanders 0e62e577e4 MWMobileSaveDialog: Use short save messages for space
Change-Id: I04e01a8941f905384e385caf1267d7c36cb2aa52
2015-08-07 17:38:52 +00:00
Ed Sanders 707628cfb1 [BREAKING CHANGE] Use save dialog in mobile
Bug: T96186
Change-Id: I4319e23da2d1bfd0cbba9719dbc9642a233bdf67
2015-08-06 21:52:14 +00:00
Ed Sanders f579ce52a2 *Dialog: Flag back/cancel actions
Change-Id: If3772863078a020eba9b9b43f58044a5aacb7296
2015-08-06 21:51:32 +00:00
Ed Sanders 322d1f54c6 MWMediaDialog: Remove redundant check of this.imageModel existence
The fact it has to exist for the two previous statements to
not fatal is a bit of a clue. I assume this made sense at
some point in the past.

Change-Id: Ic9c04395408301f514ff7e9a224b8e2c30d64896
2015-08-03 01:09:03 +00:00
Ed Sanders 4ab947d336 MWSaveDialog: Remove unnecessary <br /> from diff panel
Change-Id: I430794d781c91886abb4802c7f53ad4e0ff14c3b
2015-08-03 00:43:51 +00:00
jenkins-bot a15c54f4db Merge "MWSaveDialog: Make a FragmentDialog now that's available" 2015-08-01 22:44:18 +00:00
Ed Sanders dc71b4849b MWSaveDialog: Make a FragmentDialog now that's available
* Make save a FragmentDialog and open with WindowActions so
  the selection is restored automatically.
* Pass in some information in setup data.

Change-Id: I254b71f252adce064b9c2d2bf2cb6c8d0018e31f
2015-08-01 22:41:17 +00:00
Alex Monk d6306d8a16 Don't error when we try to close a reference/media dialog with inspectors still open
Bug: T96630
Change-Id: Ie148149c9681a883116df12a23ae6e4c3b470daa
2015-08-01 22:44:34 +01:00
jenkins-bot c8ab0003f3 Merge "Stop removal of only template placeholder from transclusion" 2015-07-31 21:58:58 +00:00
Alex Monk 7b7219fcb6 When saving from review screen, swap to main save screen
Bug: T107251
Change-Id: I78fb0b8804ffa4b8accd4d2619d7bbd34e2c4f1e
2015-07-29 17:48:43 +01:00
Alex Monk 8ae71e205a Stop removal of only template placeholder from transclusion
Bug: T95252
Change-Id: Ibf0537fd63f8315750e398f72807741187985b19
2015-07-25 14:47:36 +01:00
Alex Monk 3b978f0b4e Add save button to review mode on save dialog
Bug: T69868
Change-Id: I393a37333ea4988547c82e1fa9747b5e034de9bd
2015-07-24 01:34:13 +01:00
James D. Forrester 57f8fc5368 build: Drop last jscs over-ride and make pass
Change-Id: I4ff60af79cfc6e09e284d51f9b7ac2afa900f0f5
2015-07-22 15:13:09 -07:00
Bartosz Dziewoński 9134ec2d73 Disallow typing newlines in the edit summary
Prevent typing newlines by pressing the 'Enter' key on the keyboard,
like in a single-line <input type=text />; and filter newlines from
pasted / IME'd text.

Also:
* Use 'classes' config rather than .$element.addClass()
* Remove no-op 'tabIndex' setting (this is the default already)

Bug: T106325
Change-Id: I42d18f51f5ca989818577d6f045f6a516bb5b121
2015-07-20 13:57:25 +02:00
Ed Sanders 8e0394da5c Support command whitelist feature
Depends on I87d8aa3 in core.

Bug: T106061
Change-Id: I694e4e5a83f281da92380a895b72611141838f42
2015-07-18 18:20:49 -05:00
Ed Sanders bb46c34255 Update VE core submodule to master (edaa19b)
New changes:
aab2e90 Localisation updates from https://translatewiki.net.
826055a [BREAKING CHANGE] Rename SurfaceWidget to TargetWidget

Local changes:
* [PULL THROUGH] Rename MWSurfaceWidget to MWTargetWidget

Bug: T94066
Change-Id: If578e15c1ee7effd5ca1d6073521a6c59caac255
2015-07-18 17:19:05 -05:00
Ed Sanders 0c1eb0cf33 Remove listeners from deprecated search widget 'select' events
Attach listeners to search *result* widget 'choose' events instead.

Also, pass reference model as 'data' to MWReferenceResultWidget, instead
of index so we don't have to do a lookup later.

Change-Id: I8a9b7ddaa70e29406726ac8463582a8bcf813128
2015-07-13 17:06:28 +02:00
Ed Sanders 5fb8d3a4d0 ve.ui.MWReferenceResultWidget: Remove unused 'divider' code and styles
Also, tweak documentation.

Change-Id: Iaf5045bd65d0d484c8810f4bbe097d6710ca6e7e
2015-07-13 17:06:27 +02:00
Ed Sanders 84eadef74a Use core dimension widget times separator
For de-duplication, and because trailing whitespace is not allowed.

Bug: T104691
Change-Id: I2e65799daae7e57e6e638b3d6dcf968a6f4582c7
2015-07-03 13:21:29 +01:00
Ed Sanders 6822635158 Use new hasContent method on linear data
Change-Id: I430e628a9db30970ecdf6996bc51e7440a474077
2015-06-30 09:45:24 +01:00
Alex Monk b2319433da Fix tabbing to info/delete buttons in template dialogs
We were selecting the outer <div>s rather than the actual links which you could
interact with via the keyboard.

Bug: T97323
Change-Id: I797739e45f2c0b4a1d39e4b1901bc0836c82f281
2015-05-17 14:03:04 +01:00
Ed Sanders 1962234efd Remove this.$ remnants
Change-Id: Ia32eebd4f6da156209fc0e9cc858e99ea454c262
2015-05-09 11:48:30 +01:00