File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 247
247
248
248
BoxModal . prototype . _bindEvents = function ( ) {
249
249
var _self = this ;
250
+ _self . _pboxElement . bind ( "click.pbox" , function ( e ) {
251
+ e . stopPropagation ( ) ;
252
+ } ) ;
250
253
$document . bind ( "click.pbox" + this . _id , function ( e ) {
251
254
var _eTarget = angular . element ( e . target ) ;
252
255
if ( util . hasClass ( _eTarget , 'pbox' ) ) {
278
281
$body . append ( this . _pboxElement ) ;
279
282
$timeout ( function ( ) {
280
283
$wtPosition . calculatePos ( _self . _options , $target , _self . _pboxElement ) ;
284
+ _self . _bindEvents ( ) ;
281
285
} ) ;
282
- this . _bindEvents ( ) ;
283
286
} ;
284
287
285
288
BoxModal . prototype . close = function ( result ) {
328
331
templateAndResolvePromise . then ( function resolveSuccess ( tplAndVars ) {
329
332
330
333
var boxScope = ( options . scope || $rootScope ) . $new ( ) ;
331
- boxScope . $close = pboxInstance . close ;
332
- boxScope . $dismiss = pboxInstance . dismiss ;
334
+ boxScope . $close = function ( result ) {
335
+ pboxInstance . close ( result ) ;
336
+ } ;
337
+ boxScope . $dismiss = function ( ) {
338
+ pboxInstance . dismiss ( ) ;
339
+ } ;
333
340
334
341
var ctrlInstance , ctrlLocals = { } ;
335
342
var resolveIter = 1 ;
You can’t perform that action at this time.
0 commit comments