• Publicity: Public Only All

personal-notification-procs.tcl

Personal notifications - Mode procs

This file defines the following Objects and Classes: ::xowiki::includelet::personal-notification-messages[i]

Location:
packages/xowiki/tcl/personal-notification-procs.tcl
Created:
2020-08-02
Author:
Gustaf Neumann

Procedures in this file

Detailed information

Class ::xowiki::includelet::personal-notification-messages (public)

 ::xotcl::Class ::xowiki::includelet::personal-notification-messages[i]

Personal notification messages This includelet can be used for personal messaging, where a sender can send messages to a single user in a single applications (e.g. in an exam), where the user has to acknowledge every single message to make it disappear (current implementation). The messages are not persisted (current implementation).

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) nsf::object::alloc nsf::object::alloc nsf::relation::set nsf::relation::set nx::slotObj nx::slotObj template::add_body_script template::add_body_script (public) Class ::xowiki::includelet::personal-notification-messages Class ::xowiki::includelet::personal-notification-messages Class ::xowiki::includelet::personal-notification-messages->_ Class ::xowiki::includelet::personal-notification-messages->nsf::object::alloc Class ::xowiki::includelet::personal-notification-messages->nsf::relation::set Class ::xowiki::includelet::personal-notification-messages->nx::slotObj Class ::xowiki::includelet::personal-notification-messages->template::add_body_script

Testcases:
No testcase defined.

xowiki::includelet::personal-notification-messages proc get_messages_response (public)

 xowiki::includelet::personal-notification-messages[i] get_messages_response \
    [ -notification_id notification_id ] [ -user_id user_id ]

Get all messages for the notification-id and the give user in form of an AJAX array.

Switches:
-notification_id
(optional)
-user_id
(optional)

Partial Call Graph (max 5 caller/called nodes):
%3 xo::get_user_name xo::get_user_name xowiki::includelet::personal-notification-messages proc get_messages_response xowiki::includelet::personal-notification-messages proc get_messages_response xowiki::includelet::personal-notification-messages proc get_messages_response->xo::get_user_name

Testcases:
No testcase defined.

xowiki::includelet::personal-notification-messages proc message_add (public)

 xowiki::includelet::personal-notification-messages[i] message_add \
    [ -notification_id notification_id ] [ -to_user_id to_user_id ] \
    -payload payload 

Send the user a message. The payload has the form of a dict containing at least "msg" and "from" (in form of a user_id).

Switches:
-notification_id
(optional)
-to_user_id
(optional)
-payload
(required)

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowiki::includelet::personal-notification-messages proc message_dismiss (public)

 xowiki::includelet::personal-notification-messages[i] message_dismiss \
    [ -notification_id notification_id ] [ -user_id user_id ] \
    [ -ts ts ]

The user has dismissed a message. flush this message from the set of displayed messages.

Switches:
-notification_id
(optional)
-user_id
(optional)
-ts
(optional)

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

xowiki::includelet::personal-notification-messages proc modal_message_dialog (public)

 xowiki::includelet::personal-notification-messages[i] modal_message_dialog \
    [ -to_user_id to_user_id ] [ -title title ] [ -adpicon adpicon ]

Create a bootstrap3 modal dialog

Switches:
-to_user_id
(optional)
-title
(defaults to "Send Message to") (optional)
-adpicon
(defaults to "pencil") (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 xo::get_user_name xo::get_user_name xowiki::includelet::personal-notification-messages proc modal_message_dialog xowiki::includelet::personal-notification-messages proc modal_message_dialog xowiki::includelet::personal-notification-messages proc modal_message_dialog->xo::get_user_name

Testcases:
No testcase defined.

xowiki::includelet::personal-notification-messages proc modal_message_dialog_register_submit (public)

 xowiki::includelet::personal-notification-messages[i] modal_message_dialog_register_submit \
    -url url 

Register a submit callback for all bootstrap3 modal dialogs having an .submit class.

Switches:
-url
(required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_test_items create_test_items (test xowf) xowiki::includelet::personal-notification-messages proc modal_message_dialog_register_submit xowiki::includelet::personal-notification-messages proc modal_message_dialog_register_submit test_create_test_items->xowiki::includelet::personal-notification-messages proc modal_message_dialog_register_submit template::add_body_script template::add_body_script (public) xowiki::includelet::personal-notification-messages proc modal_message_dialog_register_submit->template::add_body_script

Testcases:
create_test_items
[ show source ]