some small fixes: grey-out send button if not ready
This commit is contained in:
		@@ -425,7 +425,9 @@ function user(usr) {
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    if ($("#chat").is(":visible") && usr.name==$("#recv").val()) { // same username as in receiver
 | 
			
		||||
        $("#send").prop("disabled", !usr.exists);
 | 
			
		||||
        $('#send').prop("disabled", !usr.exists);
 | 
			
		||||
        $("label[for=send] img").css("opacity", usr.exists?"1.0":"0.4");
 | 
			
		||||
        $("label[for=send] img").css("filter", usr.exists?"alpha(opacity=100)":"alpha(opacity=40)");
 | 
			
		||||
        if (usr.exists) success("recipient exists");
 | 
			
		||||
        else error("unknown recipient", true);
 | 
			
		||||
    }
 | 
			
		||||
@@ -567,8 +569,8 @@ function getpwd() {
 | 
			
		||||
 | 
			
		||||
function deleteUser() {
 | 
			
		||||
    var uid = userid();
 | 
			
		||||
    localStorage.pubkey = null;
 | 
			
		||||
    localStorage.privkey = null;
 | 
			
		||||
    localStorage.removeItem(pubkey);
 | 
			
		||||
    localStorage.removeItem(privkey);
 | 
			
		||||
    error("user "+uid+" permanentely lost");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -657,10 +659,10 @@ function init() {
 | 
			
		||||
            cordova.plugins.backgroundMode.enable();
 | 
			
		||||
        }
 | 
			
		||||
    }, false);
 | 
			
		||||
    socket.io.on("connect", connected());
 | 
			
		||||
    socket.io.on("reconnect", connected());
 | 
			
		||||
    socket.io.on("disconnect", disconnected());
 | 
			
		||||
    socket.io.on("error", disconnected());
 | 
			
		||||
    socket.io.on("connect", connected);
 | 
			
		||||
    socket.io.on("reconnect", connected);
 | 
			
		||||
    socket.io.on("disconnect", disconnected);
 | 
			
		||||
    socket.io.on("error", disconnected);
 | 
			
		||||
    socket.on("login", loggedin);
 | 
			
		||||
    socket.on("fail", fail);
 | 
			
		||||
    socket.on("user", user);
 | 
			
		||||
 
 | 
			
		||||
@@ -188,6 +188,10 @@ td:last-child {
 | 
			
		||||
.clear {
 | 
			
		||||
  clear: both;
 | 
			
		||||
}
 | 
			
		||||
label[for=send] img {
 | 
			
		||||
  opacity: 0.4;
 | 
			
		||||
  filter: alpha(opacity=40); /* MSIE */
 | 
			
		||||
}
 | 
			
		||||
#msgs .msg {
 | 
			
		||||
  border: 1px solid black;
 | 
			
		||||
  margin: 1ex;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user