| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | |||
| 6 | 6 | ||
| 7 | 7 | ## [Unreleased] | |
| 8 | 8 | ||
| 9 | + ### Upgrades | ||
| 10 | + | ||
| 11 | + - Bump Elemento to 1.2.2 | ||
| 12 | + | ||
| 9 | 13 | ## [0.0.2] - 2023-10-10 | |
| 10 | 14 | ||
| 11 | 15 | ### Added | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -84,7 +84,7 @@ | |||
| 84 | 84 | <!-- Dependency versions --> | |
| 85 | 85 | <version.checkstyle.config>1.0.8.Final</version.checkstyle.config> | |
| 86 | 86 | <version.elemental2>1.2.1</version.elemental2> | |
| 87 | - <version.elemento>1.2.1</version.elemento> | ||
| 87 | + <version.elemento>1.2.2</version.elemento> | ||
| 88 | 88 | <version.gwt.event>1.0.0-RC1</version.gwt.event> | |
| 89 | 89 | <version.gwt.safehtml>1.0.0-RC1</version.gwt.safehtml> | |
| 90 | 90 | <version.junit>5.10.0</version.junit> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -37,8 +37,6 @@ | |||
| 37 | 37 | import elemental2.dom.HTMLAnchorElement; | |
| 38 | 38 | import elemental2.dom.HTMLButtonElement; | |
| 39 | 39 | import elemental2.dom.HTMLElement; | |
| 40 | - import elemental2.dom.Node; | ||
| 41 | - import elemental2.dom.NodeList; | ||
| 42 | 40 | ||
| 43 | 41 | import static elemental2.dom.DomGlobal.console; | |
| 44 | 42 | import static org.jboss.elemento.Elements.failSafeRemoveFromParent; | |
@@ -69,12 +67,13 @@ | |||
| 69 | 67 | import static org.patternfly.layout.Size.md; | |
| 70 | 68 | ||
| 71 | 69 | /** | |
| 72 | - * A button is a box area or text that communicates and triggers user actions when clicked or selected. Buttons can be used to | ||
| 73 | - * communicate and immediately trigger actions a user can take in an application, like submitting a form, canceling a process, | ||
| 74 | - * or creating a new object. Buttons can also be used to take a user to a new location, like another page inside a web | ||
| 75 | - * application, or an external site such as help or documentation. | ||
| 70 | + * A button is a box area or text that communicates and triggers user actions when clicked or selected. Buttons can be | ||
| 71 | + * used to communicate and immediately trigger actions a user can take in an application, like submitting a form, | ||
| 72 | + * canceling a process, or creating a new object. Buttons can also be used to take a user to a new location, like | ||
| 73 | + * another page inside a web application, or an external site such as help or documentation. | ||
| 76 | 74 | * | |
| 77 | - * @see <a href= "https://www.patternfly.org/components/button/html">https://www.patternfly.org/components/button/html</a> | ||
| 75 | + * @see <a href= | ||
| 76 | + * "https://www.patternfly.org/components/button/html">https://www.patternfly.org/components/button/html</a> | ||
| 78 | 77 | */ | |
| 79 | 78 | public class Button extends BaseComponent<HTMLElement, Button> | |
| 80 | 79 | implements Disabled<HTMLElement, Button>, Inline<HTMLElement, Button>, Plain<HTMLElement, Button>, | |
@@ -278,24 +277,13 @@ public Button onAction(ActionHandler<Button> actionHandler) { | |||
| 278 | 277 | // ------------------------------------------------------ public API | |
| 279 | 278 | ||
| 280 | 279 | /** | |
| 281 | - * Changes the text of this button. Prefer this method over {@link #textContent(String)}, since this method doesn't remove a | ||
| 282 | - * possible progress spinner. | ||
| 280 | + * Changes the text of this button. Prefer this method over | ||
| 281 | + * {@link org.jboss.elemento.HasElement#textContent(String)}, since this method doesn't remove a possible progress | ||
| 282 | + * spinner. | ||
| 283 | 283 | */ | |
| 284 | 284 | public Button text(String text) { | |
| 285 | 285 | // just using textContent(text) would remove a possible progress spinner | |
| 286 | - boolean textNode = false; | ||
| 287 | - NodeList<Node> nodes = element().childNodes; | ||
| 288 | - for (int i = 0; i < nodes.length && !textNode; i++) { | ||
| 289 | - Node node = nodes.getAt(i); | ||
| 290 | - if (node.nodeType == Node.TEXT_NODE) { | ||
| 291 | - node.nodeValue = text; | ||
| 292 | - textNode = true; | ||
| 293 | - } | ||
| 294 | - } | ||
| 295 | - if (!textNode) { | ||
| 296 | - add(text); | ||
| 297 | - } | ||
| 298 | - return this; | ||
| 286 | + return textNode(text); | ||
| 299 | 287 | } | |
| 300 | 288 | ||
| 301 | 289 | public Button href(String href) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments