Close fancybox when clicking on the caption of a preview to move to the document view.

Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Michael Price
2018-03-12 18:31:42 -04:00
committed by Roberto Rosario
parent d03c6b4646
commit 2802ee233c
3 changed files with 9 additions and 4 deletions

View File

@@ -1,6 +1,5 @@
===============
Code statistics
===============
---------------
As of Sun Mar 4 00:43:25 2018 (commit d367d32be62ed86dd6d7b02658eac2fa8086dbb9)

View File

@@ -9,7 +9,6 @@ These are errors or issues that are blocking a release.
UI - Frontend
~~~~~~~~~~~~~
- Close fancybox when clicking on the title to move to the document view.
- Match row height is not executing until scroll.
- Fix shift+click and control+click.

View File

@@ -6,6 +6,8 @@ var MayanImage = function (options) {
}
MayanImage.intialize = function () {
var app = this;
this.fancybox = $().fancybox({
animationDuration : 400,
buttons : [
@@ -13,9 +15,14 @@ MayanImage.intialize = function () {
'close'
],
selector: 'a.fancybox',
afterShow: function (instance, current) {
$('a.a-caption').on('click', function(event) {
instance.close(true);
});
},
});
$('img.lazy-load').lazyload({
$('img.lazy-load').lazyload({
appear: function(elements_left, settings) {
new MayanImage({element: $(this)});
},