Skip to content

Commit

Permalink
Fix template picker component listeners (#16400)
Browse files Browse the repository at this point in the history
Update modx.window.resource.js
  • Loading branch information
opengeek committed Feb 15, 2024
1 parent 8013b95 commit 24970ad
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 20 deletions.
4 changes: 2 additions & 2 deletions manager/assets/modext/modx.jsgrps-min.js

Large diffs are not rendered by default.

23 changes: 11 additions & 12 deletions manager/assets/modext/widgets/resource/modx.window.resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,22 +256,21 @@ Ext.extend(MODx.combo.TemplatePicker, Ext.Panel, {
columns: 1,
items: items,
listeners: {
'render': {
fn: function(tf) {
var value = tf.getValue();

if (value.record) {
this.fireEvent('select', value.record);
render: {
fn: function(cmp) {
const value = cmp.getValue(),
record = value?.record
;
if (record) {
this.fireEvent('select', record);
}
},
scope: this
},
'change': {
fn: function(tf) {
var value = tf.getValue();

if (value.record) {
this.fireEvent('select', value.record);
change: {
fn: function(cmp, checked) {
if (checked.record) {
this.fireEvent('select', checked.record);
}
},
scope: this
Expand Down
2 changes: 1 addition & 1 deletion manager/templates/default/css/index-min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion manager/templates/default/css/index.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright (C) 2023 MODX LLC
* Copyright (C) 2024 MODX LLC
*
* This file is part of MODX Revolution and was compiled using Grunt.
*
Expand Down
2 changes: 1 addition & 1 deletion manager/templates/default/css/login-min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion manager/templates/default/css/login.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright (C) 2023 MODX LLC
* Copyright (C) 2024 MODX LLC
*
* This file is part of MODX Revolution and was compiled using Grunt.
*
Expand Down
2 changes: 1 addition & 1 deletion setup/assets/css/installer-min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion setup/assets/css/installer.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
*
* Copyright (C) 2023 MODX LLC
* Copyright (C) 2024 MODX LLC
*
* This file is part of MODX Revolution and was compiled using Grunt.
*
Expand Down

0 comments on commit 24970ad

Please sign in to comment.