mirror of https://github.com/calzoneman/sync.git
Beginning to think I should test this locally before I push
This commit is contained in:
parent
abe6dbe225
commit
fb19822eca
|
@ -84,25 +84,26 @@ if(params["channel"] == undefined) {
|
|||
socket.emit("joinChannel", {
|
||||
name: m[1]
|
||||
});
|
||||
break;
|
||||
}
|
||||
else {
|
||||
|
||||
var main = $($(".container")[1]);
|
||||
var container = $("<div/>").addClass("container").insertBefore(main);
|
||||
var row = $("<div/>").addClass("row").appendTo(container);
|
||||
var div = $("<div/>").addClass("span6").appendTo(row);
|
||||
main.css("display", "none");
|
||||
var label = $("<label/>").text("Enter Channel:").appendTo(div);
|
||||
var entry = $("<input/>").attr("type", "text").appendTo(div);
|
||||
entry.keydown(function(ev) {
|
||||
if(ev.keyCode == 13) { document.location = document.location + "?channel=" + entry.val();
|
||||
socket.emit("joinChannel", {
|
||||
name: entry.val()
|
||||
});
|
||||
container.remove();
|
||||
main.css("display", "");
|
||||
}
|
||||
});
|
||||
var main = $($(".container")[1]);
|
||||
var container = $("<div/>").addClass("container").insertBefore(main);
|
||||
var row = $("<div/>").addClass("row").appendTo(container);
|
||||
var div = $("<div/>").addClass("span6").appendTo(row);
|
||||
main.css("display", "none");
|
||||
var label = $("<label/>").text("Enter Channel:").appendTo(div);
|
||||
var entry = $("<input/>").attr("type", "text").appendTo(div);
|
||||
entry.keydown(function(ev) {
|
||||
if(ev.keyCode == 13) { document.location = document.location + "?channel=" + entry.val();
|
||||
socket.emit("joinChannel", {
|
||||
name: entry.val()
|
||||
});
|
||||
container.remove();
|
||||
main.css("display", "");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
else if(!params["channel"].match(/^[a-zA-Z0-9]+$/)) {
|
||||
$("<div/>").addClass("alert alert-error")
|
||||
|
|
Loading…
Reference in New Issue