Merge remote-tracking branch 'origin/open254'
This commit is contained in:
@@ -86,7 +86,9 @@ define(
|
||||
severity: "info"
|
||||
});
|
||||
} else if (phase.toLowerCase() === "copying") {
|
||||
this.dialogService.dismiss();
|
||||
if (this.dialog) {
|
||||
this.dialog.dismiss();
|
||||
}
|
||||
if (!this.notification) {
|
||||
this.notification = this.notificationService
|
||||
.notify({
|
||||
@@ -115,7 +117,8 @@ define(
|
||||
}
|
||||
|
||||
function error(errorDetails) {
|
||||
var errorMessage = {
|
||||
var errorDialog,
|
||||
errorMessage = {
|
||||
title: "Error copying objects.",
|
||||
severity: "error",
|
||||
hint: errorDetails.message,
|
||||
@@ -123,12 +126,12 @@ define(
|
||||
options: [{
|
||||
label: "OK",
|
||||
callback: function () {
|
||||
self.dialogService.dismiss();
|
||||
errorDialog.dismiss();
|
||||
}
|
||||
}]
|
||||
};
|
||||
|
||||
self.dialogService.dismiss();
|
||||
self.dialog.dismiss();
|
||||
if (self.notification) {
|
||||
self.notification.dismiss(); // Clear the progress notification
|
||||
}
|
||||
@@ -136,7 +139,7 @@ define(
|
||||
//Show a minimized notification of error for posterity
|
||||
self.notificationService.notify(errorMessage);
|
||||
//Display a blocking message
|
||||
self.dialogService.showBlockingMessage(errorMessage);
|
||||
errorDialog = self.dialogService.showBlockingMessage(errorMessage);
|
||||
|
||||
}
|
||||
function notification(details) {
|
||||
|
||||
@@ -44,6 +44,7 @@ define(
|
||||
notificationService,
|
||||
notification,
|
||||
dialogService,
|
||||
mockDialog,
|
||||
mockLog,
|
||||
abstractComposePromise,
|
||||
progress = {phase: "copying", totalObjects: 10, processed: 1};
|
||||
@@ -120,9 +121,12 @@ define(
|
||||
.andReturn(locationServicePromise);
|
||||
|
||||
dialogService = jasmine.createSpyObj('dialogService',
|
||||
['showBlockingMessage', 'dismiss']
|
||||
['showBlockingMessage']
|
||||
);
|
||||
|
||||
mockDialog = jasmine.createSpyObj("dialog", ["dismiss"]);
|
||||
dialogService.showBlockingMessage.andReturn(mockDialog);
|
||||
|
||||
notification = jasmine.createSpyObj('notification',
|
||||
['dismiss', 'model']
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user