mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
Fixed body container height not stretching to fill remainer of height
This commit is contained in:
parent
4e1e091648
commit
61bfddbd17
@ -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('×')
|
.html('×')
|
||||||
.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(' ')
|
.html(' ')
|
||||||
.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;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user