You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.3 KiB
42 lines
1.3 KiB
//----------------------------------------------------------------------------
|
|
// Copyright (C) 2008-2011 The IPython Development Team
|
|
//
|
|
// Distributed under the terms of the BSD License. The full license is in
|
|
// the file COPYING, distributed as part of this software.
|
|
//----------------------------------------------------------------------------
|
|
|
|
//============================================================================
|
|
// HeaderSection
|
|
//============================================================================
|
|
|
|
var IPython = (function (IPython) {
|
|
|
|
var HeaderSection = function (selector) {
|
|
this.selector = selector;
|
|
if (this.selector !== undefined) {
|
|
this.element = $(selector);
|
|
this.content = this.element.find('div.header');
|
|
this.style();
|
|
this.bind_events();
|
|
}
|
|
};
|
|
|
|
HeaderSection.prototype.style = function () {
|
|
this.content.addClass('ui-helper-clearfix');
|
|
this.content.find('#quick_help').button();
|
|
};
|
|
|
|
HeaderSection.prototype.bind_events = function () {
|
|
var that = this;
|
|
this.content.find('#quick_help').click(function () {
|
|
IPython.notebook.show_keyboard_shortcuts();
|
|
});
|
|
};
|
|
|
|
// Set module variables
|
|
IPython.HeaderSection = HeaderSection;
|
|
|
|
return IPython;
|
|
|
|
}(IPython));
|