Skip to content

Commit

Permalink
tweak(Filemanager/js): handle datasafe is locked exception for node g…
Browse files Browse the repository at this point in the history
…rid panel
  • Loading branch information
ccheng-dev committed Nov 11, 2024
1 parent 7f7aa76 commit 47a3fbd
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions tine20/Filemanager/js/NodeGridPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -851,23 +851,24 @@ Tine.Filemanager.NodeGridPanel = Ext.extend(Tine.widgets.grid.GridPanel, {
* @param {Object} options
*/
onStoreLoadException: function(proxy, type, error, options) {
if (error.code === 404) {
const pathFilter = options.params.filter.find((f) => f.field === 'path');
if (pathFilter) {
if (!this.redirectToParent) {
Ext.MessageBox.show({
title: i18n._hidden('Not Found'),
msg: i18n._hidden('Sorry, your request could not be completed because the required data could not be found. In most cases this means that someone already deleted the data. Please refresh your current view.'),
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.ERROR,
fn: (btn) => {
this.redirectToParent = true;
this.loadParentNodeByFilter(pathFilter);
}
});
} else {
this.loadParentNodeByFilter(pathFilter);
}
const pathFilter = options.params.filter.find((f) => f.field === 'path');

if (pathFilter) {
if (this.redirectToParent) {
this.loadParentNodeByFilter(pathFilter);
return;
}
if (error.code === 404) {
Ext.MessageBox.show({
title: i18n._hidden('Not Found'),
msg: i18n._hidden('Sorry, your request could not be completed because the required data could not be found. In most cases this means that someone already deleted the data. Please refresh your current view.'),
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.ERROR,
fn: (btn) => {
this.redirectToParent = true;
this.loadParentNodeByFilter(pathFilter);
}
});
return;
}
}
Expand Down

0 comments on commit 47a3fbd

Please sign in to comment.