antoniop in OpenACS

Converge render method for chat and xotcl-core package

Add ':' to formatting to uniform with the render method

Preliminary xowiki chat rework

- update javascript to comply with CSP (setInterval...)

- exploit template resource loading machinery to load javascripts

- remove code duplication

- remove inline styling

    • -95
    • +78
    /openacs-4/packages/xowiki/tcl/chat-procs.tcl
Unquote single quote from JSON before appending messages to chat

Fix quoting of single quotes in JSON

Remove leftover alert

Avoid javascript eval idiom as CSP will refuse to execute when unsafe-eval is disabled

This requires moving to a more approprate JSON parser... which is also pickier regarding single quotes, so I had to rework JSON encoding to please it.

Make ad_sanitize_html not hardly dependant on a connection being there (thanks to Markus moser for the report)

Also, update documentation and make idioms less awkward.

(this passes automated tests)

Better separate data from formatting

    • -1
    • +6
    /openacs-4/packages/chat/www/ajax/chat.adp
    • -9
    • +1
    /openacs-4/packages/chat/www/ajax/chat.tcl
Normalize indentation

    • -19
    • +19
    /openacs-4/packages/chat/tcl/chat-ajax-procs.tcl
Decouple a bit formatting from data

    • -0
    • +48
    /openacs-4/packages/chat/www/ajax/chat.adp
    • -26
    • +6
    /openacs-4/packages/chat/www/ajax/chat.tcl
Give templating a chance

move all hardcoded styling to the adp template, which might be styled by the theme. Also, biring some order in the login proc, e.g. don't open and read a file to include a javascript all the time.

    • -64
    • +59
    /openacs-4/packages/chat/tcl/chat-ajax-procs.tcl
Modernize XoTcl idioms

Remove smelly comment, as parameter is there

Deprecate util_search_list_of_lists, as since Tcl 8.5 its behavior can be achieved natively through lsearch

Modernize tcl

Whitespace removal

Move image::get_info together with its pals procs in the content repository... just to realize it should probably go away at some point

    • -42
    • +0
    /openacs-4/packages/acs-tcl/tcl/image-procs.tcl
Fix layout when no data for test is available

Fix typo in doc

Add a callback hook to put logic before calendar item deletion

Let max_depth behave as specified (0 disables redirection). Many thanks to Markus Moser

Fix typo, normalize indentation

Introduce elapsed time in http api response

Will use the one coming from ns_http when available, or fallback to a calculated one.

Close tag properly (fixes files__check_info_files)

Update adp boolean expression

Remove unneded ad_script_abort

Fix files__page_contracts for include, replace ad_decode idioms

Fix files__page_contracts for this page

Fix files__page_contracts automated test for the page