Änderungen von Dokument ClassEditSheet

Zuletzt geändert von Daniel Herrmann am 2025/07/19 16:57

Von Version Icon 2.1 Icon
bearbeitet von Daniel Herrmann
am 2025/06/22 18:47
Änderungskommentar: Install extension [org.xwiki.platform:xwiki-platform-appwithinminutes-ui/17.4.0]
Auf Version Icon 3.1
bearbeitet von Daniel Herrmann
am 2025/07/19 16:57
Änderungskommentar: Install extension [org.xwiki.platform:xwiki-platform-appwithinminutes-ui/17.5.0]

Zusammenfassung

Details

Icon Seiteneigenschaften
Inhalt
... ... @@ -274,6 +274,7 @@
274 274   * Displays a configuration property of a class field. This macro can also be used to display a property of an object.
275 275   *#
276 276  #macro (displayFieldProperty $property $prefix $field)
277 + ## This 'displayFormType' property only exists for boolean fields.
277 277   #set ($displayFormType = $property.getProperty('displayFormType'))
278 278   #if ($property.classType == 'Boolean' && (!$displayFormType || $displayFormType.value == 'checkbox'))
279 279   <dt>
Icon XWiki.JavaScriptExtension[2]
Code
... ... @@ -300,8 +300,10 @@
300 300   var label = previousDT.down('label');
301 301   prettyNameInput.title = label.textContent || label.innerText;
302 302   }
303 + prettyNameInput.ariaLabel = '$escapetool.javascript($services.localization.render('platform.appwithinminutes.classEditorFieldPrettyNameToolTip'))';
303 303   // Replace the preview label with the pretty name input.
304 304   var previewLabel = field.getViewer().down('label');
306 + // We unset the for attribute, so that this label will not be set implicitely OR explicitely anymore.
305 305   previewLabel.writeAttribute('for', '');
306 306   previewLabel.removeChild(previewLabel.lastChild);
307 307   previewLabel.insert(prettyNameInput);
... ... @@ -326,10 +326,12 @@
326 326   _enhanceFieldDefaultValue : function(event) {
327 327   var field = event.memo.field;
328 328   var fieldName = field.getName();
329 - field.getViewer().select('input[type=text]', 'textarea').each(function(input) {
331 + // We select the default field input and update it.
332 + field.getViewer().select('dd :input').each(function(input) {
330 330   if (!input.title && input.name.endsWith('_0_' + fieldName)) {
331 331   input.title = '$escapetool.javascript($services.localization.render('platform.appwithinminutes.classEditorFieldDefaultValueToolTip'))';
332 332   }
336 + input.ariaLabel = '$escapetool.javascript($services.localization.render('platform.appwithinminutes.classEditorFieldDefaultValueToolTip'))';
333 333   });
334 334   },
335 335   _onSave : function() {
... ... @@ -364,7 +364,8 @@
364 364   if (hintInput) {
365 365   hintInput.addClassName('xHint');
366 366   if (!hintInput.title) {
367 - hintInput.title = 'Hint';
371 + hintInput.title = '$escapetool.javascript($services.localization.render('platform.appwithinminutes.classEditorFieldHintToolTip'))';
372 + hintInput.ariaLabel = '$escapetool.javascript($services.localization.render('platform.appwithinminutes.classEditorFieldHintToolTip'))';
368 368   }
369 369   // Move the hint input below the pretty name input, in the field viewer.
370 370   var dd = hintInput.up('dd');