1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-09 08:17:12 +02:00

Fix issue with file/image tags where they weren't initiating properly after an AjaxUploadDone JS event

This commit is contained in:
Ryan Cramer
2017-07-17 05:47:43 -04:00
parent faf1efc049
commit b7cb72cac6
2 changed files with 4 additions and 5 deletions

View File

@@ -442,7 +442,8 @@ $(document).ready(function() {
var $inputfield = $(this);
var $inputs = $inputfield.find('.InputfieldFileTagsInput:not(.selectized)');
var $selects = $inputfield.find('.InputfieldFileTagsSelect:not(.selectized)');
if($inputs.length) {
$inputs.selectize({
plugins: ['remove_button', 'drag_drop'],
@@ -457,10 +458,8 @@ $(document).ready(function() {
}
}
});
return;
}
var $selects = $inputfield.find('.InputfieldFileTagsSelect:not(.selectized)');
if($selects.length) {
if(!$inputfield.hasClass('Inputfield')) $inputfield = $inputfield.closest('.Inputfield');
var configName = $inputfield.attr('data-configName');
@@ -563,7 +562,7 @@ $(document).ready(function() {
resizeActive = true;
setTimeout(windowResize, 1000);
}).resize();
$(document).on('AjaxUploadDone', function(event) {
$(document).on('AjaxUploadDone', '.InputfieldFileHasTags', function(event) {
initTags($(this));
});
}

File diff suppressed because one or more lines are too long