Commit Graph
100 Commits
Author SHA1 Message Date
tomasz.sowa 98ba7450a4 allow to force installing a clangd and qtcreator files
Add new targets to the Makefile:
- forceclangd - allow to force installing a .clangd file
- forceclangdall - force installing .clangd file in this project and in libriaries:
  pikotools, morm, ezc and tito
- forceqtcreator - force installing qtcreator files
- forceqtcreatorall - force installing qtcreator files in this project and in libraries
Existing files will be overwritten.

while here:
- update the c++ standard to c++23
2026-08-18 00:03:39 +02:00
tomasz.sowa b82a36142c allow to use multiple locale directories
remove config options:
- locale_dir
- locale_dir_default

add a config option:
- locale_dirs - a list of directories with locale files (translations)

We start reading locale from the first directory and files with the same name
in each directory are concatenated.
2026-06-21 23:36:29 +02:00
tomasz.sowa d35854691c allow to use multiple directories in html and txt templates
remove from the config:
templates_dir, templates_dir_default, txt_templates_dir, txt_templates_dir_default

add to the config:
html_templates_dirs - a list of directories with html templates
txt_templates_dirs - a list of directories with txt templates

We search from the last directory to the first one.
2026-06-21 01:59:32 +02:00
tomasz.sowa 9e1a3e336b bump version to 0.7.4 2026-06-21 01:41:09 +02:00
tomasz.sowa e897cfbd14 add FunctionBase::trigger_htmx_event() with a std::wstring parameter 2026-06-21 01:38:45 +02:00
tomasz.sowa 5a92edc6b0 add FunctionBase::trigger_htmx_event() with a string parameter 2026-06-16 01:33:36 +02:00
tomasz.sowa c32ed6ce28 update htmx to 2.0.9 2026-05-27 23:51:44 +02:00
tomasz.sowa 6631ba0641 update uikit to 3.23.10 2025-06-16 23:30:31 +02:00
tomasz.sowa 98320fe174 update uikit to 3.23.6 2025-04-29 09:22:41 +02:00
tomasz.sowa b8105cf9cc update uikit to 3.23.2 2025-03-05 12:44:15 +01:00
tomasz.sowa d7a93916e3 update uikit to 3.22.0 2025-01-13 18:47:59 +01:00
tomasz.sowa cec9dfc0e1 update htmx to 2.0.4 2024-12-21 01:28:39 +01:00
tomasz.sowa 893b3d9fff put a log about generated main content and frames 2024-12-03 10:57:41 +01:00
tomasz.sowa 7de9d1a819 put a log when a request job was not found 2024-12-03 10:34:17 +01:00
tomasz.sowa 8748a63532 update uikit to 3.21.16 2024-11-28 00:33:38 +01:00
tomasz.sowa 5eed025419 add trigger_htmx_event(...) methods to FunctionBase 2024-11-08 13:35:54 +01:00
tomasz.sowa f2e416b0f8 update htmx to 2.0.3 2024-10-09 19:50:27 +02:00
tomasz.sowa 1c7043fa3e update uikit to 3.21.13 2024-09-26 22:13:33 +02:00
tomasz.sowa 2bd4c5b35e print qt environment ids only when .qtcreator directory was created 2024-09-25 09:50:37 +02:00
tomasz.sowa f4481a84f4 fix: set a correct global working dir when generating a .clangd file 2024-09-24 23:41:35 +02:00
tomasz.sowa 4c740690e0 use a QTCreator environmentid and a profileid from a local installation
When creating QTCreator project files use local EnvironmentId
and default profile id. By default the environment id is stored
in ~/.config/QtProject/QtCreator.ini and the profile id in
~/.config/QtProject/qtcreator/profiles.xml.
2024-09-24 16:45:26 +02:00
tomasz.sowa 128c79cdc4 sort a makedepend output
Makefile.dep is sorted now - it's better when making a diff to a previous version.
2024-09-22 15:26:35 +02:00
tomasz.sowa 7082677b2f add a clangd/clangdall and qtcreator/qtcreatorall make targets
Add a clangd make target:
$ make clangd
This installs a .clangd file with configuration (includes/macros/compiler flags)
for the clandg language server.

Add a clangdall make target:
$ make clangdall
This installs a .clangd also in pikotools/ezc/morm and tito libraries.

Add a qtcreator make target:
$ make qtcreator
This installs a .qtcreator directory with QTCreator IDE project files.
In the QTCreator you can open a project by selecting the .qtcreator/winix.creator
file.

You can use 'make qtcreator' again to refresh .qtcreator/winix.files,
the rest of the project files will not be modified.

Add a qtcreatorall make target:
$ make qtcreatorall
This installs a .qtcreator directory also in pikotools/ezc/morm and tito libraries.
2024-09-22 11:43:26 +02:00
tomasz.sowa 257d8bbade change a database type to character varying(320) for a user.email field 2024-09-08 02:29:19 +02:00
tomasz.sowa a6ca71b131 check a length when validating an email
An email address has two parts:
 - the local part (before the "@") = max 64 characters
 - the domain part (after the "@") = max 255 characters
So maximum length is 64 + @ + 255 = 320 characters

https://www.rfc-editor.org/rfc/rfc5321.html#section-4.5.3.1
2024-09-08 02:05:43 +02:00
tomasz.sowa 8634716aa7 add FunctionBase::push_url_to(...) methods 2024-09-08 02:05:05 +02:00
tomasz.sowa 8a12629740 update htmx to 2.0.2 2024-08-19 15:32:56 +02:00
tomasz.sowa b07f2f7a59 remove unnecessary [end] tag 2024-08-12 02:25:47 +02:00
tomasz.sowa da90ef8e40 update uikit to 3.21.7 2024-07-20 15:20:09 +02:00
tomasz.sowa 197f684488 update htmx to 2.0.1 2024-07-20 15:15:03 +02:00
tomasz.sowa e63838faeb improve frontend of emacs, ckeditor, tinymce, nicedit, meta and env functions
Improves in emacs:
- use htmx to send content to the controller
- show txt and formatted_txt content in the second panel
- show two tabs if "tabs" winix parameter is used
- add an option to show either one or two panels
- correctly resize the editor window (F11) when two panels are shown

Improves in ckeditor:
- use htmx to send content to the controller
- do not check automatically for ckeditor update

Improves in tinymce/nicedit/meta/env:
- use htmx to send content to the controller

while here:
- change PascalCase to snake_case in meta/env controllers
- update CodeMirror editor to 5.65.16
- udpate Showdown (markdown to html converter) to 2.1.0
2024-07-20 15:13:27 +02:00
tomasz.sowa 89b37db48e update uikit to 3.21.6 2024-07-11 22:10:44 +02:00
tomasz.sowa 68e7f44a76 do not send content when there is a htmx redirect 2024-07-11 21:58:52 +02:00
tomasz.sowa 2490e2cc68 (ezc): generate only requested frames 2024-07-07 22:10:29 +02:00
tomasz.sowa b2f4c065ea remove a code to finish job requests when winix exits
Actually there was a bug and the code was not correctly waiting for the job requests.
2024-07-02 17:30:35 +02:00
tomasz.sowa 20b40597fd try harder to find the main template and a function's template
If there is no a template (main template and function template) for the current
language then try to find a template for a default language or for a first
available language.
2024-06-29 22:28:39 +02:00
tomasz.sowa 7df78838aa add assign_methods(...) functionality to the FunctionBase
in make_*() methods you can assing your controller methods in such a way:
  assign_methods(this,
    by_param(L"paramoption",                     &MyController::MyMethod3),
    by_param(L"paramoption1", L"paramoption2",   &MyController::MyMethod2),
    by_param_post(L"paramoption", L"postoption", &MyController::MyMethod1)
  );
2024-06-29 17:23:03 +02:00
tomasz.sowa b3bd9c6cf0 update htmx to 2.0.0 2024-06-27 16:37:05 +02:00
tomasz.sowa dadff8329e update uikit to 3.21.5 2024-06-27 11:46:45 +02:00
tomasz.sowa c30b7db041 add closing dialogs, redirecting and removing content functionality to the winix framework
add such new methods to FunctionBase:
- bool can_push_url_to_browser_history();
- void add_standard_models();
- void close_modal_dialogs();

- void prepare_doc_url(const wchar_t * local_url, pt::WTextStream & url);
- void prepare_doc_url(const wchar_t * local_url, std::wstring & url);
- std::wstring prepare_doc_url(const wchar_t * local_url = nullptr);
- std::wstring prepare_doc_url(const std::wstring & local_url);

- void redirect_to(const wchar_t * url, bool append_domain = true);
- void redirect_to(const std::wstring & url, bool append_domain = true);
- void redirect_to(const pt::WTextStream & url, bool append_domain = true);

- void redirect_to(const wchar_t * url, const wchar_t * frame_url, const wchar_t * dom_target);
- void redirect_to(const std::wstring & url, const std::wstring & frame_url, const std::wstring & dom_target);
- void redirect_to(pt::WTextStream & url, pt::WTextStream & frame_url, pt::WTextStream & dom_target);
- void redirect_to(pt::WTextStream & url, pt::WTextStream & frame_url, const wchar_t * dom_target);
- void redirect_to(const wchar_t * url, const wchar_t * frame_url, pt::WTextStream & dom_target);

- void retarged(const wchar_t * frame, const wchar_t * dom_target, const wchar_t * push_url = nullptr, const wchar_t * swap_algorithm = nullptr);
- void retarged(const std::wstring & frame, const std::wstring & dom_target, const std::wstring & push_url, const wchar_t * swap_algorithm = nullptr);
- void retarged(const wchar_t * frame, pt::WTextStream & dom_target, const wchar_t * push_url = nullptr, const wchar_t * swap_algorithm = nullptr);

- void remove_content(pt::WTextStream & dom_target, bool close_dialogs = false);
- void remove_content(const wchar_t * dom_target, bool has_postfix, long dom_target_postfix, bool close_dialogs = false);
- void remove_content(const wchar_t * dom_target, long dom_target_postfix, bool close_dialogs = false);
- void remove_content(const wchar_t * dom_target, bool close_dialogs = false);

- void update_content(const wchar_t * frame, pt::WTextStream & dom_target, bool close_dialogs = false);
- void update_content(const wchar_t * frame, const wchar_t * dom_target, bool has_postfix, long dom_target_postfix, bool close_dialogs = false);
- void update_content(const wchar_t * frame, const wchar_t * dom_target, long dom_target_postfix, bool close_dialogs = false);
- void update_content(const wchar_t * frame, const wchar_t * dom_target, bool close_dialogs = false);

while here:
- refactor PascalCase to snake_case in FunctionBase
- add start_request() and finish_request() methods to FunctionBase
- add has_*_access() methods to FunctionBase
- fix: FunctionBase::clear() method was not called if a request was assigned to a job
- add a WinixEzcHelper model
- allow to serialize a header if the header value is neither a string nor an integer
- refactor PascalCase to snake_case in functions: Emacs, Mkdir, Upload
2024-06-27 10:57:08 +02:00
tomasz.sowa 6aa100f12c WIP: remove the old database abstraction layer
remove such classes:
- DbBase
- DbConn
- DbTextStream
- Db

while here:
- remove: TextStream, SLog, TexTextStream
2024-06-22 18:03:54 +02:00
tomasz.sowa 5d457f3d4b (update to the new pikotools api): use a char32_t character as a main character when converting strings
Use a char32_t instead of a wchar_t type. This is needed on systems
where sizeof(wchar_t) is equal to 2.

This affects classes based on the pt::Stream such as Log and HtmlTextStream.
2024-06-01 00:33:15 +02:00
tomasz.sowa af0d34beb9 make depend 2024-05-31 00:32:56 +02:00
tomasz.sowa d122917f83 fix: correctly activate a user account 2024-05-27 18:22:47 +02:00
tomasz.sowa 612501217c update uikit to 3.20.9 2024-05-12 16:16:56 +02:00
tomasz.sowa d86ab8f9c0 update uikit to 3.20.8 2024-04-29 23:59:30 +02:00
tomasz.sowa 5a33563722 update htmx to 1.9.12 2024-04-28 19:45:16 +02:00
tomasz.sowa 1c850b12ec add a q_encode(...) method to misc 2024-04-28 16:14:57 +02:00
tomasz.sowa 140b4495df update jquery-file-upload to 10.32.0 2024-04-15 08:20:02 +02:00
tomasz.sowa 8b0b25ed0a fix: correctly flush logs when there was a db migration error 2024-04-15 06:38:23 +02:00
tomasz.sowa eacdcfb980 update htmx to 3.19.4 2024-04-11 05:52:09 +02:00
tomasz.sowa 132e7aa937 update htmx to 1.9.11 2024-03-20 03:15:05 +01:00
tomasz.sowa d9f3b69dde update uikit to 3.19.2 2024-03-20 03:07:17 +01:00
tomasz.sowa de753070a8 do not overwrite WINIX_INSTALL_DIR if already set 2024-03-11 16:59:45 +01:00
tomasz.sowa c1c6e6a588 install winix.so to a lib subdirectory 2024-03-11 16:12:13 +01:00
tomasz.sowa 291147503f update uikit to 3.19.1 2024-03-08 22:34:42 +01:00
tomasz.sowa dbf7dfab82 improve the startup help messages 2024-03-08 22:01:33 +01:00
tomasz.sowa b753464608 add some operators to the Log class
add:
virtual Log & operator<<(long double);
virtual Log & operator<<(float);
virtual Log & operator<<(long long unsigned int);
virtual Log & operator<<(unsigned int);
virtual Log & operator<<(short unsigned int);
virtual Log & operator<<(long long int);
virtual Log & operator<<(short int);
virtual Log & operator<<(bool);
virtual Log & operator<<(unsigned char);
virtual Log & operator<<(const pt::Stream &);
2024-02-13 22:29:22 +01:00
tomasz.sowa 544ef298aa update uikit to 3.18.3 2024-02-13 18:54:41 +01:00
tomasz.sowa 065a2d182f update htmx to 1.9.10 2024-01-16 23:17:14 +01:00
tomasz.sowa f4470ccbe7 allow to not set the res value from a plugin function
Add PluginInfo::has_res (bool, default true). If set to false by a plugin function
then the PluginInfo::res value is not taken into account when calculating how many plugins
have returned true or false.
2024-01-04 15:57:29 +01:00
tomasz.sowa 71ad4869ce fix: take into account hours when calculating a relative timezone dst 2023-12-27 16:25:54 +01:00
tomasz.sowa 09dc6782c8 fix: remember the first/last weekday flags from a timezone DST
If a date is given in a relative form with first/last parameters,
we must remember them in order to select the appropriate day
of the week from the appropriate year.
2023-12-24 14:55:39 +01:00
tomasz.sowa 0cebb2dc52 allow to use a first|last weekday name when defining a timezone dst
the format of a 'start' or 'end' field in a dst is:
MM-[first|last]:[monday|tuesday|wednesday|thursday|friday|saturday|sunday] HH:MM:SS
or just as beforehand: MM-DD HH:MM:SS

a sample timezone:
{
name = "tz_+01:00d"
id = "40"
offset_str = "+01:00"

dst = (

{
year = "2001"
has_dst = true
offset_str = "+01:00"
start  	   = "03-last-sunday 01:00"
end    	   = "10-last-sunday 01:00"
}

) # end of dst
}
2023-12-20 03:58:21 +01:00
tomasz.sowa 0724ca8eb3 update htmx to 1.9.9 2023-12-02 10:45:44 +01:00
tomasz.sowa 53991e54e1 update uikit to 3.17.11 2023-11-21 18:59:51 +01:00
tomasz.sowa df7ae1c6ea update uikit to 3.17.9 2023-11-16 23:10:51 +01:00
tomasz.sowa d1f5d9aa88 (winixcli): add a --sort-tables option
while here:
- add a fil_max_size filter for putting a space if the inner stream is greater than x characters
2023-11-09 10:57:11 +01:00
tomasz.sowa a54d70bed4 add a 422 Header status - Unprocessable Entity 2023-11-08 17:59:40 +01:00
tomasz.sowa bcde5c628a update uikit to 3.17.8 2023-11-07 03:56:45 +01:00
tomasz.sowa f241eb0a18 update htmx to 1.9.7 2023-11-06 04:43:20 +01:00
tomasz.sowa 74c0c936f6 make depend 2023-11-02 05:15:30 +01:00
tomasz.sowa 79babc916a add a Request::raw_post buffer
This buffer is used when a Function::NeedToCopyRawPost() method returned true.

while here:
- remove WINIX_POST_PARAMS and WINIX_RAW_POST_STRING plugin messages
2023-11-02 05:14:48 +01:00
tomasz.sowa a08bf9f804 update uikit to 3.17.5 2023-10-24 21:36:25 +02:00
tomasz.sowa 966577cd58 add QT Creator files to .gitignore 2023-10-22 23:38:38 +02:00
tomasz.sowa 8f20c8f67c update uikit to 3.17.1 2023-10-10 13:42:49 +02:00
tomasz.sowa f6c04b2d00 downgrade ckeditor to 4.22.1 as 4.23.0 requires a license key 2023-09-30 01:03:54 +02:00
tomasz.sowa 0474c76a3d update ckeditor to 4.23.0 2023-09-30 00:27:59 +02:00
tomasz.sowa 7a29a072be update jquery to 3.7.1 2023-09-30 00:13:28 +02:00
tomasz.sowa 24c2ecb8dd update htmx to 1.9.6 2023-09-30 00:06:57 +02:00
tomasz.sowa 7a1cea63bf update uikit to 3.17.0 2023-09-30 00:02:00 +02:00
tomasz.sowa e600aebaae add a RequestJobBase base class for requests jobs 2023-09-28 07:47:06 +02:00
tomasz.sowa 5e45ad3417 fix(Http): send body content for PATCH, DELETE and OPTIONS methods if exists
while here:
- use CURLOPT_UPLOAD instead of CURLOPT_PUT as the latter is depracated
2023-09-26 23:02:34 +02:00
tomasz.sowa 79e971cb76 parse the input body for the PUT and PATCH methods too 2023-09-15 10:04:25 +02:00
tomasz.sowa edee581ecf update uikit to 3.16.26 2023-08-31 02:01:47 +02:00
tomasz.sowa f7e077a7c5 add a TimeZone::PrintOffset(...) method 2023-08-29 15:02:37 +02:00
tomasz.sowa 6a9504fd5f update htmx to 1.9.5 2023-08-26 00:16:06 +02:00
tomasz.sowa 6d256e6512 fix: correctly set a Request::RunState::job_run flag to the background request
The flag should be set to the task.request and not to the cur->request.
The cur->request could have been already changed by the main thread.
2023-08-25 16:24:27 +02:00
tomasz.sowa cf383fa026 update easepick to 1.2.1 2023-08-21 13:31:02 +02:00
tomasz.sowa c86536d660 update htmx to 1.9.4 2023-08-09 22:45:59 +02:00
tomasz.sowa dba87d6213 update uikit to 3.16.24 2023-08-06 18:00:25 +02:00
tomasz.sowa 52f9d399ca add a Header::text_xml and text_xml_utf8 types 2023-07-31 17:31:22 +02:00
tomasz.sowa 7b7a962f19 update uikit to 3.16.23 2023-07-30 22:47:36 +02:00
tomasz.sowa c37722c29a update ckeditor to 4.22.1 and jquery to 3.7.0 2023-07-23 14:40:13 +02:00
tomasz.sowa ca509d3a86 update htmx to 1.9.3 2023-07-16 21:37:04 +02:00
tomasz.sowa bf79e46411 add a GetUTF8File(...) method with a pt::WTextStream & content to the misc 2023-07-04 22:59:57 +02:00
tomasz.sowa 08821eb440 update uikit to 3.16.22 2023-06-23 01:47:51 +02:00
tomasz.sowa d7878b5564 update uikit to 3.16.21 2023-06-14 03:13:44 +02:00
tomasz.sowa 0b52ae80dd update uikit to 3.16.19 2023-05-27 17:27:42 +02:00
tomasz.sowa 3e46d8b4b4 update uikit to 3.16.18 2023-05-23 14:48:28 +02:00