liquid_feedback_frontend

diff app/main/vote/list.lua @ 519:7492497005bd

Fixed voting for non javascript capable browser, removed browser warning
author bsw
date Mon Apr 16 23:27:07 2012 +0200 (2012-04-16)
parents 24f8920e05f1
children a930d2ab9e76
line diff
     1.1 --- a/app/main/vote/list.lua	Sun Apr 15 18:26:06 2012 +0200
     1.2 +++ b/app/main/vote/list.lua	Mon Apr 16 23:27:07 2012 +0200
     1.3 @@ -81,12 +81,6 @@
     1.4  end
     1.5  
     1.6  
     1.7 -local warning_text = _"Some JavaScript based functions (voting in particular) will not work.\nFor this beta, please use a current version of Firefox, Safari, Chrome, Opera(?), Konqueror or another (more) standard compliant browser.\nAlternative access without JavaScript will be available soon."
     1.8 -
     1.9 -ui.script{ static = "js/browser_warning.js" }
    1.10 -ui.script{ script = "checkBrowser(" .. encode.json(_"Your web browser is not fully supported yet." .. " " .. warning_text:gsub("\n", "\n\n")) .. ");" }
    1.11 -
    1.12 -
    1.13  local tempvoting_string = param.get("scoring")
    1.14  
    1.15  local tempvotings = {}
    1.16 @@ -341,7 +335,7 @@
    1.17                        end
    1.18                        local initiator_names_string = table.concat(initiator_names, ", ")
    1.19                        ui.container{
    1.20 -                        attr = { style = "float: right;" },
    1.21 +                        attr = { style = "float: right; position: relative;" },
    1.22                          content = function()
    1.23                            ui.link{
    1.24                              attr = { class = "clickable" },
    1.25 @@ -366,14 +360,13 @@
    1.26                        }
    1.27                        if not readonly then
    1.28                          ui.container{
    1.29 -                          attr = { style = "float: left;" },
    1.30 +                          attr = { style = "float: left; position: relative;" },
    1.31                            content = function()
    1.32                              ui.tag{
    1.33                                tag = "input",
    1.34                                attr = {
    1.35 -                                onclick = "voting_moveUp(this.parentNode.parentNode); return(false);",
    1.36 -                                name = "move_up",
    1.37 -                                value = initiative.id,
    1.38 +                                onclick = "if (jsFail) return true; voting_moveUp(this.parentNode.parentNode); return(false);",
    1.39 +                                name = "move_up_" .. tostring(initiative.id),
    1.40                                  class = not disabled and "clickable" or nil,
    1.41                                  type = "image",
    1.42                                  src = encode.url{ static = "icons/move_up.png" },
    1.43 @@ -384,9 +377,8 @@
    1.44                              ui.tag{
    1.45                                tag = "input",
    1.46                                attr = {
    1.47 -                                onclick = "voting_moveDown(this.parentNode.parentNode); return(false);",
    1.48 -                                name = "move_down",
    1.49 -                                value = initiative.id,
    1.50 +                                onclick = "if (jsFail) return true; voting_moveDown(this.parentNode.parentNode); return(false);",
    1.51 +                                name = "move_down_" .. tostring(initiative.id),
    1.52                                  class = not disabled and "clickable" or nil,
    1.53                                  type = "image",
    1.54                                  src = encode.url{ static = "icons/move_down.png" },

Impressum / About Us