1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-10 16:54:44 +02:00

Update the Inputfield debug mode toggle-icon hover state to also work with InputfieldFieldset types

This commit is contained in:
Ryan Cramer
2020-11-27 08:33:01 -05:00
parent 8248e75157
commit 13cb795c3d
3 changed files with 8 additions and 5 deletions

View File

@@ -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'>&nbsp;" + text + "&nbsp;</small>");
$tip.css('float', 'right');

File diff suppressed because one or more lines are too long