Commit graph

619 commits

Author SHA1 Message Date
jenkins-bot 1909c445bb Merge "Allow the gallery dialog to insert duplicate images initially" 2016-11-24 04:13:03 +00:00
Ed Sanders 0334263718 Missing i18n in gallery dialog
Change-Id: I369d5b9d42a5fd6b4d1afc12508632a282591320
2016-11-24 00:09:49 +00:00
Thalia 003ec7b653 Allow the gallery dialog to insert duplicate images initially
Change I94f4fadd84cd3e prevents the gallery dialog from inserting
duplicate images into the gallery dialog after one request (e.g.
so double-clicking on an image in the search widget doesn't cause
the image to be inserted twice). However, galleries can
intentionally contain duplicates of the same image, so it is
possible to make a spearate request to insert a duplicate image.

When the dialog is first opened, it requests all the images in
the gallery at once, so the above change was causing the
duplicates in an existing gallery to be dropped. Duplicates
should be allowed to be inserted following this initial request.

Bug: T150894
Change-Id: I34353bc9b8db947488474c4be52292e0a1447705
2016-11-23 01:02:35 +00:00
Thalia 2364f530a3 Let gallery dialog handle unprefixed filenames
The namespace prefix before image filenames is optional
in galleries, but the API requires it. If the prefix is
omitted, add the file namespace prefix.

Change-Id: I3d126550c2ad2e84454122f92307ba4bc943780b
2016-11-23 00:20:32 +00:00
James D. Forrester f24e34de3c build: Bump eslint-config-wikimedia to v0.3.0 and make pass
Change-Id: I7449c11aa63c50fda667265c32021439cc53471f
2016-11-15 15:05:05 -08:00
jenkins-bot 65604802ac Merge "Fix attribute.style typo in gallery dialog" 2016-11-15 22:09:57 +00:00
Thalia 97af378bb5 Fix attribute.style typo in gallery dialog
Change-Id: I71162652df5e09c4d974e0f863ea661c4bd7902e
2016-11-14 22:26:39 +00:00
Thalia 810202395e Normalise filename after image is chosen in gallery dialog
Bug: T150638
Change-Id: Iead7d0d3f8aa6c864dc6fba7089bab0767035812
2016-11-14 22:04:25 +00:00
Ed Sanders 37ccaca2ec eslint: Re-enable wrap-iife and partially enable dot-notation
Change-Id: I4420d66f528dcb18ebe2b9f63996661b2969f833
2016-11-12 14:43:43 +00:00
jenkins-bot bce6aeb92a Merge "build: Replace jscs and jshint with eslint" 2016-10-28 18:43:15 +00:00
James D. Forrester 36befda61c build: Replace jscs and jshint with eslint
It's new, it's fresh, it's amazing, it's here.

Change-Id: I5dc784411f704685ed5cc763a2b2b1c5d3e5a610
2016-10-28 18:33:15 +00:00
jenkins-bot 7085796ec3 Merge "Don't allow an image to be inserted into a gallery twice simultaneously" 2016-10-28 02:29:19 +00:00
Ed Sanders 7bc59cd65c Set mode of save dialog after setting size so footer is correct height
Bug: T149274
Change-Id: Ic88b1c861029495e6098686d847deb181f62288e
2016-10-26 20:09:21 -07:00
Alex Monk 8414490dbf Don't allow an image to be inserted into a gallery twice simultaneously
One after the other is okay though.
Also fix this so that, if the user is fast enough, two images simultaneously
also works.

Bug: T148558
Change-Id: I94f4fadd84cd3ed97d9676043cadc64f0e09f0b9
2016-10-20 02:22:34 +01:00
Thalia 91ca88f6e8 Set gallery dialog to larger size when search panel is focused
Bug: T145246
Change-Id: I49b218f704d31b4f699fe39f414a84abbfffc093
2016-10-12 17:42:54 -07:00
jenkins-bot 9da0eaef03 Merge "Pre-load the article title in gallery dialog search" 2016-10-04 16:24:00 +00:00
Thalia 1d8d4accff Pre-load the article title in gallery dialog search
Bug: T145243
Change-Id: I4cd04dee4c875524ecdf90027dc878eb15f47ce6
2016-09-27 14:01:31 -07:00
Matthias Mullie 2b4948b0b6 Change mid-upload 'cancel' button to 'back'
Bug: T114938
Change-Id: I964708e1267223b181630b9bea5b19e2bdf242be
2016-09-22 16:13:57 +02:00
Ed Sanders 5e22ef30fe Add show preview to save dialog when in NWE
Bug: T142642
Change-Id: I679eaddfe9037dcf258d3ff7d1eaa44214f0e730
2016-09-07 21:35:49 +00:00
James D. Forrester deef47414a Vary the 'save' labels to 'publish' for public wikis
Bug: T131132
Change-Id: I4a497265661d5ce0f6144988b514509dfa1bddfd
Depends-On: I56634ed223778a0650cf36ac7256151b13c494f1
2016-08-25 09:37:52 -07:00
James D. Forrester b7c7d06968 Show a different label for buttons on create vs. modify
To align with the linked patch in MediaWiki core. Taking advantage of
the opportunity to use core's messages for these, and remove some dead
wood old messages that were never used like "restore" items in mobile.

Bug: T139033
Depends-On: Ie81b5edd275963a965cd44d0fd325cae9ee2f1a6
Change-Id: Ie00e94cc77cb750a7e8d1104366bb3dad65af8a4
2016-08-24 16:01:11 -07:00
Thalia d156af59aa Fetch default options for gallery dialog
Fetch default options for mode, image heights and image widths
rather than hard-coding them.

Bug: T139632
Change-Id: I1adc7987fdeb1258ee87ce46acbab469ea18116e
2016-08-05 14:08:20 -07:00
Ed Sanders 6064eb3dc4 Fix preview to use a valid document slice
An inline content node must exist inside a content branch node (paragraph).

Bug: T141306
Change-Id: I6bf2f99938940c1a5e34db16fbe582b15991a7c6
2016-07-26 16:06:07 +01:00
jenkins-bot 522b3498ce Merge "MWGalleryDialog: Add new 'slideshow' mode" 2016-07-21 00:54:08 +00:00
Thalia 84919b253b MWGalleryDialog: Don't set blank values for width, height
If width or height attributes are left empty in the form,
they are now undefined in mwData.

Bug: T140094
Change-Id: I76dadbd07a89ce762e42ce714f364ce74a9cc1f0
2016-07-12 22:14:59 +01:00
James D. Forrester 96ba688a87 MWGalleryDialog: Add new 'slideshow' mode
Change-Id: I73052def5e8c082f27606b2ff094834fd5d11908
2016-07-12 08:08:15 -07:00
Thalia 3e911ba266 Make gallery dialog caption field multiline
Also change remove button label from "Remove" to "Remove image".

Bug: T139421
Bug: T137982
Change-Id: I1b11eb44c672bad0d53d139d66e796a0657457f5
2016-07-06 17:24:12 +01:00
jenkins-bot 750078ab63 Merge "MWTemplateDialog: When opening the dialog, add in any unset suggested and required parameters" 2016-06-29 22:42:25 +00:00
James D. Forrester 832118e051 MWTemplateDialog: When opening the dialog, add in any unset suggested and required parameters
Bug: T97482
Change-Id: Iaf280355f442240aba4e1f74d3ee402fc5d329b0
2016-06-08 14:19:09 +00:00
Thalia 6fdbe9fd7e Make dialog for editing galleries
Make new graphical interface for editing existing
galleries and adding new galleries.

NB The dialog does not yet support rich text in the
image captions, nor does it provide separate fields for
e.g. link, alt text, etc. These are dependent on parsing
the text within the tag, which is yet to be implemented
by Parsoid. For now, these attributes should be
specified in wikitext in the image-specific caption
field.

Bug: T45037
Change-Id: I2b4082e991268241a15b9bbd6d85c94cdc2185f2
2016-06-07 13:53:02 +01:00
Ed Sanders 35c0a0dc69 Use cloneWithData
Change-Id: I7ffe3c7ab20d5f785a6642c8293f271f4dc08ff8
2016-05-30 21:40:07 +01:00
Ed Sanders 236e3d1241 [BREAKING CHANGE] Evalute block/inline state when inserting a transclusion node
Make some of the methods we currently use to render the node
static so we can re-use them before inserting. We do the evaluation
without inserting the node so as not to dirty the document and
transcation history.

In the unlikely case the request fails, just fallback to inline.

This only handles insertions for now as type changes on edit will be
very rare.

This changes the signature of insertTransclusionNode, which is used
in Cite and Citoid extensions.

Bug: T51784
Change-Id: Ibc2fc66e6866084b0a4deeb082c8a1ca412febb2
2016-05-16 09:19:13 +01:00
Alex Monk 349b1f5e57 Add WTE welcome dialog
Bug: T133800
Change-Id: I6eb43274e22f647958c3ab1b6d5c12b3dbea388e
2016-05-10 23:28:21 +00:00
Ed Sanders 3678b0c38a Attach template form after building
Building DOM trees while attached is much slower. This makes
things about twice as fast.

Remove unused StackLayout wrapper this.panels.

Bug: T134814
Change-Id: Idb269cf3f06c350ffe28b66e2e883c0a7a3348cd
2016-05-09 23:24:22 +01:00
Ed Sanders c516d897d2 Remove icon properties from windows
Windows stopped supporting icons a while ago.

Change-Id: I8a63152282a5968dcd17675330e31bd1ebe4b68b
2016-03-29 12:33:42 +01:00
David Lynch 0268e74a7f Template Dialog: pushPending while the dialog is closing
Double-clicking the "insert" button would double-insert the template. Counting
the close as a pending action avoids that.

Bug: T129725
Change-Id: I41af7c051fd54004cecd563d7a6cf8fdb452840f
2016-03-24 11:33:00 -05:00
Ed Sanders f5873ac1db CommandHelpDialog: Inherit non-corruptively
Change-Id: Ieb497eebe930e58a02552eb9d4305280c91c92c2
2016-03-14 20:03:52 +00:00
James D. Forrester d8eb68d7b6 Don't give the user the option to discard changes when changing editor
Bug: T128585
Change-Id: I02f31e46ae7b2dc7505ed55fc56cd00f538a90e3
2016-03-07 13:39:32 -08:00
Ed Sanders 67c207a6f5 Use abstract target widget creation
Change-Id: Ic7e43e80f4f48df99842cee702963d54205e5055
Depends-On: I6a667a641540b347052ea0c645af4e1e59cf333a
2016-03-03 11:49:44 -08:00
David Lynch 7486f74c6f MWMediaDialog: Only cache relevant information
Trim the cached image data from the media dialog down so that it only caches
the same information that would have been fetched for a non-uploaded image.
Consistency!

Bug: T126081
Change-Id: I0f057c111b66f29c6360e27f97256384f5320b75
2016-02-29 10:16:34 -06:00
jenkins-bot e39d8a744b Merge "Show welcome dialog on mobile too" 2016-02-29 03:02:03 +00:00
Ed Sanders 8f028813e5 CategoryWidget: Update to work with new DraggableGroupElement
Change-Id: Iefac99dba0e6b8ed3eaaa1d5f1d92e402e3cf2db
2016-02-25 16:07:50 -08:00
Alex Monk ced27f348f Show welcome dialog on mobile too
Bug: T112599
Change-Id: Ie04aab468c80dabc84e1386e7529138e1101450e
2016-02-25 22:03:00 +00:00
jenkins-bot 7bef4c9a20 Merge "Warn for empty summary when edit section used" 2016-02-25 18:56:57 +00:00
wctaiwan 5da37932a2 Warn for empty summary when edit section used
Warn the user about an empty edit summary when the "edit section"
link is used to trigger VE.

Re-does Ic7b456ca a different way.

Bug: T114857
Change-Id: I319c9c5bed47140a81eb409d490c9f82b89a49fe
2016-02-23 00:34:12 +00:00
jenkins-bot 74b2489276 Merge "Link to file description pages in media dialog" 2016-02-22 21:07:43 +00:00
Ed Sanders deb676e73d MediaDialog: Use CC logo from upstream (ooui-icons-wikimedia)
Change-Id: I4fabf5f8d87b9b21623883203b9d6965a0ff33a0
2016-02-21 18:20:30 +00:00
Alex Monk ca5cab52af Link to file description pages in media dialog
Bug: T125227
Change-Id: I243f5479ab27ab098d41db08ff4a53195d382577
2016-02-21 03:45:37 +00:00
Ed Sanders b70eb51491 MWMetaDialog: Fix setup of pages
Only call setup in ready process, as setup includes setting
focus. Defer fitInput call to category widget until transition
is finished so measurements are correct.

Change-Id: I49a30402cf58e36f16316e3ab04fa3349d19954e
2016-02-18 17:14:45 +00:00
James D. Forrester 1e0486a679 Remove all Extension:Cite code, now moved there
Depends-on: I39936ed83d5a60471a0a75da753f498e80aef234
Depends-on: Ifd853bf9f901065798bd0063aeaa786a3761aa71
Depends-on: I32c93c5118eafe5f071252290c58d3de8dacc81a
Change-Id: Iba0f25b3ebe4e5e63377da57afb760d6980f9907
2016-02-05 21:36:56 +00:00