mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-24 12:05:22 +08:00
Add quick help button: broken ATM, style and binding aren't working.
Help needed here, will discuss during pull request before merging.
This commit is contained in:
parent
6d0715988f
commit
e9d744f06c
@ -1,4 +1,3 @@
|
||||
|
||||
/**
|
||||
* Primary styles
|
||||
*
|
||||
@ -19,12 +18,18 @@ body {
|
||||
}
|
||||
|
||||
span#save_widget {
|
||||
position: absolute;
|
||||
position: static;
|
||||
left: 0px;
|
||||
padding: 5px 0px;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
span#quick_help_area {
|
||||
position: static;
|
||||
padding: 5px 0px;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
input#notebook_name {
|
||||
height: 1em;
|
||||
line-height: 1em;
|
||||
@ -35,9 +40,10 @@ span#kernel_status {
|
||||
position: absolute;
|
||||
padding: 8px 5px 5px 5px;
|
||||
right: 10px;
|
||||
font-weight: bold;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
|
||||
.status_idle {
|
||||
color: gray;
|
||||
}
|
||||
|
41
IPython/frontend/html/notebook/static/js/header.js
Normal file
41
IPython/frontend/html/notebook/static/js/header.js
Normal file
@ -0,0 +1,41 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// 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));
|
@ -56,6 +56,9 @@
|
||||
<span id="notebook_id" style="display:none">{{notebook_id}}</span>
|
||||
<button id="save_notebook"><u>S</u>ave</button>
|
||||
</span>
|
||||
<span id="quick_help_area">
|
||||
<button id="quick_help">QuickHelp</button>
|
||||
</span>
|
||||
<span id="kernel_status">Idle</span>
|
||||
</div>
|
||||
|
||||
@ -263,6 +266,7 @@
|
||||
<script src="static/js/kernelstatus.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="static/js/layout.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="static/js/savewidget.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="static/js/header.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="static/js/pager.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="static/js/panelsection.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="static/js/printwidget.js" type="text/javascript" charset="utf-8"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user