From: konekoneko Date: Sat, 8 Sep 2012 20:28:20 +0000 (+0900) Subject: 名前を空欄にした状態で入室できないようにした X-Git-Url: http://git.osdn.jp/view?a=commitdiff_plain;h=bba296ff758e70717045af6b4ed57023b4c827c5;p=webchat%2FWebChat.git 名前を空欄にした状態で入室できないようにした --- diff --git a/public/scripts/chatclient.js b/public/scripts/chatclient.js index 549451a..ca3f4d2 100644 --- a/public/scripts/chatclient.js +++ b/public/scripts/chatclient.js @@ -6,10 +6,11 @@ $entered_message = "%sが入室しました"; $quited_message = "%sが退室しました"; $system_msg_color ="#000000"; $profile_link = "" //プロフィールシステムへのリンク先(%nで名前を表す) -$fanble_message = "[color=blue]%s ファンブル![/color]"; //ファンブル時のメッセージ -$critical_message = "[color=red]%s クリティカル![/color]"; //クリティカル時のメッセージ +$fanble_message = "[color=blue]%s ファンブル![/color]"; +$critical_message = "[color=red]%s クリティカル![/color]"; $send_message = "%sからの送信 %s"; -$failed_connect_message = "failed connect or ip banned"; +$failed_connect_message = "接続に失敗しました"; +$invaild_name_message = "名前を空欄にすることはできません"; //ここから先は変更しないでください $prefix_filelist = "!"; @@ -191,6 +192,12 @@ function createNameList() } function enterEventListener(){ + if(document.enter_form.name.value == "") + { + alert($invaild_name_message); + return; + } + $("#enter_frame").css("display","none"); $("#chat_frame").css("display","block");