diff --git a/_build/templates/default/sass/_breakpoint-medium.scss b/_build/templates/default/sass/_breakpoint-medium.scss
new file mode 100644
index 00000000000..904e7d8c1b3
--- /dev/null
+++ b/_build/templates/default/sass/_breakpoint-medium.scss
@@ -0,0 +1,47 @@
+/* Medium screens, including small desktops and tablets */
+
+// Breakpoint for up to 1024px
+@include grid-media($tabletM) {
+
+}
+
+// Breakpoint for up to 960px
+@include grid-media($desktop) {
+ .x-window {
+ form {
+ .x-column-inner {
+ width: 100% !important;
+ }
+ .x-panel-body {
+ width: 100% !important;
+ }
+ }
+ .x-window-bc {
+ .x-window-footer {
+ padding: 15px;
+ }
+ }
+ &.qce-create,
+ &.qce-update {
+ .x-toolbar-cell {
+ margin-bottom: .75rem;
+ display: inline-block;
+ margin-right: 2%;
+ &:last-child {
+ margin-right: 0;
+ }
+ }
+ }
+ &.qce-create {
+ .x-toolbar-cell {
+ width: 49%;
+ }
+ }
+ &.qce-update {
+ .x-toolbar-cell {
+ width: 32%;
+ }
+ }
+ }
+
+}
diff --git a/_build/templates/default/sass/_breakpoint-small.scss b/_build/templates/default/sass/_breakpoint-small.scss
new file mode 100644
index 00000000000..f1d6f73ec7a
--- /dev/null
+++ b/_build/templates/default/sass/_breakpoint-small.scss
@@ -0,0 +1,20 @@
+// Breakpoint for up to tablet (portrait orientation) size 768px
+@include grid-media($tabletP) {
+
+}
+
+// Breakpoint for mobile size
+@include grid-media($mobile) {
+
+ .x-window {
+ &.qce-create,
+ &.qce-update {
+ .x-toolbar-cell {
+ display: block;
+ margin-right: 0;
+ width: 100%;
+ }
+ }
+ }
+
+}
diff --git a/_build/templates/default/sass/_colors-and-vars.scss b/_build/templates/default/sass/_colors-and-vars.scss
index fa3d6ad513f..92212d45672 100644
--- a/_build/templates/default/sass/_colors-and-vars.scss
+++ b/_build/templates/default/sass/_colors-and-vars.scss
@@ -3,6 +3,7 @@ $colorSplash: #234368;
$colorSplashLight: lighten($colorSplash, 50%);
$colorSplashMedium: lighten($colorSplash, 75%);
$colorSplashDark: darken($colorSplash, 20%);
+$colorSplashShadow: scale-color($colorSplash, $lightness: -70%, $saturation: -25%);
$colorSplashContrast: #FFFFFF; // needs much more adaption, should be used as text color for elements with $colorSplash background
$silver: #CCCCCC;
$gallery: #EEEEEE;
@@ -64,7 +65,7 @@ $borderRadius: 3px;
// Shadows
$boxShadow: 0 4px 6px rgba(0, 0, 0, 0.15);
-$boxShadowBig: 0 0 15px 0 rgba(0,0,0,0.2);
+$boxShadowBig: 0 0 15px 0 rgba($black,0.25);
$shadowBorder: 0 0 0 1px $borderColor;
$shadowBorderField: 0 0 0 1px $borderColor;
$shadowBorderDark: 0 0 0 1px $softGray;
diff --git a/_build/templates/default/sass/_forms.scss b/_build/templates/default/sass/_forms.scss
index 5216afed1ab..a044f233552 100644
--- a/_build/templates/default/sass/_forms.scss
+++ b/_build/templates/default/sass/_forms.scss
@@ -316,6 +316,10 @@ input::-moz-focus-inner {
.x-form-element {
padding: 0;
font: $baseText;
+ /* add margin to element without label, primarily for checkboxes/radios appearing after a regular field or help element */
+ &.add-label-space {
+ margin-top: 28px;
+ }
}
/* .x-form-element */
@@ -818,11 +822,12 @@ input::-moz-focus-inner {
/* .x-form-check-wrap */
/* Special checboxes for resources and tv configs */
#modx-resource-tabs,
-#modx-tv-tabs {
+#modx-tv-tabs,
+.x-window {
.x-form-check-wrap,
.x-fieldset-checkbox-toggle legend,
- .x-fieldset legend {
+ .x-fieldset legend{
[type="checkbox"]{
position: absolute;
@@ -1150,7 +1155,7 @@ input::-moz-focus-inner {
}
.x-form-grow-sizer {
- font: $fontSmall;
+ font: $baseText;
}
.x-form-invalid-msg {
diff --git a/_build/templates/default/sass/_windows.scss b/_build/templates/default/sass/_windows.scss
index 2b8ff87a67e..581cfbd927c 100644
--- a/_build/templates/default/sass/_windows.scss
+++ b/_build/templates/default/sass/_windows.scss
@@ -268,6 +268,11 @@
}
}
}
+ &.qce-window {
+ .x-window-body {
+ padding-top: 0;
+ }
+ }
}
/* .x-window */
@@ -299,20 +304,19 @@
/* the window modal mask, but also the mask that covers a grid when reloading for example */
.ext-el-mask {
- background-color: $white;
+ background-color: $colorSplashShadow;
opacity: 0;
- filter: alpha(opacity=0); /* for IE <= 8 */
transition: opacity .25s;
/*z-index: 10;*/ /* this is handeled by extjs and set to 9000 on show */
&.fade-in {
opacity: .5;
- filter: alpha(opacity=50); /* for IE <= 8 */
}
+ // This affects the grid mask
.x-masked & {
+ background-color: $white;
opacity: .5;
- filter: alpha(opacity=50); /* for IE <= 8 */
z-index: 9; /* extjs standard is 100, 10 prevents overlapping the topnav dropdowns */
}
}
diff --git a/_build/templates/default/sass/index.scss b/_build/templates/default/sass/index.scss
index 32f2b3ae016..02d3f5f37aa 100644
--- a/_build/templates/default/sass/index.scss
+++ b/_build/templates/default/sass/index.scss
@@ -2388,3 +2388,6 @@ iframe[classname="x-hidden"] {
margin-top: 0 !important;
}
}
+
+@import "breakpoint-medium";
+@import "breakpoint-small";
diff --git a/core/lexicon/en/chunk.inc.php b/core/lexicon/en/chunk.inc.php
index 21239d8da48..a171f853c46 100644
--- a/core/lexicon/en/chunk.inc.php
+++ b/core/lexicon/en/chunk.inc.php
@@ -6,12 +6,12 @@
* @package modx
* @subpackage lexicon
*/
+
+// Entry out of alpha order because it must come before the entry it's used in below
+$_lang['example_tag_chunk_name'] = 'NameOfChunk';
+
$_lang['chunk'] = 'Chunk';
-$_lang['chunk_desc_category'] = 'The Category this Chunk belongs in.';
-$_lang['chunk_desc_description'] = 'A short description of this chunk.';
-$_lang['chunk_desc_name'] = 'The name of this chunk. It will be available using the [[$nameOfChunk]] tags.';
-$_lang['chunk_code'] = 'Chunk code (html)';
-$_lang['chunk_desc'] = 'Description';
+$_lang['chunk_category_desc'] = 'Use to group Chunks within the Elements tree.';
$_lang['chunk_delete_confirm'] = 'Are you sure you want to delete this chunk?';
$_lang['chunk_duplicate_confirm'] = 'Are you sure you want to duplicate this chunk?';
$_lang['chunk_err_create'] = 'An error occurred while trying to create the chunk.';
@@ -26,11 +26,31 @@
$_lang['chunk_err_ns'] = 'Chunk not specified.';
$_lang['chunk_err_ns_name'] = 'Please specify a name.';
$_lang['chunk_lock'] = 'Lock chunk for editing';
-$_lang['chunk_lock_msg'] = 'Users must have the edit_locked attribute in order to edit this chunk.';
-$_lang['chunk_msg'] = 'Here you can create/edit chunks. Remember: Chunks are \'raw\' HTML code; so any PHP code won\'t be processed.';
-$_lang['chunk_name'] = 'Chunk name';
+$_lang['chunk_lock_desc'] = 'Only users with “edit_locked” permissions can edit this Chunk.';
+$_lang['chunk_name_desc'] = 'Place the content generated by this Chunk in a Resource, Template, or other Chunk using the following MODX tag: [[$'.$_lang['example_tag_chunk_name'].']]';
$_lang['chunk_new'] = 'Create Chunk';
$_lang['chunk_properties'] = 'Default Properties';
+$_lang['chunk_tab_general_desc'] = 'Here you can enter the basic attributes for this Chunk as well as its content. The content must be HTML, either placed in the Chunk Code field below or in a static external file, and may include MODX tags. Note, however, that PHP code will not run in this element.';
+$_lang['chunk_tag_copied'] = 'Chunk tag copied!';
$_lang['chunk_title'] = 'Create/edit chunk';
$_lang['chunk_untitled'] = 'Untitled Chunk';
$_lang['chunks'] = 'Chunks';
+
+// Temporarily match old keys to new ones to ensure compatibility
+// --fields
+$_lang['chunk_desc_category'] = $_lang['chunk_category_desc'];
+$_lang['chunk_desc_name'] = $_lang['chunk_name_desc'];
+$_lang['chunk_lock_msg'] = $_lang['chunk_lock_desc'];
+
+// --tabs
+$_lang['chunk_msg'] = $_lang['chunk_tab_general_desc'];
+
+/*
+ Refer to default.inc.php for the keys below.
+ (Placement in this default file necessary to allow
+ quick create/edit panels access to them when opened
+ outside the context of their respective element types)
+
+ chunk_code
+ chunk_description_desc
+*/
diff --git a/core/lexicon/en/default.inc.php b/core/lexicon/en/default.inc.php
index 3be6fff7f24..3536eb0b62a 100644
--- a/core/lexicon/en/default.inc.php
+++ b/core/lexicon/en/default.inc.php
@@ -559,3 +559,54 @@
// Temporarily match old keys to new ones to ensure compatibility
$_lang['clear_cache_on_save_msg'] = $_lang['clear_cache_on_save_desc'];
+
+/*
+ Shared lang entries for elements --
+
+ Necessary to to give quick create/edit panels
+ access when they are opened outside the
+ context of their respective element types
+*/
+
+// All
+
+// Chunks
+$_lang['chunk_code'] = 'Chunk Code (HTML)';
+$_lang['chunk_description_desc'] = 'Usage information for this Chunk shown in search results and as a tooltip in the Elements tree.';
+ // Temporarily match old keys to new ones to ensure compatibility
+ $_lang['chunk_desc_description'] = $_lang['chunk_description_desc'];
+
+// Plugins
+$_lang['plugin_code'] = 'Plugin Code (PHP)';
+$_lang['plugin_description_desc'] = 'Usage information for this Plugin shown in search results and as a tooltip in the Elements tree.';
+$_lang['plugin_disabled'] = 'Deactivate Plugin';
+$_lang['plugin_disabled_desc'] = 'When deactivated, this Plugin will not respond to events.';
+ // Temporarily match old keys to new ones to ensure compatibility
+ $_lang['plugin_desc'] = $_lang['description'];
+ $_lang['plugin_desc_description'] = $_lang['plugin_description_desc'];
+ $_lang['plugin_disabled_msg'] = $_lang['plugin_disabled_desc'];
+
+// Snippets
+$_lang['snippet_code'] = 'Snippet Code (PHP)';
+$_lang['snippet_description_desc'] = 'Usage information for this Snippet shown in search results and as a tooltip in the Elements tree.';
+ // Temporarily match old keys to new ones to ensure compatibility
+ $_lang['snippet_desc'] = $_lang['description'];
+ $_lang['snippet_desc_description'] = $_lang['snippet_description_desc'];
+
+// Templates
+$_lang['template_code'] = 'Template Code (HTML)';
+$_lang['template_description_desc'] = 'Usage information for this Template shown in search results and as a tooltip in the Elements tree.';
+ // Temporarily match old keys to new ones to ensure compatibility
+ $_lang['template_desc'] = $_lang['description'];
+ $_lang['template_desc_description'] = $_lang['template_description_desc'];
+
+// TVs
+$_lang['tv_tab_input_options'] = 'Input Options';
+$_lang['tv_type'] = 'Input Type';
+$_lang['tv_default'] = 'Default Value';
+$_lang['tv_default_desc'] = 'The content this TV will show if user-entered content is not provided.';
+$_lang['tv_caption_desc'] = 'The label shown for this TV in Resource editing pages (can be overridden per template or other criteria using Form Customization).';
+$_lang['tv_category_desc'] = 'Use to group TVs in Resource editing pages and within the Elements tree.';
+$_lang['tv_description_desc'] = 'Usage information for this TV shown next to its caption in Resource editing pages and as a tooltip in the Elements tree.';
+$_lang['tv_elements'] = 'Input Option Values';
+$_lang['tv_elements_short_desc'] = 'Defines the selectable options for this TV, which may be manually entered or built with a one-line database query.';
diff --git a/core/lexicon/en/plugin.inc.php b/core/lexicon/en/plugin.inc.php
index b4de2db41fb..2f4b5cecda6 100644
--- a/core/lexicon/en/plugin.inc.php
+++ b/core/lexicon/en/plugin.inc.php
@@ -10,15 +10,9 @@
$_lang['events'] = 'Events';
$_lang['plugin'] = 'Plugin';
$_lang['plugin_add'] = 'Add Plugin';
-$_lang['plugin_code'] = 'Plugin code (php)';
+$_lang['plugin_category_desc'] = 'Use to group Plugins within the Elements tree.';
$_lang['plugin_config'] = 'Plugin configuration';
-$_lang['plugin_desc'] = 'Description';
-$_lang['plugin_desc_category'] = 'The Category this Plugin belongs in.';
-$_lang['plugin_desc_description'] = 'A short description of this Plugin.';
-$_lang['plugin_desc_name'] = 'The name of this Plugin.';
$_lang['plugin_delete_confirm'] = 'Are you sure you want to delete this plugin?';
-$_lang['plugin_disabled'] = 'Inactive plugin';
-$_lang['plugin_disabled_msg'] = 'Plugin is deactivated and will not respond to events.';
$_lang['plugin_duplicate_confirm'] = 'Are you sure you want to duplicate this plugin?';
$_lang['plugin_err_create'] = 'An error occurred while creating the plugin.';
$_lang['plugin_err_ae'] = 'A plugin already exists with the name "[[+name]]".';
@@ -37,14 +31,35 @@
$_lang['plugin_event_msg'] = 'Select the events that you would like this plugin to listen to.';
$_lang['plugin_event_plugin_remove_confirm'] = 'Are you sure you want to delete this plugin from this event?';
$_lang['plugin_lock'] = 'Plugin locked for editing';
-$_lang['plugin_lock_msg'] = 'Users must have the edit_locked attribute in order to edit this plugin.';
+$_lang['plugin_lock_desc'] = 'Only users with “edit_locked” permissions can edit this Plugin.';
$_lang['plugin_locked_message'] = 'This plugin is locked.';
$_lang['plugin_management_msg'] = 'Here you can choose which plugin you wish to edit.';
-$_lang['plugin_msg'] = 'Here you can create/edit plugins. Plugins are \'raw\' PHP codes that are invoked whenever the selected System Events are triggered.';
-$_lang['plugin_name'] = 'Plugin name';
+$_lang['plugin_name_desc'] = 'The name of this Plugin.';
$_lang['plugin_new'] = 'Create Plugin';
$_lang['plugin_priority'] = 'Edit Plugin Execution Order by Event';
$_lang['plugin_properties'] = 'Plugin Properties';
+$_lang['plugin_tab_general_desc'] = 'Here you can enter the basic attributes for this Plugin as well as its content. The content must be PHP, either placed in the Plugin Code field below or in a static external file. The PHP code entered runs in response to one or more MODX System Events that you specify.';
$_lang['plugin_title'] = 'Create/edit plugin';
$_lang['plugin_untitled'] = 'Untitled plugin';
$_lang['plugins'] = 'Plugins';
+
+// Temporarily match old keys to new ones to ensure compatibility
+// --fields
+$_lang['plugin_desc_category'] = $_lang['plugin_category_desc'];
+$_lang['plugin_desc_name'] = $_lang['plugin_name_desc'];
+$_lang['plugin_lock_msg'] = $_lang['plugin_lock_desc'];
+
+// --tabs
+$_lang['plugin_msg'] = $_lang['plugin_tab_general_desc'];
+
+/*
+ Refer to default.inc.php for the keys below.
+ (Placement in this default file necessary to allow
+ quick create/edit panels access to them when opened
+ outside the context of their respective element types)
+
+ plugin_code
+ plugin_description_desc
+ plugin_disabled
+ plugin_disabled_desc
+*/
diff --git a/core/lexicon/en/snippet.inc.php b/core/lexicon/en/snippet.inc.php
index 9ffa3d26e3d..db850d91c77 100644
--- a/core/lexicon/en/snippet.inc.php
+++ b/core/lexicon/en/snippet.inc.php
@@ -6,14 +6,11 @@
* @package modx
* @subpackage lexicon
*/
+$_lang['example_tag_snippet_name'] = 'NameOfSnippet';
$_lang['snippet'] = 'Snippet';
$_lang['snippets_available'] = 'Snippets available for you to include in your page';
-$_lang['snippet_code'] = 'Snippet code (php)';
+$_lang['snippet_category_desc'] = 'Use to group Snippets within the Elements tree.';
$_lang['snippet_delete_confirm'] = 'Are you sure you want to delete this snippet?';
-$_lang['snippet_desc'] = 'Description';
-$_lang['snippet_desc_category'] = 'The Category this Snippet belongs in.';
-$_lang['snippet_desc_description'] = 'A short description of this Snippet.';
-$_lang['snippet_desc_name'] = 'The name of this Snippet. It will be available using the [[NameOfSnippet]] tags.';
$_lang['snippet_duplicate_confirm'] = 'Are you sure you want to duplicate this snippet?';
$_lang['snippet_duplicate_error'] = 'An error occurred while duplicating the snippet.';
$_lang['snippet_err_create'] = 'An error occurred while creating the snippet.';
@@ -29,12 +26,32 @@
$_lang['snippet_err_save'] = 'An error occurred while saving the snippet.';
$_lang['snippet_execonsave'] = 'Execute snippet after saving.';
$_lang['snippet_lock'] = 'Lock snippet for editing';
-$_lang['snippet_lock_msg'] = 'Users must have the edit_locked attribute in order to be able to edit this snippet.';
+$_lang['snippet_lock_desc'] = 'Only users with “edit_locked” permissions can edit this Snippet.';
$_lang['snippet_management_msg'] = 'Here you can choose which snippet you wish to edit.';
-$_lang['snippet_msg'] = 'Here you can create/edit snippets. Remember, snippets are \'raw\' PHP code, and if you expect the output of the snippet to be shown at a certain point within the template, you need to return a value from within the snippet.';
-$_lang['snippet_name'] = 'Snippet name';
+$_lang['snippet_name_desc'] = 'Place the content generated by this Snippet in a Resource, Template, or Chunk using the following MODX tag: [['.$_lang['example_tag_snippet_name'].']]';
$_lang['snippet_new'] = 'Create Snippet';
$_lang['snippet_properties'] = 'Default Properties';
+$_lang['snippet_tab_general_desc'] = 'Here you can enter the basic attributes for this Snippet as well as its content. The content must be PHP, either placed in the Snippet Code field below or in a static external file. To receive output from your Snippet at the point where it is called (within a Template or Chunk), a value must be returned from within the code.';
+$_lang['snippet_tag_copied'] = 'Snippet tag copied!';
$_lang['snippet_title'] = 'Create/edit snippet';
$_lang['snippet_untitled'] = 'Untitled snippet';
$_lang['snippets'] = 'Snippets';
+
+// Temporarily match old keys to new ones to ensure compatibility
+// --fields
+$_lang['snippet_desc_category'] = $_lang['snippet_category_desc'];
+$_lang['snippet_desc_name'] = $_lang['snippet_name_desc'];
+$_lang['snippet_lock_msg'] = $_lang['snippet_lock_desc'];
+
+// --tabs
+$_lang['snippet_msg'] = $_lang['snippet_tab_general_desc'];
+
+/*
+ Refer to default.inc.php for the keys below.
+ (Placement in this default file necessary to allow
+ quick create/edit panels access to them when opened
+ outside the context of their respective element types)
+
+ snippet_code
+ snippet_description_desc
+*/
diff --git a/core/lexicon/en/template.inc.php b/core/lexicon/en/template.inc.php
index 94d4954a099..a90b31a3dc0 100644
--- a/core/lexicon/en/template.inc.php
+++ b/core/lexicon/en/template.inc.php
@@ -12,11 +12,7 @@
$_lang['rank'] = 'Rank';
$_lang['template'] = 'Template';
$_lang['template_assignedtv_tab'] = 'Assigned TVs';
-$_lang['template_code'] = 'Template code (HTML)';
-$_lang['template_desc'] = 'Description';
-$_lang['template_desc_category'] = 'The Category this Template belongs in.';
-$_lang['template_desc_description'] = 'A short description of this Template.';
-$_lang['template_desc_name'] = 'The name of this Template.';
+$_lang['template_category_desc'] = 'Use to group Templates within the Elements tree.';
$_lang['template_delete_confirm'] = 'Are you sure you want to delete this template?';
$_lang['template_duplicate_confirm'] = 'Are you sure you want to duplicate this template?';
$_lang['template_edit_tab'] = 'Edit Template';
@@ -26,25 +22,30 @@
$_lang['template_err_duplicate'] = 'An error occured while duplicating the template.';
$_lang['template_err_ae'] = 'A template already exists with the name "[[+name]]".';
$_lang['template_err_in_use'] = 'This template is in use. Please set the documents using the template to another template. Documents using this template:
';
+$_lang['template_err_invalid_name'] = 'Template name is invalid.';
$_lang['template_err_locked'] = 'Template is locked from editing.';
$_lang['template_err_nf'] = 'Template not found!';
$_lang['template_err_ns'] = 'Template not specified.';
$_lang['template_err_ns_name'] = 'Please specify a name for the template.';
$_lang['template_err_remove'] = 'An error occurred while trying to delete the template.';
$_lang['template_err_save'] = 'An error occurred while saving the template.';
-$_lang['template_icon'] = 'Icon';
-$_lang['template_icon_description'] = 'Optional. A custom CSS icon class for all resources with this template. For example a Font Awesome (free) class such as icon-home or fa-home.';
+$_lang['template_icon'] = 'Manager Icon Class';
+$_lang['template_icon_desc'] = 'A CSS class to assign an icon (shown in the document trees) for all resources using this template. Font Awesome Free 5 classes such as “fa-home” may be used.';
$_lang['template_lock'] = 'Lock template for editing';
-$_lang['template_lock_msg'] = 'Users must have the edit_locked attribute to edit this template.';
+$_lang['template_lock_desc'] = 'Only users with “edit_locked” permissions can edit this Template.';
$_lang['template_locked_message'] = 'This template is locked.';
$_lang['template_management_msg'] = 'Here you can choose which template you wish to edit.';
-$_lang['template_msg'] = 'Create and edit templates. Changed or new templates won\'t be visible in your site\'s cached pages until the cache is emptied; however, you can use the preview function on a page to see the template in action.';
-$_lang['template_name'] = 'Template name';
+$_lang['template_name_desc'] = 'The name of this Template.';
$_lang['template_new'] = 'Create Template';
$_lang['template_no_tv'] = 'No TVs have been assigned to this template yet.';
+$_lang['template_preview'] = 'Preview Image';
+$_lang['template_preview_desc'] = 'Used to preview the layout of this Template when creating a new Resource. (Minimum size: 335 x 236)';
$_lang['template_properties'] = 'Default Properties';
$_lang['template_reset_all'] = 'Reset all pages to use Default template';
$_lang['template_reset_specific'] = 'Reset only \'%s\' pages';
+$_lang['template_source'] = 'Media Source';
+$_lang['template_source_desc'] = 'The media source to select a static file or preview. Using "None" will assume you are specifying an absolute path.';
+$_lang['template_tab_general_desc'] = 'Here you can enter the basic attributes for this Template as well as its content. The content must be HTML, either placed in the Template Code field below or in a static external file, and may include MODX tags. Note that changed or new templates won’t be visible in your site’s cached pages until the cache is emptied; however, you can use the preview function on a page to see the template in action.';
$_lang['template_title'] = 'Create/edit template';
$_lang['template_tv_edit'] = 'Edit the sort order of the TVs';
$_lang['template_tv_msg'] = 'The TVs assigned to this template are listed below.';
@@ -52,7 +53,24 @@
$_lang['templates'] = 'Templates';
$_lang['tvt_err_nf'] = 'TV does not have access to the specified Template.';
$_lang['tvt_err_remove'] = 'An error occurred while trying to delete the TV from the template.';
-$_lang['template_source'] = 'Media Source';
-$_lang['template_source_description'] = 'The media source to select a static file or preview. Using "None" will assume you are specifying an absolute path.';
-$_lang['template_preview'] = 'Template preview';
-$_lang['template_preview_description'] = 'A screenshot of the template to use as preview in the template picker. Best size is 335 x 236 (w x h)';
+
+// Temporarily match old keys to new ones to ensure compatibility
+// --fields
+$_lang['template_desc_category'] = $_lang['template_category_desc'];
+$_lang['template_desc_name'] = $_lang['template_name_desc'];
+$_lang['template_icon_description'] = $_lang['template_icon_desc'];
+$_lang['template_lock_msg'] = $_lang['template_lock_desc'];
+$_lang['template_preview_description'] = $_lang['template_preview_desc'];
+
+// --tabs
+$_lang['template_msg'] = $_lang['template_tab_general_desc'];
+
+/*
+ Refer to default.inc.php for the keys below.
+ (Placement in this default file necessary to allow
+ quick create/edit panels access to them when opened
+ outside the context of their respective element types)
+
+ template_code
+ template_description_desc
+ */
diff --git a/core/lexicon/en/tv.inc.php b/core/lexicon/en/tv.inc.php
index a0de3d171fc..22f4f76df22 100644
--- a/core/lexicon/en/tv.inc.php
+++ b/core/lexicon/en/tv.inc.php
@@ -6,7 +6,7 @@
* @package modx
* @subpackage lexicon
*/
-$_lang['example_tag_tvname'] = 'NameOfTV';
+$_lang['example_tag_tv_name'] = 'NameOfTV';
$_lang['has_access'] = 'Has Access?';
$_lang['filter_by_category'] = 'Filter by Category...';
$_lang['rank'] = 'Rank';
@@ -20,7 +20,7 @@
$_lang['tv_change_template_msg'] = 'Changing this template will cause the page to reload the TVs, losing any unsaved changes.
Are you sure you want to change this template?';
$_lang['tv_delete_confirm'] = 'Are you sure you want to delete this TV?';
$_lang['tv_description'] = 'Description';
-$_lang['tv_description_desc'] = 'Usage information for this TV shown next its caption in Resource editing pages and as a tooltip in the Elements tree.';
+$_lang['tv_description_desc'] = 'Usage information for this TV shown next to its caption in Resource editing pages, as a tooltip in the Elements tree, and within search results.';
$_lang['tv_err_delete'] = 'An error occurred while trying to delete the TV.';
$_lang['tv_err_duplicate'] = 'An error occurred while trying to duplicate the TV.';
$_lang['tv_err_duplicate_templates'] = 'An error occurred while duplicating the TV templates.';
@@ -38,6 +38,7 @@
$_lang['tv_err_save'] = 'An error occurred while saving the TV.';
$_lang['tv_inuse'] = 'The following document(s) are currently using this TV. To continue with the delete operation click the Delete button otherwise click the Cancel button.';
$_lang['tv_inuse_template'] = 'The following template(s) are currently using this TV: [[+templates]].
Please detach the TV from the template(s) before deleting it.';
+$_lang['tv_isstatic_desc'] = 'Use an external file to store the default value for this TV. This may be useful if the default value’s content is particularly lengthy.';
$_lang['tv_lock'] = 'Restrict Editing';
$_lang['tv_lock_desc'] = 'Only users with “edit_locked” permissions can edit this TV.';
$_lang['tv_management_msg'] = 'Manage additional custom TVs for your documents.';
@@ -50,8 +51,7 @@
$_lang['tv_rank_desc'] = 'Use to control the positioning of this TV in Resource editing pages (can be overridden per template or other criteria using Form Customization).';
$_lang['tv_reset_params'] = 'Reset parameters';
$_lang['tv_tab_access_desc'] = 'Select the Resource Groups that this TV belongs to. Only users with access to the Groups selected will be able to modify this TV. If no Groups are selected, all users with access to the Manager will be able to modify the TV.';
-$_lang['tv_tab_general_desc'] = 'Here you can create/edit a Template Variable (TV). TVs must be assigned to templates in order to access them from snippets and documents.';
-$_lang['tv_tab_input_options'] = 'Input Options';
+$_lang['tv_tab_general_desc'] = 'Here you can enter the basic attributes for this Template Variable (TV). Note that TVs must be assigned to templates in order to access them from snippets and documents.';
$_lang['tv_tab_input_options_desc'] = '
Here you can edit the input options for the TV, specific to the type of input render that you select.
'; $_lang['tv_tab_output_options'] = 'Output Options'; $_lang['tv_tab_output_options_desc'] = 'Here you can edit the output options for the TV, specific to the type of output render that you select.
'; @@ -70,6 +70,7 @@ // Temporarily match old keys to new ones to ensure compatibility // -- fields +$_lang['is_static_tv_desc'] = $_lang['tv_isstatic_desc']; $_lang['tv_desc_caption'] = $_lang['tv_caption_desc']; $_lang['tv_desc_category'] = $_lang['tv_category_desc']; $_lang['tv_desc_description'] = $_lang['tv_description_desc']; @@ -87,3 +88,16 @@ $_lang['tv_sources.intro_msg'] = $_lang['tv_tab_sources_desc']; $_lang['tv_tmpl_access'] = $_lang['tv_tab_tmpl_access']; $_lang['tv_tmpl_access_msg'] = $_lang['tv_tab_tmpl_access_desc']; + +/* + Refer to default.inc.php for the keys below. + (Placement in this default file necessary to allow + quick create/edit panels access to them when opened + outside the context of their respective element types) + + tv_tab_input_options + tv_caption_desc + tv_category_desc + tv_description_desc + +*/ diff --git a/manager/assets/modext/widgets/core/modx.window.js b/manager/assets/modext/widgets/core/modx.window.js index 477c982c897..cda8bb54da8 100644 --- a/manager/assets/modext/widgets/core/modx.window.js +++ b/manager/assets/modext/widgets/core/modx.window.js @@ -114,6 +114,7 @@ Ext.override(Ext.Window, { */ MODx.Window = function(config) { config = config || {}; + this.isSmallScreen = Ext.getBody().getViewSize().height <= 768; Ext.applyIf(config,{ modal: false ,layout: 'auto' @@ -299,6 +300,14 @@ Ext.extend(MODx.Window,Ext.Window,{ return false; } + /* @smg6511: + Suggest moving away from using this bulk setValues method and + explicitly specifying each field’s value param in window configs, + as is done for standard form panel pages. This will already have been done + for the element quick create/edit windows. Also the above value-setting + procedure in the _loadForm method could be dropped too. All windows in + windows.js would need to be updated before dropping. + */ ,setValues: function(r) { if (r === null) { return false; } this.fp.getForm().setValues(r); diff --git a/manager/assets/modext/widgets/element/modx.panel.template.js b/manager/assets/modext/widgets/element/modx.panel.template.js index 1e6e4c2da24..a84fe6a850a 100644 --- a/manager/assets/modext/widgets/element/modx.panel.template.js +++ b/manager/assets/modext/widgets/element/modx.panel.template.js @@ -53,7 +53,7 @@ MODx.panel.Template = function(config) { xtype: 'hidden' ,name: 'id' ,id: 'modx-template-id' - ,value: config.template + ,value: config.record.id || 0 },{ xtype: 'hidden' ,name: 'props' @@ -69,7 +69,7 @@ MODx.panel.Template = function(config) { ,maxLength: 50 ,enableKeyEvents: true ,allowBlank: false - ,value: config.record.templatename + ,value: config.record.templatename || '' ,listeners: { 'keyup': {scope:this,fn:function(f,e) { var title = Ext.util.Format.stripTags(f.getValue()); diff --git a/manager/assets/modext/widgets/element/modx.panel.tv.js b/manager/assets/modext/widgets/element/modx.panel.tv.js index 6b6b4af8c1e..4c830e17fa7 100644 --- a/manager/assets/modext/widgets/element/modx.panel.tv.js +++ b/manager/assets/modext/widgets/element/modx.panel.tv.js @@ -1184,7 +1184,8 @@ Ext.extend(MODx.panel.TVInputProperties,MODx.Panel,{ ,id: 'modx-tv-elements' ,itemId: 'fld-elements' ,grow: true - ,maxHeight: 160 + ,growMin: 30 + ,growMax: 200 ,value: value ,plugins: new AddFieldUtilities.plugin.Class }; diff --git a/manager/assets/modext/widgets/windows.js b/manager/assets/modext/widgets/windows.js index 09c5f3cea32..51cd50cc461 100644 --- a/manager/assets/modext/widgets/windows.js +++ b/manager/assets/modext/widgets/windows.js @@ -228,7 +228,6 @@ Ext.extend(MODx.window.DuplicateElement,MODx.Window, { } } }); - Ext.reg('modx-window-element-duplicate',MODx.window.DuplicateElement); MODx.window.CreateCategory = function(config) { @@ -380,46 +379,152 @@ Ext.reg('modx-window-namespace-update',MODx.window.UpdateNamespace); MODx.window.QuickCreateChunk = function(config) { config = config || {}; + this.ident = config.ident || `qcechunk${Ext.id()}`; Ext.applyIf(config,{ title: _('quick_create_chunk') - ,width: 600 - ,layout: 'anchor' + ,width: 700 + ,layout: 'form' ,url: MODx.config.connector_url ,action: 'Element/Chunk/Create' + ,cls: 'qce-window qce-create' + ,modal: true + ,monitorResize: true ,fields: [{ xtype: 'hidden' ,name: 'id' + ,value: config.record.id || 0 },{ - xtype: 'textfield' - ,name: 'name' - ,fieldLabel: _('name') - ,anchor: '100%' - },{ - xtype: 'modx-combo-category' - ,name: 'category' - ,fieldLabel: _('category') - ,anchor: '100%' - },{ - xtype: 'textarea' - ,name: 'description' - ,fieldLabel: _('description') - ,anchor: '100%' + // row 1 + cls:'form-row-wrapper', + defaults: { + layout: 'column' + } + ,items: [{ + defaults: { + layout: 'form' + ,labelSeparator: '' + ,labelAlign: 'top' + } + ,items: [{ + columnWidth: 0.5 + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + ,validationEvent: 'change' + ,validateOnBlur: false + } + ,items: [{ + xtype: 'textfield' + ,name: 'name' + ,fieldLabel: _('name') + ,allowBlank: false + ,maxLength: 50 + ,value: config.record.name || '' + }] + },{ + columnWidth: 0.5 + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + } + ,items: [{ + xtype: 'modx-combo-category' + ,name: 'category' + ,id: `modx-${this.ident}-category` + ,fieldLabel: _('category') + ,description: MODx.expandHelp ? '' : _('chunk_category_desc') + ,value: config.record.category || 0 + },{ + xtype: MODx.expandHelp ? 'label' : 'hidden' + ,forId: `modx-${this.ident}-category` + ,html: _('chunk_category_desc') + ,cls: 'desc-under' + }] + }] + }] },{ - xtype: 'textarea' - ,name: 'snippet' - ,fieldLabel: _('code') - ,anchor: '100%' - ,grow: true - ,growMax: 216 + // row 2 + cls:'form-row-wrapper', + defaults: { + layout: 'column' + } + ,items: [{ + defaults: { + layout: 'form' + ,labelSeparator: '' + ,labelAlign: 'top' + } + ,items: [{ + columnWidth: 0.5 + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + ,validationEvent: 'change' + ,validateOnBlur: false + } + ,items: [{ + xtype: 'textarea' + ,name: 'description' + ,id: `modx-${this.ident}-description` + ,description: MODx.expandHelp ? '' : _('chunk_description_desc') + ,fieldLabel: _('description') + ,grow: true + ,growMin: 50 + ,growMax: this.isSmallScreen ? 90 : 120 + ,value: config.record.description || '' + },{ + xtype: MODx.expandHelp ? 'label' : 'hidden' + ,forId: `modx-${this.ident}-description` + ,html: _('chunk_description_desc') + ,cls: 'desc-under' + }] + },{ + columnWidth: 0.5 + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + } + ,items: [{ + xtype: 'xcheckbox' + ,name: 'clearCache' + ,id: `modx-${this.ident}-clear-cache` + ,hideLabel: true + ,boxLabel: _('clear_cache_on_save') + ,description: MODx.expandHelp ? '' : _('clear_cache_on_save_desc') + ,ctCls: 'add-label-space' + ,inputValue: 1 + ,checked: true + },{ + xtype: MODx.expandHelp ? 'label' : 'hidden' + ,forId: `modx-${this.ident}-clear-cache` + ,html: _('clear_cache_on_save_desc') + ,cls: 'desc-under toggle-slider-above' + }] + }] + }] },{ - xtype: 'xcheckbox' - ,name: 'clearCache' - ,hideLabel: true - ,boxLabel: _('clear_cache_on_save') - ,description: _('clear_cache_on_save_msg') - ,inputValue: 1 - ,checked: true + // row 3 + cls:'form-row-wrapper', + layout: 'form' + ,labelSeparator: '' + ,labelAlign: 'top' + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + ,validationEvent: 'change' + ,validateOnBlur: false + } + ,items: [{ + xtype: 'textarea' + ,fieldLabel: _('chunk_code') + ,name: 'snippet' + ,id: `modx-${this.ident}-code` + ,grow: true + ,growMin: 90 + ,growMax: this.isSmallScreen ? 160 : 300 + ,value: config.record.snippet || '' + }] }] ,keys: [{ key: Ext.EventObject.ENTER @@ -439,6 +544,7 @@ MODx.window.QuickUpdateChunk = function(config) { Ext.applyIf(config,{ title: _('quick_update_chunk') ,action: 'Element/Chunk/Update' + ,cls: 'qce-window qce-update' ,buttons: [{ text: config.cancelBtnText || _('cancel') ,scope: this @@ -459,48 +565,155 @@ MODx.window.QuickUpdateChunk = function(config) { Ext.extend(MODx.window.QuickUpdateChunk, MODx.window.QuickCreateChunk); Ext.reg('modx-window-quick-update-chunk',MODx.window.QuickUpdateChunk); + MODx.window.QuickCreateTemplate = function(config) { config = config || {}; + this.ident = config.ident || `qcetemplate${Ext.id()}`; Ext.applyIf(config,{ title: _('quick_create_template') - ,width: 600 + ,width: 700 ,layout: 'anchor' ,url: MODx.config.connector_url ,action: 'Element/Template/Create' + ,cls: 'qce-window qce-create' + ,modal: true + ,monitorResize: true ,fields: [{ xtype: 'hidden' ,name: 'id' + ,value: config.record.id || 0 },{ - xtype: 'textfield' - ,name: 'templatename' - ,fieldLabel: _('name') - ,anchor: '100%' - },{ - xtype: 'modx-combo-category' - ,name: 'category' - ,fieldLabel: _('category') - ,anchor: '100%' - },{ - xtype: 'textarea' - ,name: 'description' - ,fieldLabel: _('description') - ,anchor: '100%' + // row 1 + cls:'form-row-wrapper', + defaults: { + layout: 'column' + } + ,items: [{ + defaults: { + layout: 'form' + ,labelSeparator: '' + ,labelAlign: 'top' + } + ,items: [{ + columnWidth: 0.5 + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + ,validationEvent: 'change' + ,validateOnBlur: false + } + ,items: [{ + xtype: 'textfield' + ,name: 'templatename' + ,fieldLabel: _('name') + ,allowBlank: false + ,maxLength: 50 + ,value: config.record.templatename || '' + }] + },{ + columnWidth: 0.5 + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + } + ,items: [{ + xtype: 'modx-combo-category' + ,name: 'category' + ,id: `modx-${this.ident}-category` + ,fieldLabel: _('category') + ,description: MODx.expandHelp ? '' : _('template_category_desc') + ,value: config.record.category || 0 + },{ + xtype: MODx.expandHelp ? 'label' : 'hidden' + ,forId: `modx-${this.ident}-category` + ,html: _('template_category_desc') + ,cls: 'desc-under' + }] + }] + }] },{ - xtype: 'textarea' - ,name: 'content' - ,fieldLabel: _('code') - ,anchor: '100%' - ,grow: true - ,growMax: 216 + // row 2 + cls:'form-row-wrapper', + defaults: { + layout: 'column' + } + ,items: [{ + defaults: { + layout: 'form' + ,labelSeparator: '' + ,labelAlign: 'top' + } + ,items: [{ + columnWidth: 0.5 + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + ,validationEvent: 'change' + ,validateOnBlur: false + } + ,items: [{ + xtype: 'textarea' + ,name: 'description' + ,id: `modx-${this.ident}-description` + ,description: MODx.expandHelp ? '' : _('template_description_desc') + ,fieldLabel: _('description') + ,grow: true + ,growMin: 50 + ,growMax: this.isSmallScreen ? 90 : 120 + ,value: config.record.description || '' + },{ + xtype: MODx.expandHelp ? 'label' : 'hidden' + ,forId: `modx-${this.ident}-description` + ,html: _('template_description_desc') + ,cls: 'desc-under' + }] + },{ + columnWidth: 0.5 + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + } + ,items: [{ + xtype: 'xcheckbox' + ,name: 'clearCache' + ,id: `modx-${this.ident}-clear-cache` + ,hideLabel: true + ,boxLabel: _('clear_cache_on_save') + ,description: MODx.expandHelp ? '' : _('clear_cache_on_save_desc') + ,ctCls: 'add-label-space' + ,inputValue: 1 + ,checked: true + },{ + xtype: MODx.expandHelp ? 'label' : 'hidden' + ,forId: `modx-${this.ident}-clear-cache` + ,html: _('clear_cache_on_save_desc') + ,cls: 'desc-under toggle-slider-above' + }] + }] + }] },{ - xtype: 'xcheckbox' - ,name: 'clearCache' - ,hideLabel: true - ,boxLabel: _('clear_cache_on_save') - ,description: _('clear_cache_on_save_msg') - ,inputValue: 1 - ,checked: true + // row 3 + cls:'form-row-wrapper', + layout: 'form' + ,labelSeparator: '' + ,labelAlign: 'top' + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + ,validationEvent: 'change' + ,validateOnBlur: false + } + ,items: [{ + xtype: 'textarea' + ,fieldLabel: _('template_code') + ,name: 'content' + ,id: `modx-${this.ident}-code` + ,grow: true + ,growMin: 120 + ,growMax: this.isSmallScreen ? 160 : 300 + ,value: config.record.content || '' + }] }] ,keys: [{ key: Ext.EventObject.ENTER @@ -520,6 +733,7 @@ MODx.window.QuickUpdateTemplate = function(config) { Ext.applyIf(config,{ title: _('quick_update_template') ,action: 'Element/Template/Update' + ,cls: 'qce-window qce-update' ,buttons: [{ text: config.cancelBtnText || _('cancel') ,scope: this @@ -543,46 +757,152 @@ Ext.reg('modx-window-quick-update-template',MODx.window.QuickUpdateTemplate); MODx.window.QuickCreateSnippet = function(config) { config = config || {}; + this.ident = config.ident || `qcesnippet${Ext.id()}`; Ext.applyIf(config,{ title: _('quick_create_snippet') - ,width: 600 + ,width: 700 ,layout: 'anchor' ,url: MODx.config.connector_url ,action: 'Element/Snippet/Create' + ,cls: 'qce-window qce-create' + ,modal: true + ,monitorResize: true ,fields: [{ xtype: 'hidden' ,name: 'id' + ,value: config.record.id || 0 },{ - xtype: 'textfield' - ,name: 'name' - ,fieldLabel: _('name') - ,anchor: '100%' - },{ - xtype: 'modx-combo-category' - ,name: 'category' - ,fieldLabel: _('category') - ,anchor: '100%' - },{ - xtype: 'textarea' - ,name: 'description' - ,fieldLabel: _('description') - ,anchor: '100%' + // row 1 + cls:'form-row-wrapper', + defaults: { + layout: 'column' + } + ,items: [{ + defaults: { + layout: 'form' + ,labelSeparator: '' + ,labelAlign: 'top' + } + ,items: [{ + columnWidth: 0.5 + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + ,validationEvent: 'change' + ,validateOnBlur: false + } + ,items: [{ + xtype: 'textfield' + ,name: 'name' + ,fieldLabel: _('name') + ,allowBlank: false + ,maxLength: 50 + ,value: config.record.name || '' + }] + },{ + columnWidth: 0.5 + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + } + ,items: [{ + xtype: 'modx-combo-category' + ,name: 'category' + ,id: `modx-${this.ident}-category` + ,fieldLabel: _('category') + ,description: MODx.expandHelp ? '' : _('snippet_category_desc') + ,value: config.record.category || 0 + },{ + xtype: MODx.expandHelp ? 'label' : 'hidden' + ,forId: `modx-${this.ident}-category` + ,html: _('snippet_category_desc') + ,cls: 'desc-under' + }] + }] + }] },{ - xtype: 'textarea' - ,name: 'snippet' - ,fieldLabel: _('code') - ,anchor: '100%' - ,grow: true - ,growMax: 216 + // row 2 + cls:'form-row-wrapper', + defaults: { + layout: 'column' + } + ,items: [{ + defaults: { + layout: 'form' + ,labelSeparator: '' + ,labelAlign: 'top' + } + ,items: [{ + columnWidth: 0.5 + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + ,validationEvent: 'change' + ,validateOnBlur: false + } + ,items: [{ + xtype: 'textarea' + ,name: 'description' + ,id: `modx-${this.ident}-description` + ,description: MODx.expandHelp ? '' : _('snippet_description_desc') + ,fieldLabel: _('description') + ,grow: true + ,growMin: 50 + ,growMax: this.isSmallScreen ? 90 : 120 + ,value: config.record.description || '' + },{ + xtype: MODx.expandHelp ? 'label' : 'hidden' + ,forId: `modx-${this.ident}-description` + ,html: _('snippet_description_desc') + ,cls: 'desc-under' + }] + },{ + columnWidth: 0.5 + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + } + ,items: [{ + xtype: 'xcheckbox' + ,name: 'clearCache' + ,id: `modx-${this.ident}-clear-cache` + ,hideLabel: true + ,boxLabel: _('clear_cache_on_save') + ,description: MODx.expandHelp ? '' : _('clear_cache_on_save_desc') + ,ctCls: 'add-label-space' + ,inputValue: 1 + ,checked: true + },{ + xtype: MODx.expandHelp ? 'label' : 'hidden' + ,forId: `modx-${this.ident}-clear-cache` + ,html: _('clear_cache_on_save_desc') + ,cls: 'desc-under toggle-slider-above' + }] + }] + }] },{ - xtype: 'xcheckbox' - ,name: 'clearCache' - ,hideLabel: true - ,boxLabel: _('clear_cache_on_save') - ,description: _('clear_cache_on_save_msg') - ,inputValue: 1 - ,checked: true + // row 3 + cls:'form-row-wrapper', + layout: 'form' + ,labelSeparator: '' + ,labelAlign: 'top' + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + ,validationEvent: 'change' + ,validateOnBlur: false + } + ,items: [{ + xtype: 'textarea' + ,fieldLabel: _('snippet_code') + ,name: 'snippet' + ,id: `modx-${this.ident}-code` + ,grow: true + ,growMin: 90 + ,growMax: this.isSmallScreen ? 160 : 300 + ,value: config.record.snippet || '' + }] }] ,keys: [{ key: Ext.EventObject.ENTER @@ -602,6 +922,7 @@ MODx.window.QuickUpdateSnippet = function(config) { Ext.applyIf(config,{ title: _('quick_update_snippet') ,action: 'Element/Snippet/Update' + ,cls: 'qce-window qce-update' ,buttons: [{ text: config.cancelBtnText || _('cancel') ,scope: this @@ -623,57 +944,165 @@ Ext.extend(MODx.window.QuickUpdateSnippet,MODx.window.QuickCreateSnippet); Ext.reg('modx-window-quick-update-snippet',MODx.window.QuickUpdateSnippet); - MODx.window.QuickCreatePlugin = function(config) { config = config || {}; + this.ident = config.ident || `qceplugin${Ext.id()}`; Ext.applyIf(config,{ title: _('quick_create_plugin') - ,width: 600 + ,width: 700 ,layout: 'anchor' ,url: MODx.config.connector_url ,action: 'Element/Plugin/Create' ,fields: [{ xtype: 'hidden' ,name: 'id' + ,value: config.record.id || 0 },{ - xtype: 'textfield' - ,name: 'name' - ,fieldLabel: _('name') - ,anchor: '100%' - },{ - xtype: 'modx-combo-category' - ,name: 'category' - ,fieldLabel: _('category') - ,anchor: '100%' - },{ - xtype: 'textarea' - ,name: 'description' - ,fieldLabel: _('description') - ,anchor: '100%' - ,rows: 2 - },{ - xtype: 'textarea' - ,name: 'plugincode' - ,fieldLabel: _('code') - ,anchor: '100%' - ,grow: true - ,growMax: 216 + // row 1 + cls:'form-row-wrapper', + defaults: { + layout: 'column' + } + ,items: [{ + defaults: { + layout: 'form' + ,labelSeparator: '' + ,labelAlign: 'top' + } + ,items: [{ + columnWidth: 0.5 + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + ,validationEvent: 'change' + ,validateOnBlur: false + } + ,items: [{ + xtype: 'textfield' + ,name: 'name' + ,fieldLabel: _('name') + ,allowBlank: false + ,maxLength: 50 + ,value: config.record.name || '' + }] + },{ + columnWidth: 0.5 + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + } + ,items: [{ + xtype: 'modx-combo-category' + ,name: 'category' + ,id: `modx-${this.ident}-category` + ,fieldLabel: _('category') + ,description: MODx.expandHelp ? '' : _('plugin_category_desc') + ,value: config.record.category || 0 + },{ + xtype: MODx.expandHelp ? 'label' : 'hidden' + ,forId: `modx-${this.ident}-category` + ,html: _('plugin_category_desc') + ,cls: 'desc-under' + }] + }] + }] },{ - xtype: 'xcheckbox' - ,name: 'disabled' - ,boxLabel: _('disabled') - ,hideLabel: true - ,inputValue: 1 - ,checked: false + // row 2 + cls:'form-row-wrapper', + defaults: { + layout: 'column' + } + ,items: [{ + defaults: { + layout: 'form' + ,labelSeparator: '' + ,labelAlign: 'top' + } + ,items: [{ + columnWidth: 0.5 + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + ,validationEvent: 'change' + ,validateOnBlur: false + } + ,items: [{ + xtype: 'textarea' + ,name: 'description' + ,id: `modx-${this.ident}-description` + ,description: MODx.expandHelp ? '' : _('plugin_description_desc') + ,fieldLabel: _('description') + ,grow: true + ,growMin: 50 + ,growMax: this.isSmallScreen ? 90 : 120 + ,value: config.record.description || '' + },{ + xtype: MODx.expandHelp ? 'label' : 'hidden' + ,forId: `modx-${this.ident}-description` + ,html: _('plugin_description_desc') + ,cls: 'desc-under' + }] + },{ + columnWidth: 0.5 + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + } + ,items: [{ + xtype: 'xcheckbox' + ,name: 'disabled' + ,id: `modx-${this.ident}-disabled` + ,hideLabel: true + ,boxLabel: _('plugin_disabled') + ,description: MODx.expandHelp ? '' : _('plugin_disabled_desc') + ,ctCls: 'add-label-space' + ,inputValue: 1 + ,checked: config.record.disabled || 0 + },{ + xtype: MODx.expandHelp ? 'label' : 'hidden' + ,forId: `modx-${this.ident}-disabled` + ,html: _('plugin_disabled_desc') + ,cls: 'desc-under toggle-slider-above' + },{ + xtype: 'xcheckbox' + ,name: 'clearCache' + ,id: `modx-${this.ident}-clear-cache` + ,hideLabel: true + ,boxLabel: _('clear_cache_on_save') + ,description: MODx.expandHelp ? '' : _('clear_cache_on_save_desc') + ,inputValue: 1 + ,checked: true + },{ + xtype: MODx.expandHelp ? 'label' : 'hidden' + ,forId: `modx-${this.ident}-clear-cache` + ,html: _('clear_cache_on_save_desc') + ,cls: 'desc-under toggle-slider-above' + }] + }] + }] },{ - xtype: 'xcheckbox' - ,name: 'clearCache' - ,boxLabel: _('clear_cache_on_save') - ,hideLabel: true - ,description: _('clear_cache_on_save_msg') - ,inputValue: 1 - ,checked: true + // row 3 + cls:'form-row-wrapper', + layout: 'form' + ,labelSeparator: '' + ,labelAlign: 'top' + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + ,validationEvent: 'change' + ,validateOnBlur: false + } + ,items: [{ + xtype: 'textarea' + ,fieldLabel: _('plugin_code') + ,name: 'plugincode' + ,id: `modx-${this.ident}-code` + ,grow: true + ,growMin: 90 + ,growMax: this.isSmallScreen ? 160 : 300 + ,value: config.record.plugincode || '' + }] }] ,keys: [{ key: Ext.EventObject.ENTER @@ -693,6 +1122,7 @@ MODx.window.QuickUpdatePlugin = function(config) { Ext.applyIf(config,{ title: _('quick_update_plugin') ,action: 'Element/Plugin/Update' + ,cls: 'qce-window qce-update' ,buttons: [{ text: config.cancelBtnText || _('cancel') ,scope: this @@ -716,92 +1146,257 @@ Ext.reg('modx-window-quick-update-plugin',MODx.window.QuickUpdatePlugin); MODx.window.QuickCreateTV = function(config) { config = config || {}; - this.ident = config.ident || 'qtv'+Ext.id(); + this.ident = config.ident || `qcetv${Ext.id()}`; Ext.applyIf(config,{ title: _('quick_create_tv') ,width: 700 ,url: MODx.config.connector_url ,action: 'Element/TemplateVar/Create' + ,cls: 'qce-window qce-create' + ,modal: true + ,monitorResize: true ,fields: [{ xtype: 'hidden' ,name: 'id' + ,value: config.record.id || 0 },{ - layout: 'column' - ,border: false + // row 1 + cls:'form-row-wrapper', + defaults: { + layout: 'column' + } ,items: [{ - columnWidth: .6 - ,layout: 'form' + defaults: { + layout: 'form' + ,labelSeparator: '' + ,labelAlign: 'top' + } ,items: [{ - xtype: 'textfield' - ,name: 'name' - ,fieldLabel: _('name') - ,anchor: '100%' - },{ - xtype: 'textfield' - ,name: 'caption' - ,id: 'modx-'+this.ident+'-caption' - ,fieldLabel: _('caption') - ,anchor: '100%' - },{ - xtype: 'label' - ,forId: 'modx-'+this.ident+'-caption' - ,html: _('caption_desc') - ,cls: 'desc-under' - },{ - xtype: 'modx-combo-category' - ,name: 'category' - ,fieldLabel: _('category') - ,anchor: '100%' + columnWidth: 0.5 + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + ,validationEvent: 'change' + ,validateOnBlur: false + } + ,items: [{ + xtype: 'textfield' + ,name: 'name' + ,fieldLabel: _('name') + ,allowBlank: false + ,maxLength: 50 + ,value: config.record.name || '' + }] },{ - xtype: 'textarea' - ,name: 'description' - ,fieldLabel: _('description') - ,anchor: '100%' + columnWidth: 0.5 + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + } + ,items: [{ + xtype: 'modx-combo-tv-input-type' + ,fieldLabel: _('tv_type') + ,name: 'type' + ,value: config.record.type || 'text' + }] }] - },{ - columnWidth: .4 - ,border: false - ,layout: 'form' + }] + },{ + // row 2 + cls:'form-row-wrapper', + defaults: { + layout: 'column' + } + ,items: [{ + defaults: { + layout: 'form' + ,labelSeparator: '' + ,labelAlign: 'top' + } ,items: [{ - xtype: 'modx-combo-tv-input-type' - ,fieldLabel: _('tv_type') - ,name: 'type' - ,anchor: '100%' - },{ - xtype: 'textfield' - ,fieldLabel: _('tv_elements') - ,name: 'els' - ,id: 'modx-'+this.ident+'-elements' - ,anchor: '100%' - },{ - xtype: 'label' - ,forId: 'modx-'+this.ident+'-elements' - ,html: _('tv_elements_desc') - ,cls: 'desc-under' + columnWidth: 0.5 + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + ,validationEvent: 'change' + ,validateOnBlur: false + } + ,items: [{ + xtype: 'textfield' + ,name: 'caption' + ,id: `modx-${this.ident}-caption` + ,fieldLabel: _('caption') + ,description: MODx.expandHelp ? '' : _('tv_caption_desc') + ,maxLength: 50 + ,value: config.record.caption || '' + },{ + xtype: 'label' + ,forId: `modx-${this.ident}-caption` + ,html: _('tv_caption_desc') + ,cls: 'desc-under' + }] },{ - xtype: 'textarea' - ,fieldLabel: _('tv_default') - ,name: 'default_text' - ,id: 'modx-'+this.ident+'-default-text' - ,anchor: '100%' - ,grow: true - ,growMax: Ext.getBody().getViewSize().height <= 768 ? 300 : 380 + columnWidth: 0.5 + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + } + ,items: [{ + xtype: 'modx-combo-category' + ,name: 'category' + ,id: `modx-${this.ident}-category` + ,fieldLabel: _('category') + ,description: MODx.expandHelp ? '' : _('tv_category_desc') + ,value: config.record.category || 0 + },{ + xtype: MODx.expandHelp ? 'label' : 'hidden' + ,forId: `modx-${this.ident}-category` + ,html: _('tv_category_desc') + ,cls: 'desc-under' + }] + }] + }] + },{ + // row 3 + cls:'form-row-wrapper', + defaults: { + layout: 'column' + } + ,items: [{ + defaults: { + layout: 'form' + ,labelSeparator: '' + ,labelAlign: 'top' + } + ,items: [{ + columnWidth: 0.5 + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + ,validationEvent: 'change' + ,validateOnBlur: false + } + ,items: [{ + xtype: 'textarea' + ,name: 'description' + ,id: `modx-${this.ident}-description` + ,fieldLabel: _('description') + ,description: MODx.expandHelp ? '' : _('tv_description_desc') + ,grow: true + ,growMin: 50 + ,growMax: this.isSmallScreen ? 90 : 120 + ,value: config.record.description || '' + },{ + xtype: MODx.expandHelp ? 'label' : 'hidden' + ,forId: `modx-${this.ident}-description` + ,html: _('tv_description_desc') + ,cls: 'desc-under' + }] },{ - xtype: 'label' - ,forId: 'modx-'+this.ident+'-default-text' - ,html: _('tv_default_desc') - ,cls: 'desc-under' + columnWidth: 0.5 + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + } + ,items: [{ + xtype: 'xcheckbox' + ,name: 'clearCache' + ,id: `modx-${this.ident}-clear-cache` + ,hideLabel: true + ,boxLabel: _('clear_cache_on_save') + ,description: MODx.expandHelp ? '' : _('clear_cache_on_save_desc') + ,ctCls: 'add-label-space' + ,inputValue: 1 + ,checked: true + },{ + xtype: MODx.expandHelp ? 'label' : 'hidden' + ,forId: `modx-${this.ident}-clear-cache` + ,html: _('clear_cache_on_save_desc') + ,cls: 'desc-under toggle-slider-above' + }] }] }] },{ - xtype: 'xcheckbox' - ,name: 'clearCache' - ,hideLabel: true - ,boxLabel: _('clear_cache_on_save') - ,description: _('clear_cache_on_save_msg') - ,inputValue: 1 - ,checked: true + // row 4 + cls:'form-row-wrapper', + defaults: { + layout: 'column' + } + ,items: [{ + defaults: { + layout: 'form' + ,labelSeparator: '' + ,labelAlign: 'top' + } + ,items: [{ + columnWidth: 1 + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + ,validationEvent: 'change' + ,validateOnBlur: false + } + ,items: [{ + xtype: 'textarea' + ,name: 'els' + ,id: `modx-${this.ident}-elements` + ,fieldLabel: _('tv_elements') + ,description: MODx.expandHelp ? '' : _('tv_elements_short_desc') + ,grow: true + ,growMin: 30 + ,growMax: this.isSmallScreen ? 90 : 120 + ,value: config.record.els || '' + },{ + xtype: MODx.expandHelp ? 'label' : 'hidden' + ,forId: `modx-${this.ident}-elements` + ,html: _('tv_elements_short_desc') + ,cls: 'desc-under' + }] + }] + }] + },{ + // row 5 + cls:'form-row-wrapper', + defaults: { + layout: 'column' + } + ,items: [{ + defaults: { + layout: 'form' + ,labelSeparator: '' + ,labelAlign: 'top' + } + ,items: [{ + columnWidth: 0.5 + ,defaults: { + anchor: '100%' + ,msgTarget: 'under' + ,validationEvent: 'change' + ,validateOnBlur: false + } + ,items: [{ + xtype: 'textarea' + ,name: 'default_text' + ,id: `modx-${this.ident}-default-text` + ,fieldLabel: _('tv_default') + ,description: MODx.expandHelp ? '' : _('tv_default_desc') + ,grow: true + ,growMin: 30 + ,growMax: 60 + ,value: config.record.default_text || '' + },{ + xtype: MODx.expandHelp ? 'label' : 'hidden' + ,forId: `modx-${this.ident}-default-text` + ,html: _('tv_default_desc') + ,cls: 'desc-under' + }] + },{ + // using empty column here to allow full-width of previous column in mobile contexts + columnWidth: 0.5 + ,items: [] + }] + }] }] ,keys: [{ key: Ext.EventObject.ENTER @@ -821,6 +1416,7 @@ MODx.window.QuickUpdateTV = function(config) { Ext.applyIf(config,{ title: _('quick_update_tv') ,action: 'Element/TemplateVar/Update' + ,cls: 'qce-window qce-update' ,buttons: [{ text: config.cancelBtnText || _('cancel') ,scope: this