diff options
author | Ahmed Ashour <asashour@yahoo.com> | 2017-10-20 09:00:01 +0200 |
---|---|---|
committer | Péter Török <31210544+torok-peter@users.noreply.github.com> | 2017-10-20 10:00:01 +0300 |
commit | 0f4702c6d1e03e2522c556487aba74ea01f25837 (patch) | |
tree | 55ff916ebd275e3b1711dc2908b6e2e8773fda9d /compatibility-client | |
parent | 780e9cee6b7e976285402a00ad5b282a8e79619e (diff) | |
download | vaadin-framework-0f4702c6d1e03e2522c556487aba74ea01f25837.tar.gz vaadin-framework-0f4702c6d1e03e2522c556487aba74ea01f25837.zip |
Add spaces after 'if' and 'for' in JavaScript (#10199)
* Add spaces after 'if' and 'for' in JavaScript
* Revert to old format
* Remove whitespaces
Diffstat (limited to 'compatibility-client')
6 files changed, 14 insertions, 14 deletions
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/JavaScriptRendererConnector.java b/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/JavaScriptRendererConnector.java index 1e2a72ec70..d7e9c42db1 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/JavaScriptRendererConnector.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/JavaScriptRendererConnector.java @@ -246,7 +246,7 @@ public class JavaScriptRendererConnector /*-{ var rawEvents = wrapper.getConsumedEvents(); var events = []; - for(var i = 0; i < rawEvents.length; i++) { + for (var i = 0; i < rawEvents.length; i++) { events[i] = ""+rawEvents[i]; } return events; diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VDateField.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VDateField.java index 5bb07f45ef..2f48bc2377 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VDateField.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VDateField.java @@ -100,13 +100,13 @@ public class VDateField extends FlowPanel implements Field, HasEnabled { /*-{ try { var date = new Date(2000,1,1,1); // don't use current date here - if(y && y >= 0) date.setFullYear(y); - if(m && m >= 1) date.setMonth(m-1); - if(d && d >= 0) date.setDate(d); - if(h >= 0) date.setHours(h); - if(mi >= 0) date.setMinutes(mi); - if(s >= 0) date.setSeconds(s); - if(ms >= 0) date.setMilliseconds(ms); + if (y && y >= 0) date.setFullYear(y); + if (m && m >= 1) date.setMonth(m-1); + if (d && d >= 0) date.setDate(d); + if (h >= 0) date.setHours(h); + if (mi >= 0) date.setMinutes(mi); + if (s >= 0) date.setSeconds(s); + if (ms >= 0) date.setMilliseconds(ms); return date.getTime(); } catch (e) { // TODO print some error message on the console diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java index 940240a773..bbbf33f5a4 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java @@ -2303,12 +2303,12 @@ public class VFilterSelect extends Composite */ public native int minWidth(String captions) /*-{ - if(!captions || captions.length <= 0) + if (!captions || captions.length <= 0) return 0; captions = captions.split("|"); var d = $wnd.document.createElement("div"); var html = ""; - for(var i=0; i < captions.length; i++) { + for (var i=0; i < captions.length; i++) { html += "<div>" + captions[i] + "</div>"; // TODO apply same CSS classname as in suggestionmenu } diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java index 12738541aa..af255c4e5b 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java @@ -8220,7 +8220,7 @@ public class VScrollTable extends FlowPanel */ private static native JavaScriptObject getPreventTextSelectionIEHack() /*-{ - return function(){ return false; }; + return function() { return false; }; }-*/; public void triggerLazyColumnAdjustment(boolean now) { diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTree.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTree.java index 38c2f40c7c..043b210197 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTree.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTree.java @@ -1970,7 +1970,7 @@ public class VTree extends FocusElementPanel */ private native JavaScriptObject applyDisableTextSelectionIEHack() /*-{ - return function(){ return false; }; + return function() { return false; }; }-*/; /** diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Escalator.java b/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Escalator.java index c44f08ecc9..efc61cf0bf 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Escalator.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Escalator.java @@ -735,13 +735,13 @@ public class Escalator extends Widget // A delta mode of 1 means we're scrolling by lines instead of pixels // We need to scale the number of lines by the default line height - if(e.deltaMode === 1) { + if (e.deltaMode === 1) { var brc = esc.@com.vaadin.v7.client.widgets.Escalator::body; deltaY *= brc.@com.vaadin.v7.client.widgets.Escalator.AbstractRowContainer::getDefaultRowHeight()(); } // Other delta modes aren't supported - if((e.deltaMode !== undefined) && (e.deltaMode >= 2 || e.deltaMode < 0)) { + if ((e.deltaMode !== undefined) && (e.deltaMode >= 2 || e.deltaMode < 0)) { var msg = "Unsupported wheel delta mode \"" + e.deltaMode + "\""; // Print warning message |