Commit 33c5d703 authored by Gabriel Monnerat's avatar Gabriel Monnerat

refactor code to display the login form when don't have authenticated user

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43896 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2b9dab9a
...@@ -104,8 +104,20 @@ function changeCheckBoxValue(value){\n ...@@ -104,8 +104,20 @@ function changeCheckBoxValue(value){\n
});\n });\n
}\n }\n
\n \n
function displayLoginForm(){\n
$("div.header-left div.field input, div.main-right, div.main-left").hide();\n
if ($("div#login_form").html() == null){\n
$.get("WebSection_loginDialog", function(data){\n
$("div.header-left fieldset.widget").append("<p>" + data + "</p>")\n
});\n
}\n
}\n
\n
$().ready(function(){\n $().ready(function(){\n
$("p.clear").remove();\n $("p.clear").remove();\n
if ($("a#login").html() != null){\n
displayLoginForm();\n
}\n
if ($("div.gadget-column").length == 0 && window.location.href.split("?").length > 1) {\n if ($("div.gadget-column").length == 0 && window.location.href.split("?").length > 1) {\n
parameterList = getUrlParameterList();\n parameterList = getUrlParameterList();\n
if (parameterList.hasOwnProperty("upload_document") == true){\n if (parameterList.hasOwnProperty("upload_document") == true){\n
...@@ -412,12 +424,7 @@ $().ready(function(){\n ...@@ -412,12 +424,7 @@ $().ready(function(){\n
});\n });\n
$("a#login").click(function(event){\n $("a#login").click(function(event){\n
event.preventDefault();\n event.preventDefault();\n
$("div.header-left div.field input, div.main-right, div.main-left").hide();\n displayLoginForm();\n
if ($("div#login_form").html() == null){\n
$.get("WebSection_loginDialog", function(data){\n
$("div.header-left fieldset.widget").append("<p>" + data + "</p>")\n
});\n
}\n
});\n });\n
$("input.listbox-check-all").click(function(event){\n $("input.listbox-check-all").click(function(event){\n
event.preventDefault();\n event.preventDefault();\n
......
260 261
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment