move drag_info show/hide to page.ready, to avoid flouc

MinRK 15 years ago
parent 16946ef7bb
commit 218a88a47b

@ -27,8 +27,9 @@ var IPython = (function (IPython) {
NotebookList.prototype.bind_events = function () {
if (IPython.read_only)
{return}
if (IPython.read_only){
return;
}
var that = this;
this.element.bind('dragover', function () {
return false;
@ -85,9 +86,6 @@ var IPython = (function (IPython) {
if (!IPython.read_only){
// hide delete buttons when readonly
this.add_delete_button(item);
$('#drag_info').removeClass('hidden');
} else {
$('#drag_info').remove();
}
};
};

@ -35,8 +35,10 @@ $(document).ready(function () {
if (IPython.read_only){
// unhide login button if it's relevant
$('span#login_widget').removeClass('hidden');
$('#drag_info').remove();
} else {
$('#new_notebook').removeClass('hidden');
$('#drag_info').removeClass('hidden');
}
IPython.notebook_list.load_list();

Loading…
Cancel
Save