diff --git a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/Feature.java b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/Feature.java
index 748d9f623..4745a81d2 100644
--- a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/Feature.java
+++ b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/Feature.java
@@ -264,8 +264,4 @@ public static boolean showDisabled() {
public static boolean showLicensee() {
return enabled(SHOW_DISABLED);
}
-
- public static boolean isCommercial() {
- return enabled(ADDITIONAL_FORMATS);
- }
}
\ No newline at end of file
diff --git a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/util/AwesomeFactory.java b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/util/AwesomeFactory.java
index 98268d080..70321f579 100644
--- a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/util/AwesomeFactory.java
+++ b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/util/AwesomeFactory.java
@@ -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'>";
+ return I_CLASS + getCssClassPrefix() + " fa-" + icon + " fa-thin fa-spinner' aria-hidden='true'>";
else
return DIV_I_CLASS + getCssClassPrefix() + " fa-" + icon
- + " fa-lg fa-fw fa-spinner' aria-hidden='true'> " + I18N.message(text) + CLOSE_DIV;
+ + " fa-thin fa-fw fa-spinner' aria-hidden='true'> " + I18N.message(text) + CLOSE_DIV;
}
public static String getIconButtonHTML(String icon, String text, String tooltip, String color, String url) {
@@ -217,10 +217,15 @@ public static String getIndexedIcon(Integer indexed) {
return "";
String html = AwesomeFactory.getIconHtml("database");
if (indexed == Constants.INDEX_SKIP) {
+// html = "";
+// html += I_CLASS + AwesomeFactory.getCssClassPrefix()
+// + " fa-times fa-stack-1x' style='color: red' data-fa-transform='grow-2'>";
+
html = "";
+ + " fa-database fa-stack-1x fa-thin' aria-hidden='true' >";
html += I_CLASS + AwesomeFactory.getCssClassPrefix()
- + " fa-times fa-stack-1x' style='color: red' data-fa-transform='grow-2'>";
+ + " fa-times fa-stack-1x' style='color: red' >";
}
return html;
}
@@ -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'>";
+ + " fa-thin' aria-hidden='true'>";
else
return DIV_I_CLASS + getCssClassPrefix() + " fa-" + icon + (rotation != null ? " " + rotation : "")
- + " fa-lg fa-fw' aria-hidden='true'> " + I18N.message(text) + CLOSE_DIV;
+ + " fa-thin fa-fw' aria-hidden='true'> " + 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 + "'" : "") + ">";
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 + "'" : "") + "> " + text
+ CLOSE_DIV;
}
diff --git a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/util/DocUtil.java b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/util/DocUtil.java
index 8c1424654..1503e0e39 100644
--- a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/util/DocUtil.java
+++ b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/util/DocUtil.java
@@ -159,11 +159,11 @@ public static String getFolderIcon(boolean open, int type, String name, String c
html = AwesomeFactory.getColoredIconHtmlWithoutI18N("cube", name, color);
else if (type == GUIFolder.TYPE_ALIAS) {
html = "
";
- html += "";
// This is the small alias arrow
- html += " ";
+ html += " ";
html += name + "
";
} else {
if (open)
diff --git a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/util/ItemFactory.java b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/util/ItemFactory.java
index 6569c175a..d5406c331 100644
--- a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/util/ItemFactory.java
+++ b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/util/ItemFactory.java
@@ -97,7 +97,6 @@
import com.smartgwt.client.widgets.form.fields.MiniDateRangeItem;
import com.smartgwt.client.widgets.form.fields.MultiComboBoxItem;
import com.smartgwt.client.widgets.form.fields.PasswordItem;
-import com.smartgwt.client.widgets.form.fields.PickerIcon;
import com.smartgwt.client.widgets.form.fields.RadioGroupItem;
import com.smartgwt.client.widgets.form.fields.RichTextItem;
import com.smartgwt.client.widgets.form.fields.RowSpacerItem;
@@ -112,7 +111,6 @@
import com.smartgwt.client.widgets.form.fields.events.ChangedHandler;
import com.smartgwt.client.widgets.form.fields.events.EditorEnterEvent;
import com.smartgwt.client.widgets.form.fields.events.EditorExitEvent;
-import com.smartgwt.client.widgets.form.fields.events.FormItemIconClickEvent;
import com.smartgwt.client.widgets.form.validator.CustomValidator;
import com.smartgwt.client.widgets.form.validator.IntegerRangeValidator;
import com.smartgwt.client.widgets.form.validator.IsFloatValidator;
@@ -128,6 +126,8 @@
*/
public class ItemFactory {
+ public static final int ITEM_ICON_SIZE = 14;
+
private static final String PROTOCOL = "protocol";
private static final String LEVEL = "level";
@@ -211,6 +211,9 @@ public class ItemFactory {
dateRangeItem.setHintStyle("hint");
dateRangeItem.setRequiredMessage(I18N.message(FIELDREQUIRED));
dateRangeItem.setBrowserSpellCheck(false);
+ dateRangeItem.setIconHeight(ITEM_ICON_SIZE);
+ dateRangeItem.setIconWidth(ITEM_ICON_SIZE);
+ dateRangeItem.setIconVAlign(VerticalAlignment.CENTER);
DateRangeItem.setDefaultProperties(dateRangeItem);
MiniDateRangeItem miniDateRangeItem = new MiniDateRangeItem();
@@ -225,6 +228,9 @@ public class ItemFactory {
miniDateRangeItem.setPickerIconPrompt(I18N.message(SHOWDATECHOOSER));
miniDateRangeItem.setRequiredMessage(I18N.message(FIELDREQUIRED));
miniDateRangeItem.setBrowserSpellCheck(false);
+ miniDateRangeItem.setIconHeight(ITEM_ICON_SIZE);
+ miniDateRangeItem.setIconWidth(ITEM_ICON_SIZE);
+ miniDateRangeItem.setIconVAlign(VerticalAlignment.CENTER);
MiniDateRangeItem.setDefaultProperties(miniDateRangeItem);
DateItem dateItem = new DateItem();
@@ -239,10 +245,13 @@ public class ItemFactory {
dateItem.setEndDate(new Date(new Date().getTime() + 2208992400000L));
dateItem.setStartDate(new Date(-2208992400000L));
dateItem.setBrowserSpellCheck(false);
+ dateItem.setIconHeight(ITEM_ICON_SIZE);
+ dateItem.setIconWidth(ITEM_ICON_SIZE);
+ dateItem.setIconVAlign(VerticalAlignment.CENTER);
DateItem.setDefaultProperties(dateItem);
DateChooser dateChooser = new DateChooser();
- dateChooser.setEndYear(2040);
+ dateChooser.setEndYear(2050);
dateChooser.setStartYear(1990);
DateChooser.setDefaultProperties(dateChooser);
@@ -251,6 +260,9 @@ public class ItemFactory {
selectItem.setHintStyle("hint");
selectItem.setRequiredMessage(I18N.message(FIELDREQUIRED));
selectItem.setBrowserSpellCheck(false);
+ selectItem.setIconHeight(ITEM_ICON_SIZE);
+ selectItem.setIconWidth(ITEM_ICON_SIZE);
+ selectItem.setIconVAlign(VerticalAlignment.CENTER);
SelectItem.setDefaultProperties(selectItem);
TextItem textItem = new TextItem();
@@ -258,24 +270,36 @@ public class ItemFactory {
textItem.setWidth(150);
textItem.setRequiredMessage(I18N.message(FIELDREQUIRED));
textItem.setBrowserSpellCheck(false);
+ textItem.setIconHeight(ITEM_ICON_SIZE);
+ textItem.setIconWidth(ITEM_ICON_SIZE);
+ textItem.setIconVAlign(VerticalAlignment.CENTER);
TextItem.setDefaultProperties(textItem);
RadioGroupItem radioGroupItem = new RadioGroupItem();
radioGroupItem.setHintStyle("hint");
radioGroupItem.setRequiredMessage(I18N.message(FIELDREQUIRED));
radioGroupItem.setBrowserSpellCheck(false);
+ radioGroupItem.setIconHeight(ITEM_ICON_SIZE);
+ radioGroupItem.setIconWidth(ITEM_ICON_SIZE);
+ radioGroupItem.setIconVAlign(VerticalAlignment.CENTER);
RadioGroupItem.setDefaultProperties(radioGroupItem);
CheckboxItem checkboxItem = new CheckboxItem();
checkboxItem.setHintStyle("hint");
checkboxItem.setRequiredMessage(I18N.message(FIELDREQUIRED));
checkboxItem.setBrowserSpellCheck(false);
+ checkboxItem.setIconHeight(ITEM_ICON_SIZE);
+ checkboxItem.setIconWidth(ITEM_ICON_SIZE);
+ checkboxItem.setIconVAlign(VerticalAlignment.CENTER);
CheckboxItem.setDefaultProperties(checkboxItem);
MultiComboBoxItem multiComboBoxItem = new MultiComboBoxItem();
multiComboBoxItem.setHintStyle("hint");
multiComboBoxItem.setRequiredMessage(I18N.message(FIELDREQUIRED));
multiComboBoxItem.setBrowserSpellCheck(false);
+ multiComboBoxItem.setIconHeight(ITEM_ICON_SIZE);
+ multiComboBoxItem.setIconWidth(ITEM_ICON_SIZE);
+ multiComboBoxItem.setIconVAlign(VerticalAlignment.CENTER);
MultiComboBoxItem.setDefaultProperties(multiComboBoxItem);
SpinnerItem spinnerItem = new SpinnerItem();
@@ -283,11 +307,17 @@ public class ItemFactory {
spinnerItem.setWidth(60);
spinnerItem.setRequiredMessage(I18N.message(FIELDREQUIRED));
spinnerItem.setBrowserSpellCheck(false);
+ spinnerItem.setIconHeight(ITEM_ICON_SIZE);
+ spinnerItem.setIconWidth(ITEM_ICON_SIZE);
+ spinnerItem.setIconVAlign(VerticalAlignment.CENTER);
SpinnerItem.setDefaultProperties(spinnerItem);
PasswordItem passwordItem = new PasswordItem();
passwordItem.setHintStyle("hint");
passwordItem.setRequiredMessage(I18N.message(FIELDREQUIRED));
+ passwordItem.setIconHeight(ITEM_ICON_SIZE);
+ passwordItem.setIconWidth(ITEM_ICON_SIZE);
+ passwordItem.setIconVAlign(VerticalAlignment.CENTER);
TextItem.setDefaultProperties(passwordItem);
StaticTextItem staticTextItem = new StaticTextItem();
@@ -295,12 +325,18 @@ public class ItemFactory {
staticTextItem.setHintStyle("hint");
staticTextItem.setRequiredMessage(I18N.message(FIELDREQUIRED));
staticTextItem.setBrowserSpellCheck(false);
+ staticTextItem.setIconHeight(ITEM_ICON_SIZE);
+ staticTextItem.setIconWidth(ITEM_ICON_SIZE);
+ staticTextItem.setIconVAlign(VerticalAlignment.CENTER);
StaticTextItem.setDefaultProperties(staticTextItem);
IntegerItem integerItem = new IntegerItem();
integerItem.setRequiredMessage(I18N.message(FIELDREQUIRED));
integerItem.setHintStyle("hint");
integerItem.setBrowserSpellCheck(false);
+ integerItem.setIconHeight(ITEM_ICON_SIZE);
+ integerItem.setIconWidth(ITEM_ICON_SIZE);
+ integerItem.setIconVAlign(VerticalAlignment.CENTER);
IntegerItem.setDefaultProperties(integerItem);
ColorPickerItem colorPickerItem = new ColorPickerItem();
@@ -308,12 +344,18 @@ public class ItemFactory {
colorPickerItem.setRequiredMessage(I18N.message(FIELDREQUIRED));
colorPickerItem.setHintStyle("hint");
colorPickerItem.setBrowserSpellCheck(false);
+ colorPickerItem.setIconHeight(ITEM_ICON_SIZE);
+ colorPickerItem.setIconWidth(ITEM_ICON_SIZE);
+ colorPickerItem.setIconVAlign(VerticalAlignment.CENTER);
ColorPickerItem.setDefaultProperties(colorPickerItem);
LinkItem linkItem = new LinkItem();
linkItem.setRequiredMessage(I18N.message(FIELDREQUIRED));
linkItem.setHintStyle("hint");
linkItem.setBrowserSpellCheck(false);
+ linkItem.setIconHeight(ITEM_ICON_SIZE);
+ linkItem.setIconWidth(ITEM_ICON_SIZE);
+ linkItem.setIconVAlign(VerticalAlignment.CENTER);
LinkItem.setDefaultProperties(linkItem);
TextAreaItem textAreaItem = new TextAreaItem();
@@ -321,27 +363,42 @@ public class ItemFactory {
textAreaItem.setHintStyle("hint");
textAreaItem.setBrowserSpellCheck(false);
textAreaItem.setIconVAlign(VerticalAlignment.CENTER);
+ textAreaItem.setIconHeight(ITEM_ICON_SIZE);
+ textAreaItem.setIconWidth(ITEM_ICON_SIZE);
+ textAreaItem.setIconVAlign(VerticalAlignment.CENTER);
TextAreaItem.setDefaultProperties(textAreaItem);
TimeItem timeItem = new TimeItem();
timeItem.setHintStyle("hint");
timeItem.setWidth(60);
timeItem.setBrowserSpellCheck(false);
+ timeItem.setIconHeight(ITEM_ICON_SIZE);
+ timeItem.setIconWidth(ITEM_ICON_SIZE);
+ timeItem.setIconVAlign(VerticalAlignment.CENTER);
TimeItem.setDefaultProperties(timeItem);
FloatItem floatItem = new FloatItem();
floatItem.setHintStyle("hint");
floatItem.setBrowserSpellCheck(false);
+ floatItem.setIconHeight(ITEM_ICON_SIZE);
+ floatItem.setIconWidth(ITEM_ICON_SIZE);
+ floatItem.setIconVAlign(VerticalAlignment.CENTER);
FloatItem.setDefaultProperties(floatItem);
ColorPickerItem colorItemPicker = new ColorPickerItem();
colorItemPicker.setHintStyle("hint");
colorItemPicker.setWidth(115);
colorItemPicker.setBrowserSpellCheck(false);
+ colorItemPicker.setIconHeight(ITEM_ICON_SIZE);
+ colorItemPicker.setIconWidth(ITEM_ICON_SIZE);
+ colorItemPicker.setIconVAlign(VerticalAlignment.CENTER);
ColorPickerItem.setDefaultProperties(colorItemPicker);
RichTextItem richTextItem = new RichTextItem();
richTextItem.setBrowserSpellCheck(false);
+ richTextItem.setIconHeight(ITEM_ICON_SIZE);
+ richTextItem.setIconWidth(ITEM_ICON_SIZE);
+ richTextItem.setIconVAlign(VerticalAlignment.CENTER);
RichTextItem.setDefaultProperties(richTextItem);
}
@@ -361,11 +418,15 @@ public static ColorPickerItem newColorPickerItem(String name, String title, Stri
item.setValue(value);
if (clearOption) {
- PickerIcon clear = new PickerIcon(PickerIcon.CLEAR, (FormItemIconClickEvent event) -> {
+ FormItemIcon clear = new FormItemIcon();
+ clear.setPrompt(I18N.message("clear"));
+ clear.setSrc("[SKIN]/trash.svg");
+ clear.addFormItemClickHandler(click -> {
item.setValue((String) null);
if (changedHandler != null)
changedHandler.onChanged(null);
});
+
item.setIcons(clear);
item.setIconVAlign(VerticalAlignment.CENTER);
}
@@ -1153,14 +1214,15 @@ public static SelectItem newEventsSelector(String name, String title, final Chan
if (handler != null)
select.addChangedHandler(handler);
- PickerIcon clear = new PickerIcon(PickerIcon.CLEAR, click -> {
+ FormItemIcon clear = new FormItemIcon();
+ clear.setPrompt(I18N.message("clear"));
+ clear.setSrc("[SKIN]/trash.svg");
+ clear.addFormItemClickHandler(click -> {
select.clearValue();
select.setValue((String) null);
if (handler != null)
handler.onChanged(null);
});
- clear.setWidth(12);
- clear.setHeight(12);
select.setIcons(clear);
return select;
@@ -1178,14 +1240,15 @@ public static SelectItem newEventSelector(String name, String title, final Chang
if (handler != null)
select.addChangedHandler(handler);
- PickerIcon clear = new PickerIcon(PickerIcon.CLEAR, (FormItemIconClickEvent event) -> {
+ FormItemIcon clear = new FormItemIcon();
+ clear.setPrompt(I18N.message("clear"));
+ clear.setSrc("[SKIN]/trash.svg");
+ clear.addFormItemClickHandler(click -> {
select.clearValue();
select.setValue((String) null);
if (handler != null)
handler.onChanged(null);
});
- clear.setWidth(12);
- clear.setHeight(12);
select.setIcons(clear);
return select;
@@ -1311,9 +1374,7 @@ public static TextItem newCronExpressionItem(String name, String title, String v
FormItemIcon composer = new FormItemIcon();
composer.setPrompt(I18N.message("opencronexpressioncomposer"));
- composer.setSrc("[SKIN]/DynamicForm/date_control.png");
- composer.setWidth(16);
- composer.setHeight(16);
+ composer.setSrc("[SKIN]/calendar-lines-pen.svg");
composer.addFormItemClickHandler(click -> {
new CronExpressionComposer(cron, handler).show();
click.cancel();
@@ -1321,9 +1382,7 @@ public static TextItem newCronExpressionItem(String name, String title, String v
FormItemIcon validate = new FormItemIcon();
validate.setPrompt(I18N.message("validate"));
- validate.setSrc("[SKIN]/actions/approve.png");
- validate.setWidth(16);
- validate.setHeight(16);
+ validate.setSrc("[SKIN]/check.svg");
validate.addFormItemClickHandler(click -> InfoService.Instance.get().getCronDescription(cron.getValueAsString(),
I18N.getLocale(), new AsyncCallback() {
@@ -1341,14 +1400,15 @@ public void onSuccess(String description) {
}
}));
- PickerIcon clear = new PickerIcon(PickerIcon.CLEAR, click -> {
+ FormItemIcon clear = new FormItemIcon();
+ clear.setPrompt(I18N.message("clear"));
+ clear.setSrc("[SKIN]/trash.svg");
+ clear.addFormItemClickHandler(click -> {
cron.setValue((String) null);
cron.clearErrors();
if (handler != null)
handler.onChanged(null);
});
- clear.setWidth(16);
- clear.setHeight(16);
cron.setIcons(composer, validate, clear);
return cron;
@@ -1516,8 +1576,7 @@ public static PasswordItem newPasswordItem(String name, String title, String val
password.setName(originalItemName(name));
if (value != null)
password.setValue(value);
- password.setIconVAlign(VerticalAlignment.CENTER);
-
+
FormItemIcon showPassword = newShowPasswordIcon();
password.setIcons(showPassword);
@@ -1528,9 +1587,7 @@ public static PasswordItem newPasswordItem(String name, String title, String val
private static FormItemIcon newShowPasswordIcon() {
FormItemIcon showPassword = new FormItemIcon();
showPassword.setName("showpassword");
- showPassword.setWidth(16);
- showPassword.setHeight(16);
- showPassword.setSrc("[SKIN]/eye.png");
+ showPassword.setSrc("[SKIN]/eye.svg");
showPassword.setPrompt(I18N.message("showpassword"));
showPassword.addFormItemClickHandler(event -> {
NodeList inputElements = Document.get().getElementsByTagName("input");
@@ -1561,9 +1618,7 @@ public static PasswordItem newPasswordItemPreventAutocomplete(String name, Strin
if (withGeneratorTool) {
FormItemIcon generator = new FormItemIcon();
generator.setName("generator");
- generator.setWidth(16);
- generator.setHeight(16);
- generator.setSrc("[SKIN]/key.png");
+ generator.setSrc("[SKIN]/key.svg");
generator.setPrompt(I18N.message("passwordgenerator"));
generator.addFormItemClickHandler(event -> new PasswordGenerator().show());
password.setIcons(newShowPasswordIcon(), generator);
@@ -1590,19 +1645,19 @@ public static StaticTextItem newSafePasswordItem(String name, String title, Stri
FormItem hiddenPasswordItem, ChangedHandler changedHandler) {
StaticTextItem item = newStaticTextItem(name, title, value == null || value.isEmpty() ? "" : "*****");
- PickerIcon clear = new PickerIcon(PickerIcon.CLEAR, pick -> {
+ FormItemIcon clear = new FormItemIcon();
+ clear.setPrompt(I18N.message("clear"));
+ clear.setSrc("[SKIN]/trash.svg");
+ clear.addFormItemClickHandler(click -> {
item.setValue((String) null);
hiddenPasswordItem.setValue((String) null);
if (changedHandler != null)
changedHandler.onChanged(null);
});
- clear.setPrompt(I18N.message("clear"));
FormItemIcon edit = new FormItemIcon();
edit.setName("edit");
- edit.setWidth(16);
- edit.setHeight(16);
- edit.setSrc("[SKIN]/edit.png");
+ edit.setSrc("[SKIN]/pen-to-square.svg");
edit.setPrompt(I18N.message("edit"));
edit.addFormItemClickHandler(event -> {
PasswordItem password = newPasswordItem("psw", title,
@@ -1892,11 +1947,11 @@ public static LinkItem newLinkItem(String name, String title, String linkTitle,
final CopyTextFormItemIcon copyTextFormItemIcon = new CopyTextFormItemIcon(
textToCopy != null ? textToCopy : url, textToCopy != null ? "copytext" : "copylink");
- if (Feature.isCommercial())
- linkItem.setIcons(copyTextFormItemIcon, qrFormItemIcon);
- else
+ if (Util.isCommunity())
linkItem.setIcons(copyTextFormItemIcon);
-
+ else
+ linkItem.setIcons(copyTextFormItemIcon, qrFormItemIcon);
+
return linkItem;
}
@@ -1950,8 +2005,6 @@ public static TextAreaItem newTextAreaItemForAutomation(String name, String valu
private static void appendAutomationEditorIcon(FormItem item, ChangedHandler handler, boolean withHtmlEditor) {
FormItemIcon editAutomation = new FormItemIcon();
editAutomation.setName("editautomation");
- editAutomation.setWidth(16);
- editAutomation.setHeight(16);
editAutomation.setSrc("[SKIN]/java.png");
editAutomation.setPrompt(I18N.message("openautomationeditor"));
editAutomation.addFormItemClickHandler(click -> new AutomationItemEditor(item, handler).show());
@@ -1966,9 +2019,7 @@ private static void appendAutomationEditorIcon(FormItem item, ChangedHandler han
private static FormItemIcon prepareEditHtmlIcon(FormItem item, ChangedHandler handler) {
FormItemIcon editHtml = new FormItemIcon();
editHtml.setName(EDITHTML);
- editHtml.setWidth(16);
- editHtml.setHeight(16);
- editHtml.setSrc("[SKIN]/html.png");
+ editHtml.setSrc("[SKIN]/code.svg");
editHtml.setPrompt(I18N.message("openhtmleditor"));
editHtml.addFormItemClickHandler(click -> new HtmlItemEditor(item, handler).show());
return editHtml;
@@ -2664,13 +2715,14 @@ public static SelectItem newSubscriptionTypeSelector() {
selector.setValueMap(opts);
selector.setRequired(false);
- PickerIcon clear = new PickerIcon(PickerIcon.CLEAR, (FormItemIconClickEvent event) -> {
+ FormItemIcon clear = new FormItemIcon();
+ clear.setPrompt(I18N.message("clear"));
+ clear.setSrc("[SKIN]/trash.svg");
+ clear.addFormItemClickHandler(click -> {
selector.clearValue();
selector.setValue((String) null);
selector.fireEvent(new ChangedEvent(selector.getJsObj()));
});
- clear.setWidth(12);
- clear.setHeight(12);
selector.setIcons(clear);
return selector;
@@ -2694,9 +2746,7 @@ public static TextAreaItem newTextAreaItemForNote(String name, String title, Str
if (withSimplifiedHtmlEditor) {
FormItemIcon editHtml = new FormItemIcon();
editHtml.setName(EDITHTML);
- editHtml.setWidth(16);
- editHtml.setHeight(16);
- editHtml.setSrc("[SKIN]/html.png");
+ editHtml.setSrc("[SKIN]/code.svg");
editHtml.setPrompt(I18N.message("openhtmleditor"));
editHtml.addFormItemClickHandler(click -> {
RichTextItem htmlItem = newRichTextItemForNote("html", "html", item.getValueAsString());
diff --git a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/util/Util.java b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/util/Util.java
index e5f161810..dc11b5af4 100644
--- a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/util/Util.java
+++ b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/util/Util.java
@@ -181,10 +181,10 @@ public static String qrURL(String content, int size) {
}
public static String qrImg(String content, int size) {
- if (Feature.isCommercial())
- return "";
- else
+ if (isCommunity())
return "";
+ else
+ return "";
}
public static String displayURL(Long docId, Long folderId) {
@@ -454,6 +454,10 @@ public static boolean isCommunity() {
return !Feature.enabled(Feature.ADDITIONAL_FORMATS);
}
+ public static boolean isCommercial() {
+ return Feature.enabled(Feature.ADDITIONAL_FORMATS);
+ }
+
public static boolean isOfficeFileType(String type) {
return officeExts.stream().anyMatch(type::equalsIgnoreCase);
}
diff --git a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/widgets/CopyTextFormItemIcon.java b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/widgets/CopyTextFormItemIcon.java
index cab8e2b49..65db348e4 100644
--- a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/widgets/CopyTextFormItemIcon.java
+++ b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/widgets/CopyTextFormItemIcon.java
@@ -22,8 +22,6 @@ public CopyTextFormItemIcon(String text, String tooltip) {
setName("copy");
setPrompt(I18N.message(tooltip));
setSrc("[SKIN]/paste.svg");
- setWidth(16);
- setHeight(16);
addFormItemClickHandler(event -> {
if (text != null)
Util.copyText(text);
diff --git a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/widgets/FolderSelector.java b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/widgets/FolderSelector.java
index 1e2f89677..1a77c9ace 100644
--- a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/widgets/FolderSelector.java
+++ b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/widgets/FolderSelector.java
@@ -9,7 +9,6 @@
import com.logicaldoc.gui.common.client.data.FoldersDS;
import com.logicaldoc.gui.common.client.i18n.I18N;
import com.logicaldoc.gui.frontend.client.document.DocumentsPanel;
-import com.logicaldoc.gui.frontend.client.folder.FolderSearchDialog;
import com.smartgwt.client.widgets.form.fields.FormItemIcon;
import com.smartgwt.client.widgets.form.fields.PickerIcon;
import com.smartgwt.client.widgets.form.fields.TextItem;
@@ -54,32 +53,33 @@ public FolderSelector(String name, List additionalIcons) {
setFolder(Long.parseLong(item.getAttributeAsString("folderId")), item.getAttributeAsString("name"));
});
- PickerIcon search = new PickerIcon(PickerIcon.SEARCH,
- event -> new FolderSearchDialog(FolderSelector.this).show());
+ FormItemIcon search = new FormItemIcon();
search.setPrompt(I18N.message("search"));
+ search.setSrc("[SKIN]/magnifying-glass.svg");
search.setWidth(12);
search.setHeight(12);
PickerIcon pick = new PickerIcon(PickerIcon.COMBO_BOX, event -> menu.showContextMenu());
FormItemIcon open = new FormItemIcon();
- open.setName("open");
+ open.setPrompt(I18N.message("openfolder"));
+ open.setSrc("[SKIN]/folder.svg");
open.setWidth(12);
open.setHeight(12);
- open.setSrc("[SKIN]/folder.png");
- open.setPrompt(I18N.message("openfolder"));
open.addFormItemClickHandler(click -> {
if (getFolderId() != null)
DocumentsPanel.get().openInFolder(getFolderId(), null);
});
- PickerIcon clear = new PickerIcon(PickerIcon.CLEAR, event -> {
- clearValue();
- setFolder(null, null);
- });
+ FormItemIcon clear = new FormItemIcon();
clear.setPrompt(I18N.message("clear"));
+ clear.setSrc("[SKIN]/trash.svg");
clear.setWidth(12);
clear.setHeight(12);
+ clear.addFormItemClickHandler(click -> {
+ clearValue();
+ setFolder(null, null);
+ });
List icons = new ArrayList<>();
icons.add(pick);
diff --git a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/widgets/QRFormItemIcon.java b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/widgets/QRFormItemIcon.java
index 441bf970e..4921ab735 100644
--- a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/widgets/QRFormItemIcon.java
+++ b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/widgets/QRFormItemIcon.java
@@ -1,7 +1,7 @@
package com.logicaldoc.gui.common.client.widgets;
-import com.logicaldoc.gui.common.client.Feature;
import com.logicaldoc.gui.common.client.i18n.I18N;
+import com.logicaldoc.gui.common.client.util.Util;
import com.smartgwt.client.widgets.form.fields.FormItemIcon;
/**
@@ -20,23 +20,18 @@ public class QRFormItemIcon extends FormItemIcon {
*/
public QRFormItemIcon(String code, String tooltip) {
setName("qrcode");
- if (Feature.isCommercial()) {
+ if (Util.isCommercial()) {
setPrompt(I18N.message(tooltip));
setSrc("[SKIN]/qrcode.svg");
- setWidth(16);
- setHeight(16);
-
addFormItemClickHandler(event -> {
String content = code;
if (content == null)
content = event.getItem().getValue().toString();
- new QRLightbox(content, "qrcode", 150).show();
+ new QRLightbox(content).show();
});
} else {
setSrc("[SKIN]/blank.png");
setText("");
- setWidth(16);
- setHeight(16);
setDisabled(true);
}
}
diff --git a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/widgets/QRLightbox.java b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/widgets/QRLightbox.java
index 985905b4f..0760496b1 100644
--- a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/widgets/QRLightbox.java
+++ b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/widgets/QRLightbox.java
@@ -22,40 +22,43 @@
*
*/
public class QRLightbox extends Window {
- public QRLightbox(String content, String title, int size) {
+ private static final int QR_SIZE = 150;
+
+ public QRLightbox(String content) {
setHeaderControls(HeaderControls.HEADER_LABEL, HeaderControls.CLOSE_BUTTON);
- setTitle(I18N.message(title));
+ setTitle(I18N.message("qrcode"));
setCanDragResize(true);
setIsModal(true);
setShowModalMask(true);
setAutoSize(true);
centerInPage();
-
- String qrUrl1 = Util.qrURL(content, size);
+
+ String qrUrl1 = Util.qrURL(content, QR_SIZE);
if ((content.startsWith("http") || content.startsWith("https")) && content.startsWith(Util.contextPath())
&& !content.startsWith(Session.get().getConfig("server.url"))) {
-
- // We are not accessing from the declared server.url so display the additional QR with server.url
+
+ // We are not accessing from the declared server.url so display the
+ // additional QR with server.url
final StringBuilder content2 = new StringBuilder(Session.get().getConfig("server.url"));
if (!content2.toString().endsWith("/"))
content2.append("/");
content2.append(content.substring(Util.contextPath().length()));
-
- String qrUrl2 = Util.qrURL(content2.toString(), size);
-
+
+ String qrUrl2 = Util.qrURL(content2.toString(), QR_SIZE);
+
ImageLoader.loadImages(new String[] { qrUrl1, qrUrl2 }, imageElements -> {
- StaticTextItem qr1Item = ItemFactory.newStaticTextItem("qr1", title,
- "");
+ StaticTextItem qr1Item = ItemFactory.newStaticTextItem("qr1", "qrcode",
+ "");
qr1Item.setWrap(false);
qr1Item.setWrapTitle(false);
qr1Item.setShowTitle(false);
- StaticTextItem qr2Item = ItemFactory.newStaticTextItem("qr2", title,
- "");
+ StaticTextItem qr2Item = ItemFactory.newStaticTextItem("qr2", "qrcode",
+ "");
qr2Item.setWrap(false);
qr2Item.setWrapTitle(false);
qr2Item.setShowTitle(false);
@@ -68,11 +71,12 @@ public QRLightbox(String content, String title, int size) {
addItem(form);
});
} else {
- // We are accessing from the declared server.url so just display the QR
+ // We are accessing from the declared server.url so just display the
+ // QR
ImageLoader.loadImages(new String[] { qrUrl1 }, imageElements -> {
Img img = new Img(qrUrl1);
- img.setImageWidth(size);
- img.setImageHeight(size);
+ img.setImageWidth(QR_SIZE);
+ img.setImageHeight(QR_SIZE);
img.setImageType(ImageStyle.NORMAL);
addItem(img);
});
diff --git a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/document/DocumentStandardPropertiesPanel.java b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/document/DocumentStandardPropertiesPanel.java
index 06a44bda7..7f5e24414 100644
--- a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/document/DocumentStandardPropertiesPanel.java
+++ b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/document/DocumentStandardPropertiesPanel.java
@@ -21,7 +21,6 @@
import com.logicaldoc.gui.common.client.widgets.preview.PreviewTile;
import com.logicaldoc.gui.frontend.client.services.DocumentService;
import com.smartgwt.client.data.Record;
-import com.smartgwt.client.types.PickerIconName;
import com.smartgwt.client.types.TitleOrientation;
import com.smartgwt.client.util.SC;
import com.smartgwt.client.widgets.form.DynamicForm;
@@ -31,12 +30,10 @@
import com.smartgwt.client.widgets.form.fields.FormItemIcon;
import com.smartgwt.client.widgets.form.fields.LinkItem;
import com.smartgwt.client.widgets.form.fields.MultiComboBoxItem;
-import com.smartgwt.client.widgets.form.fields.PickerIcon;
import com.smartgwt.client.widgets.form.fields.SelectItem;
import com.smartgwt.client.widgets.form.fields.StaticTextItem;
import com.smartgwt.client.widgets.form.fields.TextItem;
import com.smartgwt.client.widgets.form.fields.events.ChangedHandler;
-import com.smartgwt.client.widgets.form.fields.events.FormItemIconClickEvent;
import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.layout.Layout;
import com.smartgwt.client.widgets.layout.VLayout;
@@ -152,8 +149,10 @@ private StaticTextItem preparePermaLink() {
StaticTextItem permaLink = ItemFactory.newStaticTextItem("permalink", perma);
- if (Feature.isCommercial()) {
- FormItemIcon qrCode = new QRFormItemIcon();
+ if (Util.isCommercial()) {
+ FormItemIcon qrCode = new FormItemIcon();
+ qrCode.setPrompt(I18N.message("qrcode"));
+ qrCode.setSrc("[SKIN]/qrcode.svg");
qrCode.addFormItemClickHandler(click -> new PermaLinkDisplay(document.getId()).show());
permaLink.setIcons(qrCode);
}
@@ -168,7 +167,7 @@ private StaticTextItem prepareIdItem() {
id.setValue(Util.padLeft(Long.toString(document.getId()) + " (" + document.getCustomId() + ")", 35));
}
- if (Feature.isCommercial()) {
+ if (Util.isCommercial()) {
StringBuilder sb = new StringBuilder("id: ");
sb.append(document.getId());
sb.append("_CR_filename: ");
@@ -243,11 +242,13 @@ private LinkItem prepareFolderItem() {
private StaticTextItem preparePagesItem() {
StaticTextItem pages = ItemFactory.newStaticTextItem("pages", Util.formatInt(document.getPages()));
pages.setIconHSpace(2);
- pages.setIconWidth(16);
- pages.setIconHeight(16);
pages.setWidth("1%");
- PickerIcon countPages = new PickerIcon(PickerIconName.REFRESH, (final FormItemIconClickEvent event) -> {
- event.getItem().setValue(I18N.message("computing") + "...");
+
+ FormItemIcon countPages = new FormItemIcon();
+ countPages.setSrc("[SKIN]/arrows-rotate.svg");
+ countPages.setPrompt(I18N.message("countpages"));
+ countPages.addFormItemClickHandler(click -> {
+ click.getItem().setValue(I18N.message("computing") + "...");
DocumentService.Instance.get().updatePages(document.getId(), new AsyncCallback<>() {
@Override
@@ -264,7 +265,7 @@ public void onSuccess(Integer docPages) {
}
});
});
- countPages.setPrompt(I18N.message("countpages"));
+
if (document.getId() != 0)
pages.setIcons(countPages);
return pages;
@@ -315,9 +316,7 @@ private void addTags(List items) {
FormItemIcon editTags = new FormItemIcon();
editTags.setPrompt(I18N.message("edittags"));
- editTags.setSrc("[SKIN]/actions/edit.png");
- editTags.setWidth(16);
- editTags.setHeight(16);
+ editTags.setSrc("[SKIN]/pen-to-square.svg");
editTags.addFormItemClickHandler(event -> {
tagsString.setVisible(false);
tagItem.setVisible(true);
diff --git a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/document/DocumentToolbar.java b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/document/DocumentToolbar.java
index 11bff5977..30a5e4619 100644
--- a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/document/DocumentToolbar.java
+++ b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/document/DocumentToolbar.java
@@ -473,7 +473,7 @@ private void addOffice() {
if (Feature.visible(Feature.OFFICE)) {
addButton(office);
office.setTooltip(I18N.message("editwithoffice"));
- office.setTitle("");
+ office.setTitle("");
if (!Feature.enabled(Feature.OFFICE))
setFeatureDisabled(office);
@@ -488,7 +488,7 @@ private void addOnlyOffice() {
&& Session.get().getConfigAsBoolean("converter.OnlyOfficeConverter.enabled")) {
addButton(onlyoffice);
onlyoffice.setTooltip(I18N.message("editwithonlyoffice"));
- onlyoffice.setTitle("");
+ onlyoffice.setTitle("");
if (!Feature.enabled(Feature.OFFICE))
setFeatureDisabled(onlyoffice);
diff --git a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/document/PermaLinkDisplay.java b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/document/PermaLinkDisplay.java
index d857ba122..2291c63ac 100644
--- a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/document/PermaLinkDisplay.java
+++ b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/document/PermaLinkDisplay.java
@@ -10,7 +10,6 @@
import com.smartgwt.client.types.TitleOrientation;
import com.smartgwt.client.widgets.Window;
import com.smartgwt.client.widgets.form.DynamicForm;
-import com.smartgwt.client.widgets.form.fields.ButtonItem;
import com.smartgwt.client.widgets.form.fields.StaticTextItem;
/**
@@ -44,22 +43,23 @@ public PermaLinkDisplay(long docId) {
ImageLoader.loadImages(new String[] { Util.qrURL(downloadUrl, QR_SIZE), Util.qrURL(downloadUrl2, QR_SIZE),
Util.qrURL(displayUrl, QR_SIZE), Util.qrURL(displayUrl2, QR_SIZE) }, imageElements -> {
- DynamicForm form = new DynamicForm();
- form.setMargin(4);
- form.setTitleOrientation(TitleOrientation.LEFT);
-
StaticTextItem downloadUrlItem = prepareBarcodeAndLink("download1", "download", downloadUrl);
+ downloadUrlItem.setShowTitle(true);
StaticTextItem downloadUrlItem2 = prepareBarcodeAndLink("download2", "download", downloadUrl2);
+ downloadUrlItem2.setShowTitle(false);
downloadUrlItem2.setVisible(!downloadUrl.equals(downloadUrl2));
- StaticTextItem displayUrlItem = prepareBarcodeAndLink("displayUrl", "details", displayUrl);
+ StaticTextItem displayUrlItem = prepareBarcodeAndLink("displayUrl1", "details", displayUrl);
+ displayUrlItem.setShowTitle(true);
StaticTextItem displayUrlItem2 = prepareBarcodeAndLink("displayUrl2", "details", displayUrl2);
- displayUrlItem2.setVisible(!downloadUrl.equals(downloadUrl2));
+ displayUrlItem2.setShowTitle(false);
+ displayUrlItem2.setVisible(!displayUrl.equals(displayUrl2));
- ButtonItem close = new ButtonItem("close", I18N.message("close"));
- close.addClickHandler(event -> PermaLinkDisplay.this.destroy());
-
- form.setItems(downloadUrlItem, downloadUrlItem2, displayUrlItem, displayUrlItem2, close);
+ DynamicForm form = new DynamicForm();
+ form.setNumCols(1);
+ form.setMargin(2);
+ form.setTitleOrientation(TitleOrientation.TOP);
+ form.setItems(downloadUrlItem, downloadUrlItem2, displayUrlItem, displayUrlItem2);
addItem(form);
});
diff --git a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/folder/FolderStandardPropertiesPanel.java b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/folder/FolderStandardPropertiesPanel.java
index cc5f5d165..03776d2ac 100644
--- a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/folder/FolderStandardPropertiesPanel.java
+++ b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/folder/FolderStandardPropertiesPanel.java
@@ -112,22 +112,16 @@ private void refresh() {
final StaticTextItem documents = ItemFactory.newStaticTextItem("documents",
folder.getDocumentCount() > 0 ? Util.formatLong(folder.getDocumentCount()) : "-");
documents.setIconHSpace(2);
- documents.setIconWidth(16);
- documents.setIconHeight(16);
documents.setWidth("1%");
final StaticTextItem subfolders = ItemFactory.newStaticTextItem("folders",
folder.getSubfolderCount() > 0 ? Util.formatLong(folder.getSubfolderCount()) : "-");
subfolders.setIconHSpace(2);
- subfolders.setIconWidth(16);
- subfolders.setIconHeight(16);
subfolders.setWidth("1%");
final StaticTextItem size = ItemFactory.newStaticTextItem("size",
folder.getSize() > 0 ? Util.formatSize(folder.getSize()) : "-");
size.setIconHSpace(2);
- size.setIconWidth(16);
- size.setIconHeight(16);
size.setWidth("1%");
addComputeStatsIcons(documents, subfolders, size);
@@ -162,7 +156,7 @@ private StaticTextItem prepareIdItem() {
sb.append("_CR_path: ");
sb.append(folder.getPathExtended());
- if (Feature.isCommercial())
+ if (Util.isCommercial())
id.setIcons(new QRFormItemIcon(sb.toString()));
if (folder.getFoldRef() != null)
@@ -197,8 +191,6 @@ private void addComputeStatsIcons(StaticTextItem documents, StaticTextItem subfo
FormItemIcon computeStats = new FormItemIcon();
computeStats.setPrompt(I18N.message("calculatestats"));
computeStats.setSrc("[SKIN]/arrows-rotate.svg");
- computeStats.setWidth(16);
- computeStats.setHeight(16);
computeStats.addFormItemClickHandler(click -> {
click.getItem().setValue(I18N.message("computing") + "...");
FolderService.Instance.get().computeStats(folder.getId(), new AsyncCallback<>() {
@@ -241,9 +233,6 @@ private FormItemIcon prepareEnforceStore() {
FormItemIcon enforceStore = new FormItemIcon();
enforceStore.setPrompt(I18N.message("enforcefilesintofolderstorage"));
enforceStore.setSrc("[SKIN]/boxes-stacked.svg");
- enforceStore.setWidth(16);
- enforceStore.setHeight(16);
-
enforceStore.addFormItemClickHandler(event -> {
LD.ask(I18N.message("enforcementofstorage"),
I18N.message("enforcefilesintofolderstorage") + ".\n" + I18N.message("doyouwanttoproceed"), yes -> {
@@ -275,9 +264,6 @@ private FormItemIcon prepareApplyStoreToSubfoldersItem() {
FormItemIcon applyStoreToSubfolders = new FormItemIcon();
applyStoreToSubfolders.setPrompt(I18N.message("applytosubfolders"));
applyStoreToSubfolders.setSrc("[SKIN]/clone.svg");
-
- applyStoreToSubfolders.setWidth(16);
- applyStoreToSubfolders.setHeight(16);
applyStoreToSubfolders.addFormItemClickHandler(applyStoreToSubfoldersClick -> {
LD.contactingServer();
FolderService.Instance.get().applyStore(folder.getId(), new AsyncCallback<>() {
@@ -343,13 +329,11 @@ private void fillRightForm() {
final TextItem newTagItem = prepareNewTagItem(ds);
final StaticTextItem tagsString = ItemFactory.newStaticTextItem("tags", "tag",
- Util.getTagsHTML(folder.getTags()));
+ Util.getTagsHTML(folder.getTags()));
tagsString.setEndRow(true);
FormItemIcon editTags = new FormItemIcon();
editTags.setPrompt(I18N.message("edittags"));
- editTags.setSrc("[SKIN]/actions/edit.png");
- editTags.setWidth(16);
- editTags.setHeight(16);
+ editTags.setSrc("[SKIN]/pen-to-square.svg");
editTags.addFormItemClickHandler(editTagClick -> {
tagsString.setVisible(false);
tagItem.setVisible(true);
diff --git a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/search/FulltextForm.java b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/search/FulltextForm.java
index 99944fb6a..417859db7 100644
--- a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/search/FulltextForm.java
+++ b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/search/FulltextForm.java
@@ -23,10 +23,10 @@
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.ValuesManager;
import com.smartgwt.client.widgets.form.fields.CheckboxItem;
+import com.smartgwt.client.widgets.form.fields.FormItemIcon;
import com.smartgwt.client.widgets.form.fields.IntegerItem;
import com.smartgwt.client.widgets.form.fields.MiniDateRangeItem;
import com.smartgwt.client.widgets.form.fields.MultiComboBoxItem;
-import com.smartgwt.client.widgets.form.fields.PickerIcon;
import com.smartgwt.client.widgets.form.fields.SelectItem;
import com.smartgwt.client.widgets.form.fields.TextItem;
import com.smartgwt.client.widgets.layout.VLayout;
@@ -82,17 +82,22 @@ private void initGUI() {
form1.setTitleOrientation(TitleOrientation.TOP);
form1.setNumCols(3);
- PickerIcon searchPicker = new PickerIcon(PickerIcon.SEARCH, event -> search());
- PickerIcon clear = new PickerIcon(PickerIcon.CLEAR, event -> {
- vm.clearValues();
- prepareFields(null);
- });
-
+ FormItemIcon search = new FormItemIcon();
+ search.setPrompt(I18N.message("search"));
+ search.setSrc("[SKIN]/magnifying-glass.svg");;
+ search.addFormItemClickHandler(click -> search());
+
+ FormItemIcon clear = new FormItemIcon();
+ clear.setPrompt(I18N.message("clear"));
+ clear.setSrc("[SKIN]/trash.svg");
+ clear.addFormItemClickHandler(click -> {vm.clearValues();
+ prepareFields(null);});
+
expression = ItemFactory.newTextItem(EXPRESSION_STR, I18N.message("search") + "...");
expression.setWidth("*");
expression.setColSpan(3);
expression.setRequired(true);
- expression.setIcons(searchPicker, clear);
+ expression.setIcons(search, clear);
expression.addKeyPressHandler(event -> {
if (event.getKeyName() == null)
return;
@@ -115,9 +120,9 @@ private void initGUI() {
SelectItem template = ItemFactory.newTemplateSelector(true, null);
template.setMultiple(false);
template.setColSpan(3);
- template.addChangedHandler(event -> {
- if (event.getValue() != null && !"".equals(event.getValue()))
- prepareFields(Long.parseLong((String) event.getValue()));
+ template.addChangedHandler(changed -> {
+ if (changed.getValue() != null && !"".equals(changed.getValue()))
+ prepareFields(Long.parseLong((String) changed.getValue()));
else
prepareFields(null);
});
diff --git a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/search/TagsForm.java b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/search/TagsForm.java
index 38d9e5b18..e8d572cbf 100644
--- a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/search/TagsForm.java
+++ b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/search/TagsForm.java
@@ -19,7 +19,7 @@
import com.smartgwt.client.types.SelectionStyle;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.FormItem;
-import com.smartgwt.client.widgets.form.fields.PickerIcon;
+import com.smartgwt.client.widgets.form.fields.FormItemIcon;
import com.smartgwt.client.widgets.form.fields.StaticTextItem;
import com.smartgwt.client.widgets.form.fields.TextItem;
import com.smartgwt.client.widgets.grid.ListGrid;
@@ -91,7 +91,10 @@ public TagsForm(final boolean admin, final boolean searchInHits) {
otherCharForm = new DynamicForm();
otherCharForm.setWidth(1);
- PickerIcon searchPicker = new PickerIcon(PickerIcon.SEARCH, event -> {
+ FormItemIcon search = new FormItemIcon();
+ search.setPrompt(I18N.message("clear"));
+ search.setSrc("[SKIN]/magnifying-glass.svg");
+ search.addFormItemClickHandler(click -> {
if (!otherCharForm.validate())
return;
onLetterSelect(otherCharForm.getValueAsString("otherchar"));
@@ -100,7 +103,7 @@ public TagsForm(final boolean admin, final boolean searchInHits) {
TextItem otherChar = ItemFactory.newTextItem("otherchar", null);
otherChar.setRequired(true);
otherChar.setWrapTitle(false);
- otherChar.setIcons(searchPicker);
+ otherChar.setIcons(search);
otherChar.setLength(1);
otherChar.setWidth(50);
@@ -165,21 +168,20 @@ private void showContextMenu(boolean admin) {
return;
ListGridRecord selection = tags.getSelectedRecord();
- TagService.Instance.get().rename(selection.getAttribute("word"), value,
- new AsyncCallback<>() {
- @Override
- public void onFailure(Throwable caught) {
- GuiLog.serverError(caught);
- }
-
- @Override
- public void onSuccess(Void arg) {
- GuiLog.info(I18N.message("procinexecution"), I18N.message("taginexecution"));
- ListGridRecord selection = tags.getSelectedRecord();
- selection.setAttribute("word", value);
- onLetterSelect(value.substring(0, 1));
- }
- });
+ TagService.Instance.get().rename(selection.getAttribute("word"), value, new AsyncCallback<>() {
+ @Override
+ public void onFailure(Throwable caught) {
+ GuiLog.serverError(caught);
+ }
+
+ @Override
+ public void onSuccess(Void arg) {
+ GuiLog.info(I18N.message("procinexecution"), I18N.message("taginexecution"));
+ ListGridRecord selection = tags.getSelectedRecord();
+ selection.setAttribute("word", value);
+ onLetterSelect(value.substring(0, 1));
+ }
+ });
}));
contextMenu.addItem(rename);
diff --git a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/settings/searchindex/SearchIndexPanel.java b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/settings/searchindex/SearchIndexPanel.java
index 485e07db6..038ce5225 100644
--- a/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/settings/searchindex/SearchIndexPanel.java
+++ b/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/settings/searchindex/SearchIndexPanel.java
@@ -36,7 +36,6 @@
import com.logicaldoc.gui.frontend.client.services.SearchEngineService;
import com.smartgwt.client.types.Alignment;
import com.smartgwt.client.types.ListGridFieldType;
-import com.smartgwt.client.types.PickerIconName;
import com.smartgwt.client.types.SelectionStyle;
import com.smartgwt.client.types.TitleOrientation;
import com.smartgwt.client.util.SC;
@@ -45,7 +44,7 @@
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.ValuesManager;
-import com.smartgwt.client.widgets.form.fields.PickerIcon;
+import com.smartgwt.client.widgets.form.fields.FormItemIcon;
import com.smartgwt.client.widgets.form.fields.RadioGroupItem;
import com.smartgwt.client.widgets.form.fields.SelectItem;
import com.smartgwt.client.widgets.form.fields.SpinnerItem;
@@ -399,8 +398,11 @@ private void fillSearchEngineTab() {
searchEngineForm.setColWidths(1, "*");
searchEngineForm.setValuesManager(vm);
- PickerIcon computeStat = new PickerIcon(PickerIconName.REFRESH, iconClick -> {
- iconClick.getItem().setValue(I18N.message("computing") + "...");
+ FormItemIcon computeStats = new FormItemIcon();
+ computeStats.setPrompt(I18N.message("calculatestats"));
+ computeStats.setSrc("[SKIN]/arrows-rotate.svg");
+ computeStats.addFormItemClickHandler(click -> {
+ click.getItem().setValue(I18N.message("computing") + "...");
SearchEngineService.Instance.get().countEntries(new AsyncCallback() {
@Override
@@ -410,20 +412,15 @@ public void onFailure(Throwable caught) {
@Override
public void onSuccess(Long count) {
- iconClick.getItem().setValue(Util.formatLong(count));
+ click.getItem().setValue(Util.formatLong(count));
}
});
});
- computeStat.setPrompt(I18N.message("calculatestats"));
- computeStat.setWidth(16);
-
// Entries count
StaticTextItem entries = ItemFactory.newStaticTextItem("entries", "entriescount", "-");
entries.setIconHSpace(2);
- entries.setIconWidth(16);
- entries.setIconHeight(16);
- entries.setIcons(computeStat);
+ entries.setIcons(computeStats);
entries.setWidth("1%");
// Locked
diff --git a/logicaldoc-gui/war/skin/images/eye.svg b/logicaldoc-gui/war/skin/images/eye.svg
new file mode 100644
index 000000000..932254029
--- /dev/null
+++ b/logicaldoc-gui/war/skin/images/eye.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/logicaldoc-gui/war/skin/images/folder.svg b/logicaldoc-gui/war/skin/images/folder.svg
new file mode 100644
index 000000000..c22031d74
--- /dev/null
+++ b/logicaldoc-gui/war/skin/images/folder.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/logicaldoc-gui/war/skin/images/java.svg b/logicaldoc-gui/war/skin/images/java.svg
new file mode 100644
index 000000000..66a283422
--- /dev/null
+++ b/logicaldoc-gui/war/skin/images/java.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/logicaldoc-gui/war/skin/images/magnifying-glass.svg b/logicaldoc-gui/war/skin/images/magnifying-glass.svg
new file mode 100644
index 000000000..957dc21f1
--- /dev/null
+++ b/logicaldoc-gui/war/skin/images/magnifying-glass.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/logicaldoc-gui/war/skin/images/pen-to-square.svg b/logicaldoc-gui/war/skin/images/pen-to-square.svg
new file mode 100644
index 000000000..0832ffa88
--- /dev/null
+++ b/logicaldoc-gui/war/skin/images/pen-to-square.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/logicaldoc-gui/war/skin/images/trash.svg b/logicaldoc-gui/war/skin/images/trash.svg
new file mode 100644
index 000000000..655a1fb54
--- /dev/null
+++ b/logicaldoc-gui/war/skin/images/trash.svg
@@ -0,0 +1 @@
+
\ No newline at end of file