From a622113b0b8ffaf8f43f6d4b8a9b7b8d32b1b7f3 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 21 Jan 2015 16:17:19 +0000 Subject: [PATCH] =?UTF-8?q?Pass=20event=20in=20instead=20of=20using=20wind?= =?UTF-8?q?ow.event,=20fixes=20expos=C3=A9=20initialization=20to=20selecte?= =?UTF-8?q?d=20image=20in=20firefox?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- etemplate/js/expose.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/etemplate/js/expose.js b/etemplate/js/expose.js index c000231ece..6105c9aa88 100644 --- a/etemplate/js/expose.js +++ b/etemplate/js/expose.js @@ -296,13 +296,13 @@ function expose (widget) } if (typeof this.options.expose_view != 'undefined' && this.options.expose_view ) { - jQuery(this.node).on('click', function(){ - self._init_blueimp_gallery(_value); + jQuery(this.node).on('click', function(event){ + self._init_blueimp_gallery(event, _value); }).addClass('et2_clickable'); } }, - _init_blueimp_gallery: function (_value) + _init_blueimp_gallery: function (event, _value) { var mediaContent = []; var nm = find_nextmatch(this); @@ -310,7 +310,7 @@ function expose (widget) if(nm) { // Get the row that was clicked, find its index in the list - var current_entry = nm.controller.getRowByNode(window.event.srcElement); + var current_entry = nm.controller.getRowByNode(event.target); current_index = current_entry.idx || 0; // But before it goes, we'll pull everything we can