##// END OF EJS Templates
semantic names for indicator icons...
semantic names for indicator icons For all of the discussion that we had about what kind of icons should and should not be used to indicate what mode the notebook is in, we never went through to make it possible to override it. With this change, it is now possible to override what icons are displayed for Command and Edit Modes. For example, @minrk liked the fighter-jet icon for Command Mode, so he can put this in his custom.css .ipython-command-mode:before { content: "\f0fb"; }

File last commit:

r15518:e265dff7
r15806:6b3b303a
Show More
sessionlist.js
52 lines | 1.7 KiB | application/javascript | JavascriptLexer
Paul Ivanov
added IPython.session_list...
r15479 //----------------------------------------------------------------------------
// Copyright (C) 2014 The IPython Development Team
//
// Distributed under the terms of the BSD License. The full license is in
// the file COPYING, distributed as part of this software.
//----------------------------------------------------------------------------
//============================================================================
// Running Kernels List
//============================================================================
var IPython = (function (IPython) {
"use strict";
var utils = IPython.utils;
var SesssionList = function (options) {
this.sessions = {};
this.base_url = options.base_url || utils.get_body_data("baseUrl");
};
SesssionList.prototype.load_sessions = function(){
var that = this;
var settings = {
processData : false,
cache : false,
type : "GET",
dataType : "json",
success : $.proxy(that.sessions_loaded, this)
};
var url = utils.url_join_encode(this.base_url, 'api/sessions');
Paul Ivanov
small whitespace cleanup, renamed drag_info...
r15518 $.ajax(url, settings);
Paul Ivanov
added IPython.session_list...
r15479 };
SesssionList.prototype.sessions_loaded = function(data){
this.sessions = {};
var len = data.length;
Paul Ivanov
remove redundant checks in code
r15513 var nb_path;
for (var i=0; i<len; i++) {
nb_path = utils.url_path_join(
data[i].notebook.path,
data[i].notebook.name
);
this.sessions[nb_path] = data[i].id;
Paul Ivanov
added IPython.session_list...
r15479 }
$([IPython.events]).trigger('sessions_loaded.Dashboard', this.sessions);
};
IPython.SesssionList = SesssionList;
return IPython;
}(IPython));