Index: branches/5.3.x/core/units/phrases/phrases_event_handler.php =================================================================== diff -u -N -r15928 -r16111 --- branches/5.3.x/core/units/phrases/phrases_event_handler.php (.../phrases_event_handler.php) (revision 15928) +++ branches/5.3.x/core/units/phrases/phrases_event_handler.php (.../phrases_event_handler.php) (revision 16111) @@ -1,6 +1,6 @@ Application->isAdmin && $this->Application->isDebugMode(false) && kUtil::constOn('DBG_PHRASES') ) { - $allow_events = Array ('OnCreate', 'OnUpdate'); + $allow_events = Array ('OnCreate', 'OnCreateAjax', 'OnUpdate', 'OnUpdateAjax'); if ( in_array($event->Name, $allow_events) ) { return true; @@ -251,6 +251,21 @@ } /** + * Processes items create from ajax request + * + * @param kEvent $event + * @return void + * @access protected + */ + protected function OnCreateAjax(kEvent $event) + { + $ajax_form_helper = $this->Application->recallObject('AjaxFormHelper'); + /* @var $ajax_form_helper AjaxFormHelper */ + + $ajax_form_helper->transitEvent($event, 'OnCreate'); + } + + /** * Redirects to original template after phrase is being update * * @param kEvent $event @@ -267,6 +282,21 @@ } /** + * Processes items update from ajax request + * + * @param kEvent $event + * @return void + * @access protected + */ + protected function OnUpdateAjax(kEvent $event) + { + $ajax_form_helper = $this->Application->recallObject('AjaxFormHelper'); + /* @var $ajax_form_helper AjaxFormHelper */ + + $ajax_form_helper->transitEvent($event, 'OnUpdate'); + } + + /** * Returns to original template after phrase adding/editing * * @param kEvent $event @@ -560,4 +590,4 @@ $ml_helper->updateTranslationState($event); } - } \ No newline at end of file + }