Skip to content

Commit 4402efb

Browse files
committed
Merge branch 'master' of https://github.com/logicaldoc/community
2 parents e959d23 + af57e50 commit 4402efb

File tree

29 files changed

+359
-391
lines changed

29 files changed

+359
-391
lines changed

logicaldoc-gui/antrun.xml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
<project name="maven-antrun-" default="main">
2+
<target name="main">
3+
<taskdef resource="net/sf/antcontrib/antlib.xml" />
4+
5+
<delete dir="target/api" quiet="true" />
6+
<unzip src="target/${project.artifactId}-${project.version}.jar" dest="target/api" />
7+
<copy todir="target/api">
8+
<fileset dir="src/main/java">
9+
<include name="**/*.java" />
10+
</fileset>
11+
</copy>
12+
<delete>
13+
<fileset dir="target/api" includes="*.html,*.properties" />
14+
</delete>
15+
<zip destfile="target/${project.artifactId}-${project.version}.jar" basedir="target/api" />
16+
17+
<delete dir="target/work" quiet="true" />
18+
<unzip src="target/${project.artifactId}-${project.version}.${project.packaging}" dest="target/work" />
19+
<delete dir="target/work/META-INF" />
20+
<delete dir="target/work/com/i18n" />
21+
<delete file="target/work/context.properties" />
22+
<delete file="target/work/dms.log.html" />
23+
<delete dir="target/plugin" quiet="true" />
24+
<unzip src="target/${project.artifactId}-${project.version}-plugin.zip" dest="target/plugin" />
25+
<delete file="target/${project.artifactId}-${project.version}-plugin.zip" />
26+
<delete file="target/plugin/pom.xml" />
27+
<copy todir="target/plugin">
28+
<fileset dir="war">
29+
<exclude name="**/WEB-INF/**" />
30+
<exclude name="**/common/**" />
31+
<exclude name="**/skin/**" />
32+
<exclude name="**/skin-Tahoe/**" />
33+
</fileset>
34+
</copy>
35+
36+
<for list="${smartgwt.skins}" param="skin">
37+
<sequential>
38+
<for list="login,setup,frontend" param="module">
39+
<sequential>
40+
<echo>Processing skin @{skin} for module @{module}</echo>
41+
<copy todir="target/plugin/@{module}/sc/skins/@{skin}" overwrite="true">
42+
<fileset dir="war/skin" includes="**" />
43+
</copy>
44+
<copy todir="target/plugin/@{module}/sc/skins/@{skin}" overwrite="true" failonerror="false">
45+
<fileset dir="war/skin-@{skin}" includes="**" />
46+
</copy>
47+
</sequential>
48+
</for>
49+
</sequential>
50+
</for>
51+
52+
<!-- Change some styles of the Tahoe skin -->
53+
<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" />
54+
55+
<!-- Fix the ace distribution -->
56+
<replace file="target/plugin/frontend/ace/ext-language_tools.js" token="this.popup = new AcePopup(document.body || document.documentElement);">
57+
<replacevalue>
58+
<![CDATA[// this.popup = new AcePopup(document.body || document.documentElement);
59+
60+
let elements = document.querySelectorAll('div');
61+
let parentElement;
62+
for (let elem of elements) {
63+
if (elem.matches('div[class$="ace_gutter"]')) {
64+
parentElement=elem;
65+
break;
66+
}
67+
}
68+
this.popup = new AcePopup(parentElement);
69+
]]>
70+
</replacevalue>
71+
</replace>
72+
73+
<delete dir="target/plugin/frontend/ace/" includes="worker*,mode-*,theme-*" excludes="mode-velocity.js,mode-java.js,theme-eclipse.js" />
74+
<delete dir="target/plugin/frontend/ace/snippets" includes="*.js" excludes="velocity.js" />
75+
76+
<!-- Delete all .txt files -->
77+
<delete>
78+
<fileset dir="target/plugin" includes="**/*.txt" />
79+
</delete>
80+
81+
<!-- Delete all the sources from the smartgwt jar -->
82+
<delete dir="target/plugin/WEB-INF/lib/smartgwt" failonerror="false" />
83+
<unzip dest="target/plugin/WEB-INF/lib/smartgwt" src="target/plugin/WEB-INF/lib/smartgwt-${smartgwt.version}.jar" />
84+
<delete dir="target/plugin/WEB-INF/lib/smartgwt-${smartgwt.version}.jar" />
85+
<delete>
86+
<fileset dir="target/plugin/WEB-INF/lib/smartgwt" excludes="**/*.class" />
87+
</delete>
88+
<zip destfile="target/plugin/WEB-INF/lib/smartgwt-${smartgwt.version}.jar" basedir="target/plugin/WEB-INF/lib/smartgwt" />
89+
<delete dir="target/plugin/WEB-INF/lib/smartgwt" failonerror="false" />
90+
91+
<copy file="target/${project.artifactId}-${project.version}.${project.packaging}" tofile="target/plugin/WEB-INF/lib/${project.artifactId}-${project.version}-plugin.${project.packaging}" />
92+
<copy todir="target/plugin/frontend/sc/skins/standard/images/" file="./war/skin/images/blank.gif" />
93+
<copy todir="target/plugin/setup/sc/skins/standard/images/" file="./war/skin/images/blank.gif" />
94+
<delete file="target/${project.artifactId}-${project.version}-plugin2.zip" failonerror="false" />
95+
<zip destfile="target/${project.artifactId}-${project.version}-plugin2.zip" basedir="target/plugin" />
96+
<move file="target/${project.artifactId}-${project.version}-plugin2.zip" tofile="target/${project.artifactId}-${project.version}-plugin.zip" />
97+
</target>
98+
</project>

logicaldoc-gui/pom.xml

Lines changed: 16 additions & 176 deletions
Original file line numberDiff line numberDiff line change
@@ -338,186 +338,26 @@
338338
</goals>
339339
<configuration>
340340
<target>
341-
<delete dir="target/api" quiet="true" />
342-
<unzip
343-
src="target/${project.artifactId}-${project.version}.jar"
344-
dest="target/api" />
345-
<copy todir="target/api">
346-
<fileset dir="src/main/java">
347-
<include name="**/*.java" />
348-
</fileset>
349-
</copy>
350-
<delete>
351-
<fileset dir="target/api"
352-
includes="*.html,*.properties" />
353-
</delete>
354-
<zip
355-
destfile="target/${project.artifactId}-${project.version}.jar"
356-
basedir="target/api" />
357-
358-
<delete dir="target/work" quiet="true" />
359-
<unzip
360-
src="target/${project.artifactId}-${project.version}.${project.packaging}"
361-
dest="target/work" />
362-
<delete dir="target/work/META-INF" />
363-
<delete dir="target/work/com/i18n" />
364-
<delete file="target/work/context.properties" />
365-
<delete file="target/work/dms.log.html" />
366-
<delete dir="target/plugin" quiet="true" />
367-
<unzip
368-
src="target/${project.artifactId}-${project.version}-plugin.zip"
369-
dest="target/plugin" />
370-
<delete
371-
file="target/${project.artifactId}-${project.version}-plugin.zip" />
372-
<delete file="target/plugin/pom.xml" />
373-
<copy todir="target/plugin">
374-
<fileset dir="war">
375-
<exclude name="**/WEB-INF/**" />
376-
<exclude name="**/common/**" />
377-
<exclude name="**/skin/**" />
378-
<exclude name="**/skin-Tahoe/**" />
379-
</fileset>
380-
</copy>
381-
382-
<!-- Copy static resources in the skins -->
383-
<copy
384-
todir="target/plugin/frontend/sc/skins/Enterprise"
385-
overwrite="true">
386-
<fileset dir="war/skin" includes="**" />
387-
</copy>
388-
<copy
389-
todir="target/plugin/frontend/sc/skins/Simplicity"
390-
overwrite="true">
391-
<fileset dir="war/skin" includes="**" />
392-
</copy>
393-
<copy
394-
todir="target/plugin/frontend/sc/skins/Tahoe"
395-
overwrite="true">
396-
<fileset dir="war/skin" includes="**" />
397-
</copy>
398-
<copy
399-
todir="target/plugin/frontend/sc/skins/Tahoe"
400-
overwrite="true">
401-
<fileset dir="war/skin-Tahoe" includes="**" />
402-
</copy>
403-
404-
<copy
405-
todir="target/plugin/login/sc/skins/Enterprise"
406-
overwrite="true">
407-
<fileset dir="war/skin" includes="**" />
408-
</copy>
409-
<copy
410-
todir="target/plugin/login/sc/skins/Simplicity"
411-
overwrite="true">
412-
<fileset dir="war/skin" includes="**" />
413-
</copy>
414-
<copy todir="target/plugin/login/sc/skins/Tahoe"
415-
overwrite="true">
416-
<fileset dir="war/skin" includes="**" />
417-
</copy>
418-
<copy todir="target/plugin/login/sc/skins/Tahoe"
419-
overwrite="true">
420-
<fileset dir="war/skin-Tahoe" includes="**" />
421-
</copy>
422-
423-
<copy
424-
todir="target/plugin/setup/sc/skins/Enterprise"
425-
overwrite="true">
426-
<fileset dir="war/skin" includes="**" />
427-
</copy>
428-
<copy
429-
todir="target/plugin/setup/sc/skins/Simplicity"
430-
overwrite="true">
431-
<fileset dir="war/skin" includes="**" />
432-
</copy>
433-
<copy todir="target/plugin/setup/sc/skins/Tahoe"
434-
overwrite="true">
435-
<fileset dir="war/skin" includes="**" />
436-
</copy>
437-
<copy todir="target/plugin/setup/sc/skins/Tahoe"
438-
overwrite="true">
439-
<fileset dir="war/skin-Tahoe" includes="**" />
440-
</copy>
441-
442-
<!-- Change some styles of the Tahoe skin -->
443-
<replaceregexp
444-
file="target/plugin/frontend/sc/skins/Tahoe/skin_styles.css"
445-
match=".treeCellOverDark \{\n background: #b6e3ff;\n color: white;"
446-
replace=".treeCellOverDark {${line.separator} background: #b6e3ff;${line.separator} color: black;"
447-
flags="gm" byline="false" />
448-
449-
<!-- Fix the ace distribution -->
450-
<replace
451-
file="target/plugin/frontend/ace/ext-language_tools.js"
452-
token="this.popup = new AcePopup(document.body || document.documentElement);">
453-
<replacevalue><![CDATA[// this.popup = new AcePopup(document.body || document.documentElement);
454-
455-
let elements = document.querySelectorAll('div');
456-
let parentElement;
457-
for (let elem of elements) {
458-
if (elem.matches('div[class$="ace_gutter"]')) {
459-
parentElement=elem;
460-
break;
461-
}
462-
}
463-
this.popup = new AcePopup(parentElement);
464-
]]></replacevalue>
465-
</replace>
466-
467-
<delete dir="target/plugin/frontend/ace/"
468-
includes="worker*,mode-*,theme-*"
469-
excludes="mode-velocity.js,mode-java.js,theme-eclipse.js" />
470-
<delete
471-
dir="target/plugin/frontend/ace/snippets"
472-
includes="*.js" excludes="velocity.js" />
473-
474-
<!-- Delete all .txt files -->
475-
<delete>
476-
<fileset dir="target/plugin"
477-
includes="**/*.txt" />
478-
</delete>
479-
480-
<!-- Delete all the sources from the smartgwt
481-
jar -->
482-
<delete dir="target/plugin/WEB-INF/lib/smartgwt"
483-
failonerror="false" />
484-
<unzip dest="target/plugin/WEB-INF/lib/smartgwt"
485-
src="target/plugin/WEB-INF/lib/smartgwt-${smartgwt.version}.jar" />
486-
<delete
487-
dir="target/plugin/WEB-INF/lib/smartgwt-${smartgwt.version}.jar" />
488-
<delete>
489-
<fileset
490-
dir="target/plugin/WEB-INF/lib/smartgwt"
491-
excludes="**/*.class" />
492-
</delete>
493-
<zip
494-
destfile="target/plugin/WEB-INF/lib/smartgwt-${smartgwt.version}.jar"
495-
basedir="target/plugin/WEB-INF/lib/smartgwt" />
496-
<delete dir="target/plugin/WEB-INF/lib/smartgwt"
497-
failonerror="false" />
498-
499-
<copy
500-
file="target/${project.artifactId}-${project.version}.${project.packaging}"
501-
tofile="target/plugin/WEB-INF/lib/${project.artifactId}-${project.version}-plugin.${project.packaging}" />
502-
<copy
503-
todir="target/plugin/frontend/sc/skins/standard/images/"
504-
file="./war/skin/images/blank.gif" />
505-
<copy
506-
todir="target/plugin/setup/sc/skins/standard/images/"
507-
file="./war/skin/images/blank.gif" />
508-
<delete
509-
file="target/${project.artifactId}-${project.version}-plugin2.zip"
510-
failonerror="false" />
511-
<zip
512-
destfile="target/${project.artifactId}-${project.version}-plugin2.zip"
513-
basedir="target/plugin" />
514-
<move
515-
file="target/${project.artifactId}-${project.version}-plugin2.zip"
516-
tofile="target/${project.artifactId}-${project.version}-plugin.zip" />
341+
<!-- maven does not support defining more than one target -->
342+
<!-- https://jira.codehaus.org/browse/MANTRUN-86 -->
343+
<ant antfile="${basedir}/antrun.xml" />
517344
</target>
518345
</configuration>
519346
</execution>
520347
</executions>
348+
<dependencies>
349+
<dependency>
350+
<groupId>ant-contrib</groupId>
351+
<artifactId>ant-contrib</artifactId>
352+
<version>1.0b3</version>
353+
<exclusions>
354+
<exclusion>
355+
<artifactId>ant</artifactId>
356+
<groupId>ant</groupId>
357+
</exclusion>
358+
</exclusions>
359+
</dependency>
360+
</dependencies>
521361
</plugin>
522362
</plugins>
523363
</build>

logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/Common.gwt.xml

Lines changed: 0 additions & 19 deletions
This file was deleted.

logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/Feature.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ public class Feature {
220220
public static final int CHATGPT = 104;
221221

222222
public static final int GOOGLE_CALENDAR = 105;
223+
224+
public static final int SCANNER = 106;
223225

224226
public static final int ONLYOFFICE = 107;
225227

@@ -264,8 +266,4 @@ public static boolean showDisabled() {
264266
public static boolean showLicensee() {
265267
return enabled(SHOW_DISABLED);
266268
}
267-
268-
public static boolean isCommercial() {
269-
return enabled(ADDITIONAL_FORMATS);
270-
}
271269
}

logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/util/AwesomeFactory.java

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,10 @@ public static String getIconHtml(String icon) {
149149

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

158158
public static String getIconButtonHTML(String icon, String text, String tooltip, String color, String url) {
@@ -217,10 +217,15 @@ public static String getIndexedIcon(Integer indexed) {
217217
return "";
218218
String html = AwesomeFactory.getIconHtml("database");
219219
if (indexed == Constants.INDEX_SKIP) {
220+
// html = "<span class='fa-stack'><i class='" + getCssClassPrefix()
221+
// + " fa-database fa-stack-1x fa-thin' aria-hidden='true' data-fa-transform='grow-6'></i>";
222+
// html += I_CLASS + AwesomeFactory.getCssClassPrefix()
223+
// + " fa-times fa-stack-1x' style='color: red' data-fa-transform='grow-2'></i></span>";
224+
220225
html = "<span class='fa-stack'><i class='" + getCssClassPrefix()
221-
+ " fa-database fa-stack-1x' aria-hidden='true' data-fa-transform='grow-6'></i>";
226+
+ " fa-database fa-stack-1x fa-thin' aria-hidden='true' ></i>";
222227
html += I_CLASS + AwesomeFactory.getCssClassPrefix()
223-
+ " fa-times fa-stack-1x' style='color: red' data-fa-transform='grow-2'></i></span>";
228+
+ " fa-times fa-stack-1x' style='color: red' ></i></span>";
224229
}
225230
return html;
226231
}
@@ -236,18 +241,18 @@ public static String getColoredIconHtml(String icon, String text, String color)
236241
public static String getIconHtml(String icon, String rotation, String text) {
237242
if (text == null || text.isEmpty())
238243
return I_CLASS + getCssClassPrefix() + " fa-" + icon + (rotation != null ? " " + rotation : "")
239-
+ " fa-lg' aria-hidden='true'></i>";
244+
+ " fa-thin' aria-hidden='true'></i>";
240245
else
241246
return DIV_I_CLASS + getCssClassPrefix() + " fa-" + icon + (rotation != null ? " " + rotation : "")
242-
+ " fa-lg fa-fw' aria-hidden='true'></i> " + I18N.message(text) + CLOSE_DIV;
247+
+ " fa-thin fa-fw' aria-hidden='true'></i> " + I18N.message(text) + CLOSE_DIV;
243248
}
244249

245250
public static String getColoredIconHtmlWithoutI18N(String icon, String text, String color) {
246251
if (text == null || text.isEmpty())
247-
return I_CLASS + getCssClassPrefix() + " fa-" + icon + " fa-lg' aria-hidden='true' "
252+
return I_CLASS + getCssClassPrefix() + " fa-" + icon + " fa-thin' aria-hidden='true' "
248253
+ (color != null && !color.isEmpty() ? "style='color: " + color + "'" : "") + "></i>";
249254
else
250-
return DIV_I_CLASS + getCssClassPrefix() + " fa-" + icon + " fa-lg fa-fw' aria-hidden='true'"
255+
return DIV_I_CLASS + getCssClassPrefix() + " fa-" + icon + " fa-thin fa-fw' aria-hidden='true'"
251256
+ (color != null && !color.isEmpty() ? "style='color: " + color + "'" : "") + "></i> " + text
252257
+ CLOSE_DIV;
253258
}

0 commit comments

Comments
 (0)