Skip to content

Commit 845be77

Browse files
authored
Merge pull request #397 from GwtMaterialDesign/release_2.3
Release 2.3
2 parents a36f1fe + 8bb1d6b commit 845be77

File tree

259 files changed

+18304
-13604
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

259 files changed

+18304
-13604
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
sudo: false
2+
dist: trusty
23
language: java
34
jdk:
45
- oraclejdk8
@@ -7,12 +8,12 @@ cache:
78
- $HOME/.m2
89
before_install:
910
# install the gwt-material-jquery library before we build the demo
10-
- git clone -b release_2.2 https://github.com/GwtMaterialDesign/gwt-material-jquery.git
11+
- git clone -b release_2.3 https://github.com/GwtMaterialDesign/gwt-material-jquery.git
1112
- cd gwt-material-jquery
1213
- mvn install -DskipTests=true -DdryRun=true
1314
- cd ..
1415
# install the gwt-material library before we build the demo
15-
- git clone -b release_2.2 https://github.com/GwtMaterialDesign/gwt-material.git
16+
- git clone -b release_2.3 https://github.com/GwtMaterialDesign/gwt-material.git
1617
- cd gwt-material
1718
- mvn install -DskipTests=true -DdryRun=true
1819
- cd ..

.utility/deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
set -ev
3-
if [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "release_2.2" ]; then
3+
if [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "release_2.3" ]; then
44
echo "<settings><servers><server><id>ossrh</id><username>\${env.OSSRH_USER}</username><password>\${env.OSSRH_PASS}</password></server></servers></settings>" > ~/settings.xml
55
mvn deploy -DskipTests --settings ~/settings.xml
66
fi

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
Gwt Material Design Extra Components for https://github.com/GwtMaterialDesign/gwt-material <br>
88

9-
## Current Version 2.2
9+
## Current Version 2.3.0
1010
```xml
1111
<dependency>
1212
<groupId>com.github.gwtmaterialdesign</groupId>
1313
<artifactId>gwt-material-addins</artifactId>
14-
<version>2.2</version>
14+
<version>2.3.0</version>
1515
</dependency>
1616
```
1717

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@
55
<parent>
66
<artifactId>gwt-material-parent</artifactId>
77
<groupId>com.github.gwtmaterialdesign</groupId>
8-
<version>2.2</version>
8+
<version>2.3.0</version>
99
</parent>
1010

1111
<artifactId>gwt-material-addins</artifactId>
1212
<packaging>gwt-lib</packaging>
1313

1414
<name>Gwt Material Addins</name>
15-
<version>2.2</version>
15+
<version>2.3.0</version>
1616
<description>Extra Components of GWT Material Framework</description>
1717

1818
<properties>
19-
<gwt-material.version>2.2</gwt-material.version>
19+
<gwt-material.version>2.3.0</gwt-material.version>
2020
</properties>
2121

2222
<scm>
2323
<connection>scm:git:[email protected]:GwtMaterialDesign/gwt-material-addins.git</connection>
2424
<developerConnection>scm:git:[email protected]:GwtMaterialDesign/gwt-material-addins.git</developerConnection>
2525
<url>http://github.com/GwtMaterialDesign/gwt-material-addins</url>
26-
<tag>v2.2</tag>
26+
<tag>v2.3.0</tag>
2727
</scm>
2828

2929
<licenses>

src/main/java/gwt/material/design/addins/client/autocomplete/MaterialAutoComplete.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import gwt.material.design.addins.client.MaterialAddins;
3030
import gwt.material.design.addins.client.autocomplete.constants.AutocompleteType;
3131
import gwt.material.design.addins.client.base.constants.AddinsCssName;
32+
import gwt.material.design.addins.client.dark.AddinsDarkThemeReloader;
3233
import gwt.material.design.client.MaterialDesignBase;
3334
import gwt.material.design.client.base.*;
3435
import gwt.material.design.client.base.mixin.*;
@@ -231,7 +232,6 @@ protected void onLoad() {
231232
}
232233

233234
protected void loadHandlers() {
234-
235235
if (itemBoxBlurHandler == null) {
236236
itemBoxBlurHandler = itemBox.addBlurHandler(blurEvent -> {
237237
if (getValue().size() > 0) {
@@ -291,6 +291,12 @@ protected void loadHandlers() {
291291
if (itemBoxClickHandler == null) {
292292
itemBoxClickHandler = itemBox.addClickHandler(event -> suggestBox.showSuggestionList());
293293
}
294+
295+
if (itemBox != null && itemBox.isAttached()) {
296+
itemBox.getElement().setAttribute("autocomplete", "off");
297+
}
298+
299+
AddinsDarkThemeReloader.get().reload(MaterialAutoCompleteDarkTheme.class);
294300
}
295301

296302
@Override
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* #%L
3+
* GwtMaterial
4+
* %%
5+
* Copyright (C) 2015 - 2020 GwtMaterialDesign
6+
* %%
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* #L%
19+
*/
20+
package gwt.material.design.addins.client.autocomplete;
21+
22+
import gwt.material.design.addins.client.MaterialAddins;
23+
import gwt.material.design.addins.client.dark.AddinsWidgetDarkTheme;
24+
25+
public class MaterialAutoCompleteDarkTheme extends AddinsWidgetDarkTheme {
26+
27+
public MaterialAutoCompleteDarkTheme() {
28+
super(MaterialAddins.isDebug() ? MaterialAutocompleteDebugClientBundle.INSTANCE.autocompleteDarkCss() : MaterialAutocompleteClientBundle.INSTANCE.autocompleteDarkCss());
29+
}
30+
}

src/main/java/gwt/material/design/addins/client/autocomplete/MaterialAutocompleteClientBundle.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,7 @@ interface MaterialAutocompleteClientBundle extends ClientBundle {
3434

3535
@Source("resources/css/autocomplete.min.css")
3636
TextResource autocompleteCss();
37+
38+
@Source("resources/css/autocomplete-dark.min.css")
39+
TextResource autocompleteDarkCss();
3740
}

src/main/java/gwt/material/design/addins/client/autocomplete/MaterialAutocompleteDebugClientBundle.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,7 @@ interface MaterialAutocompleteDebugClientBundle extends ClientBundle {
3434

3535
@Source("resources/css/autocomplete.css")
3636
TextResource autocompleteCssDebug();
37+
38+
@Source("resources/css/autocomplete-dark.css")
39+
TextResource autocompleteDarkCss();
3740
}

src/main/java/gwt/material/design/addins/client/avatar/MaterialAvatar.java

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
import com.google.gwt.dom.client.Document;
2323
import gwt.material.design.addins.client.MaterialAddins;
24+
import gwt.material.design.addins.client.avatar.js.AvatarOptions;
2425
import gwt.material.design.addins.client.avatar.js.JsAvatar;
2526
import gwt.material.design.client.MaterialDesignBase;
2627
import gwt.material.design.client.base.AbstractValueWidget;
@@ -66,6 +67,8 @@ public class MaterialAvatar extends AbstractValueWidget<String> implements JsLoa
6667
}
6768

6869
private String value;
70+
private AvatarOptions options;
71+
6972
public MaterialAvatar() {
7073
super(Document.get().createCanvasElement());
7174
}
@@ -84,11 +87,20 @@ protected void onLoad() {
8487

8588
@Override
8689
public void load() {
90+
if (options != null) {
91+
loadOption(options);
92+
}
93+
8794
JsAvatar.jdenticon();
8895
}
8996

97+
protected static native void loadOption(AvatarOptions options) /*-{
98+
$wnd.jdenticon_config = options;
99+
}-*/;
100+
90101
@Override
91-
public void unload() {}
102+
public void unload() {
103+
}
92104

93105
@Override
94106
public void reload() {
@@ -113,6 +125,7 @@ public String getName() {
113125

114126
/**
115127
* Replaced by {@link MaterialAvatar#setValue(Object)}
128+
*
116129
* @param name
117130
*/
118131
@Deprecated
@@ -154,7 +167,8 @@ public int getHeight() {
154167

155168
/**
156169
* Allowing to set the dimension of the Avatar component.
157-
* @param width - the width dimension of the avatar without any Unit suffix (e.i 100)
170+
*
171+
* @param width - the width dimension of the avatar without any Unit suffix (e.i 100)
158172
* @param height - the height dimension of the avatar without any Unit suffix (e.i 100)
159173
*/
160174
public void setDimension(int width, int height) {
@@ -170,4 +184,12 @@ protected String generateHashCode(String value) {
170184
this.value = value;
171185
return JsAvatar.md5(value);
172186
}
173-
}
187+
188+
public AvatarOptions getOptions() {
189+
return options;
190+
}
191+
192+
public void setOptions(AvatarOptions options) {
193+
this.options = options;
194+
}
195+
}

src/main/java/gwt/material/design/addins/client/avatar/MaterialAvatarClientBundle.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public interface MaterialAvatarClientBundle extends ClientBundle {
3232

3333
MaterialAvatarClientBundle INSTANCE = GWT.create(MaterialAvatarClientBundle.class);
3434

35-
@Source("resources/js/jdenticon-1.3.2.min.js")
35+
@Source("resources/js/jdenticon-2.2.0.min.js")
3636
TextResource jdenticonJs();
3737

3838
@Source("resources/js/md5.min.js")

0 commit comments

Comments
 (0)