Commit 46219dd336d63ea47857e197c7beb0a43ad5c4cb
Merge branch 'release/ANUBIS_1_14' of ssh://gitlab.calexium.com:33022/calexium/c…
…alexium_lib into release/ANUBIS_1_14
Showing
14 changed files
with
263 additions
and
109 deletions
Show diff stats
CXM_message_constants.anubis
| 1 | /* | 1 | /* |
| 2 | * | 2 | * |
| 3 | - * User: David RENE | 3 | + * User: David RENÉ |
| 4 | * Date: 07/04/2007 | 4 | * Date: 07/04/2007 |
| 5 | * Time: 16:06 | 5 | * Time: 16:06 |
| 6 | - * (c) Calexium | 6 | + * © Calexium |
| 7 | * | 7 | * |
| 8 | */ | 8 | */ |
| 9 | 9 | ||
| 10 | -public define Word32 _NO_NAME_MSG = 0x00000000. | 10 | +public define Word32 _NO_NAME_MSG = 0x00000000. |
| 11 | 11 | ||
| 12 | // **************** MAILBOX PROTOCOL *************** | 12 | // **************** MAILBOX PROTOCOL *************** |
| 13 | 13 | ||
| @@ -21,14 +21,14 @@ public define Word32 _CXM_FORCE_PUBLISH_MF_CONFIG = 0x33770007. // Ask the Ma | @@ -21,14 +21,14 @@ public define Word32 _CXM_FORCE_PUBLISH_MF_CONFIG = 0x33770007. // Ask the Ma | ||
| 21 | 21 | ||
| 22 | // **************** PACKAGE BUILDER *************** | 22 | // **************** PACKAGE BUILDER *************** |
| 23 | 23 | ||
| 24 | -public define Word32 _CXM_PKG_MSG_BASIS = 0x33770400. // | ||
| 25 | -public define Word32 _CXM_PKG_CONTAINER = 0x33770401. | ||
| 26 | -public define Word32 _CXM_PKG_HEADER_PART = 0x33770402. // Header Message for Script | ||
| 27 | -public define Word32 _CXM_PKG_SCRIPT_PART = 0x33770403. // Main Message for Script | ||
| 28 | -public define Word32 _CXM_PKG_S_ADD_FILE = 0x33770404. // script action to add file in the destination | ||
| 29 | -public define Word32 _CXM_PKG_S_RUN = 0x33770405. // script action to run a command | ||
| 30 | -public define Word32 _CXM_PKG_INDEX_PART = 0x33770440. // ID of package Index part | ||
| 31 | -public define Word32 _CXM_PKG_IDX_ENTRY = 0x33770441. // Index entry information | 24 | +public define Word32 _CXM_PKG_MSG_BASIS = 0x33770400. // |
| 25 | +public define Word32 _CXM_PKG_CONTAINER = 0x33770401. | ||
| 26 | +public define Word32 _CXM_PKG_HEADER_PART = 0x33770402. // Header Message for Script | ||
| 27 | +public define Word32 _CXM_PKG_SCRIPT_PART = 0x33770403. // Main Message for Script | ||
| 28 | +public define Word32 _CXM_PKG_S_ADD_FILE = 0x33770404. // script action to add file in the destination | ||
| 29 | +public define Word32 _CXM_PKG_S_RUN = 0x33770405. // script action to run a command | ||
| 30 | +public define Word32 _CXM_PKG_INDEX_PART = 0x33770440. // ID of package Index part | ||
| 31 | +public define Word32 _CXM_PKG_IDX_ENTRY = 0x33770441. // Index entry information | ||
| 32 | 32 | ||
| 33 | // **************** UPDATE SERVICE *************** | 33 | // **************** UPDATE SERVICE *************** |
| 34 | 34 | ||
| @@ -104,57 +104,57 @@ public define Word32 _CXM_INSTALLER_GET_MODELS = 0x33772005. // return | @@ -104,57 +104,57 @@ public define Word32 _CXM_INSTALLER_GET_MODELS = 0x33772005. // return | ||
| 104 | 104 | ||
| 105 | // ************* ACCOUNTS SERVICE ************* | 105 | // ************* ACCOUNTS SERVICE ************* |
| 106 | 106 | ||
| 107 | -public define Word32 _CXM_ACCOUNT_SERVICE_MSG_BASIS = 0x33772100. | 107 | +public define Word32 _CXM_ACCOUNT_SERVICE_MSG_BASIS = 0x33772100. |
| 108 | 108 | ||
| 109 | // ************* MAILINGS SERVICE ************* | 109 | // ************* MAILINGS SERVICE ************* |
| 110 | 110 | ||
| 111 | -public define Word32 _CXM_MAILING_SERVICE_MSG_BASIS = 0x33772200. | ||
| 112 | -public define Word32 _CXM_MAILING_SERVICE_ID = 0x33772200. // same as MSG_BASIS | 111 | +public define Word32 _CXM_MAILING_SERVICE_MSG_BASIS = 0x33772200. |
| 112 | +public define Word32 _CXM_MAILING_SERVICE_ID = 0x33772200. // same as MSG_BASIS | ||
| 113 | 113 | ||
| 114 | -public define Word32 _CXM_MAILING_CREATE_CONTACT = 0x33772201. | ||
| 115 | -public define Word32 _CXM_MAILING_UPDATE_CONTACT = 0x33772202. | ||
| 116 | -public define Word32 _CXM_MAILING_DELETE_CONTACT = 0x33772203. | 114 | +public define Word32 _CXM_MAILING_CREATE_CONTACT = 0x33772201. |
| 115 | +public define Word32 _CXM_MAILING_UPDATE_CONTACT = 0x33772202. | ||
| 116 | +public define Word32 _CXM_MAILING_DELETE_CONTACT = 0x33772203. | ||
| 117 | 117 | ||
| 118 | -public define Word32 _CXM_MAILING_CREATE_MAILING = 0x33772211. | ||
| 119 | -public define Word32 _CXM_MAILING_UPDATE_MAILING = 0x33772212. | ||
| 120 | -public define Word32 _CXM_MAILING_DELETE_MAILING = 0x33772213. | 118 | +public define Word32 _CXM_MAILING_CREATE_MAILING = 0x33772211. |
| 119 | +public define Word32 _CXM_MAILING_UPDATE_MAILING = 0x33772212. | ||
| 120 | +public define Word32 _CXM_MAILING_DELETE_MAILING = 0x33772213. | ||
| 121 | 121 | ||
| 122 | -public define Word32 _CXM_MAILING_ADD_CONTACT_TO_MAILING = 0x33772221. | ||
| 123 | -public define Word32 _CXM_MAILING_REMOVE_CONTACT_FROM_MAILING = 0x33772222. | 122 | +public define Word32 _CXM_MAILING_ADD_CONTACT_TO_MAILING = 0x33772221. |
| 123 | +public define Word32 _CXM_MAILING_REMOVE_CONTACT_FROM_MAILING = 0x33772222. | ||
| 124 | 124 | ||
| 125 | 125 | ||
| 126 | // ************* DIRECTORY SERVICE ************* | 126 | // ************* DIRECTORY SERVICE ************* |
| 127 | 127 | ||
| 128 | -public define Word32 _CXM_DIRECTORY_SERVICE_MSG_BASIS = 0x33772300. | 128 | +public define Word32 _CXM_DIRECTORY_SERVICE_MSG_BASIS = 0x33772300. |
| 129 | 129 | ||
| 130 | // ************* BACKUP SERVICE ************* | 130 | // ************* BACKUP SERVICE ************* |
| 131 | 131 | ||
| 132 | -public define Word32 _CXM_BACKUP_SERVICE_MSG_BASIS = 0x33772400. | ||
| 133 | -public define Word32 _CXM_BACKUP_SERVICE_ID = 0x33772401. | ||
| 134 | -public define Word32 _CXM_BACKUP_GET_STATUS = 0x33772402. /// Get backup status for a given MF (can subscribe, subscribed, subscription end date...) | ||
| 135 | -public define Word32 _CXM_BACKUP_STARTING_BACKUP = 0x33772403. /// Notify BackupService that backup process is starting | ||
| 136 | -public define Word32 _CXM_BACKUP_FINISHING_BACKUP = 0x33772404. /// Notify BackupService that backup process is finishing | ||
| 137 | -public define Word32 _CXM_BACKUP_STARTING_RESTORE = 0x33772405. /// Notify BackupService that restore process is starting | ||
| 138 | -public define Word32 _CXM_BACKUP_FINISHING_RESTORE = 0x33772406. /// Notify BackupService that restore process is finishing | 132 | +public define Word32 _CXM_BACKUP_SERVICE_MSG_BASIS = 0x33772400. |
| 133 | +public define Word32 _CXM_BACKUP_SERVICE_ID = 0x33772401. | ||
| 134 | +public define Word32 _CXM_BACKUP_GET_STATUS = 0x33772402. /// Get backup status for a given MF (can subscribe, subscribed, subscription end date...) | ||
| 135 | +public define Word32 _CXM_BACKUP_STARTING_BACKUP = 0x33772403. /// Notify BackupService that backup process is starting | ||
| 136 | +public define Word32 _CXM_BACKUP_FINISHING_BACKUP = 0x33772404. /// Notify BackupService that backup process is finishing | ||
| 137 | +public define Word32 _CXM_BACKUP_STARTING_RESTORE = 0x33772405. /// Notify BackupService that restore process is starting | ||
| 138 | +public define Word32 _CXM_BACKUP_FINISHING_RESTORE = 0x33772406. /// Notify BackupService that restore process is finishing | ||
| 139 | 139 | ||
| 140 | // ************* STATISTICS SERVICE ************* | 140 | // ************* STATISTICS SERVICE ************* |
| 141 | 141 | ||
| 142 | -public define Word32 _CXM_STATS_SERVICE_MSG_BASIS = 0x33772500. | 142 | +public define Word32 _CXM_STATS_SERVICE_MSG_BASIS = 0x33772500. |
| 143 | 143 | ||
| 144 | // ************* SUPERVISER SERVICE ************* | 144 | // ************* SUPERVISER SERVICE ************* |
| 145 | 145 | ||
| 146 | -public define Word32 _CXM_SUPERVISER_SERVICE_MSG_BASIS = 0x33772600. | 146 | +public define Word32 _CXM_SUPERVISER_SERVICE_MSG_BASIS = 0x33772600. |
| 147 | public define Word32 _CXM_SUPERVISER_SERVICE_ID = 0x33772600. | 147 | public define Word32 _CXM_SUPERVISER_SERVICE_ID = 0x33772600. |
| 148 | public define Word32 _CXM_SUPERVISER_GET_STATUS = 0x33772601. | 148 | public define Word32 _CXM_SUPERVISER_GET_STATUS = 0x33772601. |
| 149 | 149 | ||
| 150 | // ************* OTHER MESSAGES ************* | 150 | // ************* OTHER MESSAGES ************* |
| 151 | 151 | ||
| 152 | -public define Word32 _CXM_MF_MODEL = 1296912196. // 'MMOD' | ||
| 153 | -public define Word32 _CXM_MF_LICENSE = 1296845123. // 'MLIC' | 152 | +public define Word32 _CXM_MF_MODEL = 1296912196. // 'MMOD' |
| 153 | +public define Word32 _CXM_MF_LICENSE = 1296845123. // 'MLIC' | ||
| 154 | 154 | ||
| 155 | // ************* TEGAMIGAWA SERVICE ************* | 155 | // ************* TEGAMIGAWA SERVICE ************* |
| 156 | 156 | ||
| 157 | -public define Word32 _CXM_TEGAMIGAWA_SERVICE_MSG_BASIS = 0x33772700. | 157 | +public define Word32 _CXM_TEGAMIGAWA_SERVICE_MSG_BASIS = 0x33772700. |
| 158 | public define Word32 _CXM_TEGAMIGAWA_SERVICE_ID = 0x33772700. | 158 | public define Word32 _CXM_TEGAMIGAWA_SERVICE_ID = 0x33772700. |
| 159 | public define Word32 _CXM_TEGAMIGAWA_REGISTER_CLIENT = 0x33772701. | 159 | public define Word32 _CXM_TEGAMIGAWA_REGISTER_CLIENT = 0x33772701. |
| 160 | 160 | ||
| @@ -174,10 +174,30 @@ public define Word32 _CXM_KAIWA_RECEIVE_MESSAGE = 0x33772808. | @@ -174,10 +174,30 @@ public define Word32 _CXM_KAIWA_RECEIVE_MESSAGE = 0x33772808. | ||
| 174 | 174 | ||
| 175 | // ************************************************* | 175 | // ************************************************* |
| 176 | // ************* BASILIK SERVICES ************* | 176 | // ************* BASILIK SERVICES ************* |
| 177 | -public define Word32 _CXM_BSLK_MSG_BASIS = 0x33780000. | ||
| 178 | -public define Word32 _CXM_BSLK_SERVICE_ID = 0x33780000. | ||
| 179 | -public define Word32 _CXM_BSLKLP_SERVICE_ID = 0x33781000. | ||
| 180 | -public define Word32 _CXM_BSLKLP_LOG = 0x33781001. | 177 | +public define Word32 _CXM_BSLK_MSG_BASIS = 0x33780000. |
| 178 | +public define Word32 _CXM_BSLK_SERVICE_ID = 0x33780000. | ||
| 179 | +public define Word32 _CXM_BSLKLP_SERVICE_ID = 0x33781000. | ||
| 180 | +public define Word32 _CXM_BSLKLP_LOG = 0x33781001. | ||
| 181 | 181 | ||
| 182 | 182 | ||
| 183 | 183 | ||
| 184 | +// ************************************************* | ||
| 185 | +// ********* HAYAMIKI RESERVED SPACE ********** | ||
| 186 | + | ||
| 187 | +public define Word32 _CXM_HK_MSG_BASIS = 0x33790000. | ||
| 188 | +public define Word32 _HK_DATABASE = 0x33790400. | ||
| 189 | +public define Word32 _HK_APP = 0x33790401. | ||
| 190 | +public define Word32 _HK_TABLE = 0x33790402. | ||
| 191 | +public define Word32 _HK_MODEL = 0x33790403. | ||
| 192 | +public define Word32 _HK_COLUMN = 0x33790404. | ||
| 193 | +public define Word32 _HK_COLUMN_ATTRIBUTES = 0X33790405. | ||
| 194 | +public define Word32 _HK_FIELD = 0x33790406. | ||
| 195 | + | ||
| 196 | +public define Word32 _HK_ICON = 0x33790410. | ||
| 197 | +public define Word32 _HK_HELP_TEXT = 0x33790411. | ||
| 198 | +public define Word32 _HK_MODEL_DISPLAY = 0x33790412. | ||
| 199 | +public define Word32 _HK_LIST_VIEW = 0x33790413. | ||
| 200 | +public define Word32 _HK_EDIT_VIEW = 0x33790414. | ||
| 201 | +public define Word32 _HK_APP_NAME = 0x33790415. | ||
| 202 | + | ||
| 203 | +public define Word32 _CXM_HK_MSG_END = 0x3379FFFF. |
database/db_types.anubis
| @@ -33,7 +33,7 @@ public define String | @@ -33,7 +33,7 @@ public define String | ||
| 33 | if idx is | 33 | if idx is |
| 34 | { | 34 | { |
| 35 | none then "none", | 35 | none then "none", |
| 36 | - db_id(idx) then abs_to_decimal(idx) | 36 | + db_id(_idx) then abs_to_decimal(_idx) |
| 37 | }. | 37 | }. |
| 38 | 38 | ||
| 39 | public define String | 39 | public define String |
database/migration_sqlite3.anubis
| @@ -164,6 +164,7 @@ define Maybe(One) | @@ -164,6 +164,7 @@ define Maybe(One) | ||
| 164 | do_migration_loop(db, logger, current_version, db_ver, t, success(h), update_db_version), | 164 | do_migration_loop(db, logger, current_version, db_ver, t, success(h), update_db_version), |
| 165 | }. | 165 | }. |
| 166 | 166 | ||
| 167 | + | ||
| 167 | /* SQLite 3 version */ | 168 | /* SQLite 3 version */ |
| 168 | public define Maybe(One) | 169 | public define Maybe(One) |
| 169 | do_migration | 170 | do_migration |
| @@ -188,6 +189,74 @@ public define Maybe(One) | @@ -188,6 +189,74 @@ public define Maybe(One) | ||
| 188 | else | 189 | else |
| 189 | do_migration_loop(db, logger, current_version, db_version, all_migrations, failure, update_db_version) | 190 | do_migration_loop(db, logger, current_version, db_version, all_migrations, failure, update_db_version) |
| 190 | ). | 191 | ). |
| 192 | + | ||
| 193 | +/* SQLite 3 version hk_settings*/ | ||
| 194 | + | ||
| 195 | +define Maybe(One) | ||
| 196 | + do_migration_loop | ||
| 197 | + ( | ||
| 198 | + SQLite3DataBase db, | ||
| 199 | + Logger logger, | ||
| 200 | + String current_version, //current version of app | ||
| 201 | + String db_ver, //version found in db settings | ||
| 202 | + List(Migration) migrations, | ||
| 203 | + Maybe(Migration) need_to_create_table, // success in case of new DB or when no migration have been done | ||
| 204 | + (String) -> One update_db_version, | ||
| 205 | + ) = | ||
| 206 | + if migrations is | ||
| 207 | + { | ||
| 208 | + [] then | ||
| 209 | + if need_to_create_table is | ||
| 210 | + { | ||
| 211 | + failure then | ||
| 212 | + update_db_version(current_version); | ||
| 213 | + success(unique), | ||
| 214 | + success(last) then | ||
| 215 | + if last is migration(_, _, create_tables, create_indexes) then | ||
| 216 | + if create_tables(db, logger) is success(_) then | ||
| 217 | + if create_indexes(db, logger) is success(_) then | ||
| 218 | + update_db_version(current_version); | ||
| 219 | + success(unique) | ||
| 220 | + else | ||
| 221 | + failure | ||
| 222 | + else | ||
| 223 | + failure | ||
| 224 | + }, | ||
| 225 | + [h . t] then | ||
| 226 | + if h is migration(version, migrate_to, _, _) then | ||
| 227 | + if compare_db_version(db_ver, version) < 0 then | ||
| 228 | + logInfo(logger, "Migrating Database from version " + db_ver + " to version " + version); | ||
| 229 | + if migrate_to(db, logger) is failure then | ||
| 230 | + failure | ||
| 231 | + else | ||
| 232 | + do_migration_loop(db, logger, current_version, version, t, failure, update_db_version) | ||
| 233 | + else | ||
| 234 | + do_migration_loop(db, logger, current_version, db_ver, t, success(h), update_db_version), | ||
| 235 | + }. | ||
| 236 | + | ||
| 237 | +public define Maybe(One) | ||
| 238 | + do_migration | ||
| 239 | + ( | ||
| 240 | + SQLite3DataBase db, | ||
| 241 | + Logger logger, | ||
| 242 | + String current_version, | ||
| 243 | + String get_db_version, | ||
| 244 | + (String) -> One update_db_version, | ||
| 245 | + List(Migration) all_migrations, | ||
| 246 | + )= | ||
| 247 | + if is_empty_database(db) then // new empty database | ||
| 248 | + logInfo(logger, "No database found. Creating a new one..."); | ||
| 249 | + do_migration_loop(db, logger, current_version, "", [], last(all_migrations), update_db_version) | ||
| 250 | + else | ||
| 251 | + ( | ||
| 252 | + with db_version = get_db_version, | ||
| 253 | + //if app version is same as db_version, there is nothing to migrate | ||
| 254 | + if compare_db_version(db_version, current_version) = 0 then | ||
| 255 | + logInfo(logger, "Database version "+db_version+". No database migration found."); | ||
| 256 | + success(unique) | ||
| 257 | + else | ||
| 258 | + do_migration_loop(db, logger, current_version, db_version, all_migrations, failure, update_db_version) | ||
| 259 | + ). | ||
| 191 | 260 | ||
| 192 | public define Maybe(One) | 261 | public define Maybe(One) |
| 193 | do_create_indexes | 262 | do_create_indexes |
database/vtm/view_table_renderer.anubis
| @@ -20,6 +20,7 @@ read system/convert.anubis | @@ -20,6 +20,7 @@ read system/convert.anubis | ||
| 20 | //read utils.anubis | 20 | //read utils.anubis |
| 21 | read locale/L3LanguageInfo.anubis | 21 | read locale/L3LanguageInfo.anubis |
| 22 | read calexium_lib/web/CXM_common.anubis | 22 | read calexium_lib/web/CXM_common.anubis |
| 23 | +read calexium_lib/web/CXM_web_arg_utils.anubis | ||
| 23 | read calexium_lib/web/CXM_making_a_web_site.anubis | 24 | read calexium_lib/web/CXM_making_a_web_site.anubis |
| 24 | read calexium_lib/web/CXM_multihost_http_server.anubis | 25 | read calexium_lib/web/CXM_multihost_http_server.anubis |
| 25 | read calexium_lib/web/jQuery/CXM_jquery_datatable.anubis | 26 | read calexium_lib/web/jQuery/CXM_jquery_datatable.anubis |
| @@ -76,9 +77,9 @@ public define List(CXM_Form_Field) | @@ -76,9 +77,9 @@ public define List(CXM_Form_Field) | ||
| 76 | integer(s_name, c_name, value, help) then | 77 | integer(s_name, c_name, value, help) then |
| 77 | [input(_T(s_name), wan(c_name), init(abs_to_decimal(value)), small, mandatory), help_line(help, _T)], | 78 | [input(_T(s_name), wan(c_name), init(abs_to_decimal(value)), small, mandatory), help_line(help, _T)], |
| 78 | date(s_name, c_name, value, help) then | 79 | date(s_name, c_name, value, help) then |
| 79 | - [input([class("datepicker")], _T(s_name), htmlId(c_name), wan(c_name), init(value), narrow, non_mandatory), help_line(help, _T)], | 80 | + [input([class("datepicker")], _T(s_name), htmlId(c_name), wan(c_name), init(value), small, non_mandatory), help_line(help, _T)], |
| 80 | datetime(s_name, c_name, value, help) then | 81 | datetime(s_name, c_name, value, help) then |
| 81 | - [input([class("datetimepicker")], _T(s_name), htmlId(c_name), wan(c_name), init(value), narrow, mandatory), help_line(help, _T)], | 82 | + [input([class("datetimepicker")], _T(s_name), htmlId(c_name), wan(c_name), init(value), small, mandatory), help_line(help, _T)], |
| 82 | }, | 83 | }, |
| 83 | edit_form_lines(db, _T, t, reverse(line)+so_far) | 84 | edit_form_lines(db, _T, t, reverse(line)+so_far) |
| 84 | }. | 85 | }. |
| @@ -93,13 +94,14 @@ public define HTML_Partial_Content | @@ -93,13 +94,14 @@ public define HTML_Partial_Content | ||
| 93 | VT_edit vt_elist | 94 | VT_edit vt_elist |
| 94 | ) = | 95 | ) = |
| 95 | //if tb is tool_box(lang, _T, _, _, db, _) then | 96 | //if tb is tool_box(lang, _T, _, _, db, _) then |
| 96 | - with table_name = vt_elist.table_name, | 97 | + with table_name = vt_elist.table_name, |
| 98 | + with button_name = if get_String(lwa, "id","none") = "none" then _T("CREATE") else _T("UPDATE"), | ||
| 97 | partial_content(jq_datetimepicker_init(lang), | 99 | partial_content(jq_datetimepicker_init(lang), |
| 98 | partial(html_wave_box( | 100 | partial(html_wave_box( |
| 99 | _T(to_upper(table_name)), | 101 | _T(to_upper(table_name)), |
| 100 | cxm_form( table_name, htmlId(table_name), lwa, | 102 | cxm_form( table_name, htmlId(table_name), lwa, |
| 101 | edit_form_lines(db, _T, vt_elist.list, [])+ | 103 | edit_form_lines(db, _T, vt_elist.list, [])+ |
| 102 | - [ submit("create", failure, _T("CREATE"), [("table_name", table_name)]) ] | 104 | + [ submit("create", failure, button_name, [("table_name", table_name)]) ] |
| 103 | )))). | 105 | )))). |
| 104 | 106 | ||
| 105 | public define Maybe(HTML_Partial_Content) | 107 | public define Maybe(HTML_Partial_Content) |
| @@ -129,14 +131,14 @@ define HTML_Row(HTML_Off_Form) make_line | @@ -129,14 +131,14 @@ define HTML_Row(HTML_Off_Form) make_line | ||
| 129 | String table_name, | 131 | String table_name, |
| 130 | String action_name, //default is "edit_table", but can be surcharged for own use | 132 | String action_name, //default is "edit_table", but can be surcharged for own use |
| 131 | List(VT_view_entry) entries, | 133 | List(VT_view_entry) entries, |
| 132 | - List(HTML_Cell(HTML_Off_Form)) so_far, | ||
| 133 | - Int odd_even | 134 | + List(HTML_Cell(HTML_Off_Form)) so_far |
| 135 | + //Int odd_even | ||
| 134 | )= | 136 | )= |
| 135 | if entries is | 137 | if entries is |
| 136 | { | 138 | { |
| 137 | [] then | 139 | [] then |
| 138 | - with line = if odd_even = 0 then "tr_even" else "tr_odd", | ||
| 139 | - row( [core_attrs([class(line)])], reverse(so_far)), | 140 | + //with line = if odd_even = 0 then "tr_even" else "tr_odd", |
| 141 | + row( [], reverse(so_far)), | ||
| 140 | [h . t] then | 142 | [h . t] then |
| 141 | with cell = if h is | 143 | with cell = if h is |
| 142 | { | 144 | { |
| @@ -144,7 +146,7 @@ define HTML_Row(HTML_Off_Form) make_line | @@ -144,7 +146,7 @@ define HTML_Row(HTML_Off_Form) make_line | ||
| 144 | link(id, string) then cell((HTML_Off_Form)actioner(same,same, link(string), action_name, [("table_name", table_name),("id",id)])), | 146 | link(id, string) then cell((HTML_Off_Form)actioner(same,same, link(string), action_name, [("table_name", table_name),("id",id)])), |
| 145 | icon(icon_path) then cell((HTML_Off_Form)image([], icon_path, "")) | 147 | icon(icon_path) then cell((HTML_Off_Form)image([], icon_path, "")) |
| 146 | }, | 148 | }, |
| 147 | - make_line(table_name, action_name, t, [cell . so_far], odd_even) | 149 | + make_line(table_name, action_name, t, [cell . so_far]) |
| 148 | }. | 150 | }. |
| 149 | 151 | ||
| 150 | define List(HTML_Row(HTML_Off_Form)) make_lines | 152 | define List(HTML_Row(HTML_Off_Form)) make_lines |
| @@ -153,13 +155,13 @@ define List(HTML_Row(HTML_Off_Form)) make_lines | @@ -153,13 +155,13 @@ define List(HTML_Row(HTML_Off_Form)) make_lines | ||
| 153 | String table_name, | 155 | String table_name, |
| 154 | String action_name, | 156 | String action_name, |
| 155 | List(VT_view_row) entries, | 157 | List(VT_view_row) entries, |
| 156 | - List(HTML_Row(HTML_Off_Form)) so_far, | ||
| 157 | - Int odd_even | 158 | + List(HTML_Row(HTML_Off_Form)) so_far |
| 159 | +// Int odd_even | ||
| 158 | )= | 160 | )= |
| 159 | if entries is | 161 | if entries is |
| 160 | { | 162 | { |
| 161 | [] then reverse(so_far), | 163 | [] then reverse(so_far), |
| 162 | - [h . t] then make_lines(table_name, action_name, t, [make_line(table_name, action_name, h.list, [], odd_even). so_far], 1 - odd_even ) | 164 | + [h . t] then make_lines(table_name, action_name, t, [make_line(table_name, action_name, h.list, []). so_far] ) |
| 163 | }. | 165 | }. |
| 164 | 166 | ||
| 165 | // View table part | 167 | // View table part |
| @@ -192,12 +194,12 @@ public define HTML_Partial_Content view_table_form | @@ -192,12 +194,12 @@ public define HTML_Partial_Content view_table_form | ||
| 192 | VT_view rows | 194 | VT_view rows |
| 193 | )= | 195 | )= |
| 194 | //if tb is tool_box(_, _T, _, _, db, _) then | 196 | //if tb is tool_box(_, _T, _, _, db, _) then |
| 195 | - partial_content(div( [class("tableau")], | 197 | + partial_content(div( [/*class("tableau")*/], |
| 196 | sequence( | 198 | sequence( |
| 197 | [ actioner(same,same, link([class("my_button")],_T("NEW")),"edit_table",[("table_name", rows.table_name)]), | 199 | [ actioner(same,same, link([class("my_button")],_T("NEW")),"edit_table",[("table_name", rows.table_name)]), |
| 198 | - table([core_attrs([id("table_view"), class("display compact nowrap")])], | 200 | + table([core_attrs([id("table_view"), class("tableau display compact nowrap")])], |
| 199 | make_header(_T, rows.header.list, []), | 201 | make_header(_T, rows.header.list, []), |
| 200 | - make_lines(rows.table_name, action_name, rows.list, [], 0)) | 202 | + make_lines(rows.table_name, action_name, rows.list, [])) |
| 201 | ] | 203 | ] |
| 202 | ) | 204 | ) |
| 203 | )) | 205 | )) |
mail/send_mail.anubis
| @@ -210,7 +210,7 @@ public define Result(SmtpClientResult, One) | @@ -210,7 +210,7 @@ public define Result(SmtpClientResult, One) | ||
| 210 | ) = | 210 | ) = |
| 211 | send_mail(conn, | 211 | send_mail(conn, |
| 212 | param, | 212 | param, |
| 213 | - (SmtpClientSession sm_session, Send_Param param) |-> ok(param), | 213 | + (SmtpClientSession sm_session, Send_Param parameter) |-> ok(parameter), |
| 214 | handle_result | 214 | handle_result |
| 215 | ). | 215 | ). |
| 216 | 216 |
web/CXM_dojo.anubis
| @@ -824,9 +824,8 @@ public define List(HTML_Head_Tag) | @@ -824,9 +824,8 @@ public define List(HTML_Head_Tag) | ||
| 824 | String theme_name | 824 | String theme_name |
| 825 | ) | 825 | ) |
| 826 | = | 826 | = |
| 827 | - with theme_name = | ||
| 828 | - if file_exists(web_dir+"/public/js/dojo/dijit/themes/"+theme_name+"/"+theme_name+".css")then theme_name else "claro", | ||
| 829 | - [ css(css_file("js/dojo/dijit/themes/"+theme_name+"/"+theme_name+".css")) . | ||
| 830 | - [ css(css_file("js/dojo/dijit/themes/"+theme_name+"/"+theme_name+"_rtl.css")) . dojo_defaults ] | ||
| 831 | - ] | 827 | + with _theme_name = if file_exists(web_dir+"/public/js/dojo/dijit/themes/"+theme_name+"/"+theme_name+".css")then theme_name else "claro", |
| 828 | + [ css(css_file("js/dojo/dijit/themes/"+_theme_name+"/"+_theme_name+".css")) . | ||
| 829 | + [ css(css_file("js/dojo/dijit/themes/"+_theme_name+"/"+_theme_name+"_rtl.css")) . dojo_defaults ] | ||
| 830 | + ] | ||
| 832 | . | 831 | . |
web/CXM_form.anubis
| @@ -142,6 +142,14 @@ public type CXM_Form_Field: | @@ -142,6 +142,14 @@ public type CXM_Form_Field: | ||
| 142 | WebArgValue web_arg_value, | 142 | WebArgValue web_arg_value, |
| 143 | Bool checked, | 143 | Bool checked, |
| 144 | Mandatory mandatory), | 144 | Mandatory mandatory), |
| 145 | + //radio_button_hide_show | ||
| 146 | + radio_button_hide_show( | ||
| 147 | + List(InputAttrs) options, | ||
| 148 | + String label, | ||
| 149 | + WebArgName web_arg_name, | ||
| 150 | + WebArgValue web_arg_value, | ||
| 151 | + Bool checked, | ||
| 152 | + List(CXM_Form_Field) fields), | ||
| 145 | // the same one, but with the tag on the right of the radio_button | 153 | // the same one, but with the tag on the right of the radio_button |
| 146 | radio_buttonr (List(InputAttrs) options, | 154 | radio_buttonr (List(InputAttrs) options, |
| 147 | String label, | 155 | String label, |
| @@ -388,35 +396,42 @@ public define HTML_In_Form | @@ -388,35 +396,42 @@ public define HTML_In_Form | ||
| 388 | selector(options, label, id, wan, size, items, selected, mand) then | 396 | selector(options, label, id, wan, size, items, selected, mand) then |
| 389 | if selected is | 397 | if selected is |
| 390 | { | 398 | { |
| 391 | - failure then selector(options, label + star(mand), id, wan, size, items), | ||
| 392 | - success(default) then selector(options, label + star(mand), id, wan, size, items, init(get_String(lwa, wan.name, default.value))), | 399 | + failure then selector([class("in") . options], label + star(mand), id, wan, size, items), |
| 400 | + success(default) then selector([class("in") . options], label + star(mand), id, wan, size, items, init(get_String(lwa, wan.name, default.value))), | ||
| 393 | }, | 401 | }, |
| 394 | 402 | ||
| 395 | selector_c(options, label, id, wan, size, items, selected, mand) then | 403 | selector_c(options, label, id, wan, size, items, selected, mand) then |
| 396 | if selected is | 404 | if selected is |
| 397 | { | 405 | { |
| 398 | - failure then selector_c(options, label + star(mand), id, wan, size, items), | ||
| 399 | - success(default) then selector_c(options, label + star(mand), id, wan, size, items, init(get_String(lwa, wan.name, default.value))), | 406 | + failure then selector_c([class("in") . options], label + star(mand), id, wan, size, items), |
| 407 | + success(default) then selector_c([class("in") . options], label + star(mand), id, wan, size, items, init(get_String(lwa, wan.name, default.value))), | ||
| 400 | }, | 408 | }, |
| 401 | 409 | ||
| 402 | checkbox(options, label, id, wan, val, checked, mand) then | 410 | checkbox(options, label, id, wan, val, checked, mand) then |
| 403 | - check_box(options, label + star(mand), id, wan, val, get_Bool(lwa, wan.name, checked)), | 411 | + check_box([class("in") . options], label + star(mand), id, wan, val, get_Bool(lwa, wan.name, checked)), |
| 404 | 412 | ||
| 405 | checkboxr(options, label, id, wan, val, checked, mand) then | 413 | checkboxr(options, label, id, wan, val, checked, mand) then |
| 406 | - check_box_r(options, label + star(mand), id, wan, val, get_Bool(lwa, wan.name, checked)), | 414 | + check_box_r([class("in") . options], label + star(mand), id, wan, val, get_Bool(lwa, wan.name, checked)), |
| 407 | 415 | ||
| 408 | checkbox_hide_show(options, label, wan, val, checked, fields) then | 416 | checkbox_hide_show(options, label, wan, val, checked, fields) then |
| 409 | with div_id = generate_random_string(15), | 417 | with div_id = generate_random_string(15), |
| 410 | sequence([ | 418 | sequence([ |
| 411 | - check_box([event(onclick, "checkbox_hide_show_element('"+div_id+"', this);")], label, htmlId(""), wan, val, get_Bool(lwa, wan.name, checked)), | 419 | + check_box([class("in"), event(onclick, "checked_hide_show_element('"+div_id+"', this);")], label, htmlId(""), wan, val, get_Bool(lwa, wan.name, checked)), |
| 412 | div([id(div_id), style("display:"+if checked then "block" else "none")], sequence(map((CXM_Form_Field ff2) |-> div([class("form_field")], cxm_format_form_field(ff2, lwa)),fields))) | 420 | div([id(div_id), style("display:"+if checked then "block" else "none")], sequence(map((CXM_Form_Field ff2) |-> div([class("form_field")], cxm_format_form_field(ff2, lwa)),fields))) |
| 413 | ]), | 421 | ]), |
| 414 | 422 | ||
| 415 | radio_button(options, label, id, wan, val, checked, mand) then | 423 | radio_button(options, label, id, wan, val, checked, mand) then |
| 416 | - radio_button(options, label + star(mand), id, wan, val, get_Bool(lwa, wan.name, checked)), | 424 | + radio_button([class("in"), event(onclick, "radio_hide_show_group('"+wan.name+"', this);") . options], label + star(mand), id, wan, val, get_Bool(lwa, wan.name, checked)), |
| 425 | + | ||
| 426 | + radio_button_hide_show(options, label, wan, val, checked, fields) then | ||
| 427 | + with div_id = generate_random_string(15), | ||
| 428 | + sequence([ | ||
| 429 | + radio_button([data("show_id", div_id), class("in"), event(onclick, "radio_hide_show_group('"+wan.name+"', this);")], label, htmlId(""), wan, val, get_Bool(lwa, wan.name, checked)), | ||
| 430 | + div([id(div_id), style("display:"+if checked then "block" else "none")], sequence(map((CXM_Form_Field ff2) |-> div([class("form_field")], cxm_format_form_field(ff2, lwa)),fields))) | ||
| 431 | + ]), | ||
| 417 | 432 | ||
| 418 | radio_buttonr(options, label, id, wan, val, checked, mand) then | 433 | radio_buttonr(options, label, id, wan, val, checked, mand) then |
| 419 | - radio_button_r(options, label + star(mand), id, wan, val, get_Bool(lwa, wan.name, checked)), | 434 | + radio_button_r([class("in") . options], label + star(mand), id, wan, val, get_Bool(lwa, wan.name, checked)), |
| 420 | 435 | ||
| 421 | radio_button_list (options, label, id, wan, items, selected, mand, wide) then | 436 | radio_button_list (options, label, id, wan, items, selected, mand, wide) then |
| 422 | with new_selected = | 437 | with new_selected = |
| @@ -434,8 +449,8 @@ public define HTML_In_Form | @@ -434,8 +449,8 @@ public define HTML_In_Form | ||
| 434 | map( ((WebArgValue, String) item) |-> | 449 | map( ((WebArgValue, String) item) |-> |
| 435 | i <- *i + 1; | 450 | i <- *i + 1; |
| 436 | if item is (wav, item_label) then | 451 | if item is (wav, item_label) then |
| 437 | - with id = if id is htmlId(the_id) then htmlId(the_id + "_radio_" + *i), | ||
| 438 | - div([class(itemclass)], radio_button_r(options, item_label, id, wan, wav, | 452 | + with _id = if id is htmlId(the_id) then htmlId(the_id + "_radio_" + *i), |
| 453 | + div([class(itemclass)], radio_button_r(options, item_label, _id, wan, wav, | ||
| 439 | if new_selected is success(v) then wav.value = v.value else false)), | 454 | if new_selected is success(v) then wav.value = v.value else false)), |
| 440 | items)) | 455 | items)) |
| 441 | ), | 456 | ), |
| @@ -446,14 +461,14 @@ public define HTML_In_Form | @@ -446,14 +461,14 @@ public define HTML_In_Form | ||
| 446 | , | 461 | , |
| 447 | 462 | ||
| 448 | upload(options, label, id, name, w, mand) then | 463 | upload(options, label, id, name, w, mand) then |
| 449 | - file_upload(options, label + star(mand), id, name, pixels(w)), | 464 | + file_upload([class("in") . options], label + star(mand), id, name, pixels(w)), |
| 450 | 465 | ||
| 451 | raw_in_form(html) then html, | 466 | raw_in_form(html) then html, |
| 452 | // div([class("in")], html), | 467 | // div([class("in")], html), |
| 453 | raw_in_form(label, id, input) then | 468 | raw_in_form(label, id, input) then |
| 454 | sequence([ | 469 | sequence([ |
| 455 | - if id is htmlId(id) then | ||
| 456 | - literal("<label for=\"" + id + "\">" + label + "</label>"), | 470 | + if id is htmlId(_id) then |
| 471 | + literal("<label for=\"" + _id + "\">" + label + "</label>"), | ||
| 457 | input]), | 472 | input]), |
| 458 | div(options, e) then div(options, e), | 473 | div(options, e) then div(options, e), |
| 459 | partial(p_content) then partial(p_content), | 474 | partial(p_content) then partial(p_content), |
web/CXM_jquery.anubis
| @@ -39,8 +39,8 @@ define String | @@ -39,8 +39,8 @@ define String | ||
| 39 | if options is | 39 | if options is |
| 40 | { | 40 | { |
| 41 | [ ] then formated_options, | 41 | [ ] then formated_options, |
| 42 | - [ h . t ] then | ||
| 43 | - if h is | 42 | + [ c . t ] then |
| 43 | + if c is | ||
| 44 | { | 44 | { |
| 45 | resizable then jquery_button_get_onclick_action_window_options( | 45 | resizable then jquery_button_get_onclick_action_window_options( |
| 46 | t, formated_options+ comma+ "resizable=yes" ), | 46 | t, formated_options+ comma+ "resizable=yes" ), |
web/CXM_making_a_web_site.anubis
| @@ -753,6 +753,7 @@ public type CoreAttrs: | @@ -753,6 +753,7 @@ public type CoreAttrs: | ||
| 753 | public define CoreAttrs attr(String name, Bool value) = attr(name, if value then "true" else "false"). | 753 | public define CoreAttrs attr(String name, Bool value) = attr(name, if value then "true" else "false"). |
| 754 | 754 | ||
| 755 | public type InputAttrs: | 755 | public type InputAttrs: |
| 756 | + id (String), | ||
| 756 | class (String), | 757 | class (String), |
| 757 | style (String), | 758 | style (String), |
| 758 | title (String), | 759 | title (String), |
| @@ -761,7 +762,9 @@ public type InputAttrs: | @@ -761,7 +762,9 @@ public type InputAttrs: | ||
| 761 | accesskey (Word8), | 762 | accesskey (Word8), |
| 762 | tabindex (Int), | 763 | tabindex (Int), |
| 763 | attr (String, String), | 764 | attr (String, String), |
| 764 | - event (HtmlEvents, String). | 765 | + event (HtmlEvents, String), |
| 766 | + //HTML5 | ||
| 767 | + data (String name, String value). | ||
| 765 | 768 | ||
| 766 | public define InputAttrs attr(String name, Bool value) = attr(name, if value then "true" else "false"). | 769 | public define InputAttrs attr(String name, Bool value) = attr(name, if value then "true" else "false"). |
| 767 | 770 | ||
| @@ -1040,9 +1043,47 @@ public type TextAreaOption: | @@ -1040,9 +1043,47 @@ public type TextAreaOption: | ||
| 1040 | public type CSS_Style: | 1043 | public type CSS_Style: |
| 1041 | text_options(List(Text_Option)). | 1044 | text_options(List(Text_Option)). |
| 1042 | 1045 | ||
| 1046 | +public type CSS_File_Media: | ||
| 1047 | + screen, //Intended for non-paged computer screens. | ||
| 1048 | + tty, //Intended for media using a fixed-pitch character grid, such as teletypes, terminals, or portable devices with limited display capabilities. | ||
| 1049 | + tv, //Intended for television-type devices (low resolution, color, limited scrollability). | ||
| 1050 | + projection, //Intended for projectors. | ||
| 1051 | + handheld, //Intended for handheld devices (small screen, monochrome, bitmapped graphics, limited bandwidth). | ||
| 1052 | + print, //Intended for paged, opaque material and for documents viewed on screen in print preview mode. | ||
| 1053 | + braille, //Intended for braille tactile feedback devices. | ||
| 1054 | + aural, //Intended for speech synthesizers. | ||
| 1055 | + all. //Suitable for all devices. | ||
| 1056 | + | ||
| 1057 | +public define String | ||
| 1058 | + to_String | ||
| 1059 | + ( | ||
| 1060 | + CSS_File_Media css_file_media | ||
| 1061 | + )= | ||
| 1062 | + if css_file_media is | ||
| 1063 | + { | ||
| 1064 | + screen then "screen", | ||
| 1065 | + tty then "tty", | ||
| 1066 | + tv then "tv", | ||
| 1067 | + projection then "projection", | ||
| 1068 | + handheld then "handheld", | ||
| 1069 | + print then "print", | ||
| 1070 | + braille then "braille", | ||
| 1071 | + aural then "aural", | ||
| 1072 | + all then "all" | ||
| 1073 | + }. | ||
| 1074 | + | ||
| 1075 | + | ||
| 1076 | + . | ||
| 1043 | public type CSS_File: | 1077 | public type CSS_File: |
| 1044 | - css_file(String file_name). | 1078 | + css_file(String file_name, CSS_File_Media). |
| 1045 | 1079 | ||
| 1080 | +public define CSS_File | ||
| 1081 | + css_file | ||
| 1082 | + ( | ||
| 1083 | + String file_name | ||
| 1084 | + )= | ||
| 1085 | + css_file(file_name, all). | ||
| 1086 | + | ||
| 1046 | public type JS_Attribute: | 1087 | public type JS_Attribute: |
| 1047 | attr (String, String). | 1088 | attr (String, String). |
| 1048 | 1089 | ||
| @@ -3187,6 +3228,8 @@ define String | @@ -3187,6 +3228,8 @@ define String | ||
| 3187 | [h . t] then | 3228 | [h . t] then |
| 3188 | with current = if h is | 3229 | with current = if h is |
| 3189 | { | 3230 | { |
| 3231 | + id(id_name) then | ||
| 3232 | + " id=\"" + id_name + "\"", | ||
| 3190 | class(class_name) then | 3233 | class(class_name) then |
| 3191 | format_attrs(t, [class_name. classes], styles), | 3234 | format_attrs(t, [class_name. classes], styles), |
| 3192 | style(style_string) then | 3235 | style(style_string) then |
| @@ -3213,6 +3256,8 @@ define String | @@ -3213,6 +3256,8 @@ define String | ||
| 3213 | 3256 | ||
| 3214 | event(e, value) then | 3257 | event(e, value) then |
| 3215 | " " + event_name(e) + "=\"" + value + "\"", | 3258 | " " + event_name(e) + "=\"" + value + "\"", |
| 3259 | + data(name, value) then | ||
| 3260 | + " data-" + to_lower(name) + "=\"" + value + "\"", | ||
| 3216 | }, | 3261 | }, |
| 3217 | current + format_attrs(t, classes, styles) | 3262 | current + format_attrs(t, classes, styles) |
| 3218 | }. | 3263 | }. |
| @@ -3927,17 +3972,18 @@ define Printable_tree | @@ -3927,17 +3972,18 @@ define Printable_tree | ||
| 3927 | }. | 3972 | }. |
| 3928 | 3973 | ||
| 3929 | define Printable_tree | 3974 | define Printable_tree |
| 3930 | - add_css_files | ||
| 3931 | - ( | ||
| 3932 | - List(CSS_File) l | ||
| 3933 | - ) = | ||
| 3934 | - if l is | ||
| 3935 | - { | ||
| 3936 | - [ ] then [ ], | ||
| 3937 | - [h . t] then | ||
| 3938 | - [ ["<link rel=\"stylesheet\" type=\"text/css\" href=\"" + file_name(h) + "\" />\n" ] | 3975 | + add_css_files |
| 3976 | + ( | ||
| 3977 | + List(CSS_File) l | ||
| 3978 | + ) = | ||
| 3979 | + if l is | ||
| 3980 | + { | ||
| 3981 | + [ ] then [ ], | ||
| 3982 | + [h . t] then | ||
| 3983 | + since h is css_file(file_name, media), | ||
| 3984 | + [ ["<link rel=\"stylesheet\" type=\"text/css\" href=\"" + file_name + "\" media=\""+to_String(media)+"\"/>\n" ] | ||
| 3939 | . add_css_files(t)] | 3985 | . add_css_files(t)] |
| 3940 | - }. | 3986 | + }. |
| 3941 | 3987 | ||
| 3942 | define Printable_tree | 3988 | define Printable_tree |
| 3943 | add_js_files_attributes | 3989 | add_js_files_attributes |
| @@ -4402,7 +4448,7 @@ define Printable_tree | @@ -4402,7 +4448,7 @@ define Printable_tree | ||
| 4402 | div_empty(options) then | 4448 | div_empty(options) then |
| 4403 | format(cinfo, sn, ic_v, any_div_empty(options), format_element, is_https, action_count, head_tags), | 4449 | format(cinfo, sn, ic_v, any_div_empty(options), format_element, is_https, action_count, head_tags), |
| 4404 | iframe(options, css_styles, css_files, js_files, body) then | 4450 | iframe(options, css_styles, css_files, js_files, body) then |
| 4405 | - if body is body(body_options,element) then | 4451 | + if body is body(body_options,elem) then |
| 4406 | [ "<iframe", format_attrs(options), ">\n", | 4452 | [ "<iframe", format_attrs(options), ">\n", |
| 4407 | "<html style=\"margin: 0pt; padding: 0pt;\">\n", | 4453 | "<html style=\"margin: 0pt; padding: 0pt;\">\n", |
| 4408 | "<head>\n", | 4454 | "<head>\n", |
| @@ -4411,7 +4457,7 @@ define Printable_tree | @@ -4411,7 +4457,7 @@ define Printable_tree | ||
| 4411 | add_js_files(js_files), | 4457 | add_js_files(js_files), |
| 4412 | "</head>\n", | 4458 | "</head>\n", |
| 4413 | "<body ", format(body_options), ">\n", // format body options | 4459 | "<body ", format(body_options), ">\n", // format body options |
| 4414 | - format(cinfo,sn,ic_v,element,is_https, action_count, head_tags), | 4460 | + format(cinfo,sn,ic_v,elem,is_https, action_count, head_tags), |
| 4415 | "</body>\n", | 4461 | "</body>\n", |
| 4416 | "</html>\n", | 4462 | "</html>\n", |
| 4417 | "</iframe>\n", | 4463 | "</iframe>\n", |
| @@ -4539,7 +4585,8 @@ define Printable_tree | @@ -4539,7 +4585,8 @@ define Printable_tree | ||
| 4539 | script(type, _) then ["<script type=\"" + type + "\">"+content(jsi)+"</script>\n" . _format_html_head(t, so_far)], | 4585 | script(type, _) then ["<script type=\"" + type + "\">"+content(jsi)+"</script>\n" . _format_html_head(t, so_far)], |
| 4540 | } | 4586 | } |
| 4541 | css(cssf) then | 4587 | css(cssf) then |
| 4542 | - ["<link rel=\"stylesheet\" type=\"text/css\" href=\""+file_name(cssf)+"\" />\n" . _format_html_head(t, so_far)], | 4588 | + since cssf is css_file(file_name, media), |
| 4589 | + ["<link rel=\"stylesheet\" type=\"text/css\" href=\""+file_name+"\" media=\""+to_String(media)+"\" />\n" . _format_html_head(t, so_far)], | ||
| 4543 | css_inline(cssi) then | 4590 | css_inline(cssi) then |
| 4544 | ["<style>"+cssi+"</style>\n" . _format_html_head(t, so_far)] | 4591 | ["<style>"+cssi+"</style>\n" . _format_html_head(t, so_far)] |
| 4545 | } | 4592 | } |
web/CXM_multihost_http_server.anubis
| @@ -2872,14 +2872,14 @@ public define List(Web_arg) | @@ -2872,14 +2872,14 @@ public define List(Web_arg) | ||
| 2872 | if find_the_first(body_temp_file, __boundary, file_offset) is | 2872 | if find_the_first(body_temp_file, __boundary, file_offset) is |
| 2873 | { | 2873 | { |
| 2874 | failure then println("first boundary NOT found");[ ], | 2874 | failure then println("first boundary NOT found");[ ], |
| 2875 | - success(first) then | ||
| 2876 | - with first = first + file_offset, //adjust the offset to real offset in file | 2875 | + success(_first) then |
| 2876 | + with first = _first + file_offset, //adjust the offset to real offset in file | ||
| 2877 | //get the second boundary position | 2877 | //get the second boundary position |
| 2878 | if find_the_first(body_temp_file, __boundary, first + boundary_length) is | 2878 | if find_the_first(body_temp_file, __boundary, first + boundary_length) is |
| 2879 | { | 2879 | { |
| 2880 | failure then println("last boundary NOT found");[ ], | 2880 | failure then println("last boundary NOT found");[ ], |
| 2881 | - success(last) then | ||
| 2882 | - with last = last + first + boundary_length, //adjust the offset to real offset in file | 2881 | + success(_last)then |
| 2882 | + with last = _last + first + boundary_length, //adjust the offset to real offset in file | ||
| 2883 | //Extract the file content here | 2883 | //Extract the file content here |
| 2884 | if get_multipart_entity(web_site_dir, body_temp_file, first+boundary_length, last, s) is | 2884 | if get_multipart_entity(web_site_dir, body_temp_file, first+boundary_length, last, s) is |
| 2885 | { | 2885 | { |
web/CXM_web_arg_utils.anubis
| @@ -27,9 +27,10 @@ public define DB_id | @@ -27,9 +27,10 @@ public define DB_id | ||
| 27 | if decimal_scan(value) is | 27 | if decimal_scan(value) is |
| 28 | { | 28 | { |
| 29 | failure then none, | 29 | failure then none, |
| 30 | - success(value) then db_id(value) | 30 | + success(_value) then db_id(_value) |
| 31 | } | 31 | } |
| 32 | }. | 32 | }. |
| 33 | + | ||
| 33 | public define Maybe(DB_date) | 34 | public define Maybe(DB_date) |
| 34 | get_DB_date | 35 | get_DB_date |
| 35 | ( | 36 | ( |
| @@ -225,10 +226,10 @@ public define Maybe(Word32) | @@ -225,10 +226,10 @@ public define Maybe(Word32) | ||
| 225 | ) = | 226 | ) = |
| 226 | if get_Word32(lwa, name) is | 227 | if get_Word32(lwa, name) is |
| 227 | { | 228 | { |
| 228 | - failure then /*logDebug(debug_log, "Can't convert argument '" + name + "' to integer.");*/ failure | 229 | + failure then failure |
| 229 | success(value) then | 230 | success(value) then |
| 230 | if value +< min | value >+ max then | 231 | if value +< min | value >+ max then |
| 231 | - /*logDebug(debug_log, "The entered value (" + val + ")is out of boundaries [" + min + "," + max + "].");*/ failure | 232 | + failure |
| 232 | else | 233 | else |
| 233 | success(value) | 234 | success(value) |
| 234 | }. | 235 | }. |
| @@ -270,10 +271,10 @@ public define Maybe(Word8) | @@ -270,10 +271,10 @@ public define Maybe(Word8) | ||
| 270 | ) = | 271 | ) = |
| 271 | if get_Word8(lwa, name) is | 272 | if get_Word8(lwa, name) is |
| 272 | { | 273 | { |
| 273 | - failure then /*logDebug(debug_log, "Can't convert argument '" + name + "' to integer.");*/ failure | 274 | + failure then failure |
| 274 | success(value) then | 275 | success(value) then |
| 275 | if value +< min | value >+ max then | 276 | if value +< min | value >+ max then |
| 276 | - /*logDebug(debug_log, "The entered value (" + val + ")is out of boundaries [" + min + "," + max + "].");*/ failure | 277 | + failure |
| 277 | else | 278 | else |
| 278 | success(value) | 279 | success(value) |
| 279 | }. | 280 | }. |
web/jQuery/CXM_jquery_button.anubis
| @@ -281,10 +281,10 @@ public define HTML_Partial_Content | @@ -281,10 +281,10 @@ public define HTML_Partial_Content | ||
| 281 | cancel: " + to_JS_String(dlg_cancel) + "};", | 281 | cancel: " + to_JS_String(dlg_cancel) + "};", |
| 282 | 282 | ||
| 283 | button_name = uid, | 283 | button_name = uid, |
| 284 | - actioner = jQuery_actioner(same, jqscript, "CalexiumToolBox.make_confirm_dialog(this, " /*+ to_js_string("/?a=" + url + format_extra_operands(extra_ops))+*/ + to_JS_String(jquery_button_get_onclick_action(actioner)) + ");"), | 284 | + _actioner = jQuery_actioner(same, jqscript, "CalexiumToolBox.make_confirm_dialog(this, " /*+ to_js_string("/?a=" + url + format_extra_operands(extra_ops))+*/ + to_JS_String(jquery_button_get_onclick_action(actioner)) + ");"), |
| 285 | 285 | ||
| 286 | partial_content([js(js_file("js/cxm/cxm.js")), js_inline(jquery_ready(js_data))],sequence([ | 286 | partial_content([js(js_file("js/cxm/cxm.js")), js_inline(jquery_ready(js_data))],sequence([ |
| 287 | - partial(jquery_button(jQuery_button(button, uid, button_name, button_label, actioner, jq_icon_none, jq_icon_none))) | 287 | + partial(jquery_button(jQuery_button(button, uid, button_name, button_label, _actioner, jq_icon_none, jq_icon_none))) |
| 288 | ])). | 288 | ])). |
| 289 | 289 | ||
| 290 | public define HTML_Partial_Content | 290 | public define HTML_Partial_Content |
| @@ -309,11 +309,11 @@ public define HTML_Partial_Content | @@ -309,11 +309,11 @@ public define HTML_Partial_Content | ||
| 309 | ok : " + to_JS_String(dlg_ok) + ", | 309 | ok : " + to_JS_String(dlg_ok) + ", |
| 310 | cancel: " + to_JS_String(dlg_cancel) + "};", | 310 | cancel: " + to_JS_String(dlg_cancel) + "};", |
| 311 | 311 | ||
| 312 | - button_name = uid, | ||
| 313 | - actioner = jQuery_actioner(same, jqscript, "CalexiumToolBox.make_confirm_dialog(this, " + to_JS_String(jquery_button_get_onclick_action(actioner)) +");"), | 312 | + _button_name = uid, |
| 313 | + _actioner = jQuery_actioner(same, jqscript, "CalexiumToolBox.make_confirm_dialog(this, " + to_JS_String(jquery_button_get_onclick_action(actioner)) +");"), | ||
| 314 | 314 | ||
| 315 | partial_content([js(js_file("js/cxm/cxm.js")), js_inline(jquery_ready(js_data))],sequence([ | 315 | partial_content([js(js_file("js/cxm/cxm.js")), js_inline(jquery_ready(js_data))],sequence([ |
| 316 | - partial(jquery_button(jquery_img_button(img_url, button_label, button_name, actioner, orientation))) | 316 | + partial(jquery_button(jquery_img_button(img_url, button_label, _button_name, _actioner, orientation))) |
| 317 | ])). | 317 | ])). |
| 318 | 318 | ||
| 319 | public define HTML_Partial_Content | 319 | public define HTML_Partial_Content |
web/widgets/button.anubis
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | */ | 7 | */ |
| 8 | 8 | ||
| 9 | read calexium_lib/web/CXM_making_a_web_site.anubis | 9 | read calexium_lib/web/CXM_making_a_web_site.anubis |
| 10 | -read calexium_lib/web/CXM_jquery.anubis | 10 | +transmit calexium_lib/web/CXM_jquery.anubis |
| 11 | read calexium_lib/web/CXM_json.anubis | 11 | read calexium_lib/web/CXM_json.anubis |
| 12 | read calexium_lib/web/js_tools.anubis | 12 | read calexium_lib/web/js_tools.anubis |
| 13 | transmit calexium_lib/web/widgets/icons_set.anubis | 13 | transmit calexium_lib/web/widgets/icons_set.anubis |
web/widgets/icons_set.anubis
| @@ -6,19 +6,20 @@ | @@ -6,19 +6,20 @@ | ||
| 6 | * © Calexium | 6 | * © Calexium |
| 7 | */ | 7 | */ |
| 8 | 8 | ||
| 9 | - | ||
| 10 | public define String icn16_edit = "icons/16x16/edit.png". | 9 | public define String icn16_edit = "icons/16x16/edit.png". |
| 11 | public define String icn16_calendar = "icons/16x16/calendar.png". | 10 | public define String icn16_calendar = "icons/16x16/calendar.png". |
| 12 | public define String icn16_check = "icons/16x16/check.png". | 11 | public define String icn16_check = "icons/16x16/check.png". |
| 13 | public define String icn16_clock = "icons/16x16/clock.png". | 12 | public define String icn16_clock = "icons/16x16/clock.png". |
| 14 | public define String icn16_cross = "icons/16x16/cross.png". | 13 | public define String icn16_cross = "icons/16x16/cross.png". |
| 14 | +public define String icn16_home = "icons/16x16/home.png". | ||
| 15 | public define String icn16_key = "icons/16x16/key.png". | 15 | public define String icn16_key = "icons/16x16/key.png". |
| 16 | public define String icn16_locked = "icons/16x16/locked.png". | 16 | public define String icn16_locked = "icons/16x16/locked.png". |
| 17 | public define String icn16_phone = "icons/16x16/phone.png". | 17 | public define String icn16_phone = "icons/16x16/phone.png". |
| 18 | -public define String icn16_vcard_add = "icons/16x16/vcard_add.png". | ||
| 19 | public define String icn16_folder_edit = "icons/16x16/folder_edit.png". | 18 | public define String icn16_folder_edit = "icons/16x16/folder_edit.png". |
| 20 | public define String icn16_group = "icons/16x16/group.png". | 19 | public define String icn16_group = "icons/16x16/group.png". |
| 21 | public define String icn16_question = "icons/16x16/question.png". | 20 | public define String icn16_question = "icons/16x16/question.png". |
| 21 | +public define String icn16_refresh = "icons/16x16/arrow_refresh.png". | ||
| 22 | +public define String icn16_vcard_add = "icons/16x16/vcard_add.png". | ||
| 22 | public define String icn16_warning = "icons/16x16/warning.png". | 23 | public define String icn16_warning = "icons/16x16/warning.png". |
| 23 | 24 | ||
| 24 | public define String icn16_true = "icons/16x16/check.png". | 25 | public define String icn16_true = "icons/16x16/check.png". |