mirror of
https://github.com/processwire/processwire.git
synced 2025-08-11 09:14:58 +02:00
Update the Inputfield debug mode toggle-icon hover state to also work with InputfieldFieldset types
This commit is contained in:
@@ -1314,7 +1314,7 @@ class InputfieldWrapper extends Inputfield implements \Countable, \IteratorAggre
|
||||
* #pw-group-retrieval-and-traversal
|
||||
*
|
||||
* @param array $options Options to modify behavior (3.0.169+)
|
||||
* - `getWrappers` (bool): Also include InputfieldWrapper objects? (default=false) 3.0.169+
|
||||
* - `withWrappers` (bool): Also include InputfieldWrapper objects? (default=false) 3.0.169+
|
||||
* @return InputfieldWrapper
|
||||
*
|
||||
*/
|
||||
@@ -1322,7 +1322,7 @@ class InputfieldWrapper extends Inputfield implements \Countable, \IteratorAggre
|
||||
$all = $this->wire(new InputfieldsArray());
|
||||
foreach($this->children() as $child) {
|
||||
if($child instanceof InputfieldWrapper) {
|
||||
if(!empty($options['getWrappers'])) $all->add($child);
|
||||
if(!empty($options['withWrappers'])) $all->add($child);
|
||||
foreach($child->getAll($options) as $c) {
|
||||
$all->add($c);
|
||||
}
|
||||
|
@@ -1908,10 +1908,13 @@ function InputfieldStates($target) {
|
||||
var config = ProcessWire.config;
|
||||
}
|
||||
if(typeof config !== "undefined" && config.debug) {
|
||||
$('label.InputfieldHeader > i.toggle-icon', $target).hover(function() {
|
||||
$('.InputfieldHeader > i.toggle-icon', $target).hover(function() {
|
||||
var $label = $(this).parent('label');
|
||||
if($label.length == 0) return;
|
||||
var text = $label.attr('for').replace(/^Inputfield_/, '');
|
||||
var forId = $label.attr('for');
|
||||
if(!forId) forId = $label.parent().attr('id');
|
||||
if(!forId) return;
|
||||
var text = forId.replace(/^Inputfield_|wrap_Inputfield_|wrap_/, '');
|
||||
if(text.length) {
|
||||
var $tip = $("<small class='InputfieldNameTip ui-priority-secondary'> " + text + " </small>");
|
||||
$tip.css('float', 'right');
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user