Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
139
Merge Requests
139
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
84d85fa3
Commit
84d85fa3
authored
Jan 25, 2019
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "discussion: remove temporary hidden input added for click"
This reverts commit
7aa5fb76
parent
c3304c6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
23 deletions
+10
-23
bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/erp5_discussion.js.js
...teItem/portal_skins/erp5_discussion/erp5_discussion.js.js
+10
-23
No files found.
bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/erp5_discussion.js.js
View file @
84d85fa3
function
clickSaveButtonWithDiscussionPostUidHidden
(
id
,
buttonName
)
{
/* this will add respective input box for reply post id (so multiple reply buttons can
safely coexist in one HTML page with one HTML form.
Once the button was clicked, the hidden input is removed (so that this can be used
multiple times without reloading).
*/
var
hiddenInput
=
$
(
'
<input type="hidden" name="discussion_post_uid">
'
),
form
=
$
(
'
form
'
);
hiddenInput
.
val
(
id
);
form
.
append
(
hiddenInput
);
clickSaveButton
(
buttonName
);
hiddenInput
.
remove
();
function
deleteDiscussionPost
(
id
){
/* this will add respective input box for delete post id (so multiple delete buttons can
safely coexist in one HTML page with one HTML form */
$
(
"
form
"
).
append
(
'
<input type="hidden" name="discussion_post_uid" value="
'
+
id
+
'
">
'
);
clickSaveButton
(
"
DiscussionThread_deleteDiscussionPost
"
);
}
function
deleteDiscussionPost
(
id
)
{
clickSaveButtonWithDiscussionPostUidHidden
(
id
,
'
DiscussionThread_deleteDiscussionPost
'
);
function
redirectCreateCitedNewDiscussionPost
(
id
)
{
/* this will add respective input box for reply post id (so multiple reply buttons can
safely coexist in one HTML page with one HTML form */
$
(
"
form
"
).
append
(
'
<input type="hidden" name="discussion_post_uid" value="
'
+
id
+
'
">
'
);
clickSaveButton
(
"
DiscussionThread_redirectCreateNewDiscussionPost
"
);
}
function
redirectCreateCitedNewDiscussionPost
(
id
)
{
clickSaveButtonWithDiscussionPostUidHidden
(
id
,
'
DiscussionThread_redirectCreateNewDiscussionPost
'
);
}
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