##// END OF EJS Templates
Fix scroll/resize handle missing behavior.
Jonathan Frederic -
Show More
@@ -20,8 +20,8 b' define(['
20 */
20 */
21 this.events = options.events;
21 this.events = options.events;
22 this.pager_element = $(pager_selector);
22 this.pager_element = $(pager_selector);
23 this.pager_button_area = $('#pager_button_area');
23 this.pager_button_area = $('#pager-button-area');
24 this.pager_element.resizable({handles: 'n'});
24 this.pager_element.resizable({handles: 'n'});
25 this.expanded = false;
25 this.expanded = false;
26 this.create_button_area();
26 this.create_button_area();
27 this.bind_events();
27 this.bind_events();
@@ -34,7 +34,6 b' define(['
34 .attr('title',"Open the pager in an external window")
34 .attr('title',"Open the pager in an external window")
35 .addClass('ui-button')
35 .addClass('ui-button')
36 .click(function(){that.detach();})
36 .click(function(){that.detach();})
37 .attr('style','position: absolute; right: 20px;')
38 .append(
37 .append(
39 $('<span>').addClass("ui-icon ui-icon-extlink")
38 $('<span>').addClass("ui-icon ui-icon-extlink")
40 )
39 )
@@ -44,7 +43,6 b' define(['
44 .attr('title',"Close the pager")
43 .attr('title',"Close the pager")
45 .addClass('ui-button')
44 .addClass('ui-button')
46 .click(function(){that.collapse();})
45 .click(function(){that.collapse();})
47 .attr('style','position: absolute; right: 5px;')
48 .append(
46 .append(
49 $('<span>').addClass("ui-icon ui-icon-close")
47 $('<span>').addClass("ui-icon ui-icon-close")
50 )
48 )
@@ -56,19 +54,22 b' define(['
56 var that = this;
54 var that = this;
57
55
58 this.pager_element.bind('collapse_pager', function (event, extrap) {
56 this.pager_element.bind('collapse_pager', function (event, extrap) {
59 var time = 'fast';
57 // Animate hiding of the pager.
60 if (extrap && extrap.duration) {
58 that.pager_element.hide((extrap && extrap.duration) ? extrap.duration : 'fast');
61 time = extrap.duration;
62 }
63 that.pager_element.hide(time);
64 });
59 });
65
60
66 this.pager_element.bind('expand_pager', function (event, extrap) {
61 this.pager_element.bind('expand_pager', function (event, extrap) {
67 var time = 'fast';
62 // Clear the pager's height attr if it's set. This allows the
68 if (extrap && extrap.duration) {
63 // pager to size itself according to its contents.
69 time = extrap.duration;
64 that.pager_element.height('initial');
70 }
65
71 that.pager_element.show(time);
66 // Animate the showing of the pager
67 var time = (extrap && extrap.duration) ? extrap.duration : 'fast';
68 that.pager_element.show(time, function() {
69 // Explicitly set pager height once the pager has shown itself.
70 // This allows the pager-contents div to use percentage sizing.
71 that.pager_element.height(that.pager_element.height());
72 });
72 });
73 });
73
74
74 this.events.on('open_with_text.Pager', function (event, payload) {
75 this.events.on('open_with_text.Pager', function (event, payload) {
@@ -2,7 +2,7 b' div#pager {'
2 background-color: @body-bg;
2 background-color: @body-bg;
3 font-size: @notebook_font_size;
3 font-size: @notebook_font_size;
4 line-height: @notebook_line_height;
4 line-height: @notebook_line_height;
5 overflow: auto;
5 overflow: hidden;
6 display: none;
6 display: none;
7 position: fixed;
7 position: fixed;
8 bottom: 0px;
8 bottom: 0px;
@@ -23,10 +23,23 b' div#pager {'
23 padding: @code_padding;
23 padding: @code_padding;
24 }
24 }
25
25
26 #pager-container {
26 #pager-button-area {
27 position: absolute;
28 top: 0px;
29 right: 20px;
30 }
31
32 #pager-contents {
27 position: relative;
33 position: relative;
28 padding: 15px 0px;
34 overflow: auto;
29 .border-box-sizing();
35 width: 100%;
36 height: 100%;
37
38 #pager-container {
39 position: relative;
40 padding: 15px 0px;
41 .border-box-sizing();
42 }
30 }
43 }
31
44
32 }
45 }
@@ -10283,7 +10283,7 b' div#pager {'
10283 background-color: #ffffff;
10283 background-color: #ffffff;
10284 font-size: 14px;
10284 font-size: 14px;
10285 line-height: 20px;
10285 line-height: 20px;
10286 overflow: auto;
10286 overflow: hidden;
10287 display: none;
10287 display: none;
10288 position: fixed;
10288 position: fixed;
10289 bottom: 0px;
10289 bottom: 0px;
@@ -10301,7 +10301,18 b' div#pager pre {'
10301 background-color: #f7f7f7;
10301 background-color: #f7f7f7;
10302 padding: 0.4em;
10302 padding: 0.4em;
10303 }
10303 }
10304 div#pager #pager-container {
10304 div#pager #pager-button-area {
10305 position: absolute;
10306 top: 0px;
10307 right: 20px;
10308 }
10309 div#pager #pager-contents {
10310 position: relative;
10311 overflow: auto;
10312 width: 100%;
10313 height: 100%;
10314 }
10315 div#pager #pager-contents #pager-container {
10305 position: relative;
10316 position: relative;
10306 padding: 15px 0px;
10317 padding: 15px 0px;
10307 box-sizing: border-box;
10318 box-sizing: border-box;
@@ -308,9 +308,10 b' class="notebook_app"'
308 </div>
308 </div>
309
309
310 <div id="pager">
310 <div id="pager">
311 <div id='pager_button_area'>
311 <div id="pager-contents">
312 <div id="pager-container" class="container"></div>
312 </div>
313 </div>
313 <div id="pager-container" class="container"></div>
314 <div id='pager-button-area'></div>
314 </div>
315 </div>
315
316
316 <div id='tooltip' class='ipython_tooltip' style='display:none'></div>
317 <div id='tooltip' class='ipython_tooltip' style='display:none'></div>
General Comments 0
You need to be logged in to leave comments. Login now