Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-dynfield
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-dynfield
Commits
baede6db
Commit
baede6db
authored
Nov 03, 2020
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Implemented CSP (Content Security Policy)
parent
35bfbbaf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
8 deletions
+64
-8
intranet-dynfield-create.sql
sql/postgresql/intranet-dynfield-create.sql
+31
-7
upgrade-5.0.3.0.3-5.0.3.0.4.sql
sql/postgresql/upgrade/upgrade-5.0.3.0.3-5.0.3.0.4.sql
+32
-0
permissions.adp
www/permissions.adp
+1
-1
No files found.
sql/postgresql/intranet-dynfield-create.sql
View file @
baede6db
...
...
@@ -1757,6 +1757,37 @@ select im_dynfield_widget__new (
);
-- Add javascript calendar buton on date widget
UPDATE
im_dynfield_widgets
SET
parameters
=
'{format "YYYY-MM-DD HH24:MI"} {after_html {
<input type="button" id=
''
${attribute_name}_calendar
''
style="height:20px; width:20px; background: url(
''
/resources/acs-templating/calendar.gif
''
);">
<script type="text/javascript" nonce="[im_csp_nonce]">
window.addEventListener(
''
load
''
, function() {
document.getElementById(
''
${attribute_name}_calendar
''
).addEventListener(
''
click
''
, function() { showCalendarWithDateWidget(
''
${attribute_name}
''
,
''
y-m-d
''
); });
});
</script>
}}'
WHERE
widget_name
=
'timestamp'
;
-- Add javascript calendar buton on date widget
UPDATE
im_dynfield_widgets
SET
parameters
=
'{format "YYYY-MM-DD"} {after_html {
<input type="button" id=
''
${attribute_name}_calendar
''
style="height:20px; width:20px; background: url(
''
/resources/acs-templating/calendar.gif
''
);">
<script type="text/javascript" nonce="[im_csp_nonce]">
window.addEventListener(
''
load
''
, function() {
document.getElementById(
''
${attribute_name}_calendar
''
).addEventListener(
''
click
''
, function() { showCalendarWithDateWidget(
''
${attribute_name}
''
,
''
y-m-d
''
); });
});
</script>
}}'
WHERE
widget_name
=
'date'
;
select
im_dynfield_widget__new
(
null
,
-- widget_id
'im_dynfield_widget'
,
-- object_type
...
...
@@ -2841,13 +2872,6 @@ drop function inline_0();
-- Add javascript calendar buton on date widget
UPDATE
im_dynfield_widgets
SET
parameters
=
'{format "YYYY-MM-DD"} {after_html {<input type="button" style="height:20px; width:20px; background: url(
''
/resources/acs-templating/calendar.gif
''
);" onclick ="return showCalendarWithDateWidget(
''
$attribute_name
''
,
''
y-m-d
''
);" ></b>}}'
WHERE
widget_name
=
'date'
;
update
im_dynfield_widgets
set
pretty_name
=
'Translation Languages'
,
pretty_plural
=
'Translation Languages'
...
...
sql/postgresql/upgrade/upgrade-5.0.3.0.3-5.0.3.0.4.sql
0 → 100644
View file @
baede6db
-- upgrade-upgrade-5.0.3.0.3-5.0.3.0.4.sql
SELECT
acs_log__debug
(
'/packages/intranet-dynfield/sql/postgresql/upgrade/upgrade-5.0.3.0.3-5.0.3.0.4.sql'
,
''
);
-- Add javascript calendar buton on date widget
UPDATE
im_dynfield_widgets
SET
parameters
=
'{format "YYYY-MM-DD"} {after_html {
<input type="button" id=
''
${attribute_name}_calendar
''
style="height:20px; width:20px; background: url(
''
/resources/acs-templating/calendar.gif
''
);">
<script type="text/javascript" nonce="[im_csp_nonce]">
window.addEventListener(
''
load
''
, function() {
document.getElementById(
''
${attribute_name}_calendar
''
).addEventListener(
''
click
''
, function() { showCalendarWithDateWidget(
''
${attribute_name}
''
,
''
y-m-d
''
); });
});
</script>
}}'
WHERE
widget_name
=
'date'
;
-- Add javascript calendar buton on date widget
UPDATE
im_dynfield_widgets
SET
parameters
=
'{format "YYYY-MM-DD HH24:MI"} {after_html {
<input type="button" id=
''
${attribute_name}_calendar
''
style="height:20px; width:20px; background: url(
''
/resources/acs-templating/calendar.gif
''
);">
<script type="text/javascript" nonce="[im_csp_nonce]">
window.addEventListener(
''
load
''
, function() {
document.getElementById(
''
${attribute_name}_calendar
''
).addEventListener(
''
click
''
, function() { showCalendarWithDateWidget(
''
${attribute_name}
''
,
''
y-m-d
''
); });
});
</script>
}}'
WHERE
widget_name
=
'timestamp'
;
www/permissions.adp
View file @
baede6db
...
...
@@ -6,7 +6,7 @@
<property name="left_navbar">@left_navbar_html;literal@</property>
</if>
<script type="text/javascript">
<script type="text/javascript"
<if @::__csp_nonce@ not nil>nonce="@::__csp_nonce;literal@"</if>
>
$(document).ready(function () {
function hideCol($table, idx) {
if (idx != 1 && idx != 2) {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment