From 1ced32c08eed6a79c3213845c58a179754293192 Mon Sep 17 00:00:00 2001 From: Vitaly Litvak Date: Thu, 10 Dec 2015 15:56:32 +0300 Subject: [PATCH] For #396 - fixed incorrect collapsing of the 'Style' menu when screen width is small enough so the archive toolbar don't fit --- .../traccar/web/client/view/ArchiveView.java | 5 +- .../web/client/view/ArchiveView.ui.xml | 52 +++++++++---------- 2 files changed, 28 insertions(+), 29 deletions(-) diff --git a/src/main/java/org/traccar/web/client/view/ArchiveView.java b/src/main/java/org/traccar/web/client/view/ArchiveView.java index 3a18b8e4..7607c342 100644 --- a/src/main/java/org/traccar/web/client/view/ArchiveView.java +++ b/src/main/java/org/traccar/web/client/view/ArchiveView.java @@ -33,6 +33,7 @@ import com.sencha.gxt.widget.core.client.event.CloseEvent; import com.sencha.gxt.widget.core.client.form.*; import com.sencha.gxt.widget.core.client.menu.*; +import com.sencha.gxt.widget.core.client.toolbar.LabelToolItem; import org.traccar.web.client.ApplicationContext; import org.traccar.web.client.ArchiveStyle; import org.traccar.web.client.i18n.Messages; @@ -110,7 +111,7 @@ public ContentPanel getView() { CheckBox snapToRoads; @UiField(provided = true) - Label styleButtonTrackColor; + LabelToolItem styleButtonTrackColor; @UiField TextButton styleButton; @@ -146,7 +147,7 @@ public ArchiveView(final ArchiveHandler archiveHandler, ListStore device periodCombo = new PeriodComboBox(); // Element that displays the current track color - styleButtonTrackColor = new Label(); + styleButtonTrackColor = new LabelToolItem(); styleButtonTrackColor.getElement().getStyle().setProperty("backgroundColor", "#".concat(ArchiveStyle.DEFAULT_COLOR)); // Menu with the small palette smallColorMenu = new ExtColorMenu(ArchiveStyle.COLORS, ArchiveStyle.COLORS); diff --git a/src/main/java/org/traccar/web/client/view/ArchiveView.ui.xml b/src/main/java/org/traccar/web/client/view/ArchiveView.ui.xml index fb5ee072..c99ff67f 100644 --- a/src/main/java/org/traccar/web/client/view/ArchiveView.ui.xml +++ b/src/main/java/org/traccar/web/client/view/ArchiveView.ui.xml @@ -46,33 +46,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + +