Avoid adding a css class to body element

This commit is contained in:
Sylvain Corlay 2015-12-16 12:42:10 -05:00
parent dc3dae96b6
commit a094df764e
2 changed files with 7 additions and 13 deletions

View File

@ -673,13 +673,8 @@ define(function (require) {
var i2 = this.get_anchor_index();
var low = Math.min(i1, i2);
var high = Math.max(i1, i2);
if (low !== high){
$('body').addClass('jupyter-multi-select');
} else {
$('body').removeClass('jupyter-multi-select');
}
this.get_cells().map(function(cell, index, all){
if( low <= index && index <= high ){
if( low <= index && index <= high && low !== high){
cell.element.addClass(_SOFT_SELECTION_CLASS);
} else {
cell.element.removeClass(_SOFT_SELECTION_CLASS);

View File

@ -21,30 +21,29 @@ div.cell {
/* This acts as a spacer between cells, that is outside the border */
margin: 0px;
outline: none;
._selected_style(transparent, transparent, @cell_border_width);
.jupyter-multi-select &.jupyter-soft-selected {
&.jupyter-soft-selected {
border-left-color: @selected_border_color_light;
border-left-color: @soft_select_color;
._selected_style(@selected_border_color_light, @soft_select_color, 5px, 0px);
@media print {
border-color: transparent;
}
}
&.selected {
&.selected {
border-color: @border_color;
._selected_style(@selected_border_color, transparent, 5px, 0px);
@media print {
border-color: transparent;
}
}
.jupyter-multi-select &.selected.jupyter-soft-selected {
&.selected.jupyter-soft-selected {
._selected_style(@selected_border_color, @soft_select_color, 7px, 0);
}