Commit Graph

640 Commits

Author SHA1 Message Date
Tomasz Sowa 2f1cdcf379 added printing info how much time winix spent in the ezc engine
added to Request:
timespec timespec_req_stop;
timespec timespec_req_diff;
timespec timespec_ezc_engine_start;
timespec timespec_ezc_engine_stop;
2021-06-24 15:33:44 +02:00
Tomasz Sowa 443c2023d9 make depend 2021-06-23 17:04:21 +02:00
Tomasz Sowa 2c5062ba22 UrlEncode() methods from core/misc.h are now thread safe 2021-06-23 17:04:07 +02:00
Tomasz Sowa 99df807095 Makefile: added new macros to CFLAGS 2021-06-21 20:22:15 +02:00
Tomasz Sowa 8ab07d11b1 fixed: cur.request->function->fun didn't have a model connector set when a request started 2021-06-21 16:51:35 +02:00
Tomasz Sowa a1c0f6f7f0 added config option: add_header_cache_no_store_in_htmx_request
send "Cache-Control: no-store, max-age=0" http header if a request is made by htmx library (ajax)
if a webbrowser get a page from the cache then it will render just the last request without the whole html page (css, js, etc)
2021-06-21 11:43:59 +02:00
Tomasz Sowa 672737a0d8 added a comment in ItemContent 2021-06-20 22:27:06 +02:00
Tomasz Sowa ade96bf6d3 some methods from templates/item.cpp moved to ItemContent 2021-06-20 21:22:08 +02:00
Tomasz Sowa 801fc062ef added FunctionBase::Clear() which is called at the end of a request 2021-06-20 20:47:59 +02:00
Tomasz Sowa f35840e7de some work in html templates: changed some functions from item_* to item.* 2021-06-20 18:12:43 +02:00
Tomasz Sowa 79eda7abb0 - added to FunctionBase: bool register_default_models (default true)
if true then winix will add default models for ezc templates such as "request", "item", etc.
- some methods from templates/item.cpp moved to Item
2021-06-20 18:04:50 +02:00
Tomasz Sowa e7c7324058 ItemContent::user_name(EzcEnv & env) changed to ItemContent::user(morm::ModelWrapper ** model_wrapper) and we return a User class
ItemContent::group_name(EzcEnv & env) changed to ItemContent::group(morm::ModelWrapper ** model_wrapper) and we return a Group class
added ItemContent::display_user_name(EzcEnv & env)
some functions in templates/item.cpp moved to Item
2021-06-19 23:48:12 +02:00
Tomasz Sowa d8c1a81bcb removed config options: ezc_error_prefix and ezc_error_postfix
Ezc::PatternParser and Ezc::Generator use only pt::Log as a logger now
2021-06-19 20:33:35 +02:00
Tomasz Sowa 94f96c11cb make depend 2021-06-18 19:18:46 +02:00
Tomasz Sowa ec94dff7d7 some ezc functions from templates/item.cpp moved to Item and ItemContent
methods HasAccess() HasReadAccess() and similar moved from System to Item and ItemContent
2021-06-18 19:18:13 +02:00
Tomasz Sowa ebd791a256 changed: now Request class is a model class - we have fields() method there to map fields for ezc templates (currently only dir_tab)
removed: [dir_tab] ezc statement
changed: Ls winix function loads its own dir_tab container (beforehand it was loaded by [dir_tab] ezc statement)
         it's available by [child_dirs] name
2021-06-17 21:44:29 +02:00
Tomasz Sowa 4db421d6c3 make depend 2021-06-16 23:43:57 +02:00
Tomasz Sowa ab89ffe096 fixed in Item: void Item::link(Ezc::FunInfo<HtmlTextStream> & env) now returns a correct directory for the item (before the current directory was returned)
added to Item: void Item::dir_link(Ezc::FunInfo<HtmlTextStream> & env)
added to WinixModel:
  Dirs * get_dirs();
  Mounts * get_mounts();
  Users * get_users();
  Groups * get_groups();
  SLog * get_session_logger(); // not finished yet
2021-06-16 23:42:23 +02:00
Tomasz Sowa 53fe5c35b9 added .editorconfig file 2021-06-16 18:09:18 +02:00
Tomasz Sowa f2f2c851df make depend 2021-06-16 18:09:01 +02:00
Tomasz Sowa 6dddc5e948 renamed: WinixModel -> WinixModelDeprecated (this class will be removed)
added: WinixModel (models/winixmodel.h|cpp) - a class inheriting from morm::WinixModel, we have methods such as: get_config(), get_logger(), get_request()
       and this class will be a base class for our models
added: WinixModelConnector (models/winixmodelconnector.h|cpp) - a class inheriting from morm::WinixModelConnector
       this connector we are using instead of morm::ModelConnector - there are pointers to winix objects there (config, request, log)
added to Request: Ezc::Models models
removed from TemplatesFunctions: Ezc::Models ezc_models;
changed: ImgCrop winix functions is using its own item_tab vector now (not finished yet)
added: Item::is(), Item::link(), ItemContent::print_content()
2021-06-16 18:07:44 +02:00
Tomasz Sowa 9688b1a26a htmx updated to 1.4.1 2021-06-09 01:56:47 +02:00
Tomasz Sowa 81df52f6ca make depend 2021-05-31 18:59:49 +02:00
Tomasz Sowa 6e4f8f5191 start adding support for Models objects from Ezc 2021-05-31 18:59:20 +02:00
Tomasz Sowa 22de3322ae - added to Request: is_htmx_request (bool) - true if the request is made by htmx library (ajax)
- commented out using mount_page_arg_is "subject" and "info" from fun_cat.html and fun_run.html - they will be removed soon
- some improvements in fun_reply.html, fun_showthreads.html and fun_thread.html (scrolling)
2021-05-31 10:58:34 +02:00
Tomasz Sowa e6fae4598c updated to the new pikotools api: [ezc out] and [out] changed to [ezc frame] or just [frame]
- when returning json streams changed "out" field to "frames"
- renamed config parameter: allow_ezc_out_in_executable_items -> allow_ezc_frames_in_executable_items
- added basic support for ajax requests in thread plugin
2021-05-28 18:36:19 +02:00
Tomasz Sowa ba331dea4a added basic support for htmx (ajax)
- if there is HX-Request header present we sent only a part of the whole html
- we return only specific stream defined by [out ...] ezc statement
- the name of the stream is passed in the 'frame' parameter
  (if not present then 'content' is assumed)
- added ezc function: winix_is_htmx_request
2021-05-27 19:36:04 +02:00
Tomasz Sowa 1292a56d1b added htmx 1.4.0 loaded by default in html/index_head_adder.html 2021-05-27 13:41:29 +02:00
Tomasz Sowa 6a452ffed0 version changed to 0.7.3 2021-05-27 12:21:59 +02:00
Tomek fc24570062 fixed compilation: pikotools is in src subdirectory now 2021-05-27 12:04:41 +02:00
Tomasz Sowa aa71abd725 some workarounds in Thread plugin (don't show stale info in html forms) 2021-05-27 10:29:26 +02:00
Tomasz Sowa fb64f5e456 fixed: reply winix function (from thread plugin) didn't add a reply - system->Add() didn't set the model_connector to the item 2021-05-26 19:55:50 +02:00
Tomasz Sowa 61fe6ea219 updated to the new api from ezc: changed semantic of [def] and Vars moved outside of Generator 2021-05-23 10:14:08 +02:00
Tomasz Sowa d30c7254eb updated uikit to 3.6.22 2021-05-22 13:03:15 +02:00
Tomasz Sowa 06be33ba5f make depend 2021-05-21 23:06:57 +02:00
Tomasz Sowa b2cffa39e1 added models Thread and ThreadFiles in thread plugin 2021-05-21 23:06:48 +02:00
Tomasz Sowa 86ef2529b1 fixed in some places: system->AddFile() returns bool now instead of Error 2021-05-21 17:41:16 +02:00
Tomasz Sowa f1b9d1b870 updated to the new pikotools api: changed the way how child_spaces are created in Space class 2021-05-21 17:17:17 +02:00
Tomasz Sowa fe67b5d72a updated to the new pikotools api: snake_case names of methods from SpaceParser 2021-05-21 04:51:58 +02:00
Tomasz Sowa 27720afaf2 updated to the new pikotools api: SpaceParser::SetSpace(...) methods have been removed 2021-05-21 01:37:42 +02:00
Tomasz Sowa 8bb585d97d updated to the new pikotools api: changed utf8 functions PascalCase to snake_case 2021-05-21 00:41:27 +02:00
Tomasz Sowa 8c523ce8b9 make depend 2021-05-21 00:32:58 +02:00
Tomasz Sowa e48a28a5c8 namespace PT renamed to pt 2021-05-20 20:59:12 +02:00
Tomasz Sowa d66a36cf21 make depend 2021-05-14 03:32:03 +02:00
Tomasz Sowa a94e09f0aa added support for Model migrations
now we have a table core.migration and each model (User, Group, Item, ItemContent and a new Migration) have its own
row in the table with a version number

added to config:
db_make_migration_if_needed and db_stop_if_migration_fails (need description yet)
2021-05-14 03:31:29 +02:00
Tomasz Sowa 4df10de6b7 methods eq() from finder can have now a table name 2021-05-13 19:33:19 +02:00
Tomasz Sowa 6d07535dad updated uikit to 3.6.21 version 2021-05-13 06:24:44 +02:00
Tomasz Sowa ee354d2ded renamed in Models: map_fields() to fields(), prepare_table() to table() 2021-05-13 03:29:41 +02:00
Tomasz Sowa e64bd1fba8 added more html tags to extraAllowedContent (ckeditor) 2021-05-13 03:24:37 +02:00
Tomasz Sowa 031e673c51 fixed: passwd winix function: pass_encrypted was not cleared if we are not using rsa for encrypting passwords anymore 2021-05-13 02:02:15 +02:00