assets/js/romo/modal.js in romo-0.17.1 vs assets/js/romo/modal.js in romo-0.18.0

- old
+ new

@@ -5,29 +5,29 @@ } var RomoModal = function(element) { this.elem = $(element); this.doInitPopup(); - this.romoInvoke = this.elem.romoInvoke()[0]; - this.romoInvoke.doUnBindInvoke(); // disable auto invoke on click + this.romoAjax = this.elem.romoAjax()[0]; + this.romoAjax.doUnbindElem(); // disable auto invoke on click if (this.elem.data('romo-modal-disable-click-invoke') !== true) { this.elem.unbind('click'); this.elem.on('click', $.proxy(this.onToggleClick, this)); } this.elem.on('modal:triggerToggle', $.proxy(this.onToggleClick, this)); this.elem.on('modal:triggerPopupOpen', $.proxy(this.onPopupOpen, this)); this.elem.on('modal:triggerPopupClose', $.proxy(this.onPopupClose, this)); - this.elem.on('invoke:loadStart', $.proxy(function(e, invoke) { + this.elem.on('romoAjax:callStart', $.proxy(function(e, romoAjax) { this.doLoadBodyStart(); return false; }, this)); - this.elem.on('invoke:loadSuccess', $.proxy(function(e, data, invoke) { + this.elem.on('romoAjax:callSuccess', $.proxy(function(e, data, romoAjax) { this.doLoadBodySuccess(data); return false; }, this)); - this.elem.on('invoke:loadError', $.proxy(function(e, xhr, invoke) { + this.elem.on('romoAjax:callError', $.proxy(function(e, xhr, romoAjax) { this.doLoadBodyError(xhr); return false; }, this)); this.doBindElemKeyUp(); @@ -171,10 +171,10 @@ RomoModal.prototype.doPopupOpen = function() { if (this.elem.data('romo-modal-content-elem') !== undefined) { this.doLoadBodySuccess($(this.elem.data('romo-modal-content-elem')).html()) } else { - this.romoInvoke.doInvoke(); + this.romoAjax.doInvoke(); } this.popupElem.addClass('romo-modal-open'); this.doPlacePopupElem();