Fix: input text placeHolder message
This commit is contained in:
+25
-1
@@ -19,6 +19,12 @@ var Login = {
|
|||||||
(function() { this.back(); }).bind(this), // keyUpHandler
|
(function() { this.back(); }).bind(this), // keyUpHandler
|
||||||
"login" // callerClassName
|
"login" // callerClassName
|
||||||
);
|
);
|
||||||
|
this.keyboardShortcut.addCallback(
|
||||||
|
Phaser.KeyCode.ENTER, // keyCode
|
||||||
|
null, // keyDownHandler
|
||||||
|
(function() { this.startMenu(); }).bind(this), // keyUpHandler
|
||||||
|
"start" // callerClassName
|
||||||
|
);
|
||||||
|
|
||||||
// top ui
|
// top ui
|
||||||
var screenTopUI = new ScreenTopUI();
|
var screenTopUI = new ScreenTopUI();
|
||||||
@@ -59,16 +65,19 @@ var Login = {
|
|||||||
makeMaestroNameText: function(x, y) {
|
makeMaestroNameText: function(x, y) {
|
||||||
this.makeTextField(x, y, "마에스트로 계정 :");
|
this.makeTextField(x, y, "마에스트로 계정 :");
|
||||||
this.inputTextMaestroName = this.makeInputTypeText(x, y, "");
|
this.inputTextMaestroName = this.makeInputTypeText(x, y, "");
|
||||||
|
this.inputTextMaestroName.canvasInput.placeHolder("입력 후 [ Tab ]키를 누르세요");
|
||||||
},
|
},
|
||||||
|
|
||||||
makeNameText: function(x, y) {
|
makeNameText: function(x, y) {
|
||||||
this.makeTextField(x, y, "이름 :");
|
this.makeTextField(x, y, "이름 :");
|
||||||
this.inputTextName = this.makeInputTypeText(x, y, "");
|
this.inputTextName = this.makeInputTypeText(x, y, "");
|
||||||
|
this.inputTextName.canvasInput.placeHolder("입력 후 [ Tab ]키를 누르세요");
|
||||||
},
|
},
|
||||||
|
|
||||||
makeEnterCodeText: function(x, y) {
|
makeEnterCodeText: function(x, y) {
|
||||||
this.makeTextField(x, y, "입장번호 :");
|
this.makeTextField(x, y, "입장번호 :");
|
||||||
this.inputTextEnterCode = this.makeInputTypeText(x, y, "");
|
this.inputTextEnterCode = this.makeInputTypeText(x, y, "");
|
||||||
|
this.inputTextEnterCode.canvasInput.placeHolder("입력 후 [ Tab ]키를 누르세요");
|
||||||
},
|
},
|
||||||
|
|
||||||
makeTextField: function(x, y, text) {
|
makeTextField: function(x, y, text) {
|
||||||
@@ -103,6 +112,7 @@ var Login = {
|
|||||||
RoundRectButton.NONE_ICON, "시작",
|
RoundRectButton.NONE_ICON, "시작",
|
||||||
(function() { this.startMenu(); }).bind(this)
|
(function() { this.startMenu(); }).bind(this)
|
||||||
);
|
);
|
||||||
|
startButton.addShortcutText("Enter");
|
||||||
},
|
},
|
||||||
|
|
||||||
makeInfoText: function(x, y) {
|
makeInfoText: function(x, y) {
|
||||||
@@ -119,6 +129,20 @@ var Login = {
|
|||||||
sessionStorageManager.setPlayerName(this.inputTextName.canvasInput._value);
|
sessionStorageManager.setPlayerName(this.inputTextName.canvasInput._value);
|
||||||
var enterCode = this.inputTextEnterCode.canvasInput._value;
|
var enterCode = this.inputTextEnterCode.canvasInput._value;
|
||||||
|
|
||||||
|
if(maestroName == "") {
|
||||||
|
this.infoText.text = "마에스트로 계정 이름을 입력해주세요";
|
||||||
|
this.inputTextMaestroName.canvasInput.focus();
|
||||||
|
return;
|
||||||
|
} else if(sessionStorageManager.getPlayerName() == "") {
|
||||||
|
this.infoText.text = "학생의 이름을 입력해주세요";
|
||||||
|
this.inputTextName.canvasInput.focus();
|
||||||
|
return;
|
||||||
|
} else if(enterCode == "") {
|
||||||
|
this.infoText.text = "학생의 입장번호를 입력해주세요";
|
||||||
|
this.inputTextEnterCode.canvasInput.focus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var dbConnectManager = new DBConnectManager();
|
var dbConnectManager = new DBConnectManager();
|
||||||
dbConnectManager.requestCheckPlayerLogin(
|
dbConnectManager.requestCheckPlayerLogin(
|
||||||
maestroName,
|
maestroName,
|
||||||
@@ -151,7 +175,7 @@ var Login = {
|
|||||||
sessionStorageManager.clear();
|
sessionStorageManager.clear();
|
||||||
|
|
||||||
// show retry message
|
// show retry message
|
||||||
console.log('login failed, jsonData : ' + JSON.stringify(jsonData));
|
// console.log('login failed, jsonData : ' + JSON.stringify(jsonData));
|
||||||
|
|
||||||
if(jsonData["error"] !== null) {
|
if(jsonData["error"] !== null) {
|
||||||
this.infoText.text = jsonData["error"];
|
this.infoText.text = jsonData["error"];
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ var TypingTest = {
|
|||||||
this.inputTextContent.anchor.set(0.5);
|
this.inputTextContent.anchor.set(0.5);
|
||||||
this.inputTextContent.canvasInput.value('');
|
this.inputTextContent.canvasInput.value('');
|
||||||
this.inputTextContent.canvasInput.focus();
|
this.inputTextContent.canvasInput.focus();
|
||||||
|
this.inputTextContent.canvasInput.placeHolder("입력 후 [ Enter ]키를 누르세요");
|
||||||
// inputTextContent.canvasInput._onkeydown = this.checkInputText;
|
// inputTextContent.canvasInput._onkeydown = this.checkInputText;
|
||||||
// inputTextContent.canvasInput._onkeyup = function() {
|
// inputTextContent.canvasInput._onkeyup = function() {
|
||||||
this.inputTextContent.canvasInput._onkeyup = function() {
|
this.inputTextContent.canvasInput._onkeyup = function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user