##// END OF EJS Templates
prevent esc from bubbling up when dismissing tooltip...
prevent esc from bubbling up when dismissing tooltip prevents esc from entering command mode when it's meant to dismiss the tooltip. The logic for the event was already there, it just lacked the `ipkmIgnore` bit.

File last commit:

r20107:3018a185
r20392:3e4ad768
Show More
page.js
65 lines | 1.9 KiB | application/javascript | JavascriptLexer
Jonathan Frederic
Make page.html require.js friendly.
r17188 // Copyright (c) IPython Development Team.
// Distributed under the terms of the Modified BSD License.
define([
'base/js/namespace',
Jonathan Frederic
MWE,...
r17200 'jquery',
Jonathan Frederic
Kill the layout manager
r19179 'base/js/events',
], function(IPython, $, events){
Matthias BUSSONNIER
"use strict" in most (if not all) our javascript...
r12103 "use strict";
Brian Granger
Refactoring templates and top level js/css organization.
r6192
var Page = function () {
this.bind_events();
};
Page.prototype.bind_events = function () {
Min RK
don't use flexbox to size `#site`...
r20107 // resize site on:
// - window resize
// - header change
// - page load
var _handle_resize = $.proxy(this._resize_site, this);
$(window).resize(_handle_resize);
// On document ready, resize codemirror.
$(document).ready(_handle_resize);
events.on('resize-header.Page', _handle_resize);
Brian Granger
Refactoring templates and top level js/css organization.
r6192 };
Page.prototype.show = function () {
Jonathan Frederic
Ran function comment conversion tool
r19176 /**
* The header and site divs start out hidden to prevent FLOUC.
* Main scripts should call this method after styling everything.
*/
Brian Granger
Major refactoring of notebook....
r6193 this.show_header();
this.show_site();
};
Page.prototype.show_header = function () {
Jonathan Frederic
Ran function comment conversion tool
r19176 /**
* The header and site divs start out hidden to prevent FLOUC.
* Main scripts should call this method after styling everything.
* TODO: selector are hardcoded, pass as constructor argument
*/
Brian Granger
Refactoring templates and top level js/css organization.
r6192 $('div#header').css('display','block');
Brian Granger
Major refactoring of notebook....
r6193 };
Page.prototype.show_site = function () {
Jonathan Frederic
Ran function comment conversion tool
r19176 /**
* The header and site divs start out hidden to prevent FLOUC.
* Main scripts should call this method after styling everything.
* TODO: selector are hardcoded, pass as constructor argument
*/
Min RK
don't use flexbox to size `#site`...
r20107 $('div#site').css('display', 'block');
this._resize_site();
Brian Granger
Refactoring templates and top level js/css organization.
r6192 };
Min RK
don't use flexbox to size `#site`...
r20107 Page.prototype._resize_site = function() {
// Update the site's size.
$('div#site').height(window.innerHeight - $('#header').height());
Jonathan Frederic
Kill the layout manager
r19179 };
Jonathan Frederic
Make page.html require.js friendly.
r17188 // Register self in the global namespace for convenience.
Brian Granger
Refactoring templates and top level js/css organization.
r6192 IPython.Page = Page;
Jonathan Frederic
Return dicts instead of classes,...
r17201 return {'Page': Page};
Jonathan Frederic
Make page.html require.js friendly.
r17188 });