##// END OF EJS Templates
Summary of changes:...
Summary of changes: 1) IPython/core/compilerop.py: IronPython __future__ flags are non-standard, Solution try/except; comment added 2) IPython/core/completer.py: __main__ was undefined, due to local mistake in creating IronPython scope; removed this tweak 3) IPython/core/prompts.py: os.getuid() is not defined (IronPython bug; see: https://mail.python.org/pipermail/ironpython-users/2014-February/016812.html) 4) IPython/lib/inputhook.py: ctypes SystemError; comment added 5) IPython/utils/process.py and IPython/utils/_process_cli.py: adds a new _process_cli.py which would handle the processes under cli; fixed os.pathsep 6) IPython/utils/io.py: devnull opened in append mode; changed to "w" 7) New issue: IPython/external/decorator/_decorator.py: IronPython doesn't have _getframes, unless FullFrames is set to true; comment added

File last commit:

r15042:036b6a9b
r15208:301956c6
Show More
notificationwidget.js
88 lines | 2.8 KiB | application/javascript | JavascriptLexer
/ IPython / html / static / notebook / js / notificationwidget.js
Brian Granger
Major refactoring of saving, notification....
r6047 //----------------------------------------------------------------------------
// 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.
//----------------------------------------------------------------------------
//============================================================================
// Notification widget
//============================================================================
var IPython = (function (IPython) {
Matthias BUSSONNIER
use strict in notificationwidget.js
r8206 "use strict";
Brian Granger
Major refactoring of saving, notification....
r6047 var utils = IPython.utils;
var NotificationWidget = function (selector) {
this.selector = selector;
this.timeout = null;
this.busy = false;
if (this.selector !== undefined) {
this.element = $(selector);
this.style();
}
Matthias BUSSONNIER
prototype sticky notification
r8025 this.element.button();
this.element.hide();
var that = this;
Matthias BUSSONNIER
tweek notebook notification behavior
r8074
Matthias BUSSONNIER
more subtle kernel indicator...
r15042 this.inner = $('<span/>');
this.element.append(this.inner);
Brian Granger
Major refactoring of saving, notification....
r6047 };
NotificationWidget.prototype.style = function () {
MinRK
bootstrapify notification widget
r10932 this.element.addClass('notification_widget pull-right');
Brian Granger
Major refactoring of saving, notification....
r6047 this.element.addClass('border-box-sizing');
};
Matthias BUSSONNIER
tweek notebook notification behavior
r8074 // msg : message to display
// timeout : time in ms before diseapearing
//
// if timeout <= 0
// click_callback : function called if user click on notification
// could return false to prevent the notification to be dismissed
Matthias BUSSONNIER
more subtle kernel indicator...
r15042 NotificationWidget.prototype.set_message = function (msg, timeout, click_callback, opts) {
var opts = opts || {};
Matthias BUSSONNIER
jslint 2
r8205 var callback = click_callback || function() {return false;};
Brian Granger
Major refactoring of saving, notification....
r6047 var that = this;
Matthias BUSSONNIER
more subtle kernel indicator...
r15042 this.inner.attr('class', opts.icon);
this.inner.attr('title', opts.title);
this.inner.text(msg);
Brian Granger
Major refactoring of saving, notification....
r6047 this.element.fadeIn(100);
if (this.timeout !== null) {
clearTimeout(this.timeout);
this.timeout = null;
Matthias BUSSONNIER
jslint 2
r8205 }
Matthias BUSSONNIER
prototype sticky notification
r8025 if (timeout !== undefined && timeout >=0) {
Brian Granger
Major refactoring of saving, notification....
r6047 this.timeout = setTimeout(function () {
Matthias BUSSONNIER
more subtle kernel indicator...
r15042 that.element.fadeOut(100, function () {that.inner.text('');});
Brian Granger
Major refactoring of saving, notification....
r6047 that.timeout = null;
Matthias BUSSONNIER
prototype sticky notification
r8025 }, timeout);
Matthias BUSSONNIER
tweek notebook notification behavior
r8074 } else {
Matthias BUSSONNIER
jslint 2
r8205 this.element.click(function() {
if( callback() != false ) {
Matthias BUSSONNIER
more subtle kernel indicator...
r15042 that.element.fadeOut(100, function () {that.inner.text('');});
Matthias BUSSONNIER
jslint 2
r8205 that.element.unbind('click');
Matthias BUSSONNIER
tweek notebook notification behavior
r8074 }
if (that.timeout !== undefined) {
Matthias BUSSONNIER
jslint 2
r8205 that.timeout = undefined;
Matthias BUSSONNIER
tweek notebook notification behavior
r8074 clearTimeout(that.timeout);
}
});
}
Brian Granger
Major refactoring of saving, notification....
r6047 };
NotificationWidget.prototype.get_message = function () {
Matthias BUSSONNIER
more subtle kernel indicator...
r15042 return this.inner.html();
Brian Granger
Major refactoring of saving, notification....
r6047 };
IPython.NotificationWidget = NotificationWidget;
return IPython;
}(IPython));