Skip to content

Commit 95c71f6

Browse files
committed
add ba-advise support for ModalFactory
resolves #80
1 parent ee3509f commit 95c71f6

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

docs/templates/modal.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,12 @@ <h3>Programmatic Modals</h3>
158158
'overlayClose': false,
159159
// Set if the modal should be destroyed once closed
160160
'destroyOnClose': false,
161+
// Set if the modal should have the 'ba-ignore-all-close' attribute
162+
// (presence of key in configuration object will enable adding attribute)
163+
'ignoreAllClose': '',
164+
// Set if the modal should have the 'ba-advise' attribute
165+
// (presence of key in configuration object will enable adding attribute)
166+
'advise': '',
161167
// Define a template to use for the modal
162168
'templateUrl': 'partials/examples-dynamic-modal.html',
163169
// Allows you to pass in properties to the scope of the modal

js/angular/components/modal/modal.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@
201201
'overlayClose',
202202
'destroyOnClose',
203203
'ignoreAllClose',
204+
'advise',
204205
'class'
205206
];
206207

@@ -326,6 +327,9 @@
326327
case 'ignoreAllClose':
327328
element.attr('ba-ignore-all-close', 'ba-ignore-all-close');
328329
break;
330+
case 'advise':
331+
element.attr('ba-advise', 'ba-advise');
332+
break;
329333
case 'class':
330334
if (angular.isString(config[prop])) {
331335
config[prop].split(' ').forEach(function(klass) {

0 commit comments

Comments
 (0)