mirror of
https://github.com/jupyter/notebook.git
synced 2025-03-07 13:07:22 +08:00
Merge pull request #651 from Carreau/ct-reminder
Reminder of where the celltoolbar menu is
This commit is contained in:
commit
aaffd891b5
@ -55,10 +55,34 @@ define([
|
||||
],
|
||||
'run_int'],
|
||||
['<add_celltype_list>'],
|
||||
[['jupyter-notebook:show-command-palette']]
|
||||
[['jupyter-notebook:show-command-palette']],
|
||||
['<add_celltoolbar_reminder>']
|
||||
];
|
||||
this.construct(grps);
|
||||
};
|
||||
|
||||
MainToolBar.prototype._pseudo_actions = {};
|
||||
|
||||
|
||||
// reminder of where the celltoolbar new menu is, remove for 5.0
|
||||
MainToolBar.prototype._pseudo_actions.add_celltoolbar_reminder = function () {
|
||||
var _b = $('<button/>').attr('title','show new celltoolbar selector location').addClass('btn btn-default').text('CellToolbar')
|
||||
var btn = $('<div/>').addClass('btn-group').append(_b)
|
||||
|
||||
_b.on('click', function(){
|
||||
setTimeout(function(){$('#view_menu').parent().addClass('pulse')},0)
|
||||
setTimeout(function(){$('#view_menu').parent().addClass('open')},1000)
|
||||
setTimeout(function(){$('#menu-cell-toolbar').children('a').addClass('pulse')},2000)
|
||||
setTimeout(function(){$('#menu-cell-toolbar').children('ul').css('display','block')},3000)
|
||||
setTimeout(function(){$('#menu-cell-toolbar').children('ul').css('display','')},5400)
|
||||
setTimeout(function(){$('#menu-cell-toolbar').children('a').removeClass('pulse')},5600)
|
||||
setTimeout(function(){$('#view_menu').parent().removeClass('open')},5800)
|
||||
setTimeout(function(){$('#view_menu').parent().removeClass('pulse')},6000)
|
||||
})
|
||||
|
||||
return btn;
|
||||
};
|
||||
|
||||
|
||||
// add a cell type drop down to the maintoolbar.
|
||||
// triggered when the pseudo action `<add_celltype_list>` is
|
||||
|
@ -50,3 +50,10 @@
|
||||
.select-xs {
|
||||
height: @btn_small_height;
|
||||
}
|
||||
|
||||
|
||||
// highlight the new menu where celltoolbar is
|
||||
.pulse, .dropdown-menu > li > a.pulse, li.pulse > a.dropdown-toggle, li.pulse.open > a.dropdown-toggle {
|
||||
background-color: #F37626;
|
||||
color: white;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user