Commit graph

813 commits

Author SHA1 Message Date
Volker E 9291a0d6e2 Replace colors with overhauled WCAG 2.0 compliant palette
Replacing colors with ones from current WCAG 2.0 level AA compliant
color palette. Also improving SVG files by svgo optimization where
easily applicable and cleaning up some minor Less shortcomings.

Bug: T149769
Change-Id: I3d46c95a61112ba808c6ec664a95c94e9cb42c5e
2016-11-19 03:31:16 +00:00
Andrew H 0c3b0a5056 Shorten clickable link text in HTML credit lines
Previously, the clickable text in the generated HTML credit lines
was the entire link to the article. This is shortened to a localized
version of "Link".

Bug: T119686
Change-Id: I708f65a85bfa26c264cdd06a265096027266240c
2016-09-26 17:07:09 -07:00
jenkins-bot 0716876c6d Merge "Make embed text short URL into a link in HTML mode" 2016-08-11 19:19:19 +00:00
Gergő Tisza 4518f8f27d Speed up caption collection
* don't do the slow lookup for closest caption unless there are
  multiple captions
* don't clone when there is no need to change the caption

Might give wrong result when selecting a thumbnail which is in a
multi-image template and has no caption but some other image
in the same template has; that seems hard to avoid.

Bug: T141714
Change-Id: Iacebd44ab9dd469d0c95b94e90faa90d579caaa3
2016-08-01 17:00:08 -07:00
Gergő Tisza 8b8dfe4633 Make embed text short URL into a link in HTML mode
Bug: T138142
Change-Id: Ide6d9b164cdcbafacf08631536cadb04a45ce3dd
2016-08-01 15:17:25 -07:00
jenkins-bot 7c559a7250 Merge "build: Introduce stylelint and make pass" 2016-07-19 21:02:27 +00:00
jenkins-bot b5f0de95b7 Merge "build: Introduce jshint & jscs and make a pass" 2016-07-19 21:02:24 +00:00
Ed Sanders e7ff2ba8b6 build: Introduce stylelint and make pass
Change-Id: I6f97359c6f34f2e5687ce91ab9926c493e613bf5
2016-07-19 13:51:05 -07:00
Ed Sanders b46529d1b2 build: Introduce jshint & jscs and make a pass
These replace the hard-coded jshint task in CI.

Change-Id: Id14eec1ecba4ceae735ffd10f9114233a580302f
2016-07-19 13:48:06 -07:00
jenkins-bot d8984a6ab8 Merge "Limit image search to content firing event" 2016-07-19 14:44:39 +00:00
Ed Sanders db6c74a232 Limit image search to content firing event
Bug: T140574
Change-Id: I3c504c09b2b382e094ab2be1fa388efa7ec827b1
2016-07-19 11:33:53 +01:00
jenkins-bot 4bdf893422 Merge "Make Parsoid HTML selectors more specific" 2016-07-18 15:56:45 +00:00
Ed Sanders 8c7a33429c Make Parsoid HTML selectors more specific
'figure img' matches images in captions.

Follow-up to d3131db19e.

Bug: T140574
Change-Id: I1ee50846191c9de19ca35d9bd40eb2d3001cf7f5
2016-07-18 15:53:42 +00:00
Ed Sanders 14d9297eb1 Check Title.newFromImg produced a valid title with an extension
Bug: T140574
Change-Id: Ia818cebd47b3bce03befc547e5e435cb8b1f2996
2016-07-18 13:34:24 +01:00
jenkins-bot b66336ade0 Merge "Filter HTML from some attributes" 2016-07-12 20:52:27 +00:00
jenkins-bot 9fbbabfe3e Merge "Add HtmlUtils.makeLinkText utility function" 2016-07-12 20:52:25 +00:00
jenkins-bot c4da4c7ca1 Merge "Remove IE8 JS compatibility hacks/workarounds" 2016-07-12 20:42:11 +00:00
Ed Sanders d3131db19e Fix selectors to match Parsoid DOM-spec images
Bug: T62014
Change-Id: I03ee3912aab8aad5ae1e2db3be1a6d3a25d03fef
2016-07-09 17:49:35 +01:00
Michael Holloway 94476eb918 Remove IE8 JS compatibility hacks/workarounds
No longer needed as MediaWiki is no longer serving JavaScript to IE8
users.

I noticed some possible candidates for removal in the less files as well
but left those alone as this task seems specific to JavaScript.

Bug: T123443
Change-Id: Ibf6d551798ff03a227b46dcb55bcf31899dad974
2016-06-29 00:02:46 -04:00
Gergő Tisza 3c71b85c84 Filter HTML from some attributes
Bug: T138142
Change-Id: Ie5048b38ed397ce852d3f9145a63fe4f52930da9
2016-06-19 15:23:45 +00:00
Gergő Tisza dba273ac31 Add HtmlUtils.makeLinkText utility function
Change-Id: I2697c2d865dc8dd23883a59ca0c38229c2e7b6e9
2016-06-19 17:22:52 +02:00
Volker E d947539f37 Fix obsolete constructive color on download button dropdown
Remove `constructive` extension of button and remove it with more
generalized `.mw-ui-progressive` class and rely on progressive color.
Also make use of central mediawiki.UI's variable.less file.

Bug: T136209
Change-Id: I22f365419c41dd888824dbfeb4b3c995713ac5a5
2016-05-25 13:33:28 -07:00
Gilles Dubuc 53a3d9a379 Make Media Viewer pluggable for the 3D extension
Some of the code encountered accessed mw.config directly,
I cleaned that up by migrating to mmv.Config, which is an
abstraction added to avoid peeking at mw.config directly.

Bug: T132064
Change-Id: I2a95ba703e6c7f46296f8e435bceec769dceebf9
2016-04-15 16:43:45 +02:00
Ramunas Geciauskas 454b279140 Trigger fullscreen-change event when closing lightbox interface
When exit button is clicked in the full screen mode, the lightboxinterface
detaches itself but the "jq-fullscreen-change.lip" even is never fired.
This leads to issues as described in T74843 and similar.

Bug: T74843
Change-Id: Id3a68844fd2405fcf289741d54b0602c8e337a3d
2016-03-01 19:47:35 -05:00
Bartosz Dziewoński 7ef5471846 Fix height of buttons on file description page
Bug: T127052
Change-Id: I69738387f685a9f88c62c1cc820bc0e8270b6fed
2016-02-16 13:05:30 +01:00
Alex Monk 195bc0aea7 Import Checker-16x16.png into repository, instead of loading from upload.wikimedia.org
Too simple to be copyrighted - PD.

Change-Id: I2547bd8708408425fcce08bce0019239c0cac572
2016-01-23 02:58:45 +00:00
Andrew H 1b2866df0d Shorten MediaViewer credit lines
Drop the title and site name. Use a shortened URL
created using the pageID for the curid query parameter.

Add pageID property to mmv.model.Image, using value already
fetched from an existing API request.

Bug: T119686
Depends-On: I0f00b986e6095bdb9b8d6af6fbc5b01995227e02
Change-Id: I9189f00bfbf7639974d66cf1921773855a77a865
2016-01-10 23:44:23 +00:00
mhutti1 f937b1f20d Fixed viewer only displaying every nth image after reopening
Added code to detach emit calls when the interface is closed.

Bug: T122785
Change-Id: Ifd97aebe7aa01a152817100f301a80a9b6ac83a3
2016-01-07 22:50:19 +00:00
Andrew H 6005b068bf Cache imageinfo query in MultimediaViewer
Bug: T117750
Change-Id: I5560e14b13968113e768bacce9972169f270e7bc
2016-01-06 04:37:53 +00:00
Julius Alphonso a9758d21e0 Remove uploader's name from MediaViewer
Only last uploader's name is shows, this turns out to be
more confusing than useful.

Bug: T59308
Change-Id: I7d06b72c581fe8738bffc64b5e36be9983b01ccf
2015-12-29 10:56:08 +05:30
Tisza Gergő 6dddb2f7db Do not set up the overlay on irrelevant hash changes
On not-MMV -> not-MMV hash changes the bootstrap class has set
up and immediately torn down the overlay. Besides slowing things
down, this broke TOC navigation on Chrome in an ugly way.

Add a special case to skip the overlay loading when the new hash
does not contain #/media. This is a quick-and-dirty fix; the whole
loading and hash handling could use a rewrite.

Bug: T119854
Change-Id: I5494903dfe778e533773ff142fdf756475c2df32
2015-12-06 08:00:22 +00:00
Ori Livneh 20a23ff4a4 Optimize SVGs
Done using svgo version 0.5.2, invoked with '--multipass' and
'--disable=removeXMLProcInst'.

Change-Id: I1abc7a798ef793536dc9262e40f164b2e77e4ea8
2015-11-23 21:13:45 -08:00
jenkins-bot 99c8b89fac Merge "Add some error details to bug report" 2015-10-27 23:03:32 +00:00
Gergő Tisza 77bfbf61aa Add some error details to bug report
Bug: T111112
Change-Id: I1c3a31ddaefdfec0d86b80891671316741e53b0c
2015-10-26 17:12:34 -07:00
Gergő Tisza 056e339ac4 Ignore case in file extension checks
Bug: T115563
Change-Id: I27efb1a1c6510edc88357b69b1631cf55ca11539
2015-10-25 22:31:07 -07:00
Gilles Dubuc be1ba4622f Turn mmv-next/mmv-prev into OO events
More of those events sent to the document can be converted, but it's a start...

Bug: T77253
Change-Id: I6100ce303346ab9fa94332e91f5d730dc83f4e65
2015-09-29 13:11:22 +02:00
Thiemo Mättig 17084aa2c1 Add explicit word-wrap: break-word to textareas
These text fields contain file names and license informations that tend
to contain very loooooooooong words. These make the field hard to use
and hard to read, especially when the browser decides to add a horizontal
scroll bar to the already pretty short text field. Some browsers do a
proper word wrap by default, others may not. I suggest to add this
explicitely.

Bug: T69835
Change-Id: I3f32270c1c0310e83288b5f4e260feb474006297
2015-09-24 00:39:36 +00:00
Gilles Dubuc dc9a2d43d2 Fix IE9 CSS hack
According to http://mynthon.net/howto/-/webdev/CSS-big-list-of-css-hacks.txt
the /IE9 part isn't required. Its presence causes an exception in less.php
which we want to switch to.

Bug: T112035
Change-Id: I103dbdf626d0f0d5e3622fa42ccf7b8c663c3942
2015-09-18 13:18:41 +02:00
Gilles Dubuc 90e956e080 Remove CSS readiness workaround
RL's support for this should be bug-free now

Bug: T63852
Change-Id: Iaa6355648dcc1eb1780a7b1ee7e461d4213e3017
2015-09-04 13:04:58 +02:00
Geoffrey Mon 33908e64c6 Improve Personality Rights restriction icon
Make it more gender-neutral and better-looking:
- No necktie
- A frame around the icon similar to the frame of a photograph

Change-Id: I05ec5a5a546b19f08ac9a6ab1470b769025e076b
2015-09-03 21:38:55 -04:00
Gergő Tisza 2e6ffeff96 Use wikipage.content hook for updating thumbnail list
This makes sure that MediaViewer works correctly when content
is changed via frontend code (such as a VisualEditor edit or
an AJAX preview).

Bug: T97010
Bug: T110493
Change-Id: I9c57af281ed7f416521d80512f95a79150ce13a2
2015-09-01 02:47:00 +00:00
Ori Livneh 1a0ee6d2a1 Work even when cookies are disabled
When cookies are disabled in Firefox, merely referencing window.localStorage is
enough to cause Firefox to throw a SecurityError exception. (See the referenced
bug for reproduction instructions.) This causes MMV to fail to start.

Bug: T109110
Change-Id: I28399cf8b63328ee34316b785f2d091f6f052224
2015-08-14 11:18:09 -07:00
Florian 7b50d14a8e Re-add event listeners to images after a finished VE edit
Currently, if VisualEditor saved an edit, it replaces the current content
with the new content, which removes all already added event listeners, e.g.
on thumbs, added by MMV.

Add a new hook handler to the postEdit JavaScript hook to re-add all event
handlers to the thumb images to cover this case and enable MMV on a page
after a finished VE edit.

Bug: T97010
Change-Id: Ic1ee0b52265363978640358510cab89db4de2bb8
2015-08-13 17:19:40 -07:00
Gilles Dubuc 04be1d5fcc Add most common non-bucket size to statsv performance tracking
Bug: T105681
Change-Id: I11e971141455d41e935543e3a06f587ebcd070ef
2015-08-05 11:01:14 +02:00
Gilles Dubuc 66d510dddc Track image load time with statsv
Bug: T105681
Change-Id: Ic25edf7852d4b87d2b35fabf6494d88dbfdb922e
2015-07-30 14:01:55 +02:00
Geoffrey Mon a7f11a7c45 Moar restriction icons!
Icons for all important non-copyright restriction types.
Also, some tweaks made in CSS e.g. add 1 px margin to top of mw-mmv-labels
Finally, new test to check if default restriction is placed last.

Example files:
copydesign: https://commons.wikimedia.org/wiki/File:Peugeot_404_dsc01875.jpg
trademark: https://commons.wikimedia.org/wiki/File:Logo_NIKE.svg
trademark+insignia: https://commons.wikimedia.org/wiki/File:Flag_of_UNESCO.svg
personality: https://commons.wikimedia.org/wiki/File:Vice_President_Megawati_Sukarnoputri_-_Indonesia.jpg
communist+insignia: https://commons.wikimedia.org/wiki/File:Flag_of_Georgian_SSR.svg
nazi: https://commons.wikimedia.org/wiki/File:PropagandaNaziJapaneseMonster.gif
costume: https://commons.wikimedia.org/wiki/File:Shrek_%26_Fiona.jpg
fan-art: https://commons.wikimedia.org/wiki/File:Magic_wand.gif
(I think that's enough)

Bug: T102693
Change-Id: I907396c59752511448145a4ac5d29096166f841f
2015-07-16 01:06:39 +00:00
jenkins-bot 2642ebd7d8 Merge "Reduce number of RL modules in MultimediaViewer" 2015-07-15 23:24:27 +00:00
Brion Vibber 849a6d9f16 Revert no-longer-needed fix for MS Edge browser
Bug with history.pushState in Edge fixed in Win10 build 10240;
Dave Storey is asking us to remove the workaround to keep our
code pure and them honest ;)

Reverts I6ea4d367

Bug: T104381
Change-Id: I5f53416dda7c31662330dc5ec67e1bbea55dace7
2015-07-15 17:54:53 -05:00
Gilles Dubuc 95dcc971b0 Reduce number of RL modules in MultimediaViewer
Having many modules makes the startup module in the head
unnecessarily longer. Things should only be in their own
module if they're going to be loaded on demand on their
own or are a shared dependency of separate modules that
are.

This change brings down the amount of modules declared by
Media Viewer from 53 to 8. The ones that remain are
mostly things loaded on demand.

Bug: T103706
Change-Id: I5b0d29209599285b93217e96def818e641646c73
2015-07-10 00:07:14 +02:00
Gergő Tisza 742a3473a6 Replace webkitMovementX with movementX
Bug: T104758
Bug: T77869
Change-Id: Ied88588a3db3a773b02799568da71ecd6c66a2fd
2015-07-06 10:44:16 -07:00