Skip to content

Commit 45d2bab

Browse files
author
Jim Graham
committed
Quick Create/Edit Window Refinements
1 parent 3427149 commit 45d2bab

16 files changed

+1030
-244
lines changed
+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/* Medium screens, including small desktops and tablets */
2+
3+
// Breakpoint for up to 1024px
4+
@include grid-media($tabletM) {
5+
6+
}
7+
8+
// Breakpoint for up to 960px
9+
@include grid-media($desktop) {
10+
.x-window {
11+
form {
12+
.x-column-inner {
13+
width: 100% !important;
14+
}
15+
.x-panel-body {
16+
width: 100% !important;
17+
}
18+
}
19+
.x-window-bc {
20+
.x-window-footer {
21+
padding: 15px;
22+
}
23+
}
24+
&.qce-create,
25+
&.qce-update {
26+
.x-toolbar-cell {
27+
margin-bottom: .75rem;
28+
display: inline-block;
29+
margin-right: 2%;
30+
&:last-child {
31+
margin-right: 0;
32+
}
33+
}
34+
}
35+
&.qce-create {
36+
.x-toolbar-cell {
37+
width: 49%;
38+
}
39+
}
40+
&.qce-update {
41+
.x-toolbar-cell {
42+
width: 32%;
43+
}
44+
}
45+
}
46+
47+
}

Diff for: _build/templates/default/sass/_breakpoint-small.scss

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Breakpoint for up to tablet (portrait orientation) size 768px
2+
@include grid-media($tabletP) {
3+
4+
}
5+
6+
// Breakpoint for mobile size
7+
@include grid-media($mobile) {
8+
9+
.x-window {
10+
&.qce-create,
11+
&.qce-update {
12+
.x-toolbar-cell {
13+
display: block;
14+
margin-right: 0;
15+
width: 100%;
16+
}
17+
}
18+
}
19+
20+
}

Diff for: _build/templates/default/sass/_colors-and-vars.scss

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ $colorSplash: #234368;
33
$colorSplashLight: lighten($colorSplash, 50%);
44
$colorSplashMedium: lighten($colorSplash, 75%);
55
$colorSplashDark: darken($colorSplash, 20%);
6+
$colorSplashShadow: scale-color($colorSplash, $lightness: -70%, $saturation: -25%);
67
$colorSplashContrast: #FFFFFF; // needs much more adaption, should be used as text color for elements with $colorSplash background
78
$silver: #CCCCCC;
89
$gallery: #EEEEEE;
@@ -64,7 +65,7 @@ $borderRadius: 3px;
6465

6566
// Shadows
6667
$boxShadow: 0 4px 6px rgba(0, 0, 0, 0.15);
67-
$boxShadowBig: 0 0 15px 0 rgba(0,0,0,0.2);
68+
$boxShadowBig: 0 0 15px 0 rgba($black,0.25);
6869
$shadowBorder: 0 0 0 1px $borderColor;
6970
$shadowBorderField: 0 0 0 1px $borderColor;
7071
$shadowBorderDark: 0 0 0 1px $softGray;

Diff for: _build/templates/default/sass/_forms.scss

+4-3
Original file line numberDiff line numberDiff line change
@@ -845,11 +845,12 @@ input::-moz-focus-inner {
845845
/* .x-form-check-wrap */
846846
/* Special checboxes for resources and tv configs */
847847
#modx-resource-tabs,
848-
#modx-tv-tabs {
848+
#modx-tv-tabs,
849+
.x-window {
849850

850851
.x-form-check-wrap,
851852
.x-fieldset-checkbox-toggle legend,
852-
.x-fieldset legend {
853+
.x-fieldset legend{
853854
[type="checkbox"]{
854855

855856
position: absolute;
@@ -1167,7 +1168,7 @@ input::-moz-focus-inner {
11671168
}
11681169

11691170
.x-form-grow-sizer {
1170-
font: $fontSmall;
1171+
font: $baseText;
11711172
}
11721173

11731174
.x-form-invalid-msg {

Diff for: _build/templates/default/sass/_windows.scss

+8-4
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,11 @@
268268
}
269269
}
270270
}
271+
&.qce-window {
272+
.x-window-body {
273+
padding-top: 0;
274+
}
275+
}
271276
}
272277

273278
/* .x-window */
@@ -299,20 +304,19 @@
299304

300305
/* the window modal mask, but also the mask that covers a grid when reloading for example */
301306
.ext-el-mask {
302-
background-color: $white;
307+
background-color: $colorSplashShadow;
303308
opacity: 0;
304-
filter: alpha(opacity=0); /* for IE <= 8 */
305309
transition: opacity .25s;
306310
/*z-index: 10;*/ /* this is handeled by extjs and set to 9000 on show */
307311

308312
&.fade-in {
309313
opacity: .5;
310-
filter: alpha(opacity=50); /* for IE <= 8 */
311314
}
312315

316+
// This affects the grid mask
313317
.x-masked & {
318+
background-color: $white;
314319
opacity: .5;
315-
filter: alpha(opacity=50); /* for IE <= 8 */
316320
z-index: 9; /* extjs standard is 100, 10 prevents overlapping the topnav dropdowns */
317321
}
318322
}

Diff for: _build/templates/default/sass/index.scss

+3
Original file line numberDiff line numberDiff line change
@@ -2389,3 +2389,6 @@ iframe[classname="x-hidden"] {
23892389
margin-top: 0 !important;
23902390
}
23912391
}
2392+
2393+
@import "breakpoint-medium";
2394+
@import "breakpoint-small";

Diff for: core/lexicon/en/chunk.inc.php

+28-8
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
* @package modx
77
* @subpackage lexicon
88
*/
9+
10+
// Entry out of alpha order because it must come before the entry it's used in below
11+
$_lang['example_tag_chunk_name'] = 'NameOfChunk';
12+
913
$_lang['chunk'] = 'Chunk';
10-
$_lang['chunk_desc_category'] = 'The Category this Chunk belongs in.';
11-
$_lang['chunk_desc_description'] = 'A short description of this chunk.';
12-
$_lang['chunk_desc_name'] = 'The name of this chunk. It will be available using the [[$nameOfChunk]] tags.';
13-
$_lang['chunk_code'] = 'Chunk code (html)';
14-
$_lang['chunk_desc'] = 'Description';
14+
$_lang['chunk_category_desc'] = 'Use to group Chunks within the Elements tree.';
1515
$_lang['chunk_delete_confirm'] = 'Are you sure you want to delete this chunk?';
1616
$_lang['chunk_duplicate_confirm'] = 'Are you sure you want to duplicate this chunk?';
1717
$_lang['chunk_err_create'] = 'An error occurred while trying to create the chunk.';
@@ -26,11 +26,31 @@
2626
$_lang['chunk_err_ns'] = 'Chunk not specified.';
2727
$_lang['chunk_err_ns_name'] = 'Please specify a name.';
2828
$_lang['chunk_lock'] = 'Lock chunk for editing';
29-
$_lang['chunk_lock_msg'] = 'Users must have the edit_locked attribute in order to edit this chunk.';
30-
$_lang['chunk_msg'] = 'Here you can create/edit chunks. Remember: Chunks are \'raw\' HTML code; so any PHP code won\'t be processed.';
31-
$_lang['chunk_name'] = 'Chunk name';
29+
$_lang['chunk_lock_desc'] = 'Only users with “edit_locked” permissions can edit this Chunk.';
30+
$_lang['chunk_name_desc'] = 'Place the content generated by this Chunk in a Resource, Template, or other Chunk using the following MODX tag: <span class="copy-this">[[$<span class="example-replace-name">'.$_lang['example_tag_chunk_name'].'</span>]]</span>';
3231
$_lang['chunk_new'] = 'Create Chunk';
3332
$_lang['chunk_properties'] = 'Default Properties';
33+
$_lang['chunk_tab_general_desc'] = 'Here you can enter the basic attributes for this <em>Chunk</em> as well as its content. The content must be HTML, either placed in the <a href="#x-form-el-modx-chunk-snippet">Chunk Code</a> field below or in a static external file, and may include MODX tags. Note, however, that PHP code will not run in this element.';
34+
$_lang['chunk_tag_copied'] = 'Chunk tag copied!';
3435
$_lang['chunk_title'] = 'Create/edit chunk';
3536
$_lang['chunk_untitled'] = 'Untitled Chunk';
3637
$_lang['chunks'] = 'Chunks';
38+
39+
// Temporarily match old keys to new ones to ensure compatibility
40+
// --fields
41+
$_lang['chunk_desc_category'] = $_lang['chunk_category_desc'];
42+
$_lang['chunk_desc_name'] = $_lang['chunk_name_desc'];
43+
$_lang['chunk_lock_msg'] = $_lang['chunk_lock_desc'];
44+
45+
// --tabs
46+
$_lang['chunk_msg'] = $_lang['chunk_tab_general_desc'];
47+
48+
/*
49+
Refer to default.inc.php for the keys below.
50+
(Placement in this default file necessary to allow
51+
quick create/edit panels access to them when opened
52+
outside the context of their respective element types)
53+
54+
chunk_code
55+
chunk_description_desc
56+
*/

Diff for: core/lexicon/en/default.inc.php

+32
Original file line numberDiff line numberDiff line change
@@ -565,9 +565,41 @@
565565
access when they are opened outside the
566566
context of their respective element types
567567
*/
568+
568569
// All
569570

571+
// Chunks
572+
$_lang['chunk_code'] = 'Chunk Code (HTML)';
573+
$_lang['chunk_description_desc'] = 'Usage information for this Chunk shown in search results and as a tooltip in the Elements tree.';
574+
// Temporarily match old keys to new ones to ensure compatibility
575+
$_lang['chunk_desc_description'] = $_lang['chunk_description_desc'];
576+
577+
// Plugins
578+
$_lang['plugin_code'] = 'Plugin Code (PHP)';
579+
$_lang['plugin_description_desc'] = 'Usage information for this Plugin shown in search results and as a tooltip in the Elements tree.';
580+
$_lang['plugin_disabled'] = 'Deactivate Plugin';
581+
$_lang['plugin_disabled_desc'] = 'When deactivated, this Plugin will not respond to events.';
582+
// Temporarily match old keys to new ones to ensure compatibility
583+
$_lang['plugin_desc'] = $_lang['description'];
584+
$_lang['plugin_desc_description'] = $_lang['plugin_description_desc'];
585+
$_lang['plugin_disabled_msg'] = $_lang['plugin_disabled_desc'];
586+
587+
// Snippets
588+
$_lang['snippet_code'] = 'Snippet Code (PHP)';
589+
$_lang['snippet_description_desc'] = 'Usage information for this Snippet shown in search results and as a tooltip in the Elements tree.';
590+
// Temporarily match old keys to new ones to ensure compatibility
591+
$_lang['snippet_desc'] = $_lang['description'];
592+
$_lang['snippet_desc_description'] = $_lang['snippet_description_desc'];
593+
594+
// Templates
595+
$_lang['template_code'] = 'Template Code (HTML)';
596+
$_lang['template_description_desc'] = 'Usage information for this Template shown in search results and as a tooltip in the Elements tree.';
597+
// Temporarily match old keys to new ones to ensure compatibility
598+
$_lang['template_desc'] = $_lang['description'];
599+
$_lang['template_desc_description'] = $_lang['template_description_desc'];
600+
570601
// TVs
602+
$_lang['tv_tab_input_options'] = 'Input Options';
571603
$_lang['tv_type'] = 'Input Type';
572604
$_lang['tv_default'] = 'Default Value';
573605
$_lang['tv_default_desc'] = 'The content this TV will show if user-entered content is not provided.';

Diff for: core/lexicon/en/plugin.inc.php

+25-10
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,9 @@
1010
$_lang['events'] = 'Events';
1111
$_lang['plugin'] = 'Plugin';
1212
$_lang['plugin_add'] = 'Add Plugin';
13-
$_lang['plugin_code'] = 'Plugin code (php)';
13+
$_lang['plugin_category_desc'] = 'Use to group Plugins within the Elements tree.';
1414
$_lang['plugin_config'] = 'Plugin configuration';
15-
$_lang['plugin_desc'] = 'Description';
16-
$_lang['plugin_desc_category'] = 'The Category this Plugin belongs in.';
17-
$_lang['plugin_desc_description'] = 'A short description of this Plugin.';
18-
$_lang['plugin_desc_name'] = 'The name of this Plugin.';
1915
$_lang['plugin_delete_confirm'] = 'Are you sure you want to delete this plugin?';
20-
$_lang['plugin_disabled'] = 'Inactive plugin';
21-
$_lang['plugin_disabled_msg'] = 'Plugin is deactivated and will not respond to events.';
2216
$_lang['plugin_duplicate_confirm'] = 'Are you sure you want to duplicate this plugin?';
2317
$_lang['plugin_err_create'] = 'An error occurred while creating the plugin.';
2418
$_lang['plugin_err_ae'] = 'A plugin already exists with the name "[[+name]]".';
@@ -37,14 +31,35 @@
3731
$_lang['plugin_event_msg'] = 'Select the events that you would like this plugin to listen to.';
3832
$_lang['plugin_event_plugin_remove_confirm'] = 'Are you sure you want to delete this plugin from this event?';
3933
$_lang['plugin_lock'] = 'Plugin locked for editing';
40-
$_lang['plugin_lock_msg'] = 'Users must have the edit_locked attribute in order to edit this plugin.';
34+
$_lang['plugin_lock_desc'] = 'Only users with “edit_locked” permissions can edit this Plugin.';
4135
$_lang['plugin_locked_message'] = 'This plugin is locked.';
4236
$_lang['plugin_management_msg'] = 'Here you can choose which plugin you wish to edit.';
43-
$_lang['plugin_msg'] = 'Here you can create/edit plugins. Plugins are \'raw\' PHP codes that are invoked whenever the selected System Events are triggered.';
44-
$_lang['plugin_name'] = 'Plugin name';
37+
$_lang['plugin_name_desc'] = 'The name of this Plugin.';
4538
$_lang['plugin_new'] = 'Create Plugin';
4639
$_lang['plugin_priority'] = 'Edit Plugin Execution Order by Event';
4740
$_lang['plugin_properties'] = 'Plugin Properties';
41+
$_lang['plugin_tab_general_desc'] = 'Here you can enter the basic attributes for this <em>Plugin</em> as well as its content. The content must be PHP, either placed in the <a href="#x-form-el-modx-plugin-plugincode">Plugin Code</a> 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.';
4842
$_lang['plugin_title'] = 'Create/edit plugin';
4943
$_lang['plugin_untitled'] = 'Untitled plugin';
5044
$_lang['plugins'] = 'Plugins';
45+
46+
// Temporarily match old keys to new ones to ensure compatibility
47+
// --fields
48+
$_lang['plugin_desc_category'] = $_lang['plugin_category_desc'];
49+
$_lang['plugin_desc_name'] = $_lang['plugin_name_desc'];
50+
$_lang['plugin_lock_msg'] = $_lang['plugin_lock_desc'];
51+
52+
// --tabs
53+
$_lang['plugin_msg'] = $_lang['plugin_tab_general_desc'];
54+
55+
/*
56+
Refer to default.inc.php for the keys below.
57+
(Placement in this default file necessary to allow
58+
quick create/edit panels access to them when opened
59+
outside the context of their respective element types)
60+
61+
plugin_code
62+
plugin_description_desc
63+
plugin_disabled
64+
plugin_disabled_desc
65+
*/

Diff for: core/lexicon/en/snippet.inc.php

+25-8
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,11 @@
66
* @package modx
77
* @subpackage lexicon
88
*/
9+
$_lang['example_tag_snippet_name'] = 'NameOfSnippet';
910
$_lang['snippet'] = 'Snippet';
1011
$_lang['snippets_available'] = 'Snippets available for you to include in your page';
11-
$_lang['snippet_code'] = 'Snippet code (php)';
12+
$_lang['snippet_category_desc'] = 'Use to group Snippets within the Elements tree.';
1213
$_lang['snippet_delete_confirm'] = 'Are you sure you want to delete this snippet?';
13-
$_lang['snippet_desc'] = 'Description';
14-
$_lang['snippet_desc_category'] = 'The Category this Snippet belongs in.';
15-
$_lang['snippet_desc_description'] = 'A short description of this Snippet.';
16-
$_lang['snippet_desc_name'] = 'The name of this Snippet. It will be available using the [[NameOfSnippet]] tags.';
1714
$_lang['snippet_duplicate_confirm'] = 'Are you sure you want to duplicate this snippet?';
1815
$_lang['snippet_duplicate_error'] = 'An error occurred while duplicating the snippet.';
1916
$_lang['snippet_err_create'] = 'An error occurred while creating the snippet.';
@@ -29,12 +26,32 @@
2926
$_lang['snippet_err_save'] = 'An error occurred while saving the snippet.';
3027
$_lang['snippet_execonsave'] = 'Execute snippet after saving.';
3128
$_lang['snippet_lock'] = 'Lock snippet for editing';
32-
$_lang['snippet_lock_msg'] = 'Users must have the edit_locked attribute in order to be able to edit this snippet.';
29+
$_lang['snippet_lock_desc'] = 'Only users with “edit_locked” permissions can edit this Snippet.';
3330
$_lang['snippet_management_msg'] = 'Here you can choose which snippet you wish to edit.';
34-
$_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.';
35-
$_lang['snippet_name'] = 'Snippet name';
31+
$_lang['snippet_name_desc'] = 'Place the content generated by this Snippet in a Resource, Template, or Chunk using the following MODX tag: <span class="copy-this">[[<span class="example-replace-name">'.$_lang['example_tag_snippet_name'].'</span>]]</span>';
3632
$_lang['snippet_new'] = 'Create Snippet';
3733
$_lang['snippet_properties'] = 'Default Properties';
34+
$_lang['snippet_tab_general_desc'] = 'Here you can enter the basic attributes for this <em>Snippet</em> as well as its content. The content must be PHP, either placed in the <a href="#x-form-el-modx-snippet-snippet">Snippet Code</a> 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.';
35+
$_lang['snippet_tag_copied'] = 'Snippet tag copied!';
3836
$_lang['snippet_title'] = 'Create/edit snippet';
3937
$_lang['snippet_untitled'] = 'Untitled snippet';
4038
$_lang['snippets'] = 'Snippets';
39+
40+
// Temporarily match old keys to new ones to ensure compatibility
41+
// --fields
42+
$_lang['snippet_desc_category'] = $_lang['snippet_category_desc'];
43+
$_lang['snippet_desc_name'] = $_lang['snippet_name_desc'];
44+
$_lang['snippet_lock_msg'] = $_lang['snippet_lock_desc'];
45+
46+
// --tabs
47+
$_lang['snippet_msg'] = $_lang['snippet_tab_general_desc'];
48+
49+
/*
50+
Refer to default.inc.php for the keys below.
51+
(Placement in this default file necessary to allow
52+
quick create/edit panels access to them when opened
53+
outside the context of their respective element types)
54+
55+
snippet_code
56+
snippet_description_desc
57+
*/

0 commit comments

Comments
 (0)