make pending operations the first thing in slice view
[myslice.git] / views / templates / messages-header.html
1 <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.js" type="text/javascript"></script>
2 <!-- <script type="text/javascript">{{ STATIC_URL }}js/ui.widget.js</script> -->
3 <script src="{{ STATIC_URL }}js/jquery.notify.js" type="text/javascript"></script>
4 <link rel='stylesheet' href='{{ STATIC_URL }}css/ui.notify.css' type='text/css' />
5
6 <script type="text/javascript">
7 function create( template, vars, opts ){
8         return $container.notify("create", template, vars, opts);
9 }
10
11 $(function(){
12         // initialize widget on a container, passing in all the defaults.
13         // the defaults will apply to any notification created within this
14         // container, but can be overwritten on notification-by-notification
15         // basis.
16         $container = $("#notifications").notify();
17         
18         // create two when the pg loads
19         //create("default", { title:'Default Notification', text:'Example of a default notification.  I will fade out after 5 seconds'});
20         //create("sticky", { title:'Sticky Notification', text:'Example of a "sticky" notification.  Click on the X above to close me.'},{ expires:false });
21
22 {% if messages %}
23         $(document).ready(function(){
24                 {% for message in messages %}
25             $("#notifications").notify("create", {
26               title: 'Test Notification',
27               text: '{{ message }}'
28             },{
29               expires: false,
30               speed: 1000
31             });
32                 {% endfor %}
33         });
34 {% endif %}
35
36
37 });
38 </script>