diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/codeq/aaiLogin.js | 6 | ||||
-rw-r--r-- | js/codeq/about.js | 4 | ||||
-rw-r--r-- | js/codeq/change_password.js | 10 | ||||
-rw-r--r-- | js/codeq/language.js | 2 | ||||
-rw-r--r-- | js/codeq/login.js | 22 | ||||
-rw-r--r-- | js/codeq/navigation.js | 2 | ||||
-rw-r--r-- | js/codeq/problem_list.js | 6 | ||||
-rw-r--r-- | js/codeq/profile.js | 8 | ||||
-rw-r--r-- | js/codeq/prolog.js | 8 | ||||
-rw-r--r-- | js/codeq/python.js | 8 | ||||
-rw-r--r-- | js/codeq/robot.js | 8 | ||||
-rw-r--r-- | js/codeq/settings.js | 18 | ||||
-rw-r--r-- | js/codeq/signup.js | 16 | ||||
-rw-r--r-- | js/codeq/solutions.js | 2 | ||||
-rw-r--r-- | js/codeq/upgrade_to_aai.js | 8 |
15 files changed, 64 insertions, 64 deletions
diff --git a/js/codeq/aaiLogin.js b/js/codeq/aaiLogin.js index dce047e..018b765 100644 --- a/js/codeq/aaiLogin.js +++ b/js/codeq/aaiLogin.js @@ -20,12 +20,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ */ (function(){ "use strict"; - var jqScreen = $('#screen_aai_login'), + var jqScreen = $('#screen-aai-login'), jqNavBarRight = $('.nav.navbar-nav.navbar-right'), jqNavigationHomeBtn = $('#navigation-home'), - jqCancelAaiLogin = $("#cancel_aai_login"), + jqCancelAaiLogin = $("#cancel-aai-login"), jqDisabledOverlay = $('#disabled'), - jqAaiIframe = $('#aai_iframe'), + jqAaiIframe = $('#aai-iframe'), baseSamlUrl = 'https://codeq.si/saml/Login?sid=', samlLoginUrl = ''; diff --git a/js/codeq/about.js b/js/codeq/about.js index 69327fc..652fb79 100644 --- a/js/codeq/about.js +++ b/js/codeq/about.js @@ -22,8 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ */ (function(){ "use strict"; - var jqScreen = $("#screen_about"), - jqBtnGoBack = $("#btnAboutGoBack"); + var jqScreen = $("#screen-about"), + jqBtnGoBack = $("#about-back"); codeq.globalStateMachine.register('about',{ 'jqScreen': jqScreen, diff --git a/js/codeq/change_password.js b/js/codeq/change_password.js index 20c26d5..562f4b2 100644 --- a/js/codeq/change_password.js +++ b/js/codeq/change_password.js @@ -22,11 +22,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ */ (function(){ "use strict"; - var jqScreen = $("#screen_change_pass"), - jqNew = $("#modalChangePasswordNew"), - jqVerify = $("#modalChangePasswordVerify"), - jqCancelBtn = $("#cancel_change_pass_button"), - jqChangePassForm = $('#formChangePassword'); + var jqScreen = $('#screen-change-pass'), + jqNew = $('#change-password-new'), + jqVerify = $('#change-password-verify'), + jqCancelBtn = $('#change-password-cancel'), + jqChangePassForm = $('#change-password-form'); codeq.globalStateMachine.register('changePassword',{ 'jqScreen': jqScreen, diff --git a/js/codeq/language.js b/js/codeq/language.js index 708074b..54eedcb 100644 --- a/js/codeq/language.js +++ b/js/codeq/language.js @@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ (function(){ "use strict"; - var jqScreen = $('#screen_language'), + var jqScreen = $('#screen-language'), jqProlog = $('#choose-prolog'), jqPython = $('#choose-python'), jqRobot = $('#choose-robot'), diff --git a/js/codeq/login.js b/js/codeq/login.js index ff217c5..9b87762 100644 --- a/js/codeq/login.js +++ b/js/codeq/login.js @@ -21,12 +21,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ (function(){ "use strict"; - var jqScreen = $("#screen_login"), + var jqScreen = $("#screen-login"), jqNavBarRight = $('.nav.navbar-nav.navbar-right'), jqNavigationHomeBtn = $('#navigation-home'), - jqAAILoginBtn = $('#aai_login_button'), + jqAAILoginBtn = $('#aai-login-button'), jqLoginForm = $('#login-form'), - jqSignupBtn = $('#signup_button'), + jqSignupBtn = $('#signup-button'), jqLangSelect = jqScreen.find('.lang-select'), jqDisabledOverlay = $('#disabled'), jqLoginFailed = jqScreen.find('.login-failed'); @@ -39,23 +39,23 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ //nav signed in... $('#signed-in-title').html(data.name||data.username||data.email||'undefined'); //merge with profile page - $('#profileUsername').html(data.username||data.email||'undefined'); - $('#profileName').html(data.name||'undefined'); - $('#profileEmail').html(data.email||'undefined'); - $('#profileJoined').html(new Date(data.joined).toLocaleString()); - $('#profileLastLogin').html(new Date(data["last-login"]).toLocaleString()); + $('#profile-username').html(data.username||data.email||'undefined'); + $('#profile-name').html(data.name||'undefined'); + $('#profile-email').html(data.email||'undefined'); + $('#profile-joined').html(new Date(data.joined).toLocaleString()); + $('#profile-last-login').html(new Date(data["last-login"]).toLocaleString()); //merge these settings into the already existing default settings var sett = data.settings; $.extend(codeq.settings, sett); if('gui_lang' in sett && sett['gui_lang'] in codeq.supportedLangs){ codeq.setLang(sett['gui_lang']); - $("#gui_lang_select").val(sett['gui_lang']); + $("#settings-gui-lang").val(sett['gui_lang']); } - $('#robot_address_input').val(codeq.settings['robot_address'] || ''); + $('#settings-robot-address').val(codeq.settings['robot_address'] || ''); if('gui_layout' in sett && ($.inArray(sett['gui_layout'], codeq.supportedLayouts) >= 0) ){ codeq.setLayout(sett['gui_layout']); - $("#gui_layout_select").val(sett['gui_layout']); + $("#settings-layout").val(sett['gui_layout']); } codeq.globalStateMachine.transition('language'); diff --git a/js/codeq/navigation.js b/js/codeq/navigation.js index 60baa9b..1406d55 100644 --- a/js/codeq/navigation.js +++ b/js/codeq/navigation.js @@ -139,7 +139,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ codeq.globalStateMachine.transition('language'); e.preventDefault(); }); - $('#navigation-problem_list').on('click', function(e){ + $('#navigation-problem-list').on('click', function (e) { codeq.globalStateMachine.transition('problem_list'); e.preventDefault(); }); diff --git a/js/codeq/problem_list.js b/js/codeq/problem_list.js index e5ca36e..21d376b 100644 --- a/js/codeq/problem_list.js +++ b/js/codeq/problem_list.js @@ -16,7 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ (function(){ "use strict"; - var jqScreen = $('#screen_problem_list'), + var jqScreen = $('#screen-problem-list'), languageCache = {}, // keyed by language identifier: processed data about languages translationCache = [], // keys are autogenerated in ta(), a value is a dictionary of translations of a translation key for every language problemCache = {}, // problem data cache, 3-level, keyed by: language, problem group, and problem identifier @@ -428,7 +428,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ 'enter': function(language){ var data = languageCache[language]; // language data - $("#navigation-problem_list").addClass("active").css('display', ''); + $("#navigation-problem-list").addClass("active").css('display', ''); if (!language) language = currentLanguage; // This happens when we hit this with the back button if (language !== currentLanguage) { @@ -453,7 +453,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ }, 'exit' : function(){ jqScreen.css('display', 'none'); - $('#navigation-problem_list').css('display', 'none').removeClass("active"); + $('#navigation-problem-list').css('display', 'none').removeClass("active"); } }); })(); diff --git a/js/codeq/profile.js b/js/codeq/profile.js index 4b2f9ce..79a9bf5 100644 --- a/js/codeq/profile.js +++ b/js/codeq/profile.js @@ -21,9 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ (function(){ "use strict"; - var jqScreen = $("#screen_profile"), - jqBtnChangePass = $("#change_pass_profile"), - jqBtnGoBack = $("#btnProfileGoBack"); + var jqScreen = $("#screen-profile"), + jqBtnChangePass = $("#profile-change-password"), + jqBtnGoBack = $("#profile-back"); codeq.profile = { }; @@ -71,7 +71,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ items+='</td>'; }); - $('#table1').html(items) + $('#profile-stats').html(items) }) .fail(function (reason) { diff --git a/js/codeq/prolog.js b/js/codeq/prolog.js index 111ea68..0d2f9d5 100644 --- a/js/codeq/prolog.js +++ b/js/codeq/prolog.js @@ -16,7 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ (function() { "use strict"; - var jqScreen = $('#screen_prolog'), // the screen container element + var jqScreen = $('#screen-prolog'), // the screen container element // quadrants jqCode = jqScreen.find('.block2'), jqConsole = jqScreen.find('.block3'), @@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ prologHandler; var enterFun = function(problemDef, commonDef, currentSolution) { - $('#navigation-problem_list').css('display', ''); + $('#navigation-problem-list').css('display', ''); var navigationProlog = $("#navigation-prolog"); navigationProlog.addClass("active"); navigationProlog.css('display', ''); @@ -61,7 +61,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ prologHandler.destroy(); prologHandler = null; - $('#navigation-problem_list').css('display', 'none'); + $('#navigation-problem-list').css('display', 'none'); var navigationProlog = $("#navigation-prolog"); navigationProlog.removeClass("active"); navigationProlog.css('display', 'none'); @@ -260,7 +260,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ return { destroy: function () { codeq.comms.endProblem().done(); - $('#screen_prolog .title').text('');//empty the title text + $('#screen-prolog .title').text(''); //empty the title text jqAllButtons.off(); editor.off('change'); activityHandler.queueTrace({'typ': 'close'}); diff --git a/js/codeq/python.js b/js/codeq/python.js index ab557e5..112d7ff 100644 --- a/js/codeq/python.js +++ b/js/codeq/python.js @@ -16,7 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ (function() { "use strict"; - var jqScreen = $('#screen_python'), // the screen container element + var jqScreen = $('#screen-python'), // the screen container element // quadrants jqCode = jqScreen.find('.block2'), jqConsole = jqScreen.find('.block3'), @@ -32,7 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ pythonHandler; // created when we enter the python state and destroyed once we leave it var enterFun = function(problemDef, commonDef, currentSolution) { - $('#navigation-problem_list').css('display', ''); + $('#navigation-problem-list').css('display', ''); var navigationPhython = $("#navigation-python"); navigationPhython.addClass("active"); navigationPhython.css('display', ''); @@ -64,7 +64,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ pythonHandler.destroy(); pythonHandler = null; - $('#navigation-problem_list').css('display', 'none'); + $('#navigation-problem-list').css('display', 'none'); var navigationPhython = $("#navigation-python"); navigationPhython.removeClass("active"); navigationPhython.css('display', 'none'); @@ -223,7 +223,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ return { destroy: function () { codeq.comms.endProblem().done(); - $('#screen_python .title').text('');//empty the title text + $('#screen-python .title').text(''); //empty the title text jqAllButtons.off(); editor.off('change'); codeq.comms.off('terminal_output'); // stop listening for the terminal events from server diff --git a/js/codeq/robot.js b/js/codeq/robot.js index 43bfb12..3e561a1 100644 --- a/js/codeq/robot.js +++ b/js/codeq/robot.js @@ -16,7 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ (function() { "use strict"; - var jqScreen = $('#screen_robot'), // the screen container element + var jqScreen = $('#screen-robot'), // the screen container element // quadrants jqCode = jqScreen.find('.block2'), jqConsole = jqScreen.find('.block3'), @@ -32,7 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ robotHandler; var enterFun = function(problemDef, commonDef, currentSolution) { - $('#navigation-problem_list').css('display', ''); + $('#navigation-problem-list').css('display', ''); var navigationRobot = $("#navigation-robot"); navigationRobot.addClass("active"); navigationRobot.css('display', ''); @@ -65,7 +65,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ robotHandler.destroy(); robotHandler = null; - $('#navigation-problem_list').css('display', 'none'); + $('#navigation-problem-list').css('display', 'none'); var navigationRobot = $("#navigation-robot"); navigationRobot.removeClass("active"); navigationRobot.css('display', 'none'); @@ -223,7 +223,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ reconnectTimer = null; } - $('#screen_robot .title').text('');//empty the title text + $('#screen-robot .title').text(''); //empty the title text jqAllButtons.off(); editor.off('change'); activityHandler.queueTrace({'typ': 'close'}); diff --git a/js/codeq/settings.js b/js/codeq/settings.js index 1f35abf..e6b8fce 100644 --- a/js/codeq/settings.js +++ b/js/codeq/settings.js @@ -22,18 +22,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ (function(){ "use strict"; var navigationSettings = $('#navigation-settings'), - guiLangSelect = $('#gui_lang_select'), - robotAddressInput = $('#robot_address_input'), + guiLangSelect = $('#settings-gui-lang'), + robotAddressInput = $('#settings-robot-address'), jqDisabledOverlay = $('#disabled'), - jqSettForm = $("#settingsForm"), - jqSettCancelBtn = $("#settings_cancel_btn"), - jqScreenSettings = $('#screen_settings'), - jqLayoutSelect = $('#gui_layout_select'); + jqSettForm = $("#settings-form"), + jqSettCancelBtn = $("#settings-cancel"), + jqScreenSettings = $('#screen-settings'), + jqLayoutSelect = $('#settings-layout'); codeq.on('layoutchange', function(){ - $("#screen_prolog").removeClass(codeq.supportedLayouts.join(" ")).addClass(codeq.getLayout()); - $("#screen_python").removeClass(codeq.supportedLayouts.join(" ")).addClass(codeq.getLayout()); - $("#screen_robot").removeClass(codeq.supportedLayouts.join(" ")).addClass(codeq.getLayout()); + $("#screen-prolog").removeClass(codeq.supportedLayouts.join(" ")).addClass(codeq.getLayout()); + $("#screen-python").removeClass(codeq.supportedLayouts.join(" ")).addClass(codeq.getLayout()); + $("#screen-robot").removeClass(codeq.supportedLayouts.join(" ")).addClass(codeq.getLayout()); }); codeq.globalStateMachine.register('settings',{ diff --git a/js/codeq/signup.js b/js/codeq/signup.js index e1d9a09..d41f1d5 100644 --- a/js/codeq/signup.js +++ b/js/codeq/signup.js @@ -21,14 +21,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ (function(){ "use strict"; - var jqScreen = $("#screen_signup"), - jqUsername = $("#modalSignUpUsername"), - jqName = $("#modalSignUpName"), - jqEmail = $("#modalSignUpEmail"), - jqPassword = $("#modalSignUpPassword"), - jqVerify = $("#modalSignUpVerify"), - jqFormSignUp = $('#formSignUp'), - jqExitSignUpBtn = $('#exit_signup_btn'), + var jqScreen = $("#screen-signup"), + jqUsername = $("#signup-username"), + jqName = $("#signup-name"), + jqEmail = $("#signup-email"), + jqPassword = $("#signup-password"), + jqVerify = $("#signup-password-verify"), + jqFormSignUp = $('#signup-form'), + jqExitSignUpBtn = $('#signup-cancel'), jqLangSelect = jqScreen.find('.lang-select'), jqNavBarRight = $('.nav.navbar-nav.navbar-right'), jqNavigationHomeBtn = $('#navigation-home'); diff --git a/js/codeq/solutions.js b/js/codeq/solutions.js index 399c934..6df3c75 100644 --- a/js/codeq/solutions.js +++ b/js/codeq/solutions.js @@ -16,7 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ (function(){ "use strict"; - var jqScreen = $('#screen_solutions'), + var jqScreen = $('#screen-solutions'), jqSolutions = jqScreen.find('.solutions'), jqBtnGoBack = jqScreen.find('.btnGoBack'); diff --git a/js/codeq/upgrade_to_aai.js b/js/codeq/upgrade_to_aai.js index ad57fed..a75be22 100644 --- a/js/codeq/upgrade_to_aai.js +++ b/js/codeq/upgrade_to_aai.js @@ -20,10 +20,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ */ (function(){ "use strict"; - var jqScreen = $("#screen_upgrade_to_aai"), - jqForm = $('#formUpgradeToAAI'), - jqNoBtn = $('#btnUpgradeToAAINo'), - jqPassword = $('#formUpgradeToAAIPassword'), + var jqScreen = $("#screen-upgrade-to-aai"), + jqForm = $('#upgrade-to-aai-form'), + jqNoBtn = $('#upgrade-to-aai-cancel'), + jqPassword = $('#upgrade-to-aai-password'), jqLangSelect = jqScreen.find('.lang-select'); codeq.globalStateMachine.register('upgradeToAAI',{ |