liquid_feedback_frontend

diff static/js/voting.js @ 949:e616d8f16f14

Force JavaScript test before voting; Removed unneccessary "preview2" mechanism in voting script
author jbe
date Thu Nov 08 20:55:54 2012 +0100 (2012-11-08)
parents bb8b21241dab
children
line diff
     1.1 --- a/static/js/voting.js	Thu Nov 08 15:32:57 2012 +0100
     1.2 +++ b/static/js/voting.js	Thu Nov 08 20:55:54 2012 +0100
     1.3 @@ -338,18 +338,7 @@
     1.4    window.addEventListener("load", function(event) {
     1.5      jsProtect(function() {
     1.6        voting_setCategoryHeadings();
     1.7 -      // TODO: replace the following code by non-JavaScript HTML attributes
     1.8 -      var elements = document.getElementsByTagName("input");
     1.9 -      for (var i=0; i<elements.length; i++) {
    1.10 -        var element = elements[i];
    1.11 -        if (element.name == "preview") {
    1.12 -          element.addEventListener("click", function(event) {
    1.13 -            jsProtect(function() {
    1.14 -              document.getElementById("preview2").value = "1";
    1.15 -            });
    1.16 -          }, false);
    1.17 -        }
    1.18 -      }
    1.19 +      voting_calculateScoring();  // checks if script works fine
    1.20      });
    1.21    }, false);
    1.22    window.voting_moveUp = function(element) {

Impressum / About Us