N°5655 - Align "activity panel" and "preferences" ajax operation code to new convention

This commit is contained in:
Molkobain
2022-11-05 00:25:22 +01:00
parent f5b216fd9a
commit 4486842169
4 changed files with 11 additions and 8 deletions

View File

@@ -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,

View File

@@ -655,6 +655,7 @@ EOF
///////////////////////////////////////////////////////////////////////////////////////////
case 'modify': // Legacy operation
/** @internal */
case 'object.modify': // New operation
$oController = new ObjectController();
$oP = $oController->Modify();

View File

@@ -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();

View File

@@ -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')
}
)