Skip to content

Commit

Permalink
Merge pull request #153 from tim-moody/0.3-fix-feb21
Browse files Browse the repository at this point in the history
fix auto load of home page and missing function
  • Loading branch information
tim-moody authored Feb 21, 2019
2 parents 1c03156 + 387ba96 commit 6863398
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions roles/console/files/js/js_menu_functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function getMenuItemDefLists(){
var resp = getMenuItemDefList();
if (!homeMenuLoaded) {
getContentMenuToEdit('home'); // load home menu on first run
homeMenuLoaded = true;
//homeMenuLoaded = true;
}
return resp;
}
Expand Down Expand Up @@ -51,7 +51,13 @@ function getContentMenuToEdit(currentJsMenuToEditUrl){ // passed by button click
if (!Array.isArray(currentJsMenuToEdit.menu_items_1) || !currentJsMenuToEdit.menu_items_1.length)
currentJsMenuToEdit.menu_items_1 = ['en-credits'];
setContentMenuToEditFormValues();
delayedProcCurrentMenuItemDefList (5000, currentJsMenuToEdit.menu_items_1, "current-items"); // hard coded name of list against future multi-tab menus
if (homeMenuLoaded)
delayedProcCurrentMenuItemDefList (5000, currentJsMenuToEdit.menu_items_1, "current-items"); // hard coded name$
else { // the first time we let the all menu item list completion draw the current menu
var html = createMenuItemScaffold(currentJsMenuToEdit.menu_items_1, "current-items");
$("#menusDefineMenuCurrentItemList").html(html);
homeMenuLoaded = true;
}
})
.fail(function (jqXHR, textStatus, errorThrown){
if (errorThrown == 'Not Found'){
Expand Down Expand Up @@ -186,6 +192,11 @@ function procCurrentMenuUpdateSelectedLangs (list) { // automatically select any
}
}

function redrawAllMenuItemList() {
// createMenuItemScaffold(menuItemDefList, "all-items"); - not needed as done for all items initially
drawMenuItemDefList(menuItemDefList, "all-items");
}

function drawMenuItemDefList (list, prefix){
for (var i = 0; i < list.length; i++) {
var menu_item_name = list[i];
Expand Down

0 comments on commit 6863398

Please sign in to comment.