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

Commit

Permalink
Merge pull request #1695 from vogdb/issue-1695
Browse files Browse the repository at this point in the history
Destroy jquery.autosize
  • Loading branch information
vogdb committed Mar 19, 2015
2 parents 07c9f7b + 009dbb9 commit 47f0065
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions library/CM/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,14 @@ var CM_App = CM_Class_Abstract.extend({
$dom.find('.openx-ad:visible').openx();
$dom.find('.fancySelect').fancySelect();
},
/**
* @param {jQuery} $dom
*/
teardown: function($dom) {
$dom.find('.timeago').timeago('dispose');
$dom.find('textarea.autosize, .autosize textarea').trigger('autosize.destroy');
$dom.find('.showTooltip[title]').tooltip('destroy');
},
/**
* @param {jQuery} $element
* @param {Function} [success] fn(MediaElement, Element)
Expand Down
4 changes: 4 additions & 0 deletions library/CM/Component/Abstract.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ var CM_Component_Abstract = CM_View_Abstract.extend({
CM_View_Abstract.prototype._ready.call(this);

cm.dom.setup(this.$());

this.on('destruct', function() {
cm.dom.teardown(this.$());
})
},

/**
Expand Down

0 comments on commit 47f0065

Please sign in to comment.