Index: branches/5.2.x/core/units/phrases/phrases_event_handler.php =================================================================== diff -u -N -r15569 -r16008 --- branches/5.2.x/core/units/phrases/phrases_event_handler.php (.../phrases_event_handler.php) (revision 15569) +++ branches/5.2.x/core/units/phrases/phrases_event_handler.php (.../phrases_event_handler.php) (revision 16008) @@ -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; @@ -249,6 +249,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 @@ -265,6 +280,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 @@ -517,4 +547,4 @@ ) ); } - } \ No newline at end of file + }