diff --git a/client/src/app/components/vote-button.jsx b/client/src/app/components/vote-button.jsx index ada0751..d075ae2 100644 --- a/client/src/app/components/vote-button.jsx +++ b/client/src/app/components/vote-button.jsx @@ -235,23 +235,38 @@ var VoteButton = React.createClass({ _handleYesButtonTouched: function (e) { console.log('!!!!!!!_handleYesButton'); + var timeout ; if (this.lastTouchEvent && (e.nativeEvent.timeStamp - this.lastTouchEvent) < 250) { + clearTimeout(this.timeout); this.getVoted('yes'); this.lastTouchEvent = 0; } else { this.lastTouchEvent = e.nativeEvent.timeStamp; + + this.timeout = setTimeout( + function(){ + this.setState({snackbarMessage: window.textSet.doubleClick}); + this.refs.snackbar.show(); + }.bind(this), 500); } }, _handleNoButtonTouched: function (e) { console.log('!!!!!!!_handleNoButton'); + var timeout ; if (this.lastTouchEvent && (e.nativeEvent.timeStamp - this.lastTouchEvent) < 250) { + clearTimeout(this.timeout); this.getVoted('no'); this.lastTouchEvent = 0; } else { this.lastTouchEvent = e.nativeEvent.timeStamp; + this.timeout = setTimeout( + function(){ + this.setState({snackbarMessage: window.textSet.doubleClick}); + this.refs.snackbar.show(); + }.bind(this), 500); } }, diff --git a/client/src/www/index.html b/client/src/www/index.html index 229bb11..e09cf57 100644 --- a/client/src/www/index.html +++ b/client/src/www/index.html @@ -23,7 +23,7 @@ console.error = function(){}; console.debug = function(){}; window.server = {} - window.server.ip = "54.65.152.112"; + window.server.ip = "52.196.23.127"; window.server.port = "5000"; window.server.url = "http://"+window.server.ip+":"+window.server.port; diff --git a/client/src/www/language.js b/client/src/www/language.js index b75a097..423ff51 100644 --- a/client/src/www/language.js +++ b/client/src/www/language.js @@ -38,6 +38,7 @@ function getTextSetByLanguege(language) { text.tag = "태그를 입력해주세요"; text.tagResult = "결과 없음, 다른 태그를 입력해주세요"; text.newAskCreated = "새로운 Ask가 생성되었습니다."; + text.doubleClick = "투표는 더블클릭으로!"; break; case "en" : text.login = "Sign in"; @@ -76,6 +77,7 @@ function getTextSetByLanguege(language) { text.tag = "Please type #tag..."; text.tagResult = "No result, please type another tag..."; text.newAskCreated = "New Ask created"; + text.doubleClick = "Double Tap for voting"; break; default: console.log("Please check language parameter!")