|
1 | | -// Patternslib 2.1.0 |
| 1 | +// Patternslib 2.1.1-dev |
2 | 2 |
|
3 | 3 | /** |
4 | 4 | * @license almond 0.3.3 Copyright jQuery Foundation and other contributors. |
@@ -27255,7 +27255,7 @@ define('pat-collapsible',[ |
27255 | 27255 | return; |
27256 | 27256 | } |
27257 | 27257 |
|
27258 | | - this.$panel = $el.find(".panel-content"); |
| 27258 | + this.$panel = $el.children(".panel-content"); |
27259 | 27259 | if (this.$panel.length === 0) { |
27260 | 27260 | if ($content.length) { |
27261 | 27261 | this.$panel = $content |
@@ -32874,7 +32874,7 @@ define('pat-depends',[ |
32874 | 32874 | // vim: sw=4 expandtab |
32875 | 32875 | ; |
32876 | 32876 | /** |
32877 | | - * EvEmitter v1.1.0 |
| 32877 | + * EvEmitter v1.0.3 |
32878 | 32878 | * Lil' event emitter |
32879 | 32879 | * MIT License |
32880 | 32880 | */ |
@@ -32979,12 +32979,6 @@ proto.emitEvent = function( eventName, args ) { |
32979 | 32979 | return this; |
32980 | 32980 | }; |
32981 | 32981 |
|
32982 | | -proto.allOff = |
32983 | | -proto.removeAllListeners = function() { |
32984 | | - delete this._events; |
32985 | | - delete this._onceEvents; |
32986 | | -}; |
32987 | | - |
32988 | 32982 | return EvEmitter; |
32989 | 32983 |
|
32990 | 32984 | })); |
@@ -33637,7 +33631,7 @@ define('pat-modal',[ |
33637 | 33631 | } else { |
33638 | 33632 | this.$el.append("<div class='panel-content' />"); |
33639 | 33633 | } |
33640 | | - $(".panel-content", this.$el).before($header); |
| 33634 | + this.$el.children(".panel-content").before($header); |
33641 | 33635 | this.$el.children(this.options.panelHeaderContent).prependTo($header); |
33642 | 33636 |
|
33643 | 33637 | // Restore focus in case the active element was a child of $el and |
@@ -33720,12 +33714,23 @@ define('pat-modal',[ |
33720 | 33714 | utils.redraw(this.$el.find(".panel-body")); |
33721 | 33715 | } |
33722 | 33716 | }, |
33723 | | - |
33724 | 33717 | destroy: function() { |
33725 | | - $(document).off(".pat-modal"); |
33726 | | - this.$el.remove(); |
33727 | | - $('body').removeClass("modal-active"); |
33728 | | - } |
| 33718 | + var $el = this.$el; |
| 33719 | + if ($el.find('form').hasClass('pat-inject') ) { |
| 33720 | + // if pat-inject in modal form, listen to patterns-inject-triggered and destroy first |
| 33721 | + // once that has been triggered |
| 33722 | + $('body').on( "patterns-inject-triggered", function() { |
| 33723 | + $(document).off(".pat-modal"); |
| 33724 | + $el.remove(); |
| 33725 | + $('body').removeClass("modal-active"); |
| 33726 | + }); |
| 33727 | + } else { |
| 33728 | + // if working without injection, destroy right away. |
| 33729 | + $(document).off(".pat-modal"); |
| 33730 | + $el.remove(); |
| 33731 | + $('body').removeClass("modal-active"); |
| 33732 | + } |
| 33733 | + } |
33729 | 33734 | }); |
33730 | 33735 | }); |
33731 | 33736 |
|
|
0 commit comments