Added shortid for server and unique id's for remote

This commit is contained in:
Kasper Rynning-Tønnesen
2015-06-19 19:43:58 +02:00
parent 8b4cb5964d
commit 7e96a1d0dc
19 changed files with 740 additions and 7 deletions

View File

@@ -5,7 +5,7 @@ socket.on("id", function(id)
{
console.log("Unique remote control ID: " + id);
var codeURL = "https://"+window.location.hostname+"/remote/"+id;
$("#code-text").text(id.toUpperCase())
$("#code-text").text(id)
$("#code-qr").attr("src", "https://chart.googleapis.com/chart?chs=221x221&cht=qr&choe=UTF-8&chld=L|1&chl="+codeURL);
$("#code-link").attr("href", codeURL);
if(!began)

View File

@@ -8,7 +8,7 @@ $(document).ready(function (){
id = window.location.pathname.split("/")[2];
if(id)
{
id = id.toLowerCase();
//id = id.toLowerCase();
control();
}
});
@@ -44,7 +44,7 @@ function control()
$(".rc").css("display", "block");
document.getElementById("base").setAttribute("onsubmit", "control(); return false;");
$("#remote-text").text("Controlling "+ id.toUpperCase())
$("#remote-text").text("Controlling "+ id)
document.getElementById("search").setAttribute("length", "18");
document.getElementById("search").setAttribute("maxlength", "18");
$("#forsearch").html("Type new channel name to change to");