From e265dff7503512262b3b36c1b574b8fa3f21e0dc 2014-02-28 03:36:42 From: Paul Ivanov Date: 2014-02-28 03:36:42 Subject: [PATCH] small whitespace cleanup, renamed drag_info in the dashboard, I've renamed drag_info to notebook_list_info, so applying style to notebook_list_info and running_list_info can be done in one place. --- diff --git a/IPython/html/static/tree/js/kernellist.js b/IPython/html/static/tree/js/kernellist.js index 7ff20dd..f89d52c 100644 --- a/IPython/html/static/tree/js/kernellist.js +++ b/IPython/html/static/tree/js/kernellist.js @@ -22,13 +22,12 @@ var IPython = (function (IPython) { KernelList.prototype.sessions_loaded = function (d) { this.sessions = d; - // clear out the previous list this.clear_list(); var item; for (var path in d) { item = this.new_notebook_item(-1); this.add_link('', path, item); - this.add_shutdown_button(item,this.sessions[path]); + this.add_shutdown_button(item, this.sessions[path]); } $('#running_list_header').toggle($.isEmptyObject(d)); diff --git a/IPython/html/static/tree/js/notebooklist.js b/IPython/html/static/tree/js/notebooklist.js index 4b86310..2f472de 100644 --- a/IPython/html/static/tree/js/notebooklist.js +++ b/IPython/html/static/tree/js/notebooklist.js @@ -33,10 +33,11 @@ var IPython = (function (IPython) { }; NotebookList.prototype.style = function () { - $('#' + this.element_name + '_toolbar').addClass('list_toolbar'); - $('#drag_info').addClass('toolbar_info'); - $('#' + this.element_name + '_buttons').addClass('toolbar_buttons'); - $('#' + this.element_name + '_list_header').addClass('list_header'); + var prefix = '#' + this.element_name + $(prefix + '_toolbar').addClass('list_toolbar'); + $(prefix + '_list_info').addClass('toolbar_info'); + $(prefix + '_buttons').addClass('toolbar_buttons'); + $(prefix + '_list_header').addClass('list_header'); this.element.addClass("list_container"); }; diff --git a/IPython/html/static/tree/js/sessionlist.js b/IPython/html/static/tree/js/sessionlist.js index dc1f9aa..4942ed8 100644 --- a/IPython/html/static/tree/js/sessionlist.js +++ b/IPython/html/static/tree/js/sessionlist.js @@ -29,7 +29,7 @@ var IPython = (function (IPython) { success : $.proxy(that.sessions_loaded, this) }; var url = utils.url_join_encode(this.base_url, 'api/sessions'); - $.ajax(url,settings); + $.ajax(url, settings); }; SesssionList.prototype.sessions_loaded = function(data){ diff --git a/IPython/html/templates/tree.html b/IPython/html/templates/tree.html index cf0abad..19a5e23 100644 --- a/IPython/html/templates/tree.html +++ b/IPython/html/templates/tree.html @@ -34,9 +34,9 @@ data-base-kernel-url="{{base_kernel_url}}"
- + To import a notebook, drag the file onto the listing below or click here. - +
@@ -76,9 +76,8 @@ data-base-kernel-url="{{base_kernel_url}}"
-