##// END OF EJS Templates
Show terminals as terminals/name...
Thomas Kluyver -
Show More
@@ -39,6 +39,11 b' define(['
39 $('#new_terminal').click($.proxy(this.new_terminal, this));
39 $('#new_terminal').click($.proxy(this.new_terminal, this));
40 };
40 };
41
41
42 TerminalList.prototype.new_terminal = function() {
43 var url = utils.url_join_encode(this.base_url, 'terminals/new');
44 window.open(url, '_blank');
45 };
46
42 TerminalList.prototype.load_terminals = function() {
47 TerminalList.prototype.load_terminals = function() {
43 var that = this;
48 var that = this;
44 var url = utils.url_join_encode(this.base_url, 'api/terminals');
49 var url = utils.url_join_encode(this.base_url, 'api/terminals');
@@ -63,15 +68,10 b' define(['
63 }
68 }
64 $('#terminal_list_header').toggle(data.length === 0);
69 $('#terminal_list_header').toggle(data.length === 0);
65 };
70 };
66
67 TerminalList.prototype.new_terminal = function() {
68 var url = utils.url_join_encode(this.base_url, 'terminals/new');
69 window.open(url, '_blank');
70 };
71
71
72 TerminalList.prototype.add_link = function(name, item) {
72 TerminalList.prototype.add_link = function(name, item) {
73 item.data('term-name', name);
73 item.data('term-name', name);
74 item.find(".item_name").text(name);
74 item.find(".item_name").text("terminals/" + name);
75 item.find(".item_icon").addClass("fa fa-terminal");
75 item.find(".item_icon").addClass("fa fa-terminal");
76 var link = item.find("a.item_link")
76 var link = item.find("a.item_link")
77 .attr('href', utils.url_join_encode(this.base_url, "terminals", name));
77 .attr('href', utils.url_join_encode(this.base_url, "terminals", name));
General Comments 0
You need to be logged in to leave comments. Login now