Index: lams_central/web/includes/javascript/main.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/Attic/main.js,v diff -u -r1.1.2.3 -r1.1.2.4 --- lams_central/web/includes/javascript/main.js 28 Oct 2016 02:49:07 -0000 1.1.2.3 +++ lams_central/web/includes/javascript/main.js 28 Oct 2016 17:05:38 -0000 1.1.2.4 @@ -1,7 +1,5 @@ $(document).ready(function () { - //initButtons(); //TODO remove? - // open active course. in case active course is not yet chosen by user, it will be opened after tablesorter's pager receives all orgs if (activeOrgId != null) { loadOrganisation(); @@ -149,9 +147,6 @@ { dispatch : "storeLastVisitedOrganisation", orgId : activeOrgId - }, - function() { - //initButtons("org-container"); //TODO remove? } ); } @@ -164,8 +159,11 @@ stateId : stateId, orgId : activeOrgId }, - function() { - //initButtons("org-container"); //TODO remove? + function( response, status, xhr ) { + //in case of any server error - open offcanvas bar so user can select another course + if ( status == "error" ) { + $("body").removeClass("offcanvas-hidden"); + } } ); } @@ -189,45 +187,7 @@ ); } -//TODO remove? -function initButtons(containerId) { - var container = containerId ? $('#' + containerId) : document; - $(".ui-button", container).button(); - $(".split-ui-button", container).each(function(){ - var buttonContainer = $(this), - buttons = buttonContainer.children(); - - buttons.first().button() - .next().button({ - text : false, - icons : { - primary : "ui-icon-triangle-1-s" - } - }); - - buttonContainer.buttonset().next().hide().menu(); - - buttons.each(function(){ - var button = $(this); - if (!button.attr('onclick')) { - button.click(function() { - var menu = $(this).parent().next().show().position({ - my : "right top", - at : "right bottom", - of : $(this).parent() - }); - $(document).one("click", function() { - menu.hide(); - }); - return false; - }); - } - }); - }); -} - - function showMyProfileDialog() { showDialog("dialogMyProfile", { 'title' : LABELS.MY_PROFILE,