Commit graph

116 commits

Author SHA1 Message Date
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 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 abb094babd MWTargetWidget: Add missing indent commands to blacklists
Bug: T124619
Change-Id: If2a5d98673db6e2d29fe49f1e7f5307437ba3866
2016-01-26 23:46:12 +00:00
James D. Forrester ada58df361 build: Bump file copyright notices for 2016
Change-Id: I3c618c196e504a80ca297a4132a17f1977a24fb7
2016-01-03 14:57:25 -08:00
Bartosz Dziewoński ca81362afd ve.ui.MWMediaDialog: Make the dialog higher (600px)
Avoids a scrollbar for option 4 of the A/B test from T120867.

Change-Id: I3eacb560117219febd6e08066599e2d4d42df219
2015-12-14 20:53:32 +01:00
Ed Sanders ae26eefb05 Fix typos
Add some common ones to typos.json

Change-Id: I3830be4949ab6a5fd998d6937ed83e9f18091c2b
2015-12-09 16:47:13 +00:00
Ed Sanders 557eb4fe84 MediaDialog: Remove useless empty object arg to media size widget
Change-Id: Id85498616f80147cd856d4d12bf5a0e58ad66029
2015-12-07 14:12:56 +00:00
James D. Forrester 3c9a361da0 MWMediaDialog: Add a margin back to the border checkbox
This was removed upstream in OOUI as unecessary in general, but clearly
this was the place for which the rule had been designed. :-)

Bug: T119547
Change-Id: I46a1df1141c337b436e66872f1a8cdae026816cd
2015-12-02 18:28:18 -08:00
James D. Forrester b68e34fdeb MWMediaDialog: Use OOUI's 'clock' icon rather than a home-brew one
Depends on If4ec151a in OOUI.

Bug: T111100
Change-Id: I90af27a7ba881c588b8a432f1cc1e54ab4c80f79
2015-11-24 18:40:13 -08:00
Ed Sanders e1d14099e0 Image/gallery icons: Rename and use new upstream versions
Depends on oojs-ui > 0.13.2.

Change-Id: Iee4cc52b998626e829fd92346d5ee1295c08f26f
2015-11-18 01:49:31 +00:00
Bartosz Dziewoński 0238c53262 ve.ui.MWMediaDialog: Wait for upload booklet to initialize when setting up
Depends on I65a92e3915a6844056fb7b3a2758a168eb12e6b8 in MediaWiki core.

Change-Id: If59979f30315c7a2164457108362803544431615
2015-10-28 22:31:45 +01:00
Bartosz Dziewoński cf6178f3a1 ve.ui.MWMediaDialog: Reset upload booklet when done uploading
Bug: T115380
Change-Id: I7c252a08cc2f09385102650e4d437e74d3919e59
2015-10-22 20:30:44 +02:00
jenkins-bot 9e74b26c41 Merge "ve.ui.MWMediaDialog: Correct harmless typo in method name" 2015-10-22 18:26:15 +00:00
Bartosz Dziewoński 777fc0445e ve.ui.MWMediaDialog: Correct harmless typo in method name
Change-Id: Ibeb037896123349edac6bc74ab0d9541a2a63e93
2015-10-22 20:18:43 +02:00
Bartosz Dziewoński c5434b2db8 ve.ui.MWMediaDialog: Only disable 'upload' and 'save' actions on setup, not on tab switch
When the tab is switched, we already set a mode that doesn't allow
using these actions.

Bug: T116299
Change-Id: Ib3ba50f578face3d49bcd14e41afe01a3b3d15af
2015-10-22 20:12:03 +02:00
Bartosz Dziewoński bc9487cc8e ve.ui.MWMediaDialog: Move upload booklet init further up
The first time this is called, it will try to switch panels, so it has
to be done before we switch to the right panel.

Bug: T116217
Bug: T116219
Change-Id: I22411024995e22ae65bde1e6418748aedf026b1b
2015-10-22 19:44:39 +02:00
Prateek Saxena d1bf196f68 Media upload: Initialize booklet before setting file on drag drop
Calling initialize will clear all fields including the
OO.ui.SelectFileWidget that was just set.

Follows up I521909d27c390faad7d62f717f2b97b7676e5a63.

Bug: T40031
Change-Id: Ibc7ddafae9cb7718372520245a356938f4731479
2015-10-14 12:49:31 +00:00
Ed Sanders 7f2d9d0042 Media upload: Use new setFile method
Depends on I30ec98be0 in MW core.

Change-Id: Ied82ac8fd25a1c4b9818029429231ce2f39916d4
2015-10-13 18:25:09 +00:00
Ed Sanders 557340426f Media upload: Initiate upload process on image drop
Bug: T40031
Change-Id: I521909d27c390faad7d62f717f2b97b7676e5a63
2015-10-13 11:24:34 -07:00
Ed Sanders d5766c2d5f Media upload: Hide tabs after first stage of upload booklet
Change-Id: Ie0cd0fe7761b3937de685ed18b96cc95b8ca4d4f
2015-10-10 16:52:35 +01:00
Ed Sanders aa5f0c2faf Media upload: Only reset upload booklet on dialog setup
Bug: T115059
Change-Id: I4ee9b408624ee3b0dfc3079f02ebbaf2e66f3fa3
2015-10-10 16:52:25 +01:00
Ed Sanders afb556813a MediaDialog: Rename bookletLayout to mediaSettingsBooklet
Change-Id: I04dbdfd14daedf614e8a47992231d48d72f7ff33
2015-10-10 16:26:40 +01:00
Ed Sanders fcc9be4fa4 Fix typo in MWMediaDialog
Change-Id: Id8133f9eee523a7cd237d4ca2814b29bce02fa0d
2015-10-07 19:34:21 +01:00
Ed Sanders 97ddc8af2b Add image upload tab to media dialog
Uses the ForeignStructuredUpload BookletLayout.

Bug: T40030
Change-Id: I103044210e714d99350a28a48619beacefb43eaa
2015-10-06 18:40:19 -07: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
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 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 f5c6f61163 build: Enable jscs rule 'requireSpacesInsideBrackets' and make pass
Change-Id: I846d36c15e1b1f810d2ef7fd422f8412790bcb0f
2015-08-19 10:33:02 -07: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 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
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
James D. Forrester 57f8fc5368 build: Drop last jscs over-ride and make pass
Change-Id: I4ff60af79cfc6e09e284d51f9b7ac2afa900f0f5
2015-07-22 15:13:09 -07: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 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 431f2abcfd Use new selectItemByData method where possible
Change-Id: I32f213bf2977623a0bde83fb9119fda42a1e9848
2015-05-08 16:15:51 +01:00
Moriel Schottlender 1d1079e7fc Rearrange images when the media search window resizes
This is a quickfix to make the masonry fit recalculate itself after
the window is resized. It is most significant for orientation changes
in mobile devices, as those lead to a resizing of the window and a
complete reorganization of the masonry fit rows.

Bug: T95017
Change-Id: Ibf3c74ea21d42f4a159d0b855be5672c8455639f
2015-04-21 17:57:17 -07:00
Roan Kattouw 95bffa22a0 Stop using this.$
Has been a backwards-compatibility alias since OOjs UI 0.7.0.

Change-Id: I17d7c03e9d1b9fa991d88444d22abfd403269ee0
2015-04-14 02:54:01 +01:00
Ed Sanders 0a2fa11a4e Fix choose event listeners
* Choose can't emit with null
* Connect search straight to results' choose event.

Change-Id: I434829511ea70859d14e26f39095e0d094dea6c0
2015-03-27 10:51:06 +00:00
Moriel Schottlender 06f29f343a Add a threshold to 'read more' calculation in media dialog info
When calculating whether to show the 'read more' button on fields
that are configured 'descriptions', use a threshold to check if
the height is enough to be shown.

Bug: T87265
Change-Id: I0601e4fa92cb58903641a146500cf560bc029425
2015-03-04 11:04:53 -08:00
Alex Monk 8e48f94580 Use mw.Api to run requests rather than our own stuff in ve.init.mw.Target
Bug: T58659
Bug: T89435
Change-Id: I18162f04c50f48606378aed62ee99fccdc3159f6
2015-02-25 01:57:22 +00:00
Moriel Schottlender a06df576b3 Correct the license URL in the media dialog
The license url read the response object instead of the response
value itself.

Bug: T89544
Change-Id: Ibb22e47e0097e012279e21211e1c7e2f1545f2b1
2015-02-16 14:49:12 -08:00