Commit graph

441 commits

Author SHA1 Message Date
jenkins-bot 4667c9a896 Merge "Handle PD licenses on frontend" 2014-01-31 07:56:54 +00:00
Gilles Dubuc ec29c88a6e Swap position of caption and description
The design requested that the caption is displayed above the
description, not below it.

Change-Id: Ie4bd10e04b65aeaa4e367c59d3ddef790bee1e2b
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/120
2014-01-31 04:04:59 +00:00
Gergő Tisza 612d34458c Handle PD licenses on frontend
Change-Id: I49d920d201baeac11f3c6379857880ab6828b6ce
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/117
2014-01-30 21:47:22 +00:00
jenkins-bot 344e6e6758 Merge "cucumber.yml is no longer needed" 2014-01-30 19:53:32 +00:00
Gilles Dubuc 8bd1786ead Revert "Replace $.fn.msg calls by mw.message"
This reverts commit 1804f98ee7.

Turned out to be a caching issue, $.fn.msg() works fine

Change-Id: I087bf5cc0bbe89fdc80c64c015218a5ff9a24ee7
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/157
2014-01-30 14:11:23 +01:00
Gilles Dubuc 1804f98ee7 Replace $.fn.msg calls by mw.message
$.fn.msg breaks on beta for an unknown reason
Switching to mw.message which is used elsewhere in mmv

Change-Id: Id569df019c03b2f11fb513fcd3ed9ffc6eac7e91
2014-01-30 13:46:49 +01:00
Zeljko Filipin 219f9d3f1b cucumber.yml is no longer needed
Bug: 56085
Change-Id: Idd5a7867173effea6ae5f80416b1d5f640a911ab
2014-01-30 13:07:02 +01:00
Gilles Dubuc 30563de71d Add file usage data to MMV metadata panel
Interface code is its own class which does not depend on the main
interface class it can be unit tested (and eventually moved into its
own file to make browsing the code easier). IMO we should aim to
eventually break up the interface into similar classes (with a simple
init/empty/set interface + custom events where it makes sense).

Also, sneak-introducing LESS!

API usage could be more effective (globalusage is a separate API call;
it needn't be), but we will have to rewrite that part soon anyway, so
it should pass for now.

Bug: 60087
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/44
Change-Id: Ibe5c323cdeab4a378316925f0c3efb3dc7ef5997
2014-01-30 13:03:28 +01:00
Aaron Arcos f7925a1a4f Refactor image load code, add unit tests.
The code to load and set the image was semi-duplicated and
scattered in various places. This was the source of defects
as this code is called asynchronously and was hard to debug.
This change attemps ot consolidate all the image load logic
in one place. It also adds sorely needed unit tests.

Change-Id: I92eb1c48e2ff0808134e56b4b150e22254eb2d6e
2014-01-30 08:51:15 +01:00
Gilles Dubuc 98e03d31c8 Test metadata visibility in fullscreen mode
Add metadata visibility logic to the test
Convert the code to CSS since writing the test made me
realise that the current JS was superfluous

Change-Id: I80c2f1860cc021e9bdf09345647b288de746f1e3
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/140
2014-01-30 08:39:55 +01:00
Gilles Dubuc 02897fda9c Chevron/metadata UI behavior improvements
When the multimedia panel is closed, the chevron
points upwards, otherwise it points downwards
Pressing the up and down arrows on the keyboard
opens and closes the metadata panel

Change-Id: I7dd31f3cc3d90f9342845faea2c6cfea3b40e232
2014-01-30 02:52:53 +00:00
Mark Holmquist a86a6d5b9e Fix resize engine for fullscreen
This sorta has a few other miscellaneous fixes in it, but it works!

There are maybe still funky behaviours left. Test it?

Also refactor some bits, so we aren't accessing mw.mediaViewer in the
interface code.

Change-Id: I69db8e7b4ff5f994ba706fd4965688f3c26859f4
2014-01-29 11:50:22 +01:00
jenkins-bot fe846f3063 Merge "Fixes bug where next/prev would exit fullscreen mode" 2014-01-28 22:39:29 +00:00
jenkins-bot 95dd8fd3af Merge "Moved Sauce Labs browser configuration to mediawiki-selenium Ruby gem" 2014-01-28 22:32:29 +00:00
Translation updater bot a60b4e7958 Localisation updates from https://translatewiki.net.
Change-Id: I8c2c3f2342addbf001c43ba574ff39314c8799c8
2014-01-28 21:20:52 +00:00
Zeljko Filipin 2e5d5271cc Moved Sauce Labs browser configuration to mediawiki-selenium Ruby gem
Bug: 56085
Change-Id: I6d0ac62a3dcceab7d41de7fa162c6b3ead1aad5a
2014-01-28 18:00:32 +01:00
jenkins-bot d246d7709a Merge "Simple test for enter/exiting fullscreen mode" 2014-01-28 10:21:14 +00:00
Aaron Arcos 7c87033235 Request maximum image resolution in the API call.
After checking all the code paths (phew !), it seems
this simple change takes care of the resolution issue
that surfaces mainly in iOS devices (see b/60388).

Bug: 60388
Change-Id: I867dd18f782126fb71eb52ec637a2b90b910050d
2014-01-27 17:17:32 -08:00
jenkins-bot 567039c14e Merge "Fix bug that would cause the image to stay small" 2014-01-27 18:44:58 +00:00
Gilles Dubuc 2d3287e6bf Fixes bug where next/prev would exit fullscreen mode
Next/prev caused an attach() call which in turn
replaced the lightbox elements with themselves
causing the browser to exit fullscreen mode
because the full screened element was shortly
removed from the DOM (to be replaced by the same content),

Unfortunately this cannot be covered by a test case
because the screen would have to truly go into fullscreen
mode for the bug to happen. Having QUnit go fullscreen
seems unreasonable both for local testing (annoying)
and automated testing (could fail  to really fo fullscreen
because user confirmation is requested by the browser).

Change-Id: I57a2668179d6749188d7b5a3efcd06216b7747a9
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/139
2014-01-27 18:12:09 +01:00
Gilles Dubuc 6803daf3a6 Simple test for enter/exiting fullscreen mode
While writing the test I spotted a bug and fixed it

Change-Id: I781c67752781960e4be88520f53163756fc11dab
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/140
2014-01-27 17:54:03 +01:00
theopolisme b770e02d48 Enable fullscreening with jquery.fullscreen
Depends on I58138afa05c43f5a24e74fa3a30a658428c39ce0
(core patch)

Change-Id: Ib972d453bdf8172439bf6195985fcf7e248b2b8a
2014-01-27 14:14:36 +01:00
Mark Holmquist 5e98e3bcd6 Fix bug that would cause the image to stay small
When opening the lightbox, the image might stay small
because of a race condition. This is fixed using a
deferred object.

Change-Id: I4e93c7d26da47e5177abeb1dac841bf6c25a9022
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/138
2014-01-27 10:21:38 +01:00
Translation updater bot b2d986e2b4 Localisation updates from https://translatewiki.net.
Change-Id: I5470b0001d4c807eb7309a5a24d06be23a04c9d6
2014-01-26 16:24:18 +00:00
jenkins-bot 38fe1c91b5 Merge "Move models to their own modules" 2014-01-24 23:24:26 +00:00
Translation updater bot 0b78a146b5 Merge "Localisation updates from https://translatewiki.net." 2014-01-24 20:17:15 +00:00
Translation updater bot 23bf3d0d31 Localisation updates from https://translatewiki.net.
Change-Id: I50a902ed79086306d41e5e22fc12b0830285a03d
2014-01-24 20:10:14 +00:00
Mark Holmquist 5b03c39c72 Move models to their own modules
Change-Id: Ib3d32496bfbc174dc136a269abf0b66cf0ae475d
2014-01-24 11:41:05 -08:00
Mark Holmquist 5e4a544133 Moving things around for module renames
This is a big change, but should change nothing except the sizes of some
files and where they all are.

There are no more ext.multimediaViewer strings ANYWHERE, so let's keep
it that way. :)

Change-Id: Ic0892f5894700938bfa01f3f9bc8e5ab8276eb72
2014-01-24 09:21:16 -08:00
Aaron Arcos f643430373 Fix to streching image b/60173.
It seems the problem was iOS specific. In retina displays the devicePixelRatio
turns out to be 2. This was making the images twice as wide. This was introduced
as a way to fix the resolution problem with some Apple devices, I suppose? Since this is not
fixing the problem I am removing it for the moment. Fixing the resolution issue implies
more changes that will be addressed in another iteration.

Bug: 60173
Change-Id: Iaff2aa6ba13ae85f905ab6d1569572881d8b5990
2014-01-23 16:16:13 -08:00
Translation updater bot a28988355b Localisation updates from https://translatewiki.net.
Change-Id: Icaf9874a67cf3ff427d85e4db61983258e9bd1b5
2014-01-23 20:16:13 +00:00
Mark Holmquist 64c1cc2976 Fix up jsduck docs
Documentation shouldn't be this hard :P

Change-Id: I758ec6c5b3e0ba389dbb837470fa6ceea07fa67d
2014-01-23 18:31:12 +00:00
jenkins-bot d245703241 Merge "A bunch of description fixes" 2014-01-22 23:51:50 +00:00
Mark Holmquist 22d2a69979 A bunch of description fixes
* Move description and caption to both be in the bottom left
* Make empty description grey and italic
* Fix problem where description was sometimes appended twice
* Move description UI stuff into a separate file, and make it more MVCy
* Tests for description UI stuff
* General framework, to an extent, for UI classes

Change-Id: Ibc8c576cd8a41c2e3cf7e13f1b9e093384fb4655
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/120
2014-01-22 14:46:39 -08:00
Gergő Tisza 2a70725d4e Add CC 4.0 license support
Bug: 60199
Change-Id: I1c2fa11960b2031b5dd5c4f85bf6caaa566fd3b8
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/95
2014-01-22 09:18:36 -08:00
jenkins-bot 7f67c0934a Merge "Add 'Location:' to the location message" 2014-01-22 17:13:52 +00:00
Zeljko Filipin f876b87d56 @login tag is required for tests to be able to log in at Jenkins machine
Change-Id: I4302518543a7f7e4bd02132d444f870a1fcea54f
2014-01-22 14:51:17 +01:00
Gergő Tisza fed238fcd6 Create model & providers for file usage information
Bug: 60087
Change-Id: I0e72c1e4590714e92a365f9741633221af5b0553
2014-01-21 18:04:51 -08:00
Mark Holmquist 47cad0e607 Add 'Location:' to the location message
Actually it's a totally new message, but still.

Change-Id: I5c02b9ec59bd0c8e455aae71936625a1bae48700
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/121
2014-01-21 17:35:02 -08:00
Gergő Tisza ac8d1eec0c Change working directory for JSDuck generate script
...so that it can be used without cd-ing.

Change-Id: I8e75b7348dfe0d3bd7185899bfeecbe63de11161
2014-01-22 00:33:40 +00:00
Mark Holmquist 34047e3ba3 Fix jsduck warnings
Change-Id: I91da4956c6635088a3763c2cd79d0e685bbaf859
2014-01-21 16:28:05 -08:00
Mark Holmquist 4ce1d0d206 Add main class to jsduck
Change-Id: I774303ce4f756637bea3821ae2b2ff724351b3bb
2014-01-21 13:48:10 -08:00
Mark Holmquist bdef21d593 Adding first pass at jsduck docs
Interface, data model, and image all documented.

Change-Id: Id64da283c4bbeaae930103233f9e798b5a9db51b
2014-01-21 11:44:58 -08:00
jenkins-bot 244b056249 Merge "Initial setup for Multimedia Viewer browser tests and first basic e2e test." 2014-01-20 22:55:02 +00:00
Translation updater bot bef5375818 Localisation updates from https://translatewiki.net.
Change-Id: Icd507c502006eba00c15c5633f1e919d041b9426
2014-01-19 20:16:51 +00:00
Jeff Hall 47cfaf62bd Initial setup for Multimedia Viewer browser tests and first basic e2e test.
Did some clean-up for Cucumber tags and code conventions.

Change-Id: Ifc954f60a50c41211043493fd64c2dcfa64848ff
Mingle: Multimedia card #100
Bug: 60049
2014-01-18 18:41:26 -08:00
Translation updater bot 1eba90d28d Localisation updates from https://translatewiki.net.
Change-Id: Id627ee6304a86d8bf084b0debca2c04191d8d0a9
2014-01-18 21:15:32 +00:00
Mark Holmquist f59962e4a3 Add location information to metadata div
Adds location in a human readable format, plus a link to geohack because
that's how we roll.

See https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/42

+more tests

Change-Id: Ie8c9b8a0caf0f13ad5341a84173381ce49da97f6
2014-01-17 17:22:44 -08:00
Mark Holmquist 6363b90bd8 Add caption to the interface in place of description
Also include the description on the right side of the page, but the caption
generally is more relevant and so should have the place of honour.

+tests

Change-Id: I512b3dd99207878233d501135b4dda0d0bd9cdd6
2014-01-17 16:37:56 -08:00
Mark Holmquist 328728a3ff Add tests for EventLogging timing
Change-Id: Idb44fc2c0b4f38c0e4ae9c91459735fa547d0191
2014-01-17 18:44:28 +00:00