mirror of
https://github.com/processwire/processwire.git
synced 2025-08-12 09:44:38 +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
|
* #pw-group-retrieval-and-traversal
|
||||||
*
|
*
|
||||||
* @param array $options Options to modify behavior (3.0.169+)
|
* @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
|
* @return InputfieldWrapper
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -1322,7 +1322,7 @@ class InputfieldWrapper extends Inputfield implements \Countable, \IteratorAggre
|
|||||||
$all = $this->wire(new InputfieldsArray());
|
$all = $this->wire(new InputfieldsArray());
|
||||||
foreach($this->children() as $child) {
|
foreach($this->children() as $child) {
|
||||||
if($child instanceof InputfieldWrapper) {
|
if($child instanceof InputfieldWrapper) {
|
||||||
if(!empty($options['getWrappers'])) $all->add($child);
|
if(!empty($options['withWrappers'])) $all->add($child);
|
||||||
foreach($child->getAll($options) as $c) {
|
foreach($child->getAll($options) as $c) {
|
||||||
$all->add($c);
|
$all->add($c);
|
||||||
}
|
}
|
||||||
|
@@ -1908,10 +1908,13 @@ function InputfieldStates($target) {
|
|||||||
var config = ProcessWire.config;
|
var config = ProcessWire.config;
|
||||||
}
|
}
|
||||||
if(typeof config !== "undefined" && config.debug) {
|
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');
|
var $label = $(this).parent('label');
|
||||||
if($label.length == 0) return;
|
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) {
|
if(text.length) {
|
||||||
var $tip = $("<small class='InputfieldNameTip ui-priority-secondary'> " + text + " </small>");
|
var $tip = $("<small class='InputfieldNameTip ui-priority-secondary'> " + text + " </small>");
|
||||||
$tip.css('float', 'right');
|
$tip.css('float', 'right');
|
||||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user