From 8480409f208096d422575541943647429093bebf Mon Sep 17 00:00:00 2001 From: Luis Majano Date: Fri, 20 Oct 2023 12:59:13 +0200 Subject: [PATCH] - fix for js for template break missing - fix for boolean formatting in dumb adobe that doesn't adhere to casting rules - improvement of remove all for custom fields with nice confirmations and only show when they exist. --- box.json | 8 ++-- config/modules/cbdebugger.cfc | 22 ++++++++--- .../resources/assets/js/editors/editors.js | 1 + .../views/_components/editor/CustomFields.cfm | 3 +- .../_components/editor/CustomFieldsHelper.cfm | 10 ++--- .../views/content/editorHelper.cfm | 39 ++++++++++++------- .../views/contentStore/index.cfm | 4 +- .../views/contentTemplates/index.cfm | 4 +- .../contentbox-admin/views/entries/index.cfm | 4 +- .../contentbox-admin/views/pages/index.cfm | 10 +++-- 10 files changed, 66 insertions(+), 39 deletions(-) diff --git a/box.json b/box.json index 73515f2f1..dcbbe46f8 100644 --- a/box.json +++ b/box.json @@ -33,14 +33,14 @@ "testbox":"^5.0.0+1", "commandbox-cfformat":"*", "commandbox-docbox":"*", - "route-visualizer":"^1.4.0+24", - "cbdebugger":"be" + "cbdebugger":"be", + "route-visualizer":"^2.0.0+6" }, "installPaths":{ "testbox":"testbox/", "coldbox":"coldbox/", - "route-visualizer":"modules/route-visualizer/", - "cbdebugger":"modules/cbdebugger/" + "cbdebugger":"modules/cbdebugger/", + "route-visualizer":"modules/route-visualizer/" }, "ignores":[], "scripts":{ diff --git a/config/modules/cbdebugger.cfc b/config/modules/cbdebugger.cfc index d20a96ae4..78bd8139e 100644 --- a/config/modules/cbdebugger.cfc +++ b/config/modules/cbdebugger.cfc @@ -7,15 +7,15 @@ component { enabled : getSystemSetting( "CBDEBUGGER_ENABLED", false ), // This setting controls if you will activate the debugger for visualizations ONLY // The debugger will still track requests even in non debug mode. - debugMode : false, + debugMode : true, // The URL password to use to activate it on demand debugPassword : "cb", // This flag enables/disables the end of request debugger panel docked to the bottem of the page. // If you disable i, then the only way to visualize the debugger is via the `/cbdebugger` endpoint - requestPanelDock : false, + requestPanelDock : true, // Request Tracker Options requestTracker : { - storage : "cachebox", + storage : "memory", cacheName : "template", trackDebuggerEvents : false, // Expand by default the tracker panel or not @@ -46,7 +46,7 @@ component { httpRequest : { expanded : false, // If enabled, we will profile HTTP Body content, disabled by default as it contains lots of data - profileHTTPBody : false + profileHTTPBody : true } }, // ColdBox Tracer Appender Messages @@ -80,7 +80,19 @@ component { // Log the binding parameters logParams : false }, - async : { enabled : false, expanded : false } + // Adobe ColdFusion SQL Collector + acfSql : { enabled : false, expanded : false, logParams : true }, + // Lucee SQL Collector + luceeSQL : { enabled : false, expanded : false, logParams : true }, + // Async Manager Collector + async : { enabled : true, expanded : false }, + // Hyper Collector + hyper : { + enabled : false, + expanded : false, + logResponseData : false, + logRequestBody : false + } }; } diff --git a/modules/contentbox/modules/contentbox-admin/resources/assets/js/editors/editors.js b/modules/contentbox/modules/contentbox-admin/resources/assets/js/editors/editors.js index 562311ae3..17a3706bb 100644 --- a/modules/contentbox/modules/contentbox-admin/resources/assets/js/editors/editors.js +++ b/modules/contentbox/modules/contentbox-admin/resources/assets/js/editors/editors.js @@ -612,6 +612,7 @@ window.applyContentTemplateToField = function( fieldName, definition ){ } } ); + break; } default:{ if ( $templateField[ 0 ].localName == "select" ){ diff --git a/modules/contentbox/modules/contentbox-admin/views/_components/editor/CustomFields.cfm b/modules/contentbox/modules/contentbox-admin/views/_components/editor/CustomFields.cfm index f4e88a1fd..23a3f5fce 100644 --- a/modules/contentbox/modules/contentbox-admin/views/_components/editor/CustomFields.cfm +++ b/modules/contentbox/modules/contentbox-admin/views/_components/editor/CustomFields.cfm @@ -28,7 +28,8 @@ type="button" id="removeCustomFieldsButton" class="btn btn-sm btn-danger" - @click="cleanCustomFields" + x-show="customFields.length > 0" + @click="removeAllCustomFields" > Remove All diff --git a/modules/contentbox/modules/contentbox-admin/views/_components/editor/CustomFieldsHelper.cfm b/modules/contentbox/modules/contentbox-admin/views/_components/editor/CustomFieldsHelper.cfm index f3785d040..248770c99 100644 --- a/modules/contentbox/modules/contentbox-admin/views/_components/editor/CustomFieldsHelper.cfm +++ b/modules/contentbox/modules/contentbox-admin/views/_components/editor/CustomFieldsHelper.cfm @@ -27,12 +27,10 @@ function customFieldsModel(){ this.customFields.push( newField ); }, - cleanCustomFields(){ - this.customFields.forEach( ( item, index ) => { - if( !item.key.trim() ){ - this.customFields.splice( index, 1 ); - } - } ); + removeAllCustomFields(){ + if( confirm( "Really delete all custom fields?" ) ){ + this.customFields = []; + } }, removeCustomField( field ){ diff --git a/modules/contentbox/modules/contentbox-admin/views/content/editorHelper.cfm b/modules/contentbox/modules/contentbox-admin/views/content/editorHelper.cfm index 4123c1f81..c7742c1f5 100755 --- a/modules/contentbox/modules/contentbox-admin/views/content/editorHelper.cfm +++ b/modules/contentbox/modules/contentbox-admin/views/content/editorHelper.cfm @@ -1,15 +1,19 @@