/** * /script/tester.js * @version 1.3 * @desc Script file for the tester page (not the actual sQuizEngine yet. :P) * @author Fándly Gergő Zoltán (gergo@systemtest.tk, systemtest.tk) * @copy 2017 Fándly Gergő Zoltán * License: sQuiz for creating small jQuery based quizs in an implementable way Copyright (C) 2017 Fándly Gergő Zoltán This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . **/ function showSelector(){ $("#list").slideUp(); $("#fromfile").slideUp(); $("#fromurl").slideUp(); $("#sQuiz").slideUp(); $("#menuwrapper").slideDown(); $("#back").attr("onclick", "window.history.back()"); } function loadFromList(){ $("#back").attr("onclick", "showSelector()"); $("#menuwrapper").slideUp(); $.getJSON("./tests/main.json", function(json){ var list; if(!json.locallist){ //get list from server $.getJSON("./engine/engine.php?list", function(json){ list=json; $("#listcontent").html(""); $.each(list, function(key, val){ var push=""; push+=""+(parseInt(key)+1).toString()+""; push+=""+val.name+""; push+=""+val.description+""; push+="