Index: core/units/phrases/phrases_event_handler.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/phrases/phrases_event_handler.php (revision 15892) +++ core/units/phrases/phrases_event_handler.php (revision ) @@ -85,7 +85,7 @@ public function CheckPermission(kEvent $event) { if ( !$this->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 @@ -262,6 +277,21 @@ } parent::OnUpdate($event); + } + + /** + * 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'); } /** @@ -517,4 +547,4 @@ ) ); } - } \ No newline at end of file + }