Commit c595db19 authored by fat's avatar fat
Browse files

fixes #10911 - add loading event for use with remote option :|

parent 499cca21
No related merge requests found
Showing with 12 additions and 4 deletions
+12 -4
...@@ -787,7 +787,9 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery" ...@@ -787,7 +787,9 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
this.$backdrop = this.$backdrop =
this.isShown = null this.isShown = null
if (this.options.remote) this.$element.find('.modal-content').load(this.options.remote) if (this.options.remote) this.$element.find('.modal-content').load(this.options.remote, $.proxy(function () {
this.$element.trigger('loaded.bs.modal')
}, this))
} }
Modal.DEFAULTS = { Modal.DEFAULTS = {
......
This diff is collapsed.
This diff is collapsed.
...@@ -403,6 +403,10 @@ $('#myModal').modal({ ...@@ -403,6 +403,10 @@ $('#myModal').modal({
<td>hidden.bs.modal</td> <td>hidden.bs.modal</td>
<td>This event is fired when the modal has finished being hidden from the user (will wait for CSS transitions to complete).</td> <td>This event is fired when the modal has finished being hidden from the user (will wait for CSS transitions to complete).</td>
</tr> </tr>
<tr>
<td>loaded.bs.modal</td>
<td>This event is fired when the modal has loaded content using the remote option.</td>
</tr>
</tbody> </tbody>
</table> </table>
</div><!-- /.table-responsive --> </div><!-- /.table-responsive -->
......
...@@ -18,7 +18,9 @@ ...@@ -18,7 +18,9 @@
this.$backdrop = this.$backdrop =
this.isShown = null this.isShown = null
if (this.options.remote) this.$element.find('.modal-content').load(this.options.remote) if (this.options.remote) this.$element.find('.modal-content').load(this.options.remote, $.proxy(function () {
this.$element.trigger('loaded.bs.modal')
}, this))
} }
Modal.DEFAULTS = { Modal.DEFAULTS = {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment