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.
This commit is contained in:
Paul Ivanov 2014-02-27 19:36:42 -08:00
parent eb4e674598
commit 938f4bdfc4
4 changed files with 10 additions and 11 deletions

View File

@ -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));

View File

@ -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");
};

View File

@ -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){

View File

@ -34,9 +34,9 @@ data-base-kernel-url="{{base_kernel_url}}"
<div id="notebook_toolbar" class="row-fluid">
<div class="span8">
<form id='alternate_upload' class='alternate_upload' >
<span id="drag_info" style="position:absolute" >
<span id="notebook_list_info" style="position:absolute" >
To import a notebook, drag the file onto the listing below or <strong>click here</strong>.
</span>
</span>
<input type="file" name="datafile" class="fileinput" multiple='multiple'>
</form>
</div>
@ -76,9 +76,8 @@ data-base-kernel-url="{{base_kernel_url}}"
</div>
<div id="running_list">
<div id="running_list_header" class="row-fluid list_header" style='display:none'>
<div id="running_list_header" class="row-fluid list_header">
<div> There are no notebooks running. </div>
<!-- damn it, I seem to need this stupid placeholder, otherwise items don't get added to the list -->
</div>
</div>
</div>