|
@@ -31,7 +31,7 @@ import {StateService} from '../services/state';
|
|
|
import {WebClientService} from '../services/webclient';
|
|
|
import {ControllerModelMode} from '../types/enums';
|
|
|
|
|
|
-abstract class DialogController {
|
|
|
+class DialogController {
|
|
|
public static $inject = ['$mdDialog'];
|
|
|
|
|
|
public $mdDialog: ng.material.IDialogService;
|
|
@@ -58,11 +58,14 @@ abstract class DialogController {
|
|
|
this.activeElement.focus();
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* If true, the focus on the active element (before opening the dialog)
|
|
|
- * will be restored.
|
|
|
+ * will be restored. Default `true`, override if desired.
|
|
|
*/
|
|
|
- protected abstract resumeFocusOnClose(): boolean;
|
|
|
+ protected resumeFocusOnClose(): boolean {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -84,10 +87,6 @@ class SendFileController extends DialogController {
|
|
|
this.send();
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- protected resumeFocusOnClose(): boolean {
|
|
|
- return true;
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
/**
|