Skip to content

Commit

Permalink
fix(textareafield): compatibility with GLPI 9.5.10
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Nov 7, 2022
1 parent da9d8dc commit 7f2ff1a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions js/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -928,10 +928,12 @@ var plugin_formcreator = new function() {
var questionId = questionKey;
questionId = parseInt(questionKey.replace('formcreator_field_', ''));
if (!isNaN(questionId)) {
// Workaround issue with tinymce input which may be 0px height
$('#form-group-field-' + questionKey + ' iframe')
.attr('data-mce-style', 'width: 100%; height: 148px; display: block;')
.attr('style', 'width: 100%; height: 148px; display: block;');
if (tinymce.majorVersion < 5) {
// Workaround issue with tinymce input which may be 0px height
$('#form-group-field-' + questionKey + ' iframe')
.attr('data-mce-style', 'width: 100%; height: 148px; display: block;')
.attr('style', 'width: 100%; height: 148px; display: block;');
}
if (questionToShow[questionKey]) {
$('#plugin_formcreator_form.plugin_formcreator_form [data-itemtype = "PluginFormcreatorQuestion"][data-id="' + questionKey + '"]').removeAttr('hidden', '');
} else {
Expand Down

0 comments on commit 7f2ff1a

Please sign in to comment.