Commit graph

13 commits

Author SHA1 Message Date
Aaron Arcos add9a9b435 Add a very simple resize test
Add test to verify that in case of a resize event no image
replacement takes place when api data is empty/undefined.

Change-Id: I2a880ce4b2e6c158763b1473f6a9f751922187b0
2013-12-03 23:20:51 +00:00
jenkins-bot b704f294f8 Merge "Add tests to MultimediaViewer" 2013-12-02 23:27:42 +00:00
Aaron Arcos bed5c07039 Add tests to MultimediaViewer
These are just smoke tests. I will add more in coming versions of this change.
Consolidated various cases in one tests. Added tests to validate for legit clicks.

Based on Idfbec829399ff6969cd01be3c13a8ed7a66a1fef

Change-Id: I366c7af9a5cf43361d8293183c9da117bc5d4971
2013-12-02 15:19:12 -08:00
MatmaRex 1ed2804863 Replace weird .select() reimplementation
Browsers have had a .select() method on <input>s and <textarea>s
since the dawn of the web.

Change-Id: Ib35415115291086300494ef1c6cb3063cd6b8e94
2013-11-28 21:31:04 +00:00
MatmaRex d47778b501 Kill !Boolean( variable )
That's an impressive abomination. :)

Change-Id: I1e3d64add5921924050ad97bfe2b1e6f6b1d46b1
2013-11-28 22:07:32 +01:00
Mark Holmquist 85eb742277 Previous and next functionality!
Adds buttons on the side, disabled at the start and end of the list of
images, that let you browse through the images on the page!

Also arrow keys!

EXCITING!

Change-Id: Ie514cd4b16bdee8a384a89d4bd1d755a24c5cdb4
2013-11-26 21:10:16 +00:00
Mark Holmquist a4c0617b1f Push history state to support links to media viewer
Also listen for popState events so users can use their browser's back
functionality to close the lightbox or go backwards, etc.

Bug: 56469
Change-Id: Id44fea9008adb391817250c2897693f45bead717
2013-11-26 13:09:54 -08:00
Mark Holmquist 5aaf1e73fe Reorganize UI to be...way sexier.
There's just no other adjective for this, it is _super_ nice.

There may be refinements later as the designers get things together.

Bug: 56499
Change-Id: I200684a19c190444587f520595186e9ae5afbea6
2013-11-21 09:47:05 -08:00
Mark Holmquist 24a8092a2f Measure sitename clicks too
Change-Id: Iad105fbc9d257db895660d7afac77294e7907f7a
2013-11-18 22:04:10 +00:00
Mark Holmquist 95a88d43d1 Use oojs to extend multilightbox objects
Simple now, only really aliases the classes, but we'll use them to replace
the hooking infrastructure in the near future.

Change-Id: I963a4887a717c9bb064e30fa5fb86bbccb7186a1
2013-11-18 13:50:02 -08:00
tgr 5d419682f5 Use moment.js for date formatting
Add moment.js ( http://momentjs.com/ ) as a ResourceLoader module
and use it to parse and format date strings. Moment.js seems to be
the least bad option right now; eventually it should be replaced
by i18n functionality in core Javascript modules.

Change-Id: I332655778be3d694781b83fa5dea1e59770d8866
2013-11-15 14:53:45 +00:00
Mark Holmquist 96c4b06858 Rewrite of UI initialization
Split it into a bunch of different functions.

No helper functions because apparently most of my UI code is pretty
unique and not refactorable, or at least not easily.

Change-Id: I8209fd91ec6788c26b8dea26d97c26f8231ddbbf
2013-11-14 21:38:51 +00:00
Mark Holmquist c0c9e7037f ResourceLoader consistency file moves
Keep modules in separate dirs, move images to their module dirs, and fix
up the module declarations so they still work.

Also moved viewer.svg into the root.

Bug: 56421
Change-Id: Ia84ddfd3b91c784c42d9ba243c5cfd46354f139f
2013-11-14 13:38:40 -08:00
Renamed from js/ext.multimediaViewer.js (Browse further)