Skip to content
This repository was archived by the owner on Jan 7, 2020. It is now read-only.

Commit 5b09707

Browse files
authored
Merge pull request #278 from RandyInVictoria/tweaks
EPIC-1188 Ensure modals will not close by ESC or click on backdrop.
2 parents 1704d78 + 5b4554f commit 5b09707

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

modules/core/client/app/init.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,23 @@ angular.module(ApplicationConfiguration.applicationModuleName).run(function ($ro
8787

8888
});
8989

90+
// Ensures all modals can only be closed by clicking X or buttons
91+
angular.module('ui.bootstrap').config(function($provide) {
92+
$provide.decorator('$modal', function($delegate) {
93+
var open = $delegate.open;
94+
95+
$delegate.open = function(options) {
96+
options = angular.extend(options || {}, {
97+
backdrop: 'static',
98+
keyboard: false
99+
});
100+
return open(options);
101+
};
102+
103+
return $delegate;
104+
});
105+
});
106+
90107
//Then define the init function for starting up the application
91108
angular.element(document).ready(function () {
92109
//Fixing facebook bug with redirect

0 commit comments

Comments
 (0)