You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2014/12/17 01:08:08 UTC

[6/6] git commit: [flex-asjs] [refs/heads/develop] - lint

lint


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/23b46651
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/23b46651
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/23b46651

Branch: refs/heads/develop
Commit: 23b46651fe652a85233987d00291ecd8815ee555
Parents: d0a66ff
Author: Alex Harui <ah...@apache.org>
Authored: Tue Dec 16 16:00:41 2014 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Tue Dec 16 16:07:57 2014 -0800

----------------------------------------------------------------------
 .../src/org/apache/flex/core/Application.js     |  2 +-
 .../org/apache/flex/core/SimpleCSSValuesImpl.js | 31 ++++++++++----------
 2 files changed, 17 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/23b46651/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js b/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
index 744cc2d..b6b2dae 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/Application.js
@@ -82,7 +82,7 @@ org.apache.flex.core.Application.prototype.set_valuesImpl =
 org.apache.flex.core.Application.prototype.start = function() {
   this.element = document.getElementsByTagName('body')[0];
   this.element.flexjs_wrapper = this;
-  this.element.className = "Application";
+  this.element.className = 'Application';
 
   org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(this, null, this.get_MXMLDescriptor());
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/23b46651/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js
----------------------------------------------------------------------
diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js
index e8ea5c8..25b953d 100644
--- a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js
+++ b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js
@@ -254,10 +254,10 @@ org.apache.flex.core.SimpleCSSValuesImpl.prototype.parseStyles = function(styles
     else {
       var n = Number(value);
       if (isNaN(n)) {
-        if (value.indexOf("'") == 0)
+        if (value.indexOf("'") === 0)
           value = value.substring(1, value.length - 1);
         obj[pieces[0]] = value;
-	  }
+      }
       else
         obj[pieces[0]] = n;
     }
@@ -270,21 +270,22 @@ org.apache.flex.core.SimpleCSSValuesImpl.prototype.parseStyles = function(styles
  * The styles that apply to each UI widget
  */
 org.apache.flex.core.SimpleCSSValuesImpl.perInstanceStyles = {
-   backgroundColor : 1,
-   backgroundImage : 1,
-   color : 1,
-   fontFamily : 1,
-   fontWeight : 1,
-   fontSize : 1,
-   fontStyle : 1
+   backgroundColor: 1,
+   backgroundImage: 1,
+   color: 1,
+   fontFamily: 1,
+   fontWeight: 1,
+   fontSize: 1,
+   fontStyle: 1
 };
 
+
 /**
  * The styles that use color format #RRGGBB
  */
 org.apache.flex.core.SimpleCSSValuesImpl.colorStyles = {
-   backgroundColor : 1,
-   color : 1
+   backgroundColor: 1,
+   color: 1
 };
 
 
@@ -299,12 +300,12 @@ org.apache.flex.core.SimpleCSSValuesImpl.prototype.applyStyles =
   for (var p in styles) {
     //if (styleList[p])
     var value = styles[p];
-    if (typeof(value) == "number") {
+    if (typeof(value) == 'number') {
       if (colorStyles[p])
-        value = "#" + value.toString(16);
+        value = '#' + value.toString(16);
       else
-        value = value.toString() + "px";
-	}
+        value = value.toString() + 'px';
+    }
     thisObject.element.style[p] = value;
   }
 };