mirror of
https://github.com/processwire/processwire.git
synced 2025-08-11 17:24:46 +02:00
Update inputfields.js to support selection of Inputfield elements behaving as a tab
This commit is contained in:
@@ -519,6 +519,7 @@ var Inputfields = {
|
||||
var hasNoFocus = $inputfield.hasClass('InputfieldNoFocus');
|
||||
// Inputfields.toggle() can call Inputfields.focus(), so prevent the focus by adding this class
|
||||
if(!hasNoFocus) $inputfield.addClass('InputfieldNoFocus');
|
||||
if($inputfield.hasClass('WireTab') && !$inputfield.is(':visible')) $inputfield = $inputfield.find('.Inputfield');
|
||||
this.toggle($inputfield, true, 0, function($in, open, duration) {
|
||||
if(level > 9) return;
|
||||
var timeout = level > 0 ? 10 * level : 0;
|
||||
@@ -848,6 +849,7 @@ var Inputfields = {
|
||||
var $in = jQuery(':input[name=' + $inputfield + ']');
|
||||
if(!$in.length) $in = jQuery(':input[id=' + $inputfield + ']');
|
||||
if(!$in.length) $in = jQuery(':input[name="' + $inputfield + '[]"]'); // array name
|
||||
if(!$in.length) $in = jQuery('#' + $inputfield + '.Inputfield');
|
||||
$inputfield = $in;
|
||||
} else {
|
||||
$inputfield = jQuery($inputfield)
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user