From 78a5468279ddc442ac64d045f5fe4aa79ed9ef6e Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Thu, 1 Sep 2016 14:56:41 +0300 Subject: [PATCH] Implement new RichTextArea Change-Id: I6f430c77caaad6d610133f340eba960f2268897e --- all/src/main/templates/release-notes.html | 1 + .../com/vaadin/client/ui/VRichTextArea.java | 415 +++++++++++++++ .../richtextarea/RichTextAreaConnector.java | 139 +++++ .../ui/richtextarea/VRichTextToolbar.java | 476 ++++++++++++++++++ .../client/ui/textarea/TextAreaConnector.java | 6 +- .../textfield/AbstractTextFieldConnector.java | 71 +-- .../ui/textfield/TextFieldConnector.java | 5 +- .../ui/textfield/ValueChangeHandler.java | 129 +++++ .../VRichTextToolbar$Strings.properties | 35 ++ .../client/ui/richtextarea/backColors.gif | Bin 0 -> 104 bytes .../vaadin/client/ui/richtextarea/bold.gif | Bin 0 -> 900 bytes .../client/ui/richtextarea/createLink.gif | Bin 0 -> 954 bytes .../client/ui/richtextarea/fontSizes.gif | Bin 0 -> 96 bytes .../vaadin/client/ui/richtextarea/fonts.gif | Bin 0 -> 147 bytes .../client/ui/richtextarea/foreColors.gif | Bin 0 -> 173 bytes .../vaadin/client/ui/richtextarea/gwtLogo.png | Bin 0 -> 11454 bytes .../com/vaadin/client/ui/richtextarea/hr.gif | Bin 0 -> 853 bytes .../vaadin/client/ui/richtextarea/indent.gif | Bin 0 -> 76 bytes .../client/ui/richtextarea/insertImage.gif | Bin 0 -> 946 bytes .../vaadin/client/ui/richtextarea/italic.gif | Bin 0 -> 190 bytes .../client/ui/richtextarea/justifyCenter.gif | Bin 0 -> 70 bytes .../client/ui/richtextarea/justifyLeft.gif | Bin 0 -> 71 bytes .../client/ui/richtextarea/justifyRight.gif | Bin 0 -> 70 bytes .../com/vaadin/client/ui/richtextarea/ol.gif | Bin 0 -> 204 bytes .../vaadin/client/ui/richtextarea/outdent.gif | Bin 0 -> 76 bytes .../client/ui/richtextarea/removeFormat.gif | Bin 0 -> 962 bytes .../client/ui/richtextarea/removeLink.gif | Bin 0 -> 585 bytes .../client/ui/richtextarea/strikeThrough.gif | Bin 0 -> 915 bytes .../client/ui/richtextarea/subscript.gif | Bin 0 -> 933 bytes .../client/ui/richtextarea/superscript.gif | Bin 0 -> 232 bytes .../com/vaadin/client/ui/richtextarea/ul.gif | Bin 0 -> 133 bytes .../client/ui/richtextarea/underline.gif | Bin 0 -> 914 bytes .../java/com/vaadin/ui/AbstractField.java | 15 +- .../java/com/vaadin/ui/AbstractTextField.java | 49 +- .../com/vaadin/ui/HasValueChangeMode.java | 69 +++ .../java/com/vaadin/ui/PasswordField.java | 12 - .../main/java/com/vaadin/ui/RichTextArea.java | 170 +++++++ .../AbstractTextFieldDeclarativeTest.java | 2 +- .../java/com/vaadin/ui/ComponentTest.java | 98 ++++ .../java/com/vaadin/ui/RichTextAreaTest.java | 107 ++++ .../ui/{textfield => }/ValueChangeMode.java | 2 +- .../richtextarea/RichTextAreaClientRpc.java | 29 ++ .../richtextarea/RichTextAreaServerRpc.java | 33 ++ .../ui/richtextarea/RichTextAreaState.java | 52 ++ .../ui/textfield/AbstractTextFieldState.java | 1 + .../themes/base/textfield/textfield.scss | 2 +- .../com/vaadin/tests/TestCaptionWrapper.java | 2 +- .../vaadin/tests/TestForRichTextEditor.java | 75 --- .../AbstractComponentContainerTest.java | 2 +- .../notification/NotificationsWaiAria.java | 2 +- .../popupview/PopupViewWithRTE.java | 2 +- .../richtextarea/RichTextAreaEmptyString.java | 2 +- .../RichTextAreaRelativeHeightResize.java | 2 +- .../richtextarea/RichTextAreaScrolling.java | 2 +- .../richtextarea/RichTextAreaSize.java | 2 +- .../richtextarea/RichTextAreaTest.java | 47 +- .../RichTextAreaUpdateWhileTyping.java | 2 +- .../RichTextAreaWithKeyboardShortcuts.java | 2 +- .../richtextarea/RichTextAreas.java | 2 +- .../splitpanel/GridLayoutWithCheckbox.java | 2 +- .../SplitPanelWithRichTextArea.java | 2 +- .../textfield/MultipleTextChangeEvents.java | 2 +- .../textfield/TextFieldsValueChangeMode.java | 152 ++++++ .../tests/components/tree/TreeScrolling.java | 2 +- .../uitest/components/TextFieldsCssTest.java | 2 +- .../window/WindowCloseShortcuts.java | 2 +- .../com/vaadin/tests/fields/TabIndexes.java | 3 +- .../vaadin/tests/navigator/NavigatorTest.java | 2 +- .../com/vaadin/tests/themes/valo/Forms.java | 2 +- .../vaadin/tests/themes/valo/TextFields.java | 2 +- .../textarea/TextAreaCursorPosition.java | 2 +- .../textfield/TextChangeEvents.java | 146 ------ .../TextFieldsValueChangeModeTest.java | 124 +++++ 73 files changed, 2103 insertions(+), 404 deletions(-) create mode 100644 client/src/main/java/com/vaadin/client/ui/VRichTextArea.java create mode 100644 client/src/main/java/com/vaadin/client/ui/richtextarea/RichTextAreaConnector.java create mode 100644 client/src/main/java/com/vaadin/client/ui/richtextarea/VRichTextToolbar.java create mode 100644 client/src/main/java/com/vaadin/client/ui/textfield/ValueChangeHandler.java create mode 100644 client/src/main/resources/com/vaadin/client/ui/richtextarea/VRichTextToolbar$Strings.properties create mode 100644 client/src/main/resources/com/vaadin/client/ui/richtextarea/backColors.gif create mode 100644 client/src/main/resources/com/vaadin/client/ui/richtextarea/bold.gif create mode 100644 client/src/main/resources/com/vaadin/client/ui/richtextarea/createLink.gif create mode 100644 client/src/main/resources/com/vaadin/client/ui/richtextarea/fontSizes.gif create mode 100644 client/src/main/resources/com/vaadin/client/ui/richtextarea/fonts.gif create mode 100644 client/src/main/resources/com/vaadin/client/ui/richtextarea/foreColors.gif create mode 100644 client/src/main/resources/com/vaadin/client/ui/richtextarea/gwtLogo.png create mode 100644 client/src/main/resources/com/vaadin/client/ui/richtextarea/hr.gif create mode 100644 client/src/main/resources/com/vaadin/client/ui/richtextarea/indent.gif create mode 100644 client/src/main/resources/com/vaadin/client/ui/richtextarea/insertImage.gif create mode 100644 client/src/main/resources/com/vaadin/client/ui/richtextarea/italic.gif create mode 100644 client/src/main/resources/com/vaadin/client/ui/richtextarea/justifyCenter.gif create mode 100644 client/src/main/resources/com/vaadin/client/ui/richtextarea/justifyLeft.gif create mode 100644 client/src/main/resources/com/vaadin/client/ui/richtextarea/justifyRight.gif create mode 100644 client/src/main/resources/com/vaadin/client/ui/richtextarea/ol.gif create mode 100644 client/src/main/resources/com/vaadin/client/ui/richtextarea/outdent.gif create mode 100644 client/src/main/resources/com/vaadin/client/ui/richtextarea/removeFormat.gif create mode 100644 client/src/main/resources/com/vaadin/client/ui/richtextarea/removeLink.gif create mode 100644 client/src/main/resources/com/vaadin/client/ui/richtextarea/strikeThrough.gif create mode 100644 client/src/main/resources/com/vaadin/client/ui/richtextarea/subscript.gif create mode 100644 client/src/main/resources/com/vaadin/client/ui/richtextarea/superscript.gif create mode 100644 client/src/main/resources/com/vaadin/client/ui/richtextarea/ul.gif create mode 100644 client/src/main/resources/com/vaadin/client/ui/richtextarea/underline.gif create mode 100644 server/src/main/java/com/vaadin/ui/HasValueChangeMode.java create mode 100644 server/src/main/java/com/vaadin/ui/RichTextArea.java create mode 100644 server/src/test/java/com/vaadin/ui/ComponentTest.java create mode 100644 server/src/test/java/com/vaadin/ui/RichTextAreaTest.java rename shared/src/main/java/com/vaadin/shared/ui/{textfield => }/ValueChangeMode.java (97%) create mode 100644 shared/src/main/java/com/vaadin/shared/ui/richtextarea/RichTextAreaClientRpc.java create mode 100644 shared/src/main/java/com/vaadin/shared/ui/richtextarea/RichTextAreaServerRpc.java create mode 100644 shared/src/main/java/com/vaadin/shared/ui/richtextarea/RichTextAreaState.java delete mode 100644 uitest/src/main/java/com/vaadin/tests/TestForRichTextEditor.java create mode 100644 uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldsValueChangeMode.java delete mode 100644 uitest/src/main/java/com/vaadin/v7/tests/components/textfield/TextChangeEvents.java create mode 100644 uitest/src/test/java/com/vaadin/tests/components/textfield/TextFieldsValueChangeModeTest.java diff --git a/all/src/main/templates/release-notes.html b/all/src/main/templates/release-notes.html index 8e2d29d955..568006e622 100644 --- a/all/src/main/templates/release-notes.html +++ b/all/src/main/templates/release-notes.html @@ -128,6 +128,7 @@
  • Old input prompts have been replaced with placeholders utilizing the related browser functionality
  • The old liferay theme (Liferay 6.0 look) has been removed
  • Components in the compatibility packages now use the prefix "vaadin7-" in declarative design files
  • +
  • RichTextArea no longer receives a special "v-richtextarea-readonly" class when readonly, only the standard "v-readonly" class
  • Known Issues and Limitations