@@ -51,7 +51,10 @@ angular.module( 'multi-select', ['ng'] ).directive( 'multiSelect' , [ '$sce', fu
51
51
orientation : '@' ,
52
52
maxLabels : '@' ,
53
53
isDisabled : '=' ,
54
- directiveId : '@'
54
+ directiveId : '@' ,
55
+ // JH DotComIt Added 5/8/2014
56
+ onPopupopen : '&onPopupopen' ,
57
+ onPopupclose : '&onPopupclose'
55
58
} ,
56
59
57
60
template :
@@ -235,15 +238,21 @@ angular.module( 'multi-select', ['ng'] ).directive( 'multiSelect' , [ '$sce', fu
235
238
for ( i = 0 ; i < checkboxes . length ; i ++ ) {
236
239
if ( i != multiSelectIndex ) {
237
240
checkboxes [ i ] . className = 'multiSelect checkboxLayer hide' ;
241
+ // JH DotComIt 5/8/2014 Added method handler for closing the popup
242
+ $scope . onPopupclose ( ) ;
238
243
}
239
244
}
240
245
241
246
if ( checkboxes [ multiSelectIndex ] . className == 'multiSelect checkboxLayer hide' ) {
242
247
checkboxes [ multiSelectIndex ] . className = 'multiSelect checkboxLayer show' ;
248
+ // JH DotComIt 5/8/2014 Added method handler for opening the popup
249
+ $scope . onPopupopen ( ) ;
243
250
}
244
251
else if ( checkboxes [ multiSelectIndex ] . className == 'multiSelect checkboxLayer show' ) {
245
252
checkboxes [ multiSelectIndex ] . className = 'multiSelect checkboxLayer hide' ;
246
- }
253
+ // JH DotComIt 5/8/2014 Added method handler for closing the popup
254
+ $scope . onPopupclose ( ) ;
255
+ }
247
256
}
248
257
}
249
258
@@ -359,8 +368,10 @@ angular.module( 'multi-select', ['ng'] ).directive( 'multiSelect' , [ '$sce', fu
359
368
var checkboxes = document . querySelectorAll ( '.checkboxLayer' ) ;
360
369
if ( e . target . className . indexOf ( 'multiSelect' ) === - 1 ) {
361
370
for ( i = 0 ; i < checkboxes . length ; i ++ ) {
362
- checkboxes [ i ] . className = 'multiSelect checkboxLayer hide' ;
363
- }
371
+ checkboxes [ i ] . className = 'multiSelect checkboxLayer hide' ;
372
+ // JH DotComIt 5/8/2014 Added method handler for closing the popup
373
+ $scope . onPopupclose ( ) ;
374
+ }
364
375
e . stopPropagation ( ) ;
365
376
}
366
377
} ) ;
0 commit comments