Utility to load and fill the global #modal div
This commit is contained in:
@@ -48,5 +48,20 @@
|
|||||||
el.className = $.trim(classes.join(" "));
|
el.className = $.trim(classes.join(" "));
|
||||||
});
|
});
|
||||||
return this;
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
$.fn.openModalUrl = function(title, url) {
|
||||||
|
this.on('click', function(e){
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
$('#modal').modal();
|
||||||
|
$("#modal .modal-header span.title").html(title);
|
||||||
|
$("#modal .modal-body").load(url);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
}(jQuery));
|
}(jQuery));
|
||||||
|
|
||||||
|
$('#modal').on('hidden.bs.modal', function () {
|
||||||
|
$("#modal .modal-body").html('');
|
||||||
|
});
|
||||||
|
Reference in New Issue
Block a user