Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/logicaldoc/community
Browse files Browse the repository at this point in the history
  • Loading branch information
gdesiato committed Dec 27, 2024
2 parents e959d23 + af57e50 commit 4402efb
Show file tree
Hide file tree
Showing 29 changed files with 359 additions and 391 deletions.
98 changes: 98 additions & 0 deletions logicaldoc-gui/antrun.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<project name="maven-antrun-" default="main">
<target name="main">
<taskdef resource="net/sf/antcontrib/antlib.xml" />

<delete dir="target/api" quiet="true" />
<unzip src="target/${project.artifactId}-${project.version}.jar" dest="target/api" />
<copy todir="target/api">
<fileset dir="src/main/java">
<include name="**/*.java" />
</fileset>
</copy>
<delete>
<fileset dir="target/api" includes="*.html,*.properties" />
</delete>
<zip destfile="target/${project.artifactId}-${project.version}.jar" basedir="target/api" />

<delete dir="target/work" quiet="true" />
<unzip src="target/${project.artifactId}-${project.version}.${project.packaging}" dest="target/work" />
<delete dir="target/work/META-INF" />
<delete dir="target/work/com/i18n" />
<delete file="target/work/context.properties" />
<delete file="target/work/dms.log.html" />
<delete dir="target/plugin" quiet="true" />
<unzip src="target/${project.artifactId}-${project.version}-plugin.zip" dest="target/plugin" />
<delete file="target/${project.artifactId}-${project.version}-plugin.zip" />
<delete file="target/plugin/pom.xml" />
<copy todir="target/plugin">
<fileset dir="war">
<exclude name="**/WEB-INF/**" />
<exclude name="**/common/**" />
<exclude name="**/skin/**" />
<exclude name="**/skin-Tahoe/**" />
</fileset>
</copy>

<for list="${smartgwt.skins}" param="skin">
<sequential>
<for list="login,setup,frontend" param="module">
<sequential>
<echo>Processing skin @{skin} for module @{module}</echo>
<copy todir="target/plugin/@{module}/sc/skins/@{skin}" overwrite="true">
<fileset dir="war/skin" includes="**" />
</copy>
<copy todir="target/plugin/@{module}/sc/skins/@{skin}" overwrite="true" failonerror="false">
<fileset dir="war/skin-@{skin}" includes="**" />
</copy>
</sequential>
</for>
</sequential>
</for>

<!-- Change some styles of the Tahoe skin -->
<replaceregexp file="target/plugin/frontend/sc/skins/Tahoe/skin_styles.css" match=".treeCellOverDark \{\n background: #b6e3ff;\n color: white;" replace=".treeCellOverDark {${line.separator} background: #b6e3ff;${line.separator} color: black;" flags="gm" byline="false" />

<!-- Fix the ace distribution -->
<replace file="target/plugin/frontend/ace/ext-language_tools.js" token="this.popup = new AcePopup(document.body || document.documentElement);">
<replacevalue>
<![CDATA[// this.popup = new AcePopup(document.body || document.documentElement);
let elements = document.querySelectorAll('div');
let parentElement;
for (let elem of elements) {
if (elem.matches('div[class$="ace_gutter"]')) {
parentElement=elem;
break;
}
}
this.popup = new AcePopup(parentElement);
]]>
</replacevalue>
</replace>

<delete dir="target/plugin/frontend/ace/" includes="worker*,mode-*,theme-*" excludes="mode-velocity.js,mode-java.js,theme-eclipse.js" />
<delete dir="target/plugin/frontend/ace/snippets" includes="*.js" excludes="velocity.js" />

<!-- Delete all .txt files -->
<delete>
<fileset dir="target/plugin" includes="**/*.txt" />
</delete>

<!-- Delete all the sources from the smartgwt jar -->
<delete dir="target/plugin/WEB-INF/lib/smartgwt" failonerror="false" />
<unzip dest="target/plugin/WEB-INF/lib/smartgwt" src="target/plugin/WEB-INF/lib/smartgwt-${smartgwt.version}.jar" />
<delete dir="target/plugin/WEB-INF/lib/smartgwt-${smartgwt.version}.jar" />
<delete>
<fileset dir="target/plugin/WEB-INF/lib/smartgwt" excludes="**/*.class" />
</delete>
<zip destfile="target/plugin/WEB-INF/lib/smartgwt-${smartgwt.version}.jar" basedir="target/plugin/WEB-INF/lib/smartgwt" />
<delete dir="target/plugin/WEB-INF/lib/smartgwt" failonerror="false" />

<copy file="target/${project.artifactId}-${project.version}.${project.packaging}" tofile="target/plugin/WEB-INF/lib/${project.artifactId}-${project.version}-plugin.${project.packaging}" />
<copy todir="target/plugin/frontend/sc/skins/standard/images/" file="./war/skin/images/blank.gif" />
<copy todir="target/plugin/setup/sc/skins/standard/images/" file="./war/skin/images/blank.gif" />
<delete file="target/${project.artifactId}-${project.version}-plugin2.zip" failonerror="false" />
<zip destfile="target/${project.artifactId}-${project.version}-plugin2.zip" basedir="target/plugin" />
<move file="target/${project.artifactId}-${project.version}-plugin2.zip" tofile="target/${project.artifactId}-${project.version}-plugin.zip" />
</target>
</project>
192 changes: 16 additions & 176 deletions logicaldoc-gui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -338,186 +338,26 @@
</goals>
<configuration>
<target>
<delete dir="target/api" quiet="true" />
<unzip
src="target/${project.artifactId}-${project.version}.jar"
dest="target/api" />
<copy todir="target/api">
<fileset dir="src/main/java">
<include name="**/*.java" />
</fileset>
</copy>
<delete>
<fileset dir="target/api"
includes="*.html,*.properties" />
</delete>
<zip
destfile="target/${project.artifactId}-${project.version}.jar"
basedir="target/api" />

<delete dir="target/work" quiet="true" />
<unzip
src="target/${project.artifactId}-${project.version}.${project.packaging}"
dest="target/work" />
<delete dir="target/work/META-INF" />
<delete dir="target/work/com/i18n" />
<delete file="target/work/context.properties" />
<delete file="target/work/dms.log.html" />
<delete dir="target/plugin" quiet="true" />
<unzip
src="target/${project.artifactId}-${project.version}-plugin.zip"
dest="target/plugin" />
<delete
file="target/${project.artifactId}-${project.version}-plugin.zip" />
<delete file="target/plugin/pom.xml" />
<copy todir="target/plugin">
<fileset dir="war">
<exclude name="**/WEB-INF/**" />
<exclude name="**/common/**" />
<exclude name="**/skin/**" />
<exclude name="**/skin-Tahoe/**" />
</fileset>
</copy>

<!-- Copy static resources in the skins -->
<copy
todir="target/plugin/frontend/sc/skins/Enterprise"
overwrite="true">
<fileset dir="war/skin" includes="**" />
</copy>
<copy
todir="target/plugin/frontend/sc/skins/Simplicity"
overwrite="true">
<fileset dir="war/skin" includes="**" />
</copy>
<copy
todir="target/plugin/frontend/sc/skins/Tahoe"
overwrite="true">
<fileset dir="war/skin" includes="**" />
</copy>
<copy
todir="target/plugin/frontend/sc/skins/Tahoe"
overwrite="true">
<fileset dir="war/skin-Tahoe" includes="**" />
</copy>

<copy
todir="target/plugin/login/sc/skins/Enterprise"
overwrite="true">
<fileset dir="war/skin" includes="**" />
</copy>
<copy
todir="target/plugin/login/sc/skins/Simplicity"
overwrite="true">
<fileset dir="war/skin" includes="**" />
</copy>
<copy todir="target/plugin/login/sc/skins/Tahoe"
overwrite="true">
<fileset dir="war/skin" includes="**" />
</copy>
<copy todir="target/plugin/login/sc/skins/Tahoe"
overwrite="true">
<fileset dir="war/skin-Tahoe" includes="**" />
</copy>

<copy
todir="target/plugin/setup/sc/skins/Enterprise"
overwrite="true">
<fileset dir="war/skin" includes="**" />
</copy>
<copy
todir="target/plugin/setup/sc/skins/Simplicity"
overwrite="true">
<fileset dir="war/skin" includes="**" />
</copy>
<copy todir="target/plugin/setup/sc/skins/Tahoe"
overwrite="true">
<fileset dir="war/skin" includes="**" />
</copy>
<copy todir="target/plugin/setup/sc/skins/Tahoe"
overwrite="true">
<fileset dir="war/skin-Tahoe" includes="**" />
</copy>

<!-- Change some styles of the Tahoe skin -->
<replaceregexp
file="target/plugin/frontend/sc/skins/Tahoe/skin_styles.css"
match=".treeCellOverDark \{\n background: #b6e3ff;\n color: white;"
replace=".treeCellOverDark {${line.separator} background: #b6e3ff;${line.separator} color: black;"
flags="gm" byline="false" />

<!-- Fix the ace distribution -->
<replace
file="target/plugin/frontend/ace/ext-language_tools.js"
token="this.popup = new AcePopup(document.body || document.documentElement);">
<replacevalue><![CDATA[// this.popup = new AcePopup(document.body || document.documentElement);
let elements = document.querySelectorAll('div');
let parentElement;
for (let elem of elements) {
if (elem.matches('div[class$="ace_gutter"]')) {
parentElement=elem;
break;
}
}
this.popup = new AcePopup(parentElement);
]]></replacevalue>
</replace>

<delete dir="target/plugin/frontend/ace/"
includes="worker*,mode-*,theme-*"
excludes="mode-velocity.js,mode-java.js,theme-eclipse.js" />
<delete
dir="target/plugin/frontend/ace/snippets"
includes="*.js" excludes="velocity.js" />

<!-- Delete all .txt files -->
<delete>
<fileset dir="target/plugin"
includes="**/*.txt" />
</delete>

<!-- Delete all the sources from the smartgwt
jar -->
<delete dir="target/plugin/WEB-INF/lib/smartgwt"
failonerror="false" />
<unzip dest="target/plugin/WEB-INF/lib/smartgwt"
src="target/plugin/WEB-INF/lib/smartgwt-${smartgwt.version}.jar" />
<delete
dir="target/plugin/WEB-INF/lib/smartgwt-${smartgwt.version}.jar" />
<delete>
<fileset
dir="target/plugin/WEB-INF/lib/smartgwt"
excludes="**/*.class" />
</delete>
<zip
destfile="target/plugin/WEB-INF/lib/smartgwt-${smartgwt.version}.jar"
basedir="target/plugin/WEB-INF/lib/smartgwt" />
<delete dir="target/plugin/WEB-INF/lib/smartgwt"
failonerror="false" />

<copy
file="target/${project.artifactId}-${project.version}.${project.packaging}"
tofile="target/plugin/WEB-INF/lib/${project.artifactId}-${project.version}-plugin.${project.packaging}" />
<copy
todir="target/plugin/frontend/sc/skins/standard/images/"
file="./war/skin/images/blank.gif" />
<copy
todir="target/plugin/setup/sc/skins/standard/images/"
file="./war/skin/images/blank.gif" />
<delete
file="target/${project.artifactId}-${project.version}-plugin2.zip"
failonerror="false" />
<zip
destfile="target/${project.artifactId}-${project.version}-plugin2.zip"
basedir="target/plugin" />
<move
file="target/${project.artifactId}-${project.version}-plugin2.zip"
tofile="target/${project.artifactId}-${project.version}-plugin.zip" />
<!-- maven does not support defining more than one target -->
<!-- https://jira.codehaus.org/browse/MANTRUN-86 -->
<ant antfile="${basedir}/antrun.xml" />
</target>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
<exclusions>
<exclusion>
<artifactId>ant</artifactId>
<groupId>ant</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ public class Feature {
public static final int CHATGPT = 104;

public static final int GOOGLE_CALENDAR = 105;

public static final int SCANNER = 106;

public static final int ONLYOFFICE = 107;

Expand Down Expand Up @@ -264,8 +266,4 @@ public static boolean showDisabled() {
public static boolean showLicensee() {
return enabled(SHOW_DISABLED);
}

public static boolean isCommercial() {
return enabled(ADDITIONAL_FORMATS);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ public static String getIconHtml(String icon) {

public static String getSpinnerIconHtml(String icon, String text) {
if (text == null || text.isEmpty())
return I_CLASS + getCssClassPrefix() + " fa-" + icon + " fa-lg fa-spinner' aria-hidden='true'></i>";
return I_CLASS + getCssClassPrefix() + " fa-" + icon + " fa-thin fa-spinner' aria-hidden='true'></i>";
else
return DIV_I_CLASS + getCssClassPrefix() + " fa-" + icon
+ " fa-lg fa-fw fa-spinner' aria-hidden='true'></i>&nbsp;" + I18N.message(text) + CLOSE_DIV;
+ " fa-thin fa-fw fa-spinner' aria-hidden='true'></i>&nbsp;" + I18N.message(text) + CLOSE_DIV;
}

public static String getIconButtonHTML(String icon, String text, String tooltip, String color, String url) {
Expand Down Expand Up @@ -217,10 +217,15 @@ public static String getIndexedIcon(Integer indexed) {
return "";
String html = AwesomeFactory.getIconHtml("database");
if (indexed == Constants.INDEX_SKIP) {
// html = "<span class='fa-stack'><i class='" + getCssClassPrefix()
// + " fa-database fa-stack-1x fa-thin' aria-hidden='true' data-fa-transform='grow-6'></i>";
// html += I_CLASS + AwesomeFactory.getCssClassPrefix()
// + " fa-times fa-stack-1x' style='color: red' data-fa-transform='grow-2'></i></span>";

html = "<span class='fa-stack'><i class='" + getCssClassPrefix()
+ " fa-database fa-stack-1x' aria-hidden='true' data-fa-transform='grow-6'></i>";
+ " fa-database fa-stack-1x fa-thin' aria-hidden='true' ></i>";
html += I_CLASS + AwesomeFactory.getCssClassPrefix()
+ " fa-times fa-stack-1x' style='color: red' data-fa-transform='grow-2'></i></span>";
+ " fa-times fa-stack-1x' style='color: red' ></i></span>";
}
return html;
}
Expand All @@ -236,18 +241,18 @@ public static String getColoredIconHtml(String icon, String text, String color)
public static String getIconHtml(String icon, String rotation, String text) {
if (text == null || text.isEmpty())
return I_CLASS + getCssClassPrefix() + " fa-" + icon + (rotation != null ? " " + rotation : "")
+ " fa-lg' aria-hidden='true'></i>";
+ " fa-thin' aria-hidden='true'></i>";
else
return DIV_I_CLASS + getCssClassPrefix() + " fa-" + icon + (rotation != null ? " " + rotation : "")
+ " fa-lg fa-fw' aria-hidden='true'></i> " + I18N.message(text) + CLOSE_DIV;
+ " fa-thin fa-fw' aria-hidden='true'></i> " + I18N.message(text) + CLOSE_DIV;
}

public static String getColoredIconHtmlWithoutI18N(String icon, String text, String color) {
if (text == null || text.isEmpty())
return I_CLASS + getCssClassPrefix() + " fa-" + icon + " fa-lg' aria-hidden='true' "
return I_CLASS + getCssClassPrefix() + " fa-" + icon + " fa-thin' aria-hidden='true' "
+ (color != null && !color.isEmpty() ? "style='color: " + color + "'" : "") + "></i>";
else
return DIV_I_CLASS + getCssClassPrefix() + " fa-" + icon + " fa-lg fa-fw' aria-hidden='true'"
return DIV_I_CLASS + getCssClassPrefix() + " fa-" + icon + " fa-thin fa-fw' aria-hidden='true'"
+ (color != null && !color.isEmpty() ? "style='color: " + color + "'" : "") + "></i> " + text
+ CLOSE_DIV;
}
Expand Down
Loading

0 comments on commit 4402efb

Please sign in to comment.