Commit 46454c6a authored by Frank Bergmann's avatar Frank Bergmann

- Implemented CSP (Content Security Policy)

parent f1f8ab97
<script type="text/javascript" <if @::__csp_nonce@ not nil>nonce="@::__csp_nonce;literal@"</if>>
window.addEventListener('load', function() {
var el1 = document.getElementById('list_check_all1');
var el2 = document.getElementById('list_check_all2');
var el3 = document.getElementById('list_check_all3');
var el4 = document.getElementById('list_check_all4');
if (!!el1) el1.addEventListener('click', function() { acs_ListCheckAll('task_without_start_constraint', this.checked) });
if (!!el2) el2.addEventListener('click', function() { acs_ListCheckAll('task_with_empty_start_end_date', this.checked) });
if (!!el3) el3.addEventListener('click', function() { acs_ListCheckAll('task_without_start_constraint', this.checked) });
if (!!el4) el4.addEventListener('click', function() { acs_ListCheckAll('task_without_start_constraint', this.checked) });
});
/*
document.getElementById('list_check_all1').addEventListener('click', function() { acs_ListCheckAll('task_with_empty_start_end_date', this.checked) });
document.getElementById('list_check_all2').addEventListener('click', function() { acs_ListCheckAll('task_without_start_constraint', this.checked) });
document.getElementById('list_check_all3').addEventListener('click', function() { acs_ListCheckAll('task_with_overallocation', this.checked) });
document.getElementById('list_check_all4').addEventListener('click', function() { acs_ListCheckAll('task_with_overallocation', this.checked) });
*/
</script>
@warnings_html;noquote@
......@@ -166,7 +166,7 @@ if {![info exists ignore_hash($warning_key)]} {
if {$task_html ne ""} {
set task_header "<tr class=rowtitle>\n"
append task_header "<td class=rowtitle><input type=checkbox name=_dummy onclick=acs_ListCheckAll('task_with_empty_start_end_date',this.checked) checked></td>\n"
append task_header "<td class=rowtitle><input id=list_check_all1 type=checkbox name=_dummy checked></td>\n"
append task_header "<td class=rowtitle>[lang::message::lookup "" intranet-ganttproject.Task "Task"]</td>\n"
append task_header "</tr>\n"
......@@ -378,7 +378,7 @@ if {![info exists ignore_hash($warning_key)]} {
if {$task_html ne ""} {
set task_header "<tr class=rowtitle>\n"
append task_header "<td class=rowtitle><input type=checkbox name=_dummy onclick=acs_ListCheckAll('task_without_start_constraint',this.checked) checked></td>\n"
append task_header "<td class=rowtitle><input id=list_check_all1 type=checkbox name=_dummy checked></td>\n"
append task_header "<td class=rowtitle>[lang::message::lookup "" intranet-ganttproject.Task "Task"]</td>\n"
append task_header "</tr>\n"
......@@ -545,7 +545,7 @@ if {0 && ![info exists ignore_hash($warning_key)]} {
if {$task_html ne ""} {
set task_header "<tr class=rowtitle>\n"
append task_header "<td class=rowtitle align=center><input type=checkbox name=_dummy onclick=acs_ListCheckAll('task_with_overallocation',this.checked) checked></td>\n"
append task_header "<td class=rowtitle align=center><input id=list_check_all3 type=checkbox name=_dummy checked></td>\n"
append task_header "<td class=rowtitle align=center>[lang::message::lookup "" intranet-ganttproject.Task "Task"]</td>\n"
append task_header "<td class=rowtitle align=center>[lang::message::lookup "" intranet-ganttproject.Start "Start Date/Time"]</td>\n"
append task_header "<td class=rowtitle align=center>[lang::message::lookup "" intranet-ganttproject.End "End Date/Time"]</td>\n"
......@@ -748,7 +748,7 @@ if {![info exists ignore_hash($warning_key)]} {
if {$task_html ne ""} {
set task_header "<tr class=rowtitle>\n"
append task_header "<td class=rowtitle align=center><input type=checkbox name=_dummy onclick=acs_ListCheckAll('task_with_overallocation',this.checked) checked></td>\n"
append task_header "<td class=rowtitle align=center><input type=checkbox id=list_check_all4 name=_dummy checked></td>\n"
append task_header "<td class=rowtitle align=center>[lang::message::lookup "" intranet-ganttproject.Task "Task Name"]</td>\n"
append task_header "<td class=rowtitle align=center>[lang::message::lookup "" intranet-ganttproject.Start "Start"]</td>\n"
append task_header "<td class=rowtitle align=center>[lang::message::lookup "" intranet-ganttproject.End "End"]</td>\n"
......
......@@ -575,11 +575,24 @@ ad_proc -public im_gp_save_xml {
"
ad_script_abort
}
set root_node [$doc documentElement]
set format "gantt"
set root_name [$root_node nodeName]
if {"Project" ne $root_name} {
ad_return_complaint 1 "
<b>[lang::message::lookup "" intranet-ganttproject.Invalid_XML_Tag "Invalid XML Format / Main Tag"]</b>:<br>&nbsp;<br>
[lang::message::lookup "" intranet-ganttproject.Invalid_XML_Tag_Error "
Your XML file starts with the tag '%root_name%'.<br>
However, Microsoft Project produces files with the first tag 'Project'.<br>
So your file has probably been created by a different application.<br>
This format is currently not supported by &#93;project-open&#91;.<br>
&nbsp;<br>
"]
"
ad_script_abort
}
set format "gantt"
if {[string equal [$root_node nodeName] "Project"]
&& [string equal [$root_node getAttribute "xmlns" ""] \
"http://schemas.microsoft.com/project"]} {
......
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