From b7a213f1947bc306ba2c56021baacea5db1fe2f6 Mon Sep 17 00:00:00 2001 From: zmsdev Date: Mon, 15 May 2023 20:12:20 +0200 Subject: [PATCH 01/31] zmssqldb.zmi_filter_form --- Products/zms/zpt/ZMSSqlDb/manage_main.zpt | 122 ++++------------------ 1 file changed, 19 insertions(+), 103 deletions(-) diff --git a/Products/zms/zpt/ZMSSqlDb/manage_main.zpt b/Products/zms/zpt/ZMSSqlDb/manage_main.zpt index ccc511f4e..7554afc2f 100644 --- a/Products/zms/zpt/ZMSSqlDb/manage_main.zpt +++ b/Products/zms/zpt/ZMSSqlDb/manage_main.zpt @@ -86,116 +86,32 @@ - -
- - - - -
- -
- -
change_dt by change_uid
-
-
-
- - Createad: %d.%m.%Y by %s, - - %i Objects, - %i Bytes, - unique-id -
-
- -
- - - the label - -
-
- -
-
- -
- -
-
- -
-
- -
-
- -
-
- -
-
-
-
- - -   - - · - -
-
resSlctStmnt
-
-
-
-
- - - metaobj_recordset_main_grid + + + + metaobj_recordset_main_grid + - - + + + + +
+ +
+ +
change_dt by change_uid
+
+
+
+ + Createad: %d.%m.%Y by %s, + + %i Objects, + %i Bytes, + unique-id +
+
+ +
+ + + the label + +
+
+ +
+
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ + +   + + · + +
+
resSlctStmnt
+
+
+
+ diff --git a/Products/zms/zpt/ZMSSqlDb/zmi_details_form.zpt b/Products/zms/zpt/ZMSSqlDb/zmi_details_form.zpt index 1d69b6edb..493579dec 100644 --- a/Products/zms/zpt/ZMSSqlDb/zmi_details_form.zpt +++ b/Products/zms/zpt/ZMSSqlDb/zmi_details_form.zpt @@ -45,7 +45,7 @@
- - - recordSet_Insert= - recordSet_Update= - recordSet_Delete= From 5ea40bfd8ea4c74bc24bcd4f7beb5518dcbc390c Mon Sep 17 00:00:00 2001 From: drfho Date: Mon, 15 May 2023 23:07:32 +0200 Subject: [PATCH 04/31] type fix, whitespace cherrypick: https://github.com/zms-publishing/ZMS/commit/bee60d3dcd40ffc86d6e486d4b8bfd0649d0e56c --- Products/zms/zmssqldb.py | 4 ++-- Products/zms/zpt/ZMS/index.zpt | 33 ++++++++++++++++----------------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/Products/zms/zmssqldb.py b/Products/zms/zmssqldb.py index 883e74f63..1af4f5933 100644 --- a/Products/zms/zmssqldb.py +++ b/Products/zms/zmssqldb.py @@ -255,8 +255,8 @@ def sql_quote__(self, tablename, columnname, v): except: return "NULL" else: - if v.find("\'") >= 0: - v=''.join(v.split("\'")) + if str(v).find("\'") >= 0: + v=''.join(str(v).split("\'")) return "'%s'"%v diff --git a/Products/zms/zpt/ZMS/index.zpt b/Products/zms/zpt/ZMS/index.zpt index 4c6d02764..0ac3c5538 100644 --- a/Products/zms/zpt/ZMS/index.zpt +++ b/Products/zms/zpt/ZMS/index.zpt @@ -2,11 +2,10 @@ ### Initialize request.
--- Raise unauthorized --- ### Response status f_standard_html_request Date: Thu, 1 Jun 2023 22:45:13 +0200 Subject: [PATCH 05/31] fixing/reconstructing ZMI --- Products/zms/zmssqldb.py | 2 +- Products/zms/zpt/ZMSSqlDb/filter_form.zpt | 11 +- Products/zms/zpt/ZMSSqlDb/input_form.zpt | 402 +++++++++++----------- Products/zms/zpt/ZMSSqlDb/manage_main.zpt | 258 +++++++------- 4 files changed, 344 insertions(+), 329 deletions(-) diff --git a/Products/zms/zmssqldb.py b/Products/zms/zmssqldb.py index 1af4f5933..f48ec4e4f 100644 --- a/Products/zms/zmssqldb.py +++ b/Products/zms/zmssqldb.py @@ -115,7 +115,7 @@ class ZMSSqlDb(zmscustom.ZMSCustom): # Management Interface. # --------------------- - zmi_input_form = PageTemplateFile('zpt/ZMSSqlDb/filter_form', globals()) + zmi_filter_form = PageTemplateFile('zpt/ZMSSqlDb/filter_form', globals()) zmi_input_form = PageTemplateFile('zpt/ZMSSqlDb/input_form', globals()) manage_zmi_details_grid = PageTemplateFile('zpt/ZMSSqlDb/zmi_details_grid', globals()) manage_zmi_details_form = PageTemplateFile('zpt/ZMSSqlDb/zmi_details_form', globals()) diff --git a/Products/zms/zpt/ZMSSqlDb/filter_form.zpt b/Products/zms/zpt/ZMSSqlDb/filter_form.zpt index 92456ef38..ce6c59e1f 100644 --- a/Products/zms/zpt/ZMSSqlDb/filter_form.zpt +++ b/Products/zms/zpt/ZMSSqlDb/filter_form.zpt @@ -1,4 +1,11 @@ -
+ + + @@ -81,3 +88,5 @@ + +
\ No newline at end of file diff --git a/Products/zms/zpt/ZMSSqlDb/input_form.zpt b/Products/zms/zpt/ZMSSqlDb/input_form.zpt index 52a45b31e..729938f02 100644 --- a/Products/zms/zpt/ZMSSqlDb/input_form.zpt +++ b/Products/zms/zpt/ZMSSqlDb/input_form.zpt @@ -10,226 +10,226 @@ input_form python:options.get('input_form',True); request_form_inherit python:['lang','preview','qentity']+options.get('request_form_inherit',[]);"> -
- - - - - - - -
- -
- - - - - -
+ + + + + + + + +
+ +
+ + + - table interface element + +
- - ##### Label ############################################################ - - - - - ##### Password ######################################################### - -
- - -
+ table interface element - - ##### Auto ############################################################# - -
-
- - the value -
-
- - the value -
- -
+ + ##### Label ############################################################ + + - - ##### Fk ############################################################### - -
- - - -
- - -
- -
-
+ + ##### Password ######################################################### -
- - - the control +
+ + +
+ + + ##### Auto ############################################################# -
- - the control - - -
-
+
+
+ + the value +
+
+ + the value +
+ +
- - ##### Multiselect ###################################################### - -
- - - - -
- -
-
-
- - -
-
-
-
- - the control - - -
+
+ + + +
+ + +
+ +
+
+
+
+ + + the control + + + + the control + + +
+
- - ##### Multimultiselect ################################################# - -
- -
-
- -
- - - -
-
- the control -
+ + ##### Multiselect ###################################################### + +
+ + -
- - -
-
- + + + + +
+
+
+ + +
+
+
- -
-
-
- -
+ + the control + + +
- - ##### Default ########################################################## - -
- the control - -
+ + ##### Multimultiselect ################################################# + +
+ +
+
+ +
+ + + +
+
+ the control +
+
+
+ + +
+
+ +
+
+
+ +
-
+ + ##### Default ########################################################## + +
+ the control + +
- - ##### Password (Confirm) ################################################# - -
- -
- -
-
+
- - - + + ##### Password (Confirm) ################################################# + +
+ +
+ +
+
+ + + + -
-
-
- +
+
+
+ +
+ +
- - -
-
+
-
-
+
+
-
+
-zmi_html_head - -
zmi_body_header
-
-zmi_breadcrumbs + zmi_html_head + - +
zmi_body_header
- +
+ zmi_breadcrumbs - + - - + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - metaobj_recordset_main_grid - - - + + + Filter Form + + + + metaobj_recordset_main_grid + + + - - - - metaobj_recordset_input_fields - - - - - metaobj_recordset_input_fields - + + + + metaobj_recordset_input_fields + + + - - - + + metaobj_recordset_input_fields + + + + + -
-
zmi_body_footer
- +
+
zmi_body_footer
+ From 85ff82a8c8577897f0b52e303255760493d85401 Mon Sep 17 00:00:00 2001 From: zmsdev Date: Wed, 14 Jun 2023 18:29:43 +0200 Subject: [PATCH 06/31] extracting main ZMI --- Products/zms/zmssqldb.py | 1 + Products/zms/zpt/ZMSSqlDb/ main.zpt | 125 ++++++++++++++++++++ Products/zms/zpt/ZMSSqlDb/manage_main.zpt | 134 +--------------------- 3 files changed, 128 insertions(+), 132 deletions(-) create mode 100644 Products/zms/zpt/ZMSSqlDb/ main.zpt diff --git a/Products/zms/zmssqldb.py b/Products/zms/zmssqldb.py index f48ec4e4f..52b86938c 100644 --- a/Products/zms/zmssqldb.py +++ b/Products/zms/zmssqldb.py @@ -117,6 +117,7 @@ class ZMSSqlDb(zmscustom.ZMSCustom): # --------------------- zmi_filter_form = PageTemplateFile('zpt/ZMSSqlDb/filter_form', globals()) zmi_input_form = PageTemplateFile('zpt/ZMSSqlDb/input_form', globals()) + zmi_main = PageTemplateFile('zpt/ZMSSqlDb/main', globals()) manage_zmi_details_grid = PageTemplateFile('zpt/ZMSSqlDb/zmi_details_grid', globals()) manage_zmi_details_form = PageTemplateFile('zpt/ZMSSqlDb/zmi_details_form', globals()) manage_zmi_lazy_select_form = PageTemplateFile('zpt/ZMSSqlDb/zmi_lazy_select_form', globals()) diff --git a/Products/zms/zpt/ZMSSqlDb/ main.zpt b/Products/zms/zpt/ZMSSqlDb/ main.zpt new file mode 100644 index 000000000..517c7aec1 --- /dev/null +++ b/Products/zms/zpt/ZMSSqlDb/ main.zpt @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Filter Form + + + + metaobj_recordset_main_grid + + + + + + + + metaobj_recordset_input_fields + + + + + + metaobj_recordset_input_fields + + + + + diff --git a/Products/zms/zpt/ZMSSqlDb/manage_main.zpt b/Products/zms/zpt/ZMSSqlDb/manage_main.zpt index aa3cb3f9d..9d26108ea 100644 --- a/Products/zms/zpt/ZMSSqlDb/manage_main.zpt +++ b/Products/zms/zpt/ZMSSqlDb/manage_main.zpt @@ -1,8 +1,5 @@ - + zmi_html_head -
zmi_body_header
-
zmi_breadcrumbs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Filter Form - - - - metaobj_recordset_main_grid - - - - - - - - metaobj_recordset_input_fields - - - - - - metaobj_recordset_input_fields - - - - - - + zmi_main
zmi_body_footer
From fd780859019d960de4027a2468840cf094eebd26 Mon Sep 17 00:00:00 2001 From: zmsbot Date: Wed, 14 Jun 2023 20:16:33 +0200 Subject: [PATCH 07/31] fixed filename --- Products/zms/zpt/ZMSSqlDb/{ main.zpt => main.zpt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Products/zms/zpt/ZMSSqlDb/{ main.zpt => main.zpt} (100%) diff --git a/Products/zms/zpt/ZMSSqlDb/ main.zpt b/Products/zms/zpt/ZMSSqlDb/main.zpt similarity index 100% rename from Products/zms/zpt/ZMSSqlDb/ main.zpt rename to Products/zms/zpt/ZMSSqlDb/main.zpt From 71b4b74014769a972a79d8207c1b5630e3d5d951 Mon Sep 17 00:00:00 2001 From: zmsdev Date: Wed, 14 Jun 2023 22:01:15 +0200 Subject: [PATCH 08/31] request.form handling --- Products/zms/ZMSMetaobjManager.py | 4 ++-- Products/zms/ZMSZCatalogConnector.py | 2 +- Products/zms/standard.py | 2 +- Products/zms/zmsobject.py | 4 ++-- Products/zms/zmssqldb.py | 13 +++++-------- 5 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Products/zms/ZMSMetaobjManager.py b/Products/zms/ZMSMetaobjManager.py index 27dbbeb78..4b477bca6 100644 --- a/Products/zms/ZMSMetaobjManager.py +++ b/Products/zms/ZMSMetaobjManager.py @@ -1176,14 +1176,14 @@ def manage_changeProperties(self, lang, btn='', key='all', REQUEST=None, RESPONS message += self.setMetaobjAttr( id, None, attr_id, newName, newMandatory, newMultilang, newRepetitive, newType, newKeys, newCustom, newDefault) message += self.getZMILangStr('MSG_INSERTED')%attr_id # Lang-Dict. - for key in REQUEST.form.keys(): + for key in REQUEST.form: if key.startswith('_lang_dict_key_'): i = int(key[len('_lang_dict_key_'):]) if REQUEST[key]: lang_dict = self.get_lang_dict() k = '%s.%s'%(id,REQUEST[key].strip()) lang_dict[k] = {} - for key2 in REQUEST.form.keys(): + for key2 in REQUEST.form: if key2.startswith('_lang_dict_value_%i_'%i): lang_id = key2[len('_lang_dict_value_%i_'%i):] lang_dict[k][lang_id] = REQUEST[key2].strip() diff --git a/Products/zms/ZMSZCatalogConnector.py b/Products/zms/ZMSZCatalogConnector.py index 5d833832e..a378fa3ad 100644 --- a/Products/zms/ZMSZCatalogConnector.py +++ b/Products/zms/ZMSZCatalogConnector.py @@ -253,7 +253,7 @@ def search_xml(self, q, page_index=0, page_size=10, debug=0, REQUEST=None, RESPO xml += '' xml += '%i'%status xml += '' - for key in REQUEST.form.keys(): + for key in REQUEST.form: xml += '%s'%(key, standard.html_quote(REQUEST.form[key])) xml += '' xml += '' diff --git a/Products/zms/standard.py b/Products/zms/standard.py index f46885751..6a3eaecde 100644 --- a/Products/zms/standard.py +++ b/Products/zms/standard.py @@ -363,7 +363,7 @@ def url_inherit_params(url, REQUEST, exclude=[], sep='&'): anchor = url[i:] url = url[:i] if REQUEST.form: - for key in REQUEST.form.keys(): + for key in REQUEST.form: if not key in exclude: v = REQUEST.form.get( key, None ) if key is not None: diff --git a/Products/zms/zmsobject.py b/Products/zms/zmsobject.py index b7a90375d..fc40b40c6 100644 --- a/Products/zms/zmsobject.py +++ b/Products/zms/zmsobject.py @@ -1274,7 +1274,7 @@ def ajaxGetParentNodes(self, lang, xml_header=True, meta_types=None, REQUEST=Non xml += self.getXmlHeader() # Start-tag. xml += " 0: if tablename not in [x['id'] for x in tabledefs]: tablename = tabledefs[0]['id'] - tablename = REQUEST.form.get('qentity', tablename) + tablename = REQUEST.get('qentity', tablename) tabledef = [x for x in tabledefs if x['id'].upper()==tablename.upper()][0] sqlStatement.append( self.recordSet_Select( tablename)) tablecols = tabledef['columns'] # Primary Key. - primary_key = [x['id'] for x in tablecols if x.get('pk', 0)==1] - primary_key.append(None) - #-- Set environment. + primary_key = [x['id'] for x in tablecols if x.get('pk', 0)]+[None] + # Set environment. standard.set_session_value(self,'qentity_%s'%self.id, tablename) REQUEST.set('qentity', tablename) REQUEST.set('tabledef', tabledef) @@ -1204,7 +1201,7 @@ def recordSet_Filter(self, REQUEST): # reset session-value standard.set_session_value(self, sessionkey, '') # get value from request - requestvalue = REQUEST.form.get(requestkey, '') + requestvalue = REQUEST.get(requestkey, '') # reset value if REQUEST.get('btn') == 'BTN_RESET': requestvalue = '' From d22234e0e66e5334ec54ef1713a225749f1a559b Mon Sep 17 00:00:00 2001 From: zmsbot Date: Thu, 15 Jun 2023 21:14:52 +0200 Subject: [PATCH 09/31] fix eventually missing manage_lang --- Products/zms/zpt/ZMSRecordSet/main_grid.zpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Products/zms/zpt/ZMSRecordSet/main_grid.zpt b/Products/zms/zpt/ZMSRecordSet/main_grid.zpt index 7b5206bf0..b5dc9db0d 100644 --- a/Products/zms/zpt/ZMSRecordSet/main_grid.zpt +++ b/Products/zms/zpt/ZMSRecordSet/main_grid.zpt @@ -198,7 +198,7 @@ tal:content="structure python:(here.operator_gettype(elValue) is not str) and elValue.getFilename() or elValue">filename
elValueelValueelValue Date: Thu, 15 Jun 2023 22:03:22 +0200 Subject: [PATCH 10/31] replace deprecated js-substr with substring --- .../opensearch/script.js | 2 +- .../ZMSLib/show_version.zpt | 6 +-- .../ZMSLinkElement/inferface0.zpt | 2 +- .../ZMSObjectSet/script.zmi.js | 4 +- .../ZMSTable/interface0.zpt | 6 +-- Products/zms/manage_addzmsform.zpt | 4 +- .../zms/plugins/rte/ckeditor/manage_form.zpt | 4 +- .../zms/plugins/rte/tinymce/manage_form.zpt | 2 +- .../bootstrap/plugin/bootstrap.plugin.zmi.js | 42 +++++++++---------- Products/zms/plugins/www/zmi.core.js | 20 ++++----- Products/zms/plugins/www/zmi.internal.js | 14 +++---- 11 files changed, 52 insertions(+), 54 deletions(-) diff --git a/Products/zms/conf/metaobj_manager/com.zms.foundation.zcatalog.opensearch/opensearch/script.js b/Products/zms/conf/metaobj_manager/com.zms.foundation.zcatalog.opensearch/opensearch/script.js index 90bdfd7a6..b2f854c52 100644 --- a/Products/zms/conf/metaobj_manager/com.zms.foundation.zcatalog.opensearch/opensearch/script.js +++ b/Products/zms/conf/metaobj_manager/com.zms.foundation.zcatalog.opensearch/opensearch/script.js @@ -70,7 +70,7 @@ $(function() { hit['snippet'] = source['attachment']['content']; } if (hit['snippet'].length > 200) { - hit['snippet'] = hit['snippet'].substr(0,200) + '...'; + hit['snippet'] = hit['snippet'].substring(0,200) + '...'; } res_processed.hits.push(hit) }) diff --git a/Products/zms/conf/metaobj_manager/com.zms.foundation/ZMSLib/show_version.zpt b/Products/zms/conf/metaobj_manager/com.zms.foundation/ZMSLib/show_version.zpt index 6402a25e5..cc11af3b4 100644 --- a/Products/zms/conf/metaobj_manager/com.zms.foundation/ZMSLib/show_version.zpt +++ b/Products/zms/conf/metaobj_manager/com.zms.foundation/ZMSLib/show_version.zpt @@ -3,11 +3,10 @@ - - - -
- -
- -
change_dt by change_uid
-
-
-
- - Createad: %d.%m.%Y by %s, - - %i Objects, - %i Bytes, - unique-id -
-
- -
- - - the label - -
-
- -
-
- -
- -
-
- -
-
- -
-
- -
-
- -
-
-
-
- - -   - - · - -
-
resSlctStmnt
-
-
-
- - - - metaobj_recordset_main_grid + + + + metaobj_recordset_main_grid + - - + + + + +
+ +
+ +
change_dt by change_uid
+
+
+
+ + Createad: %d.%m.%Y by %s, + + %i Objects, + %i Bytes, + unique-id +
+
+ +
+ + + the label + +
+
+ +
+
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ + +   + + · + +
+
resSlctStmnt
+
+
+
+ diff --git a/Products/zms/zpt/ZMSSqlDb/zmi_details_form.zpt b/Products/zms/zpt/ZMSSqlDb/zmi_details_form.zpt index 1d69b6edb..493579dec 100644 --- a/Products/zms/zpt/ZMSSqlDb/zmi_details_form.zpt +++ b/Products/zms/zpt/ZMSSqlDb/zmi_details_form.zpt @@ -45,7 +45,7 @@
- - - recordSet_Insert= - recordSet_Update= - recordSet_Delete= From 2cbc7ca5be280e0a3e5a8659c4f64f75579eb0be Mon Sep 17 00:00:00 2001 From: drfho Date: Mon, 15 May 2023 23:07:32 +0200 Subject: [PATCH 16/31] type fix, whitespace cherrypick: https://github.com/zms-publishing/ZMS/commit/bee60d3dcd40ffc86d6e486d4b8bfd0649d0e56c --- Products/zms/zmssqldb.py | 4 ++-- Products/zms/zpt/ZMS/index.zpt | 33 ++++++++++++++++----------------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/Products/zms/zmssqldb.py b/Products/zms/zmssqldb.py index 883e74f63..1af4f5933 100644 --- a/Products/zms/zmssqldb.py +++ b/Products/zms/zmssqldb.py @@ -255,8 +255,8 @@ def sql_quote__(self, tablename, columnname, v): except: return "NULL" else: - if v.find("\'") >= 0: - v=''.join(v.split("\'")) + if str(v).find("\'") >= 0: + v=''.join(str(v).split("\'")) return "'%s'"%v diff --git a/Products/zms/zpt/ZMS/index.zpt b/Products/zms/zpt/ZMS/index.zpt index 4c6d02764..0ac3c5538 100644 --- a/Products/zms/zpt/ZMS/index.zpt +++ b/Products/zms/zpt/ZMS/index.zpt @@ -2,11 +2,10 @@ ### Initialize request.
--- Raise unauthorized --- ### Response status f_standard_html_request Date: Thu, 1 Jun 2023 22:45:13 +0200 Subject: [PATCH 17/31] fixing/reconstructing ZMI --- Products/zms/zmssqldb.py | 2 +- Products/zms/zpt/ZMSSqlDb/filter_form.zpt | 11 +- Products/zms/zpt/ZMSSqlDb/input_form.zpt | 402 +++++++++++----------- Products/zms/zpt/ZMSSqlDb/manage_main.zpt | 258 +++++++------- 4 files changed, 344 insertions(+), 329 deletions(-) diff --git a/Products/zms/zmssqldb.py b/Products/zms/zmssqldb.py index 1af4f5933..f48ec4e4f 100644 --- a/Products/zms/zmssqldb.py +++ b/Products/zms/zmssqldb.py @@ -115,7 +115,7 @@ class ZMSSqlDb(zmscustom.ZMSCustom): # Management Interface. # --------------------- - zmi_input_form = PageTemplateFile('zpt/ZMSSqlDb/filter_form', globals()) + zmi_filter_form = PageTemplateFile('zpt/ZMSSqlDb/filter_form', globals()) zmi_input_form = PageTemplateFile('zpt/ZMSSqlDb/input_form', globals()) manage_zmi_details_grid = PageTemplateFile('zpt/ZMSSqlDb/zmi_details_grid', globals()) manage_zmi_details_form = PageTemplateFile('zpt/ZMSSqlDb/zmi_details_form', globals()) diff --git a/Products/zms/zpt/ZMSSqlDb/filter_form.zpt b/Products/zms/zpt/ZMSSqlDb/filter_form.zpt index 92456ef38..ce6c59e1f 100644 --- a/Products/zms/zpt/ZMSSqlDb/filter_form.zpt +++ b/Products/zms/zpt/ZMSSqlDb/filter_form.zpt @@ -1,4 +1,11 @@ -
+ + + @@ -81,3 +88,5 @@
+ +
\ No newline at end of file diff --git a/Products/zms/zpt/ZMSSqlDb/input_form.zpt b/Products/zms/zpt/ZMSSqlDb/input_form.zpt index 52a45b31e..729938f02 100644 --- a/Products/zms/zpt/ZMSSqlDb/input_form.zpt +++ b/Products/zms/zpt/ZMSSqlDb/input_form.zpt @@ -10,226 +10,226 @@ input_form python:options.get('input_form',True); request_form_inherit python:['lang','preview','qentity']+options.get('request_form_inherit',[]);"> -
- - - - - - - -
- -
- - - - - -
+ + + + + + + + +
+ +
+ + + - table interface element + +
- - ##### Label ############################################################ - - - - - ##### Password ######################################################### - -
- - -
+ table interface element - - ##### Auto ############################################################# - -
-
- - the value -
-
- - the value -
- -
+ + ##### Label ############################################################ + + - - ##### Fk ############################################################### - -
- - - -
- - -
- -
-
+ + ##### Password ######################################################### -
- - - the control +
+ + +
+ + + ##### Auto ############################################################# -
- - the control - - -
-
+
+
+ + the value +
+
+ + the value +
+ +
- - ##### Multiselect ###################################################### - -
- - - - -
- -
-
-
- - -
-
-
-
- - the control - - -
+
+ + + +
+ + +
+ +
+
+
+
+ + + the control + + + + the control + + +
+
- - ##### Multimultiselect ################################################# - -
- -
-
- -
- - - -
-
- the control -
+ + ##### Multiselect ###################################################### + +
+ + -
- - -
-
- + + + + +
+
+
+ + +
+
+
- -
-
-
- -
+ + the control + + +
- - ##### Default ########################################################## - -
- the control - -
+ + ##### Multimultiselect ################################################# + +
+ +
+
+ +
+ + + +
+
+ the control +
+
+
+ + +
+
+ +
+
+
+ +
-
+ + ##### Default ########################################################## + +
+ the control + +
- - ##### Password (Confirm) ################################################# - -
- -
- -
-
+
- - - + + ##### Password (Confirm) ################################################# + +
+ +
+ +
+
+ + + + -
-
-
- +
+
+
+ +
+ +
- - -
-
+
-
-
+
+
-
+
-zmi_html_head - -
zmi_body_header
-
-zmi_breadcrumbs + zmi_html_head + - +
zmi_body_header
- +
+ zmi_breadcrumbs - + - - + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - metaobj_recordset_main_grid - - - + + + Filter Form + + + + metaobj_recordset_main_grid + + + - - - - metaobj_recordset_input_fields - - - - - metaobj_recordset_input_fields - + + + + metaobj_recordset_input_fields + + + - - - + + metaobj_recordset_input_fields + + + + + -
-
zmi_body_footer
- +
+
zmi_body_footer
+ From 6eaa05aa024040ca3646ce37f30910dd90029131 Mon Sep 17 00:00:00 2001 From: zmsdev Date: Wed, 14 Jun 2023 18:29:43 +0200 Subject: [PATCH 18/31] extracting main ZMI --- Products/zms/zmssqldb.py | 1 + Products/zms/zpt/ZMSSqlDb/ main.zpt | 125 ++++++++++++++++++++ Products/zms/zpt/ZMSSqlDb/manage_main.zpt | 134 +--------------------- 3 files changed, 128 insertions(+), 132 deletions(-) create mode 100644 Products/zms/zpt/ZMSSqlDb/ main.zpt diff --git a/Products/zms/zmssqldb.py b/Products/zms/zmssqldb.py index f48ec4e4f..52b86938c 100644 --- a/Products/zms/zmssqldb.py +++ b/Products/zms/zmssqldb.py @@ -117,6 +117,7 @@ class ZMSSqlDb(zmscustom.ZMSCustom): # --------------------- zmi_filter_form = PageTemplateFile('zpt/ZMSSqlDb/filter_form', globals()) zmi_input_form = PageTemplateFile('zpt/ZMSSqlDb/input_form', globals()) + zmi_main = PageTemplateFile('zpt/ZMSSqlDb/main', globals()) manage_zmi_details_grid = PageTemplateFile('zpt/ZMSSqlDb/zmi_details_grid', globals()) manage_zmi_details_form = PageTemplateFile('zpt/ZMSSqlDb/zmi_details_form', globals()) manage_zmi_lazy_select_form = PageTemplateFile('zpt/ZMSSqlDb/zmi_lazy_select_form', globals()) diff --git a/Products/zms/zpt/ZMSSqlDb/ main.zpt b/Products/zms/zpt/ZMSSqlDb/ main.zpt new file mode 100644 index 000000000..517c7aec1 --- /dev/null +++ b/Products/zms/zpt/ZMSSqlDb/ main.zpt @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Filter Form + + + + metaobj_recordset_main_grid + + + + + + + + metaobj_recordset_input_fields + + + + + + metaobj_recordset_input_fields + + + + + diff --git a/Products/zms/zpt/ZMSSqlDb/manage_main.zpt b/Products/zms/zpt/ZMSSqlDb/manage_main.zpt index aa3cb3f9d..9d26108ea 100644 --- a/Products/zms/zpt/ZMSSqlDb/manage_main.zpt +++ b/Products/zms/zpt/ZMSSqlDb/manage_main.zpt @@ -1,8 +1,5 @@ - + zmi_html_head -
zmi_body_header
-
zmi_breadcrumbs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Filter Form - - - - metaobj_recordset_main_grid - - - - - - - - metaobj_recordset_input_fields - - - - - - metaobj_recordset_input_fields - - - - - - + zmi_main
zmi_body_footer
From 7411647ea09aefbf8a753618907e4ae66a60e09e Mon Sep 17 00:00:00 2001 From: zmsbot Date: Wed, 14 Jun 2023 20:16:33 +0200 Subject: [PATCH 19/31] fixed filename --- Products/zms/zpt/ZMSSqlDb/{ main.zpt => main.zpt} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Products/zms/zpt/ZMSSqlDb/{ main.zpt => main.zpt} (100%) diff --git a/Products/zms/zpt/ZMSSqlDb/ main.zpt b/Products/zms/zpt/ZMSSqlDb/main.zpt similarity index 100% rename from Products/zms/zpt/ZMSSqlDb/ main.zpt rename to Products/zms/zpt/ZMSSqlDb/main.zpt From b3f79e64ef5da9ebb0358653d49c1e6b5a570452 Mon Sep 17 00:00:00 2001 From: zmsdev Date: Wed, 14 Jun 2023 22:01:15 +0200 Subject: [PATCH 20/31] request.form handling --- Products/zms/ZMSZCatalogConnector.py | 2 +- Products/zms/standard.py | 2 +- Products/zms/zmsobject.py | 4 ++-- Products/zms/zmssqldb.py | 13 +++++-------- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/Products/zms/ZMSZCatalogConnector.py b/Products/zms/ZMSZCatalogConnector.py index 5d833832e..a378fa3ad 100644 --- a/Products/zms/ZMSZCatalogConnector.py +++ b/Products/zms/ZMSZCatalogConnector.py @@ -253,7 +253,7 @@ def search_xml(self, q, page_index=0, page_size=10, debug=0, REQUEST=None, RESPO xml += '' xml += '%i'%status xml += '' - for key in REQUEST.form.keys(): + for key in REQUEST.form: xml += '%s'%(key, standard.html_quote(REQUEST.form[key])) xml += '' xml += '' diff --git a/Products/zms/standard.py b/Products/zms/standard.py index f46885751..6a3eaecde 100644 --- a/Products/zms/standard.py +++ b/Products/zms/standard.py @@ -363,7 +363,7 @@ def url_inherit_params(url, REQUEST, exclude=[], sep='&'): anchor = url[i:] url = url[:i] if REQUEST.form: - for key in REQUEST.form.keys(): + for key in REQUEST.form: if not key in exclude: v = REQUEST.form.get( key, None ) if key is not None: diff --git a/Products/zms/zmsobject.py b/Products/zms/zmsobject.py index b7a90375d..fc40b40c6 100644 --- a/Products/zms/zmsobject.py +++ b/Products/zms/zmsobject.py @@ -1274,7 +1274,7 @@ def ajaxGetParentNodes(self, lang, xml_header=True, meta_types=None, REQUEST=Non xml += self.getXmlHeader() # Start-tag. xml += " 0: if tablename not in [x['id'] for x in tabledefs]: tablename = tabledefs[0]['id'] - tablename = REQUEST.form.get('qentity', tablename) + tablename = REQUEST.get('qentity', tablename) tabledef = [x for x in tabledefs if x['id'].upper()==tablename.upper()][0] sqlStatement.append( self.recordSet_Select( tablename)) tablecols = tabledef['columns'] # Primary Key. - primary_key = [x['id'] for x in tablecols if x.get('pk', 0)==1] - primary_key.append(None) - #-- Set environment. + primary_key = [x['id'] for x in tablecols if x.get('pk', 0)]+[None] + # Set environment. standard.set_session_value(self,'qentity_%s'%self.id, tablename) REQUEST.set('qentity', tablename) REQUEST.set('tabledef', tabledef) @@ -1204,7 +1201,7 @@ def recordSet_Filter(self, REQUEST): # reset session-value standard.set_session_value(self, sessionkey, '') # get value from request - requestvalue = REQUEST.form.get(requestkey, '') + requestvalue = REQUEST.get(requestkey, '') # reset value if REQUEST.get('btn') == 'BTN_RESET': requestvalue = '' From 6a4eb6e2587311ebbd8641f5dbe656c67481ca6c Mon Sep 17 00:00:00 2001 From: zmsbot Date: Thu, 15 Jun 2023 21:14:52 +0200 Subject: [PATCH 21/31] fix eventually missing manage_lang --- Products/zms/zpt/ZMSRecordSet/main_grid.zpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Products/zms/zpt/ZMSRecordSet/main_grid.zpt b/Products/zms/zpt/ZMSRecordSet/main_grid.zpt index 7b5206bf0..b5dc9db0d 100644 --- a/Products/zms/zpt/ZMSRecordSet/main_grid.zpt +++ b/Products/zms/zpt/ZMSRecordSet/main_grid.zpt @@ -198,7 +198,7 @@ tal:content="structure python:(here.operator_gettype(elValue) is not str) and elValue.getFilename() or elValue">filename
elValueelValueelValue Date: Thu, 15 Jun 2023 22:03:22 +0200 Subject: [PATCH 22/31] replace deprecated js-substr with substring --- .../opensearch/script.js | 2 +- .../ZMSLib/show_version.zpt | 6 +-- .../ZMSLinkElement/inferface0.zpt | 2 +- .../ZMSObjectSet/script.zmi.js | 4 +- .../ZMSTable/interface0.zpt | 6 +-- Products/zms/manage_addzmsform.zpt | 4 +- .../zms/plugins/rte/ckeditor/manage_form.zpt | 4 +- .../zms/plugins/rte/tinymce/manage_form.zpt | 2 +- .../bootstrap/plugin/bootstrap.plugin.zmi.js | 42 +++++++++---------- Products/zms/plugins/www/zmi.core.js | 20 ++++----- Products/zms/plugins/www/zmi.internal.js | 14 +++---- 11 files changed, 52 insertions(+), 54 deletions(-) diff --git a/Products/zms/conf/metaobj_manager/com.zms.foundation.zcatalog.opensearch/opensearch/script.js b/Products/zms/conf/metaobj_manager/com.zms.foundation.zcatalog.opensearch/opensearch/script.js index 90bdfd7a6..b2f854c52 100644 --- a/Products/zms/conf/metaobj_manager/com.zms.foundation.zcatalog.opensearch/opensearch/script.js +++ b/Products/zms/conf/metaobj_manager/com.zms.foundation.zcatalog.opensearch/opensearch/script.js @@ -70,7 +70,7 @@ $(function() { hit['snippet'] = source['attachment']['content']; } if (hit['snippet'].length > 200) { - hit['snippet'] = hit['snippet'].substr(0,200) + '...'; + hit['snippet'] = hit['snippet'].substring(0,200) + '...'; } res_processed.hits.push(hit) }) diff --git a/Products/zms/conf/metaobj_manager/com.zms.foundation/ZMSLib/show_version.zpt b/Products/zms/conf/metaobj_manager/com.zms.foundation/ZMSLib/show_version.zpt index 6402a25e5..cc11af3b4 100644 --- a/Products/zms/conf/metaobj_manager/com.zms.foundation/ZMSLib/show_version.zpt +++ b/Products/zms/conf/metaobj_manager/com.zms.foundation/ZMSLib/show_version.zpt @@ -3,11 +3,10 @@ - + +
From 5781f174cc5b7ad930d74452ce247ccba0b1f576 Mon Sep 17 00:00:00 2001 From: zmsbot Date: Fri, 13 Dec 2024 08:30:23 +0100 Subject: [PATCH 31/31] added error 'Details tablename not found' --- Products/zms/zpt/ZMSSqlDb/manage_configuration.zpt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Products/zms/zpt/ZMSSqlDb/manage_configuration.zpt b/Products/zms/zpt/ZMSSqlDb/manage_configuration.zpt index d8cbf2148..1986377ed 100644 --- a/Products/zms/zpt/ZMSSqlDb/manage_configuration.zpt +++ b/Products/zms/zpt/ZMSSqlDb/manage_configuration.zpt @@ -282,10 +282,10 @@ function mms_normalize_rows(el_tbody) { - + the details-tablename @@ -298,10 +298,10 @@ function mms_normalize_rows(el_tbody) { - + the details-tablename