Fix: menu typing ES5 bug
This commit is contained in:
@@ -102,7 +102,7 @@ var MenuTypingPractice = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getBestRecord: function(jsonList, appID) {
|
getBestRecord: function(jsonList, appID) {
|
||||||
var count = Object.keys(jsonList).length;
|
var count = jsonList.length; // Object.keys(jsonList).length;
|
||||||
|
|
||||||
for(var i = 0; i < count; i++) {
|
for(var i = 0; i < count; i++) {
|
||||||
if(jsonList[i].AppID === appID)
|
if(jsonList[i].AppID === appID)
|
||||||
@@ -127,8 +127,8 @@ var MenuTypingPractice = {
|
|||||||
|
|
||||||
var buttonWidthGap = TypingAppButton.BUTTON_WIDTH + MenuTypingPractice.BUTTON_GAP;
|
var buttonWidthGap = TypingAppButton.BUTTON_WIDTH + MenuTypingPractice.BUTTON_GAP;
|
||||||
|
|
||||||
var koreanTypingPracticeAppCount = Object.keys(replyJSON.KoreanAppList).length;
|
var koreanTypingPracticeAppCount = replyJSON.KoreanAppList.length; // Object.keys(replyJSON.KoreanAppList).length;
|
||||||
var englishTypingPracticeAppCount = Object.keys(replyJSON.EnglishAppList).length;
|
var englishTypingPracticeAppCount = replyJSON.EnglishAppList.length; // Object.keys(replyJSON.EnglishAppList).length;
|
||||||
|
|
||||||
for(var i = 0; i < koreanTypingPracticeAppCount; i++) {
|
for(var i = 0; i < koreanTypingPracticeAppCount; i++) {
|
||||||
var activeApp = replyJSON.KoreanAppList[i];
|
var activeApp = replyJSON.KoreanAppList[i];
|
||||||
@@ -165,7 +165,7 @@ var MenuTypingPractice = {
|
|||||||
var typingPracticeButton = new TypingAppButton(
|
var typingPracticeButton = new TypingAppButton(
|
||||||
TypingAppButton.TYPE_PRACTICE_ENGLISH,
|
TypingAppButton.TYPE_PRACTICE_ENGLISH,
|
||||||
posX, posY,
|
posX, posY,
|
||||||
this.getIconImage(activeApp.AppID),
|
this.getIconImage(replyJSON.EnglishHighScoreList, activeApp.AppID),
|
||||||
activeApp.KoreanName,
|
activeApp.KoreanName,
|
||||||
{
|
{
|
||||||
AppID: activeApp.AppID,
|
AppID: activeApp.AppID,
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ var MenuTypingTest = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getBestRecord: function(jsonList, appID) {
|
getBestRecord: function(jsonList, appID) {
|
||||||
var count = Object.keys(jsonList).length;
|
var count = jsonList.length; // Object.keys(jsonList).length;
|
||||||
|
|
||||||
for(var i = 0; i < count; i++) {
|
for(var i = 0; i < count; i++) {
|
||||||
if(jsonList[i].AppID === appID)
|
if(jsonList[i].AppID === appID)
|
||||||
@@ -129,8 +129,8 @@ var MenuTypingTest = {
|
|||||||
|
|
||||||
var buttonWidthGap = TypingAppButton.BUTTON_WIDTH + MenuTypingTest.BUTTON_GAP;
|
var buttonWidthGap = TypingAppButton.BUTTON_WIDTH + MenuTypingTest.BUTTON_GAP;
|
||||||
|
|
||||||
var koreanTypingPracticeAppCount = Object.keys(replyJSON.KoreanAppList).length;
|
var koreanTypingPracticeAppCount = replyJSON.KoreanAppList.length; // Object.keys(replyJSON.KoreanAppList).length;
|
||||||
var englishTypingPracticeAppCount = Object.keys(replyJSON.EnglishAppList).length;
|
var englishTypingPracticeAppCount = replyJSON.EnglishAppList.length; // Object.keys(replyJSON.EnglishAppList).length;
|
||||||
|
|
||||||
for(var i = 0; i < koreanTypingPracticeAppCount; i++) {
|
for(var i = 0; i < koreanTypingPracticeAppCount; i++) {
|
||||||
var activeApp = replyJSON.KoreanAppList[i];
|
var activeApp = replyJSON.KoreanAppList[i];
|
||||||
@@ -167,7 +167,7 @@ var MenuTypingTest = {
|
|||||||
var typingTestButton = new TypingAppButton(
|
var typingTestButton = new TypingAppButton(
|
||||||
TypingAppButton.TYPE_TEST_ENGLISH,
|
TypingAppButton.TYPE_TEST_ENGLISH,
|
||||||
posX, posY,
|
posX, posY,
|
||||||
this.getIconImage(replyJSON.KoreanHighScoreList, activeApp.AppID),
|
this.getIconImage(replyJSON.EnglishHighScoreList, activeApp.AppID),
|
||||||
activeApp.KoreanName,
|
activeApp.KoreanName,
|
||||||
{
|
{
|
||||||
AppID: activeApp.AppID,
|
AppID: activeApp.AppID,
|
||||||
|
|||||||
Reference in New Issue
Block a user