Skip to content

Commit

Permalink
Merge branch 'xwiki:master' into XWIKI-22433
Browse files Browse the repository at this point in the history
  • Loading branch information
Sereza7 authored Dec 9, 2024
2 parents f75a44c + dcdcf18 commit 92fab0b
Show file tree
Hide file tree
Showing 37 changed files with 430 additions and 142 deletions.
34 changes: 30 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery-ui</artifactId>
<version>1.13.3</version>
<version>1.14.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -469,9 +469,9 @@
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>momentjs</artifactId>
<version>2.29.4</version>
<groupId>org.webjars.npm</groupId>
<artifactId>moment</artifactId>
<version>2.30.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
Expand All @@ -480,10 +480,16 @@
<version>3.1</version>
<scope>runtime</scope>
<exclusions>
<!-- We use our own fork of Bootstrap. -->
<exclusion>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
</exclusion>
<!-- We prefer the org.webjars.npm version. -->
<exclusion>
<groupId>org.webjars</groupId>
<artifactId>momentjs</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down Expand Up @@ -1670,6 +1676,26 @@
</rules>
</configuration>
</execution>
<!-- Make sure we use the NPM packaging of moment because it includes the modified JavaScript code. -->
<execution>
<id>enforce-moment-platform</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<bannedDependencies>
<searchTransitive>true</searchTransitive>
<message>
Please use org.webjars.npm:moment instead of org.webjars:momentjs .
</message>
<excludes>
<exclude>org.webjars:momentjs</exclude>
</excludes>
</bannedDependencies>
</rules>
</configuration>
</execution>
<!-- Make sure JAR extensions don't trigger runtime dependencies on XAR extensions -->
<execution>
<id>enforcer-banneddependencytype-xar</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<dependency>
<groupId>org.webjars.npm</groupId>
<artifactId>fuse.js</artifactId>
<version>6.6.2</version>
<version>7.0.0</version>
<scope>runtime</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<!-- Used to test the integration with Numbered Headings Application. -->
<groupId>org.xwiki.contrib.numbered.content</groupId>
<artifactId>application-numbered-content-headings-ui</artifactId>
<version>1.10.2</version>
<version>1.10.3</version>
<type>xar</type>
<exclusions>
<exclusion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,28 +131,34 @@
<version>5.2.0</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>momentjs</artifactId>
<groupId>org.webjars.npm</groupId>
<artifactId>moment</artifactId>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<groupId>org.webjars.npm</groupId>
<artifactId>moment-jdateformatparser</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>org.webjars.npm</groupId>
<artifactId>moment-timezone</artifactId>
<version>0.5.43</version>
<version>0.5.46</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>Eonasdan-bootstrap-datetimepicker</artifactId>
<version>4.17.49</version>
<exclusions>
<!-- We use our own fork of Bootstrap. -->
<exclusion>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
</exclusion>
<!-- We prefer the org.webjars.npm version. -->
<exclusion>
<groupId>org.webjars</groupId>
<artifactId>momentjs</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
'main': 'scriptaculous'
}, {
'name': 'moment',
'location': $stringtool.removeEnd($services.webjars.url('momentjs', ''), '/'),
'location': $stringtool.removeEnd($services.webjars.url('org.webjars.npm:moment', ''), '/'),
'main': 'min/moment.min'
}
],
Expand All @@ -81,7 +81,7 @@
'jquery': "#removeJsSuffix($services.webjars.url('jquery', ""jquery${jsExtension}""))",
'jquery-migrate': "#removeJsSuffix($services.webjars.url($jqueryMigrateId, ""dist/jquery-migrate${jsExtension}""))",
'jsTree': "#removeJsSuffix($services.webjars.url('jstree', ""jstree${jsExtension}""))",
'moment-jdateformatparser': $services.webjars.url('moment-jdateformatparser', 'moment-jdateformatparser.min'),
'moment-jdateformatparser': $services.webjars.url('org.webjars.npm:moment-jdateformatparser', 'moment-jdateformatparser.min'),
'moment-timezone': $services.webjars.url('org.webjars.npm:moment-timezone', 'builds/moment-timezone-with-data.min'),
'prototype': "#removeJsSuffix($services.webjars.url('prototype', 'prototype.js'))",
'selectize': "#removeJsSuffix($services.webjars.url('selectize.js', ""js/standalone/selectize${jsExtension}""))",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
float: left;
margin-left: @navbar-padding-horizontal;
margin-right: @navbar-padding-horizontal;
/* Without this rule, the left navbar will cause unexpected layout shifts even when it's empty. */
&:not(:has(> *)) {
margin-top: 0;
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,31 @@
</parent>
<artifactId>xwiki-platform-image-processing-api</artifactId>
<name>XWiki Platform - Image - Processing - API</name>
<description>General APIs for processing images</description>
<properties>
<thumbnailator.version>0.4.20</thumbnailator.version>
<xwiki.jacoco.instructionRatio>0.22</xwiki.jacoco.instructionRatio>
<!-- Old names of this module used for retro compatibility when resolving dependencies of old extensions -->
<xwiki.extension.features>org.xwiki.platform:xwiki-platform-image-api</xwiki.extension.features>
<!-- Name to display by the Extension Manager -->
<xwiki.extension.name>Image Processing API</xwiki.extension.name>
<!-- Category for the Extension Manager -->
<xwiki.extension.category>api</xwiki.extension.category>
</properties>
<dependencies>
<dependency>
<groupId>org.xwiki.platform</groupId>
<artifactId>xwiki-platform-component-multi</artifactId>
<version>${project.version}</version>
</dependency>

<!-- Use a better image parser than what is in the JDK with ImageIO (which doesn't support CMYK-encoded
jpeg images for example. Just adding this dependency is enough for calls to ImageIO.read() to use
twelvemonkeys's implementation. -->
<dependency>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio-jpeg</artifactId>
<version>3.12.0</version>
</dependency>
<!-- Used by the image plugin to resize the images (i.e. create thumbnails) on the server side. -->
<dependency>
<groupId>net.coobird</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,15 @@
</parent>
<artifactId>xwiki-platform-image-processing-plugin</artifactId>
<name>XWiki Platform - Image - Processing - Plugin</name>
<description>Deprecated Image plugin</description>
<description>Server-side resize of downloaded images</description>
<properties>
<xwiki.jacoco.instructionRatio>0.64</xwiki.jacoco.instructionRatio>
<!-- Old names of this module used for retro compatibility when resolving dependencies of old extensions -->
<xwiki.extension.features>org.xwiki.platform:xwiki-platform-image-plugin</xwiki.extension.features>
<!-- Name to display by the Extension Manager -->
<xwiki.extension.name>Image Processing Plugin</xwiki.extension.name>
<!-- Category for the Extension Manager -->
<xwiki.extension.category>api</xwiki.extension.category>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.util.Arrays;

import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -46,9 +47,7 @@

/**
* @version $Id$
* @deprecated the plugin technology is deprecated, consider rewriting as components
*/
@Deprecated
public class ImagePlugin extends XWikiDefaultPlugin
{
/**
Expand All @@ -63,6 +62,8 @@ public class ImagePlugin extends XWikiDefaultPlugin
*/
private static final String PLUGIN_NAME = "image";

private static final String DEFAULT_QUALITY_PARAM = "xwiki.plugin.image.defaultQuality";

/**
* Cache for already served images.
*/
Expand Down Expand Up @@ -120,13 +121,13 @@ public void init(XWikiContext context)
String imageProcessorHint = context.getWiki().Param("xwiki.plugin.image.processorHint", "thumbnailator");
this.imageProcessor = Utils.getComponent(ImageProcessor.class, imageProcessorHint);

String defaultQualityParam = context.getWiki().Param("xwiki.plugin.image.defaultQuality");
String defaultQualityParam = context.getWiki().Param(DEFAULT_QUALITY_PARAM);
if (!StringUtils.isBlank(defaultQualityParam)) {
try {
this.defaultQuality = Math.max(0, Math.min(1, Float.parseFloat(defaultQualityParam.trim())));
} catch (NumberFormatException e) {
LOG.warn("Failed to parse xwiki.plugin.image.defaultQuality configuration parameter. "
+ "Using {} as the default image quality.", this.defaultQuality);
LOG.warn("Failed to parse [{}] configuration parameter. Using [{}] as the default image quality.",
DEFAULT_QUALITY_PARAM, this.defaultQuality);
}
}
}
Expand Down Expand Up @@ -219,9 +220,9 @@ public XWikiAttachment downloadAttachment(XWikiAttachment attachment, XWikiConte
// Transform the image attachment before is it downloaded.
result = downloadImage(attachment, width, height, quality, context);
} catch (Exception e) {
LOG.warn(
"Failed to transform image attachment {} for scaling, falling back to original attachment.",
attachment.getFilename());
LOG.warn("Failed to transform image attachment [{}] for scaling, falling back to original "
+ "attachment. Root error: [{}]", attachment.getFilename(),
ExceptionUtils.getRootCauseMessage(e));
LOG.debug("Full stack trace for image attachment scaling error: ", e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@

/**
* @version $Id$
* @deprecated the plugin technology is deprecated, consider rewriting as components
*/
@Deprecated
public class ImagePluginAPI extends PluginApi<ImagePlugin>
{
/** Logging helper object. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
* @version $Id$
* @since 17.0.0RC1
*/
@Deprecated(since = "17.0.0RC1")
@Component
@Named("model")
@Singleton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ rendering.macro.liveData.parameter.showPageSizeDropdown.name=Afficher le menu d\
rendering.macro.liveData.parameter.showPageSizeDropdown.description=Afficher ou masquer la liste d\u00E9roulante permettant \u00E0 l'utilisateur de modifier le nombre d'\u00E9l\u00E9ments \u00E0 afficher par page.
rendering.macro.liveData.parameter.pageSizes.name=Tailles de page
rendering.macro.liveData.parameter.pageSizes.description=La liste, s\u00E9par\u00E9e par des virgules, des tailles de page \u00E0 afficher dans la liste d\u00E9roulante des tailles de page.
rendering.macro.liveData.parameter.description.name=Description
rendering.macro.liveData.parameter.description.description=Une description textuelle optionnelle de la Live Data.

#
# Translation keys for the live data widget.
Expand All @@ -87,16 +89,22 @@ livedata.selection.selectInAllPages=S\u00E9lectionner dans toutes les pages
livedata.selection.infoBar.selectedCount={0} \u00E9l\u00E9ments s\u00E9lectionn\u00E9s
livedata.selection.infoBar.allSelected=Tous les \u00E9l\u00E9ments s\u00E9lectionn\u00E9s
livedata.selection.infoBar.allSelectedBut=Tous les \u00E9l\u00E9ments s\u00E9lectionn\u00E9s except\u00E9 {0}
livedata.pagination.label.empty=Contr\u00F4le de la pagination pour la table
# The parameter used thereafter contains the id of the livedata table.
livedata.pagination.label=Contr\u00F4le de la pagination pour la table {0}
livedata.pagination.currentEntries=\u00C9l\u00E9ments {0} - {1} sur {2}
livedata.pagination.pageSize=par page de
livedata.pagination.selectPageSize=S\u00E9lectionner le nombre d'entr\u00E9es par page.
livedata.pagination.page=page
livedata.pagination.first=Premi\u00E8re page
livedata.pagination.previous=Page pr\u00E9c\u00E9dente
livedata.pagination.next=Page suivante
livedata.pagination.last=Derni\u00E8re page
livedata.action.refresh=Actualiser
livedata.action.addEntry=Ajouter un \u00E9l\u00E9ment
livedata.action.resizeColumn.hint=Glisser pour redimensionner. Double-clic pour r\u00E9initialiser.
livedata.action.columnName.default.hint=D\u00E9placer ou utiliser les fl\u00E8ches pour ordonner cette propri\u00E9t\u00E9
livedata.action.columnName.sortable.hint=Cliquez pour trier les entr\u00E9es li\u00E9es \u00E0 cette propri\u00E9t\u00E9. D\u00E9placez en maintenant le bouton de la souris enfonc\u00E9 ou utilisez les fl\u00E8ches du clavier pour r\u00E9organiser.
livedata.action.resizeColumn.hint=Glisser ou utiliser les fl\u00E8ches du clavier pour redimensionner. Double-clic ou presser Echap pour r\u00E9initialiser.
livedata.panel.filter.title=Filtrer
livedata.panel.filter.noneFilterable=Aucun des \u00E9l\u00E9ments affich\u00E9s ne peut \u00EAtre filtr\u00E9.
livedata.panel.filter.addConstraint=Ajouter un filtre
Expand All @@ -118,7 +126,12 @@ livedata.displayer.boolean.false=Faux
livedata.displayer.xObjectProperty.failedToRetrieveField.errorMessage=Impossible de r\u00E9cup\u00E9rer le champ {0}.
livedata.displayer.actions.edit=Modifier
livedata.displayer.actions.followLink=Suivre le lien
livedata.filter.boolean.label=Filtrer sur une propri\u00E9t\u00E9 bool\u00E9enne.
livedata.filter.date.label=Filtrer sur une propri\u00E9t\u00E9 de type date.
livedata.filter.list.label=Filtrer sur une propri\u00E9t\u00E9 de type liste.
livedata.filter.list.emptyLabel=(vide)
livedata.filter.number.label=Filtrer sur une propri\u00E9t\u00E9 num\u00E9rique.
livedata.filter.text.label=Filtrer sur une propri\u00E9t\u00E9 textuelle.
livedata.footnotes.computedTitle=Le titre de certaines pages est calcul\u00E9. Filtrer et trier sur ces titres ne fonctionnera pas normalement pour ces pages.
### Missing: livedata.footnotes.propertyNotViewable=Displayed when some entries require special rights to be viewed and thus fields cannot be extracted from them.
livedata.bottombar.noEntries=(Aucun \u00E9l\u00E9ment)
Expand All @@ -135,3 +148,4 @@ livedata.action.reorder.hint=Glisser pour r\u00E9organiser

## Used to indicate where deprecated keys end
#@deprecatedend

Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
</dependency>
<!-- Used by the date filter. -->
<dependency>
<groupId>org.webjars</groupId>
<artifactId>momentjs</artifactId>
<groupId>org.webjars.npm</groupId>
<artifactId>moment</artifactId>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 92fab0b

Please sign in to comment.