Commit graph

30 commits

Author SHA1 Message Date
Mark Holmquist 32a1c2e194 Support for all manner of images
Thumbnails still supported, but we also do categories and galleries,
now!

https://mingle.corp.wikimedia.org/projects/multimedia/cards/57

Change-Id: Ieee973eb165eec3e4cff1f0d387e2c20369e126b
2013-11-04 13:40:31 -08:00
Mark Holmquist 21e4d76ea8 Make description scrollable
The autoEllipsis nonsense wasn't working, this is wayyy better.

Bug: 56145
Change-Id: Iaca83c405969d09c53c09561236a39d82bad7de2
2013-11-01 12:21:37 -07:00
Brion Vibber 64fb52a709 MultimediaViewer hi-DPI support
Multiply target dimensions by $.devicePixelRatio() when fetching
image for the viewer lightbox.

Bug: 55477
Change-Id: I5d64d21ecc563486a6f7d4709cebc129ef77f930
2013-11-01 16:20:05 +00:00
Mark Holmquist dd3df43e37 Fix bug in spinner code
Needed to use $.createSpinner instead of hacking in the image directly,
else bits.wikimedia.org won't work as expected. Will test on beta.

Change-Id: I0eba356f7910fd6a3173ed66c601fd42264ff336
2013-10-31 15:33:40 -07:00
Mark Holmquist dd2e2d153f Add info links for Media Viewer
Bug: 56332
Change-Id: I2d229481693735a4662f1d898bd0f19c200e39bc
2013-10-31 17:15:43 +00:00
jenkins-bot 9411057591 Merge "Clear entire interface" 2013-10-30 20:34:41 +00:00
Mark Holmquist 9ded203080 Clear entire interface
In the future, I'll have a nicer UI creation helper method that will
mark these as clearable and empty them for me. Until then...

Change-Id: I8a03040a294a4fec19cd7714d4219f5d571b0c48
2013-10-30 13:22:25 -07:00
Mark Holmquist ca46c13d13 Add "use this file" link and dialog
Little bit hacky, maybe, but it's working nicely and it's a very useful
tool for the lightbox.

Selection, it turns out, is really really difficult.

Bug: 56141
Change-Id: Ifd3e2f771010190c9f401fd4219342aff48f4be8
2013-10-30 13:06:18 -07:00
Mark Holmquist e40d993227 Add image's license to the lightbox header
Depends on…

* core
:* I77303d8e535fc1c42e14cfb853814e5c434a81ec
* CommonsMetadata
:* I5e6bc45f9751641e16426231dabcc8277b86fee0 (merged)
:* If3cf6a0ee444d1613d0caf14045b92fad6afa2ab (merged)

Change-Id: I60180f7ca3a16a04a0adee8af8482fa0940ac555
2013-10-30 11:53:26 -07:00
Mark Holmquist fe2141e488 Fix up whitelistHtml
There were a few nasty things going on here, but it looks fixed up, and
probably a mite faster too!

Thanks so much for the review, Krinkle.

Thanks to Gergo also for the better algo.

Change-Id: I630a1ad625abb803e31c7e7dd2cb4f4386d52607
2013-10-30 10:37:21 -07:00
Mark Holmquist 71e87c64e6 Load thumbnails, use loading image in core
This makes the loading experience _way_ nicer, and hopefully faster.

Bug: 56266
Change-Id: Ided64b0e15af84d9fe65517db2adb291c174c4bf
2013-10-28 15:34:57 -07:00
tgr 467a697d55 Improve date display
Strip any non-text content from the creation/upload date string,
and, if possible,  parse and format (according to browser locale)
the result.

Bug: 56146
Change-Id: I214e53c5219335b7a9fc852dc029b2992ca56435
2013-10-25 20:57:10 +04:00
Mark Holmquist 0719e17a6b Add source and authour to the title div
Strips out complex formatting, which should be useful later on as well.

Depends on:

* core
:* I77303d8e535fc1c42e14cfb853814e5c434a81ec
* CommonsMetadata
:* I5e6bc45f9751641e16426231dabcc8277b86fee0

Change-Id: Id835fd8133b9762e7bec10783f4fa4b983177aed
2013-10-24 15:59:24 -07:00
jenkins-bot a0c1e950c4 Merge "Put the username into the info list" 2013-10-24 22:58:08 +00:00
jenkins-bot ed7d36622c Merge "EventLogging support for MultimediaViewer" 2013-10-24 22:56:15 +00:00
Mark Holmquist 47c7fc1be8 Put the username into the info list
Link to the user page of the uploader.

Fetches the gender from the API - falls back to "unknown" especially in
cases of cross-domain requests.

Change-Id: I38940782dc5d2d56c8aea608b1fe72e04f397c00
2013-10-24 15:55:38 -07:00
jenkins-bot cf4c9ef4f4 Merge "Add creation time to list" 2013-10-24 22:46:43 +00:00
Mark Holmquist f26d8b06f5 EventLogging support for MultimediaViewer
Capture clicky events for most buttons and things.

Change-Id: I7d7ed21512df5cda19a0e5b7b7e1a32fd1ccfd2b
2013-10-24 15:33:55 -07:00
Mark Holmquist a66be06ae9 Add creation time to list
Fallback to upload time for now.

Helps to have:

* core
:* I77303d8e535fc1c42e14cfb853814e5c434a81ec
* CommonsMetadata
:* I5e6bc45f9751641e16426231dabcc8277b86fee0

Change-Id: I822b48cebbace51cd8f68adc45a68a1c93ec29db
2013-10-24 15:21:17 -07:00
Mark Holmquist ab2949e95f Clear interface before opening again
Bug: 56055
Change-Id: I1a36617ea7b141e0d695ff44ef3b05a2e327b4c4
2013-10-24 22:19:30 +00:00
Mark Holmquist ea778e990f Fix a few fullscreen bugs
Also pull in a change to multilightbox that will make things easier for
fullscreen handling.

Bug: 55489
Change-Id: I2eda8f82df8602a02dcf1c878c5232a8e6490e6a
2013-10-24 15:18:34 -07:00
Mark Holmquist bfc58e4533 Add description to the DOM
This is all getting really real, really fast!

Depends on:

* core
:* I77303d8e535fc1c42e14cfb853814e5c434a81ec
* CommonsMetadata
:* I5e6bc45f9751641e16426231dabcc8277b86fee0

Change-Id: I203852358fc6f7592832e48c562b24c5d9f046f5
2013-10-24 14:06:56 -07:00
Mark Holmquist c9bd8416ec Add whitelistHtml method
Used in source/authour and description patches

Change-Id: Iff17ee74f7a1bcee1c099053a2b15be7fc8bab77
2013-10-24 14:04:51 -07:00
Mark Holmquist 084cbfe7e4 Fetch extended metadata from the API
Depends on:

* core
:* I77303d8e535fc1c42e14cfb853814e5c434a81ec

Change-Id: Ic4700d33e4104783e034903f25a72b8fac2d89b2
2013-10-24 13:41:12 -07:00
jenkins-bot 822018c418 Merge "Only add handlers on image thumbnails" 2013-10-24 20:31:14 +00:00
Mark Holmquist 509416ce8d Add remote image repository information to list
Change-Id: Icfab093a44530949d1672a683fb8d4c0e7b901fc
2013-10-24 09:43:11 -07:00
Mark Holmquist f279c17112 Fix interface creation
The previous commits had a flawed process for creating the lightbox
interface. We now have some nice tweaks that should make it loads
easier to modify in later commits.

Change-Id: Ie56da2384c993279af0db2dee82e488e02783114
2013-10-24 09:31:08 -07:00
Mark Holmquist 62f6235f54 Only add handlers on image thumbnails
None of this PDF handler business.

Whitelist may be a little incomplete, but I think it comprises most of
the images on Commons at least. We can revisit later.

Change-Id: I33a44f8de8b0e93818f7cc950d8cae11bd73b929
2013-10-22 13:42:57 -07:00
Mark Holmquist 88b2e6f1a2 Pull data from API, load title
Information is actually getting stuck into the interface now! Woo!

Also added divs for other metadata, when we're ready for them.

Note, requires I1aaed0895d2a0bc224c82e93975ecf6afd8cb6b8 and
Ie31e6df376bda087e92ec889d54df3374ba96b5e to work properly.

Change-Id: Ief96c1b7b7ad54a6bdf0531921a842206a42c823
2013-10-08 11:42:39 -07:00
Mark Holmquist 4898f42e18 Initial commit - working demo
Works with the new multilightbox library from
https://gitorious.org/multilightbox/multilightbox

Also has fullscreen and close. Very fun.

Change-Id: I6d61f6590843e1767bc7492dbd98e6aa3b85fcdc
2013-09-03 16:52:28 -07:00