diff options
author | Artur Signell <artur@vaadin.com> | 2013-09-17 14:16:35 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2013-09-17 14:16:36 +0300 |
commit | 0f7bcffdb9f753148d1027ff380c9520bb78bfd8 (patch) | |
tree | a91e21f0060cd097bfa70b8eef91723047d49692 /client | |
parent | 70649ac21a40a2b819856da39ebcfb5394ae3280 (diff) | |
parent | 3a4351f9b777009d8e226d26125f758861ddcbb3 (diff) | |
download | vaadin-framework-0f7bcffdb9f753148d1027ff380c9520bb78bfd8.tar.gz vaadin-framework-0f7bcffdb9f753148d1027ff380c9520bb78bfd8.zip |
Merge changes from origin/7.1
de53191 Fix for #12279 (caret jumps when formatting in RTA).
fca0f7a Add <br> as empty representation for webkit (#12490)
6dcece8 Allow creating TextBox or SuggestionPopup when extending VFilterSelect (#12491)
22fcb44 Include unobfuscated file used by test in the war (#12468)
bc90a58 Unified xml files to end with new line
3d01d74 Reduce Ivy resolver spam to a minimum (#12510)
1e73ca8 Fix keystore path to correspond to the Vaadin 7 directory structure (#12520)
dcf9c61 Protect CurrentInstance instances from garbage collection (#12509)
24ffbc2 Allow storing and restoring null instances in CurrentInstance #12509
0d79a84 Added a comment that hopefully explains the NULL_OBJECT #12509
e4d99b3 Use non-obfuscated version of vaadinPush.js when not in production (#12527)
3a31dfe NullPointerException in TableQuery.fetchMetadata() (#11403)
4659797 fixed incorrect name for close-pressed.png for windows in black theme (#12563)
9b05257 Test for push with streaming based on Table
3cafce3 NullPointerException in DateToSqlDateConverter (#12284)
3a4351f Ensure PushConnection is properly cleaned up on disconnect (#12226, #12522)
Change-Id: I44f3d5f003e62e7ab86a22188b22933491226868
Diffstat (limited to 'client')
5 files changed, 64 insertions, 18 deletions
diff --git a/client/build.xml b/client/build.xml index dec8b84a18..19ec05b28a 100644 --- a/client/build.xml +++ b/client/build.xml @@ -72,4 +72,4 @@ <antcall target="common.test.run" /> </target> -</project>
\ No newline at end of file +</project> diff --git a/client/src/com/vaadin/client/communication/AtmospherePushConnection.java b/client/src/com/vaadin/client/communication/AtmospherePushConnection.java index 93d5d879dc..ccb01c5a30 100644 --- a/client/src/com/vaadin/client/communication/AtmospherePushConnection.java +++ b/client/src/com/vaadin/client/communication/AtmospherePushConnection.java @@ -22,6 +22,7 @@ import com.google.gwt.core.client.JavaScriptObject; import com.google.gwt.core.client.Scheduler; import com.google.gwt.json.client.JSONObject; import com.google.gwt.user.client.Command; +import com.vaadin.client.ApplicationConfiguration; import com.vaadin.client.ApplicationConnection; import com.vaadin.client.ApplicationConnection.CommunicationErrorHandler; import com.vaadin.client.ResourceLoader; @@ -489,7 +490,13 @@ public class AtmospherePushConnection implements PushConnection { if (isAtmosphereLoaded()) { command.execute(); } else { - final String pushJs = ApplicationConstants.VAADIN_PUSH_JS; + final String pushJs; + if (ApplicationConfiguration.isProductionMode()) { + pushJs = ApplicationConstants.VAADIN_PUSH_JS; + } else { + pushJs = ApplicationConstants.VAADIN_PUSH_DEBUG_JS; + } + VConsole.log("Loading " + pushJs); ResourceLoader.get().loadScript( connection.getConfiguration().getVaadinDirUrl() + pushJs, diff --git a/client/src/com/vaadin/client/ui/VFilterSelect.java b/client/src/com/vaadin/client/ui/VFilterSelect.java index a4041cc34d..7efb5b8867 100644 --- a/client/src/com/vaadin/client/ui/VFilterSelect.java +++ b/client/src/com/vaadin/client/ui/VFilterSelect.java @@ -916,6 +916,27 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, } } + /** + * TextBox variant used as input element for filter selects, which prevents + * selecting text when disabled. + * + * @since 7.1.5 + */ + public class FilterSelectTextBox extends TextBox { + + /** + * Overridden to avoid selecting text when text input is disabled + */ + @Override + public void setSelectionRange(int pos, int length) { + if (textInputEnabled) { + super.setSelectionRange(pos, length); + } else { + super.setSelectionRange(getValue().length(), 0); + } + } + } + @Deprecated public static final FilteringMode FILTERINGMODE_OFF = FilteringMode.OFF; @Deprecated @@ -938,21 +959,10 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, * <p> * For internal use only. May be removed or replaced in the future. */ - public final TextBox tb = new TextBox() { - - // Overridden to avoid selecting text when text input is disabled - @Override - public void setSelectionRange(int pos, int length) { - if (textInputEnabled) { - super.setSelectionRange(pos, length); - } else { - super.setSelectionRange(getValue().length(), 0); - } - }; - }; + public final TextBox tb; /** For internal use only. May be removed or replaced in the future. */ - public final SuggestionPopup suggestionPopup = new SuggestionPopup(); + public final SuggestionPopup suggestionPopup; /** * Used when measuring the width of the popup @@ -1096,9 +1106,12 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, private boolean textInputEnabled = true; /** - * Default constructor + * Default constructor. */ public VFilterSelect() { + tb = createTextBox(); + suggestionPopup = createSuggestionPopup(); + selectedItemIcon.setStyleName("v-icon"); selectedItemIcon.addLoadHandler(new LoadHandler() { @@ -1136,6 +1149,32 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, setStyleName(CLASSNAME); } + /** + * This method will create the TextBox used by the VFilterSelect instance. + * It is invoked during the Constructor and should only be overridden if a + * custom TextBox shall be used. The overriding method cannot use any + * instance variables. + * + * @since 7.1.5 + * @return TextBox instance used by this VFilterSelect + */ + protected TextBox createTextBox() { + return new FilterSelectTextBox(); + } + + /** + * This method will create the SuggestionPopup used by the VFilterSelect + * instance. It is invoked during the Constructor and should only be + * overridden if a custom SuggestionPopup shall be used. The overriding + * method cannot use any instance variables. + * + * @since 7.1.5 + * @return SuggestionPopup instance used by this VFilterSelect + */ + protected SuggestionPopup createSuggestionPopup() { + return new SuggestionPopup(); + } + @Override public void setStyleName(String style) { super.setStyleName(style); diff --git a/client/src/com/vaadin/client/ui/VRichTextArea.java b/client/src/com/vaadin/client/ui/VRichTextArea.java index 34693ce392..0b2c1e574c 100644 --- a/client/src/com/vaadin/client/ui/VRichTextArea.java +++ b/client/src/com/vaadin/client/ui/VRichTextArea.java @@ -403,7 +403,7 @@ public class VRichTextArea extends Composite implements Field, KeyPressHandler, result = ""; } } else if (browser.isWebkit()) { - if ("<div><br></div>".equals(result)) { + if ("<br>".equals(result) || "<div><br></div>".equals(result)) { result = ""; } } else if (browser.isIE()) { diff --git a/client/src/com/vaadin/client/ui/richtextarea/RichTextAreaConnector.java b/client/src/com/vaadin/client/ui/richtextarea/RichTextAreaConnector.java index 20dfc74c69..d2576eb133 100644 --- a/client/src/com/vaadin/client/ui/richtextarea/RichTextAreaConnector.java +++ b/client/src/com/vaadin/client/ui/richtextarea/RichTextAreaConnector.java @@ -104,9 +104,9 @@ public class RichTextAreaConnector extends AbstractFieldConnector implements if (getConnection() != null && getConnectorId() != null) { final String html = getWidget().getSanitizedValue(); if (!html.equals(cachedValue)) { + cachedValue = html; getConnection().updateVariable(getConnectorId(), "text", html, getState().immediate); - getWidget().setValue(html); } } }; |