Oracle Application Express - Comments plugin
This plug-in helps to build a comment region to application express developers.
Minimum requirement: Oracle Application Expresss 19.1
This plug-in uses the Viima jquery-comments and the YUKU textcomplete and the Moment.js library.
You can check each setup in my downloadable Sample Application: APEX Plug-ins by Richard Baldogi
The following attributes must be specified in order to fulfill the JSON which will display the comments in the region.
Query example:
select id_column as id
, parent_id as parent
, comment as content
, created_date as created
, modified_date as modified
, name as fullname
, prof_pic_url as profile_picture_url
, case when created_date < sysdate - 2
then 1
else 0
end as is_new
from comments_table
JSON example:
{
id: "c2",
parent: "c1",
content: "Welcome!",
created: "2022-03-31T17:57:34Z",
modified: "2022-04-31T17:27:14Z",
fullname: "RICHARDB DEVELOPER",
profile_picture_url: "https://www.someprofilepicture.com/profpic1.jpg",
is_new: true / false
}
Settings
Pinging users
Query example:
select empno as ID
, ename as USERNAME
, ename || ' ' || job as NAME
, ename || '.' || job || '@company.com' as EMAIL
, pp_url as PROFILE_PICTURE_URL
from emp;
Filter column/item - multiple comments for different records
Developers can specify a source id column if for example: The comments should be related to different records in another table then they must specify a column which will be filled and an item where the column value must be returned.
Also the query have to be extended with a where clause which filters the comments.
Query example:
select id_column as id
, parent_id as parent
, comment as content
, created_date as created
, modified_date as modified
, name as fullname
, prof_pic_url as profile_picture_url
, case when created_date < sysdate - 2
then 1
else 0
end as is_new
, column_filter
from comments_table
where column_filter = :P_FILTER_ITEM
Customizing the comment region
Developers can customize their region by specifying a function in the Javascript Initialization Code section
Example:
function(config) {
config.replyText = 'Válasz';
config.enableHashtags = true;
config.editText = 'Szerkesztés';
config.deleteText = 'Törlés';
config.saveText = 'Mentés';
config.hideRepliesText = 'Elrejtés';
config.viewAllRepliesText = 'Összes válasz mutatása (__replyCount__)';
config.roundProfilePictures = true;
config.timeFormatter = function(time) {
return moment(time).format('MMMM Do YYYY, h:mm:ss a');
};
return config;
}
For more options please check the Viima jquery-comments API.
License MIT