##// END OF EJS Templates
Merge pull request #2159 from Carreau/dashbord_refresh_on_error...
Bussonnier Matthias -
r7942:aa922b15 merge
parent child Browse files
Show More
@@ -84,23 +84,29 b' var IPython = (function (IPython) {'
84 84
85 85 NotebookList.prototype.clear_list = function () {
86 86 this.element.children('.list_item').remove();
87 }
87 };
88 88
89 89
90 90 NotebookList.prototype.load_list = function () {
91 var that = this;
91 92 var settings = {
92 93 processData : false,
93 94 cache : false,
94 95 type : "GET",
95 96 dataType : "json",
96 success : $.proxy(this.list_loaded, this)
97 success : $.proxy(this.list_loaded, this),
98 error : $.proxy( function(){
99 that.list_loaded([], null, null, {msg:"Error connecting to server."});
100 },this)
97 101 };
102
98 103 var url = $('body').data('baseProjectUrl') + 'notebooks';
99 104 $.ajax(url, settings);
100 105 };
101 106
102 107
103 NotebookList.prototype.list_loaded = function (data, status, xhr) {
108 NotebookList.prototype.list_loaded = function (data, status, xhr, param) {
109 var message = param.msg || 'Notebook list empty.';
104 110 var len = data.length;
105 111 this.clear_list();
106 112
@@ -109,7 +115,7 b' var IPython = (function (IPython) {'
109 115 $(this.new_notebook_item(0))
110 116 .append(
111 117 $('<div style="margin:auto;text-align:center;color:grey"/>')
112 .text('Notebook list empty.')
118 .text(message)
113 119 )
114 120 }
115 121
General Comments 0
You need to be logged in to leave comments. Login now