Functional add server button

inline styling for now.
This commit is contained in:
Jiiks 2015-10-28 00:04:41 +02:00
parent 42cea45430
commit 52cec81afb
3 changed files with 29 additions and 8 deletions

View File

@ -420,16 +420,27 @@ PublicServers.prototype.addServer = function(name, code, title, language, descri
text: language
}));
tr.append(desc);
tr.append($("<button/>", {
text: "Join",
css: {
"width": "100%",
"height": "30px",
"display": "block",
"margin-top": "10px",
"background-color": "#36393E",
"border": "1px solid #404040",
"outline": "1px solid #000",
"color": "#EDEDED"
},
click: function() { self.joinServer(code); }
}));
tr.append(desc);
tableBody.append(tr);
};
PublicServers.prototype.show = function() {
this.getPanel().toggle();
var li = $("#bd-pub-li");

2
js/main.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -124,14 +124,24 @@ PublicServers.prototype.addServer = function(name, code, title, language, descri
tr.append($("<td/>", {
text: language
}));
tr.append($("<button/>", {
text: "Join",
click: function() { self.joinServer(code); }
}));
tr.append(desc);
tr.append($("<button/>", {
text: "Join",
css: {
"width": "100%",
"height": "30px",
"display": "block",
"margin-top": "10px",
"background-color": "#36393E",
"border": "1px solid #404040",
"outline": "1px solid #000",
"color": "#EDEDED"
},
click: function() { self.joinServer(code); }
}));
tableBody.append(tr);
};