This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
US42: option to enable 'Enter' to save and move to the next string an…
…d use Shift+Enter to add a new line
- Loading branch information
Showing
6 changed files
with
145 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
server/zanata-war/src/main/java/org/zanata/webtrans/client/events/EnterKeyEnabledEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| package org.zanata.webtrans.client.events; | ||
|
|
||
| import com.google.gwt.event.shared.GwtEvent; | ||
|
|
||
| public class EnterKeyEnabledEvent extends GwtEvent<EnterKeyEnabledEventHandler> | ||
| { | ||
|
|
||
| /** | ||
| * Handler type. | ||
| */ | ||
| private static Type<EnterKeyEnabledEventHandler> TYPE; | ||
|
|
||
| /** | ||
| * Gets the type associated with this event. | ||
| * | ||
| * @return returns the handler type | ||
| */ | ||
| public static Type<EnterKeyEnabledEventHandler> getType() | ||
| { | ||
| if (TYPE == null) | ||
| { | ||
| TYPE = new Type<EnterKeyEnabledEventHandler>(); | ||
| } | ||
| return TYPE; | ||
| } | ||
|
|
||
| private Boolean enterkeyEnabled; | ||
|
|
||
| public EnterKeyEnabledEvent(Boolean value) | ||
| { | ||
| enterkeyEnabled = value; | ||
| } | ||
|
|
||
| public Boolean isEnabled() | ||
| { | ||
| return enterkeyEnabled; | ||
| } | ||
|
|
||
| @Override | ||
| protected void dispatch(EnterKeyEnabledEventHandler handler) | ||
| { | ||
| handler.onValueChanged(this); | ||
| } | ||
|
|
||
| @Override | ||
| public Type<EnterKeyEnabledEventHandler> getAssociatedType() | ||
| { | ||
| return getType(); | ||
| } | ||
|
|
||
| } |
8 changes: 8 additions & 0 deletions
8
...nata-war/src/main/java/org/zanata/webtrans/client/events/EnterKeyEnabledEventHandler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| package org.zanata.webtrans.client.events; | ||
|
|
||
| import com.google.gwt.event.shared.EventHandler; | ||
|
|
||
| public interface EnterKeyEnabledEventHandler extends EventHandler | ||
| { | ||
| void onValueChanged(EnterKeyEnabledEvent enterKeyEnabledEvent); | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters