cleanup stuff and fix tests

Matthias Bussonnier 11 years ago
parent 67dd3b4450
commit 0f307f28f1

@ -15,6 +15,9 @@
@border-radius-base: 2px;
@border-radius-large: 3px;
@grid-gutter-width: 0px;
@kbd-color: #888;
@kbd-bg: transparent;
@icon-font-path: "../components/bootstrap/fonts/";
// Disable modal slide-in from top animation.
@ -57,4 +60,3 @@ label {
// preven container size to jump from 768px to 720px
// when window width go from 768 to 769+
@container-sm : @screen-sm-min;

@ -4,8 +4,6 @@
define(function(require){
"use strict";
var dialog = require("base/js/dialog");
var ActionHandler = function (env) {
this.env = env || {};
Object.seal(this);

@ -172,8 +172,7 @@ define(function (require) {
// ii) to prevent the div from scrolling up when the last cell is being
// edited, but is too low on the page, which browsers will do automatically.
var end_space = $('<div/>')
.addClass('end_space')
.html('<kbd>Cmd-Shift-P</kbd> for Command palette');
.addClass('end_space');
end_space.dblclick(function (e) {
var ncells = that.ncells();
that.insert_cell_below('code',ncells-1);

@ -96,38 +96,19 @@ p {
.command-shortcut:before{
content:"(command)";
padding-right:3px;
color:#ccc
color:@gray-light;
}
.edit-shortcut:before{
content:"(edit)";
padding-right:3px;
color:#ccc
}
.end_space {
margin-left: auto;
margin-right:auto;
margin-top:50px;
font-size: 20pt;
font-weight: bold;
width:500px;
color: #aaa;
& kbd {
color: #aaa;
border-color: #aaa;
}
color:@gray-light;
}
kbd {
background: transparent;
border: 1px solid #888;
border-style: solid;
border-width: 1px;
box-shadow: none;
border-radius: 3px;
color: #888;
margin: 2px;
padding-left: 2px;
padding-right: 2px;
@ -138,7 +119,6 @@ kbd {
ul.typeahead-list i{
margin-left: -10px;
width: 18px;
border: thin solid transparent;
}
ul.typeahead-list {

@ -13,6 +13,13 @@ var to_normalize = [
var unshifted = "` 1 2 3 4 5 6 7 8 9 0 - = q w e r t y u i o p [ ] \\ a s d f g h j k l ; ' z x c v b n m , . /";
// shifted = '~ ! @ # $ % ^ & * ( ) _ + Q W E R T Y U I O P { } | A S D F G H J K L : " Z X C V B N M < > ?';
var ambiguous_expect = function(ch){
// `-` is ambiguous in shortcut context as a separator, so map it to `minus`
if(ch === '-'){
return 'minus';
}
return ch;
};
casper.notebook_test(function () {
var that = this;
@ -24,7 +31,7 @@ casper.notebook_test(function () {
var sc2 = IPython.keyboard.event_to_shortcut(e);
return sc2;
}, item);
this.test.assertEquals(result, item, 'Shortcut to event roundtrip: '+item);
this.test.assertEquals(result, ambiguous_expect(item), 'Shortcut to event roundtrip: '+item);
});
});

Loading…
Cancel
Save