Fixed body container height not stretching to fill remainer of height

This commit is contained in:
Jonathan Frederic 2013-11-25 11:10:27 -08:00 committed by Jonathan Frederic
parent 4e1e091648
commit 61bfddbd17

View File

@ -73,14 +73,14 @@ define(["notebook/js/widget"], function(widget_manager) {
this.$window = $('<div />') this.$window = $('<div />')
.addClass('modal widget-modal') .addClass('modal widget-modal')
.appendTo($('#notebook-container')); .appendTo($('#notebook-container'));
var title_bar = $('<div />') this.$title_bar = $('<div />')
.addClass('popover-title') .addClass('popover-title')
.appendTo(this.$window); .appendTo(this.$window);
var that = this; var that = this;
$('<button />') $('<button />')
.addClass('close') .addClass('close')
.html('&times;') .html('&times;')
.appendTo(title_bar) .appendTo(this.$title_bar)
.click(function(){ .click(function(){
that.hide(); that.hide();
event.stopPropagation(); event.stopPropagation();
@ -88,7 +88,7 @@ define(["notebook/js/widget"], function(widget_manager) {
this.$title = $('<div />') this.$title = $('<div />')
.addClass('widget-modal-title') .addClass('widget-modal-title')
.html('&nbsp;') .html('&nbsp;')
.appendTo(title_bar); .appendTo(this.$title_bar);
this.$body = $('<div />') this.$body = $('<div />')
.addClass('modal-body') .addClass('modal-body')
.addClass('widget-container') .addClass('widget-container')
@ -104,6 +104,10 @@ define(["notebook/js/widget"], function(widget_manager) {
this.$window.draggable({handle: '.popover-title', snap: '#notebook, .modal', snapMode: 'both'}); this.$window.draggable({handle: '.popover-title', snap: '#notebook, .modal', snapMode: 'both'});
this.$window.resizable(); this.$window.resizable();
this.$window.on('resize', function(){
that.$body.outerHeight(that.$window.innerHeight() - that.$title_bar.outerHeight());
})
this._shown_once = false; this._shown_once = false;
}, },