Skip to content
Snippets Groups Projects
Commit a5917593 authored by buczekp's avatar buczekp
Browse files

[LMS-2441] fixed progress bars for trash operations & used dictionary messages

SVN: 22415
parent 783cbb5f
No related branches found
No related tags found
No related merge requests found
...@@ -530,6 +530,8 @@ public abstract class Dict ...@@ -530,6 +530,8 @@ public abstract class Dict
public static final String REVERT_DELETIONS_CONFIRMATION_MSG = public static final String REVERT_DELETIONS_CONFIRMATION_MSG =
"revert_deletions_confirmation_msg"; "revert_deletions_confirmation_msg";
public static final String REVERT_DELETIONS_PROGRESS = "revert_deletions_progress";
public static final String REVERT_ENTITY_DELETION_CONFIRMATION_MSG = public static final String REVERT_ENTITY_DELETION_CONFIRMATION_MSG =
"revert_entity_deletion_confirmation_msg"; "revert_entity_deletion_confirmation_msg";
...@@ -539,6 +541,8 @@ public abstract class Dict ...@@ -539,6 +541,8 @@ public abstract class Dict
public static final String PERMANENT_DELETIONS_CONFIRMATION_MSG = public static final String PERMANENT_DELETIONS_CONFIRMATION_MSG =
"permanent_deletions_confirmation_msg"; "permanent_deletions_confirmation_msg";
public static final String PREMANENT_DELETIONS_PROGRESS = "permanent_deletions_progress";
public static final String USE_TRASH_BROWSER = "use_trash_browser"; public static final String USE_TRASH_BROWSER = "use_trash_browser";
public static final String TRASH_BUTTON_TOOLTIP = "trash_button_tooltip"; public static final String TRASH_BUTTON_TOOLTIP = "trash_button_tooltip";
...@@ -547,6 +551,8 @@ public abstract class Dict ...@@ -547,6 +551,8 @@ public abstract class Dict
public static final String EMPTY_TRASH_CONFIRMATION_MSG = "empty_trash_confirmation_msg"; public static final String EMPTY_TRASH_CONFIRMATION_MSG = "empty_trash_confirmation_msg";
public static final String EMPTY_TRASH_PROGRESS = "empty_trash_progress";
// //
// Sample Viewer // Sample Viewer
// //
......
...@@ -45,13 +45,15 @@ public final class EmptyTrashConfirmationDialog extends ...@@ -45,13 +45,15 @@ public final class EmptyTrashConfirmationDialog extends
super(viewContext, Collections.<Deletion> emptyList(), viewContext super(viewContext, Collections.<Deletion> emptyList(), viewContext
.getMessage(Dict.EMPTY_TRASH_CONFIRMATION_TITLE)); .getMessage(Dict.EMPTY_TRASH_CONFIRMATION_TITLE));
this.viewContext = viewContext; this.viewContext = viewContext;
this.callback = AsyncCallbackWithProgressBar.decorate(callback, "Emptying trash..."); this.callback = callback;
} }
@Override @Override
protected void executeConfirmedAction() protected void executeConfirmedAction()
{ {
viewContext.getCommonService().emptyTrash(callback); viewContext.getCommonService().emptyTrash(
AsyncCallbackWithProgressBar.decorate(callback,
viewContext.getMessage(Dict.EMPTY_TRASH_PROGRESS)));
} }
@Override @Override
......
...@@ -46,7 +46,7 @@ public final class PermanentDeletionConfirmationDialog extends ...@@ -46,7 +46,7 @@ public final class PermanentDeletionConfirmationDialog extends
super(viewContext, deletions, viewContext super(viewContext, deletions, viewContext
.getMessage(Dict.PERMANENT_DELETIONS_CONFIRMATION_TITLE)); .getMessage(Dict.PERMANENT_DELETIONS_CONFIRMATION_TITLE));
this.viewContext = viewContext; this.viewContext = viewContext;
this.callback = AsyncCallbackWithProgressBar.decorate(callback, "Deleting permanently..."); this.callback = callback;
} }
public PermanentDeletionConfirmationDialog(IViewContext<ICommonClientServiceAsync> viewContext, public PermanentDeletionConfirmationDialog(IViewContext<ICommonClientServiceAsync> viewContext,
...@@ -58,7 +58,10 @@ public final class PermanentDeletionConfirmationDialog extends ...@@ -58,7 +58,10 @@ public final class PermanentDeletionConfirmationDialog extends
@Override @Override
protected void executeConfirmedAction() protected void executeConfirmedAction()
{ {
viewContext.getCommonService().deletePermanently(TechId.createList(data), callback); viewContext.getCommonService().deletePermanently(
TechId.createList(data),
AsyncCallbackWithProgressBar.decorate(callback,
viewContext.getMessage(Dict.PREMANENT_DELETIONS_PROGRESS)));
} }
@Override @Override
......
...@@ -68,14 +68,17 @@ public final class RevertDeletionConfirmationDialog extends ...@@ -68,14 +68,17 @@ public final class RevertDeletionConfirmationDialog extends
super(viewContext, Collections.singletonList(deletedEntity.getDeletion()), viewContext super(viewContext, Collections.singletonList(deletedEntity.getDeletion()), viewContext
.getMessage(Dict.REVERT_DELETIONS_CONFIRMATION_TITLE)); .getMessage(Dict.REVERT_DELETIONS_CONFIRMATION_TITLE));
this.viewContext = viewContext; this.viewContext = viewContext;
this.callback = AsyncCallbackWithProgressBar.decorate(callback, "Reverting deletion(s)..."); this.callback = callback;
this.deletedEntityOrNull = deletedEntity; this.deletedEntityOrNull = deletedEntity;
} }
@Override @Override
protected void executeConfirmedAction() protected void executeConfirmedAction()
{ {
viewContext.getCommonService().revertDeletions(TechId.createList(data), callback); viewContext.getCommonService().revertDeletions(
TechId.createList(data),
AsyncCallbackWithProgressBar.decorate(callback,
viewContext.getMessage(Dict.REVERT_DELETIONS_PROGRESS)));
} }
@Override @Override
......
...@@ -81,14 +81,17 @@ var common = { ...@@ -81,14 +81,17 @@ var common = {
button_empty_trash: "Empty Trash", button_empty_trash: "Empty Trash",
button_delete_permanently: "Delete Permanently", button_delete_permanently: "Delete Permanently",
revert_deletions_confirmation_title: "Confirm Revert", revert_deletions_confirmation_title: "Confirm Revert",
revert_deletions_progress: "Reverting deletion(s)...",
revert_entity_deletion_confirmation_msg: "Are you sure you want to revert deletion of {0}?</br></br><b>NOTE:</b> This will in fact revert deletion of all entities deleted together with {0} by {1} on {2} with a following reason: <i>\"{3}\"</i>", revert_entity_deletion_confirmation_msg: "Are you sure you want to revert deletion of {0}?</br></br><b>NOTE:</b> This will in fact revert deletion of all entities deleted together with {0} by {1} on {2} with a following reason: <i>\"{3}\"</i>",
revert_deletions_confirmation_msg: "Are you sure you want to revert {0} selected deletion(s)?", revert_deletions_confirmation_msg: "Are you sure you want to revert {0} selected deletion(s)?",
permanent_deletions_confirmation_title: "Confirm Permanent Deletion", permanent_deletions_confirmation_title: "Confirm Permanent Deletion",
permanent_deletions_progress: "Deleting permanently...",
permanent_deletions_confirmation_msg: "Are you sure you want to <b>permanently</b> delete all entities that were moved to trash in selected {0} deletion(s)?</br></br>You can't undo this action.", permanent_deletions_confirmation_msg: "Are you sure you want to <b>permanently</b> delete all entities that were moved to trash in selected {0} deletion(s)?</br></br>You can't undo this action.",
use_trash_browser: "Use trash browser (click on the trash button in top menu) to delete entities permanently.", use_trash_browser: "Use trash browser (click on the trash button in top menu) to delete entities permanently.",
trash_button_tooltip: "Displays browser of deletions, allows to revert them or confirm (delete permanently).", trash_button_tooltip: "Displays browser of deletions, allows to revert them or confirm (delete permanently).",
empty_trash_confirmation_title: "Confirm Empty Trash", empty_trash_confirmation_title: "Confirm Empty Trash",
empty_trash_confirmation_msg: "Are you sure you want to <b>permanently</b> delete all entities that were moved to trash?</br></br>You can't undo this action.", empty_trash_confirmation_msg: "Are you sure you want to <b>permanently</b> delete all entities that were moved to trash?</br></br>You can't undo this action.",
empty_trash_progress: "Emptying trash...",
// //
// Table Modifications // Table Modifications
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment