diff --git a/IPython/frontend/html/notebook/static/css/notebook.css b/IPython/frontend/html/notebook/static/css/notebook.css index 8a49a19d5..940e1e75d 100644 --- a/IPython/frontend/html/notebook/static/css/notebook.css +++ b/IPython/frontend/html/notebook/static/css/notebook.css @@ -51,8 +51,17 @@ span#notebook_name { position: relative; } -#notification { +#notification_area { position: absolute; + right: 0px; + top: 0px; + height: 25px; + padding: 3px 6px; + z-index: 10; +} + +.notification{ + float : right; right: 3px; top: 3px; height: 25px; @@ -60,6 +69,18 @@ span#notebook_name { z-index: 10; } +.notification.info +{color : darkblue;} + +.notification.safe +{color : darkgreen;} + +.notification.warning +{color : darkorange;} + +.notification.danger +{ color : darkred } + #toolbar { padding: 3px 15px; } diff --git a/IPython/frontend/html/notebook/static/js/notificationarea.js b/IPython/frontend/html/notebook/static/js/notificationarea.js new file mode 100644 index 000000000..7cd6b21b2 --- /dev/null +++ b/IPython/frontend/html/notebook/static/js/notificationarea.js @@ -0,0 +1,48 @@ +//---------------------------------------------------------------------------- +// Copyright (C) 2012 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) { + "use strict"; + var utils = IPython.utils; + + + var NotificationArea = function (selector) { + this.selector = selector; + if (this.selector !== undefined) { + this.element = $(selector); + } + }; + + NotificationArea.prototype.temp_message = function (msg, timeout, css_class) { + var uuid = utils.uuid(); + var tdiv = $('