1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 17:02:41 +01:00
phorge-phorge/webroot/rsrc/js/application/pholio/behavior-pholio-mock-view.js
Lauri-Henrik Jalonen 8ac1afc81a Show all photos in a Pholio mock and allow switching between them
Summary: Mock page now shows all images. Switching between images is done by clicking thumbnails.

Test Plan: Verified that all images are shown. Verified that by clicking thumbnail the image clicked will show.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, AnhNhan

Maniphest Tasks: T2427

Differential Revision: https://secure.phabricator.com/D4698
2013-01-28 11:19:01 -08:00

17 lines
446 B
JavaScript

/**
* @provides javelin-behavior-pholio-mock-view
* @requires javelin-behavior
* javelin-stratcom
*/
JX.behavior('pholio-mock-view', function(config) {
JX.Stratcom.listen(
'click', // Listen for clicks...
'mock-thumbnail', // ...on nodes with sigil "mock-thumbnail".
function(e) {
var data = e.getNodeData('mock-thumbnail');
var main = JX.$(config.mainID);
main.src = data.fullSizeURI;
});
});