##// END OF EJS Templates
Add notion of action that differs from shortcuts....
Add notion of action that differs from shortcuts. This decouple the notion of shortcut from the notion of executed "action" This allow the shortcuts manager to be purely describe as data, and the same action to be later refered to either from the shortcut, from a toolbar button or a menu. This also implement a more complete keyboard shortcut handler which is able ton interpete sequences like `Cmd-X,Meta-v` By storing the shortcuts in a tree.

File last commit:

r17444:058b9270
r18390:39ea1bc4
Show More
page.js
41 lines | 1.3 KiB | application/javascript | JavascriptLexer
// Copyright (c) IPython Development Team.
// Distributed under the terms of the Modified BSD License.
define([
'base/js/namespace',
'jquery',
], function(IPython, $){
"use strict";
var Page = function () {
this.bind_events();
};
Page.prototype.bind_events = function () {
};
Page.prototype.show = function () {
// The header and site divs start out hidden to prevent FLOUC.
// Main scripts should call this method after styling everything.
this.show_header();
this.show_site();
};
Page.prototype.show_header = function () {
// 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
$('div#header').css('display','block');
};
Page.prototype.show_site = function () {
// 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
$('div#site').css('display','block');
};
// Register self in the global namespace for convenience.
IPython.Page = Page;
return {'Page': Page};
});