From 4486842169fcbb47856e1973c158ba1f77aa92c1 Mon Sep 17 00:00:00 2001 From: Molkobain Date: Sat, 5 Nov 2022 00:25:22 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B05655=20-=20Align=20"activity=20panel"=20?= =?UTF-8?q?and=20"preferences"=20ajax=20operation=20code=20to=20new=20conv?= =?UTF-8?q?ention?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/layouts/activity-panel/activity-panel.js | 6 +++--- pages/UI.php | 1 + pages/ajax.render.php | 10 ++++++---- pages/preferences.php | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/js/layouts/activity-panel/activity-panel.js b/js/layouts/activity-panel/activity-panel.js index e6522ef67..90ca2a7c1 100644 --- a/js/layouts/activity-panel/activity-panel.js +++ b/js/layouts/activity-panel/activity-panel.js @@ -547,7 +547,7 @@ $(function() $.post( this.options.save_state_endpoint, { - 'operation': 'activity_panel_save_state', + 'operation': 'activity_panel.save_state', 'object_class': this._GetHostObjectClass(), 'object_mode': this._GetHostObjectMode(), 'is_expanded': this.element.hasClass(this.css_classes.is_expanded), @@ -936,7 +936,7 @@ $(function() // Prepare parameters let oParams = $.extend(oExtraInputs, { - operation: 'activity_panel_add_caselog_entries', + operation: 'activity_panel.add_caselog_entries', object_class: this._GetHostObjectClass(), object_id: this._GetHostObjectID(), transaction_id: this.options.transaction_id, @@ -1380,7 +1380,7 @@ $(function() // Send XHR request let oParams = { - operation: 'activity_panel_load_more_entries', + operation: 'activity_panel.load_more_entries', object_class: this._GetHostObjectClass(), object_id: this._GetHostObjectID(), last_loaded_entries_ids: this.options.last_loaded_entries_ids, diff --git a/pages/UI.php b/pages/UI.php index c2ff97cfa..90b4a54b2 100644 --- a/pages/UI.php +++ b/pages/UI.php @@ -655,6 +655,7 @@ EOF /////////////////////////////////////////////////////////////////////////////////////////// case 'modify': // Legacy operation + /** @internal */ case 'object.modify': // New operation $oController = new ObjectController(); $oP = $oController->Modify(); diff --git a/pages/ajax.render.php b/pages/ajax.render.php index 2e2cfe21b..08008bb68 100644 --- a/pages/ajax.render.php +++ b/pages/ajax.render.php @@ -2590,7 +2590,8 @@ EOF //-------------------------------- // Preferences //-------------------------------- - case 'preferences_set_user_picture': + /** @internal */ + case 'preferences.set_user_picture': $oPage = new JsonPage(); try { $oController = new PreferencesController(); @@ -2610,7 +2611,7 @@ EOF // Activity panel //-------------------------------- /** @internal */ - case 'activity_panel_save_state': + case 'activity_panel.save_state': $oPage = new JsonPage(); try { $oController = new ActivityPanelController(); @@ -2629,7 +2630,7 @@ EOF break; /** @internal */ - case 'activity_panel_add_caselog_entries': + case 'activity_panel.add_caselog_entries': $oPage = new JsonPage(); try { $oController = new ActivityPanelController(); @@ -2645,7 +2646,7 @@ EOF break; /** @internal */ - case 'activity_panel_load_more_entries': + case 'activity_panel.load_more_entries': $oPage = new JsonPage(); try { $oController = new ActivityPanelController(); @@ -2672,6 +2673,7 @@ EOF //-------------------------------- // Object //-------------------------------- + /** @internal */ case 'object.modify': $oController = new ObjectController(); $oPage = $oController->Modify(); diff --git a/pages/preferences.php b/pages/preferences.php index b21b8fac1..6a14c6f03 100644 --- a/pages/preferences.php +++ b/pages/preferences.php @@ -422,7 +422,7 @@ $('[data-role="ibo-preferences--user-preferences--picture-placeholder--image"]') $.post( GetAbsoluteUrlAppRoot()+'pages/ajax.render.php', { - 'operation': 'preferences_set_user_picture', + 'operation': 'preferences.set_user_picture', 'image_filename': $(this).attr('data-image-name') } )