Fix: requestMainMenuApp

This commit is contained in:
2019-08-07 21:39:25 +09:00
parent e76674ac95
commit b205787545
2 changed files with 32 additions and 3 deletions
+26 -1
View File
@@ -141,7 +141,7 @@ MainMenu.prototype.loadAppData = function() {
this.selectedLanguage, this.selectedLanguage,
(function(replyJSON) { (function(replyJSON) {
// this.updateAppGroupTab(replyJSON.appGroupData); // this.updateAppGroupTab(replyJSON.appGroupData);
// this.updateAppButtons(replyJSON.appGroup, replyJSON.appData); this.updateAppButtons(replyJSON.appGroup, replyJSON.appData);
// this.updateLanguageTab(replyJSON.appGroup); // this.updateLanguageTab(replyJSON.appGroup);
}).bind(this), }).bind(this),
(function(replyJSON) { (function(replyJSON) {
@@ -163,6 +163,31 @@ MainMenu.prototype.loadAppData = function() {
*/ */
} }
MainMenu.prototype.updateAppButtons = function(appGroup, appData) {
switch(appGroup) {
case MainMenu.APP_GROUP_FINGER_POSITION:
this.makeFingerPositionAppButtons();
break;
case MainMenu.APP_GROUP_TYPING_PRACTICE:
this.makeTypingPracticeAppButtons();
break;
case MainMenu.APP_GROUP_TYPING_TEST:
this.makeTypingTestAppButtons();
break;
case MainMenu.APP_GROUP_TYPING_PLAY:
this.makeTypingPlayAppButtons();
break;
case MainMenu.APP_GROUP_MOUSE_PLAY:
this.makeMousePlayAppButtons();
break;
}
}
MainMenu.prototype.loadSucceeded = function(replyJSON) { MainMenu.prototype.loadSucceeded = function(replyJSON) {
// console.log(replyJSON); // console.log(replyJSON);
+6 -2
View File
@@ -28,8 +28,12 @@ include "./../db/menu_collection.php";
$menuCollection = new MenuCollection($dbConnector->getMysqli()); $menuCollection = new MenuCollection($dbConnector->getMysqli());
// $systemWritingArray = $menuCollection->getSystemWritingList(); // $systemWritingArray = $menuCollection->getSystemWritingList();
$jsonBuilder->setData("appGroup", $menuCollection->getAppGroupName($appGroup)); $jsonBuilder->setData("appGroupName", $menuCollection->getAppGroupName($appGroup));
$jsonBuilder->setData("language", $menuCollection->getLanguageName($language)); $jsonBuilder->setData("languageName", $menuCollection->getLanguageName($language));
$jsonBuilder->setData("appGroup", $appGroup);
$jsonBuilder->setData("appData", $appData);
$jsonBuilder->sendResultSuccess(); $jsonBuilder->sendResultSuccess();
/* /*