##// END OF EJS Templates
tweak history prefix search (up/^p) in qtconsole...
tweak history prefix search (up/^p) in qtconsole moving the cursor around the line could result in weird inconsistencies in the prefix. This simplifies the logic by always using the cursor position to set the history prefix, and better determine when the history prefix has actually changed.

File last commit:

r7800:7dacc590
r9205:ef8c14cd
Show More
loginwidget.js
45 lines | 1.4 KiB | application/javascript | JavascriptLexer
MinRK
add missing loginwidget.js
r5207 //----------------------------------------------------------------------------
// Copyright (C) 2008-2011 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.
//----------------------------------------------------------------------------
//============================================================================
// Login button
//============================================================================
var IPython = (function (IPython) {
Matthias BUSSONNIER
use full base_url in html and js
r7800 var base_url = $('body').data('baseProjectUrl');
MinRK
add missing loginwidget.js
r5207
var LoginWidget = function (selector) {
this.selector = selector;
if (this.selector !== undefined) {
this.element = $(selector);
this.style();
this.bind_events();
}
};
LoginWidget.prototype.style = function () {
Stefan van der Walt
Add logout button.
r5325 this.element.find('button#logout').button();
Stefan van der Walt
Display login button in read-only mode.
r5718 this.element.find('button#login').button();
MinRK
add missing loginwidget.js
r5207 };
Brian Granger
Refactoring templates and top level js/css organization.
r6192
MinRK
add missing loginwidget.js
r5207 LoginWidget.prototype.bind_events = function () {
var that = this;
Stefan van der Walt
Add logout button.
r5325 this.element.find("button#logout").click(function () {
Matthias BUSSONNIER
use full base_url in html and js
r7800 window.location = base_url+"logout";
MinRK
add missing loginwidget.js
r5207 });
Stefan van der Walt
Display login button in read-only mode.
r5718 this.element.find("button#login").click(function () {
Matthias BUSSONNIER
use full base_url in html and js
r7800 window.location = base_url+"login";
Stefan van der Walt
Display login button in read-only mode.
r5718 });
MinRK
add missing loginwidget.js
r5207 };
// Set module variables
IPython.LoginWidget = LoginWidget;
return IPython;
}(IPython));