mirror of
https://github.com/processwire/processwire.git
synced 2025-08-12 09:44:38 +02:00
Add AdminThemeDefault/AdminThemeReno column widths fix as suggested by @Toutouwai in processwire/processwire-issues#306 plus add typo fix per processwire/processwire-issues#797
This commit is contained in:
@@ -2047,7 +2047,7 @@ class WireArray extends Wire implements \IteratorAggregate, \ArrayAccess, \Count
|
|||||||
* #pw-group-retrieval
|
* #pw-group-retrieval
|
||||||
* #pw-group-fun-tools
|
* #pw-group-fun-tools
|
||||||
*
|
*
|
||||||
* @param string|callable|array $property Property or properties to retrieve, or callable function that shuld receive items.
|
* @param string|callable|array $property Property or properties to retrieve, or callable function that should receive items.
|
||||||
* @param array $options Options to modify default behavior:
|
* @param array $options Options to modify default behavior:
|
||||||
* - `getMethod` (string): Method to call on each item to retrieve $property (default = "get")
|
* - `getMethod` (string): Method to call on each item to retrieve $property (default = "get")
|
||||||
* - `key` (string|null): Property of Wire objects to use for key of array, or omit (null) for non-associative array (default).
|
* - `key` (string|null): Property of Wire objects to use for key of array, or omit (null) for non-associative array (default).
|
||||||
|
@@ -871,7 +871,8 @@ function InputfieldColumnWidths($target) {
|
|||||||
} else if(!$('body').hasClass('InputfieldColumnWidthsInit')) {
|
} else if(!$('body').hasClass('InputfieldColumnWidthsInit')) {
|
||||||
// initialize monitoring events on first run
|
// initialize monitoring events on first run
|
||||||
$('body').addClass('InputfieldColumnWidthsInit');
|
$('body').addClass('InputfieldColumnWidthsInit');
|
||||||
|
|
||||||
|
/*
|
||||||
var changeTimeout = null;
|
var changeTimeout = null;
|
||||||
var checkInputfieldHeightChange = function() {
|
var checkInputfieldHeightChange = function() {
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
@@ -887,10 +888,11 @@ function InputfieldColumnWidths($target) {
|
|||||||
checkNow();
|
checkNow();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$(document).on('change', '.InputfieldColumnWidth :input', checkInputfieldHeightChange);
|
$(document).on('change', '.InputfieldColumnWidth :input', checkInputfieldHeightChange);
|
||||||
$(document).on('AjaxUploadDone', '.InputfieldFileList', checkInputfieldHeightChange);
|
$(document).on('AjaxUploadDone', '.InputfieldFileList', checkInputfieldHeightChange);
|
||||||
$(document).on('heightChanged', '.InputfieldColumnWidth', checkInputfieldHeightChange);
|
$(document).on('heightChanged', '.InputfieldColumnWidth', checkInputfieldHeightChange);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1191,6 +1193,7 @@ function InputfieldStates($target) {
|
|||||||
InputfieldColumnWidths();
|
InputfieldColumnWidths();
|
||||||
} else {
|
} else {
|
||||||
$li.trigger('reloaded', [ 'InputfieldAjaxLoad' ]);
|
$li.trigger('reloaded', [ 'InputfieldAjaxLoad' ]);
|
||||||
|
InputfieldColumnWidths();
|
||||||
}
|
}
|
||||||
if($li.closest('.InputfieldFormNoDependencies').length == 0) {
|
if($li.closest('.InputfieldFormNoDependencies').length == 0) {
|
||||||
InputfieldDependencies($li.parent());
|
InputfieldDependencies($li.parent());
|
||||||
@@ -1505,7 +1508,7 @@ function InputfieldsInit($target) {
|
|||||||
/***********************************************************************************/
|
/***********************************************************************************/
|
||||||
|
|
||||||
jQuery(document).ready(function($) {
|
jQuery(document).ready(function($) {
|
||||||
|
|
||||||
InputfieldStates();
|
InputfieldStates();
|
||||||
|
|
||||||
InputfieldDependencies($(".InputfieldForm:not(.InputfieldFormNoDependencies)"));
|
InputfieldDependencies($(".InputfieldForm:not(.InputfieldFormNoDependencies)"));
|
||||||
@@ -1534,6 +1537,20 @@ jQuery(document).ready(function($) {
|
|||||||
InputfieldRequirements($('.InputfieldForm'));
|
InputfieldRequirements($('.InputfieldForm'));
|
||||||
|
|
||||||
$(document).on('reload', '.Inputfield', InputfieldReloadEvent);
|
$(document).on('reload', '.Inputfield', InputfieldReloadEvent);
|
||||||
|
|
||||||
|
|
||||||
|
if($('.InputfieldForm:not(.InputfieldFormNoWidths)').length) {
|
||||||
|
$(document).on('change', '.InputfieldColumnWidth :input', function() {
|
||||||
|
InputfieldColumnWidths(); // For fields with immediate height change (e.g. AsmSelect)
|
||||||
|
setTimeout(InputfieldColumnWidths, 300); // For fields with delayed height change (e.g. Files delete)
|
||||||
|
});
|
||||||
|
$(document).on('AjaxUploadDone', '.InputfieldFileList', function() {
|
||||||
|
InputfieldColumnWidths();
|
||||||
|
});
|
||||||
|
$(document).on('heightChanged', '.InputfieldColumnWidth', function() {
|
||||||
|
InputfieldColumnWidths();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// for testing:
|
// for testing:
|
||||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user