'update'
[qomet.git] / public / javascripts / course.js
index 6320538..7006933 100644 (file)
@@ -39,28 +39,13 @@ new Vue({
                newEvaluation: { name: "" },
                evaluationArray: evaluationArray,
                mode: "view", //or "edit" (some evaluation)
-               evaluationIndex: 0, //current edited evaluation index
+               evaluationIndex: -1, //current edited evaluation index
                evaluation: { }, //copy of evaluation at editing index in array
                questionsText: "", //questions in an evaluation, in text format
        },
        mounted: function() {
-               
-               
-               
-               $('.modal').each( (i,elem) => {
-                       if (elem.id != "evaluationEdit")
-                               $(elem).modal();
-               });
-               $('ul.tabs').tabs(); //--> migrate to grade.js
-               
-               
-               
-               $('#evaluationEdit').modal({
-                       complete: () => {
-                               this.parseEvaluation();
-                               Vue.nextTick(statementsLibsRefresh);
-                       },
-               });
+               $('.modal').modal();
+               //Materialize.updateTextFields(); //textareas, time field...
        },
        methods: {
                // GENERAL:
@@ -145,10 +130,6 @@ new Vue({
                                }
                        );
                },
-               materialOpenModal: function(id) {
-                       $("#" + id).modal("open");
-                       Materialize.updateTextFields(); //textareas, time field...
-               },
                updateEvaluation: function() {
                        $.ajax("/evaluations", {
                                method: "PUT",