diaspora/app/assets/javascripts/app/helpers/modal_helper.js
Steffen van Bergerem 0627cdaf43
Use autosize in modals
Fixes #7338 and missing autosize in conversation forms on the profile page
and the contacts page. Regression from #6674.

closes #7339
2017-02-19 03:20:26 +01:00

14 lines
332 B
JavaScript

(function(){
app.helpers.showModal = function(id){
$(id).modal();
var modalBody = $(id).find(".modal-body");
var url = $(id).attr("href");
modalBody.load(url, function(){
$(id).find("#modalWaiter").remove();
autosize($("textarea", modalBody));
$(id).trigger("modal:loaded");
});
};
})();