mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 20:57:26 +02:00
Prevent e-ajax from firing multiple times.
This commit is contained in:
@@ -123,12 +123,12 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
|
|||||||
e107.behaviors.eAJAX = {
|
e107.behaviors.eAJAX = {
|
||||||
attach: function (context, settings)
|
attach: function (context, settings)
|
||||||
{
|
{
|
||||||
$(context).find('.e-ajax').one('e-ajax').each(function ()
|
$(context).find('.e-ajax').each(function ()
|
||||||
{
|
{
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
var event = $this.attr('data-event') || e107.callbacks.getDefaultEventHandler($this);
|
var event = $this.attr('data-event') || e107.callbacks.getDefaultEventHandler($this);
|
||||||
|
|
||||||
$this.on(event, function ()
|
$this.one(event, function ()
|
||||||
{
|
{
|
||||||
var $element = $(this);
|
var $element = $(this);
|
||||||
|
|
||||||
@@ -219,7 +219,7 @@ var e107 = e107 || {'settings': {}, 'behaviors': {}};
|
|||||||
$(this).show();
|
$(this).show();
|
||||||
|
|
||||||
// default 'toggle'.
|
// default 'toggle'.
|
||||||
$(this).click(function ()
|
$(this).on('click', function ()
|
||||||
{
|
{
|
||||||
|
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
|
Reference in New Issue
Block a user