incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [33/50] [abbrv] git commit: JShint updates
Date Sat, 31 May 2014 14:22:06 GMT
JShint updates


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/45539324
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/45539324
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/45539324

Branch: refs/heads/apache-blur-0.2
Commit: 4553932412c42dbfaba3ab245c50dba5a8c0c893
Parents: 47b89ce
Author: Chris Rohr <crohr@nearinfinity.com>
Authored: Thu May 29 07:37:14 2014 -0400
Committer: Chris Rohr <crohr@nearinfinity.com>
Committed: Thu May 29 07:37:14 2014 -0400

----------------------------------------------------------------------
 .../src/main/webapp/js/blurconsole.overrides.js | 57 ++++++++++++--------
 1 file changed, 36 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/45539324/contrib/blur-console/src/main/webapp/js/blurconsole.overrides.js
----------------------------------------------------------------------
diff --git a/contrib/blur-console/src/main/webapp/js/blurconsole.overrides.js b/contrib/blur-console/src/main/webapp/js/blurconsole.overrides.js
index a4fd1a6..836ceed 100644
--- a/contrib/blur-console/src/main/webapp/js/blurconsole.overrides.js
+++ b/contrib/blur-console/src/main/webapp/js/blurconsole.overrides.js
@@ -22,26 +22,41 @@ under the License.
  * blurconsole.overrides.js
  * File to override globals
  */
-/*global console:false */
+/*global console:true, blurconsole:false */
+
 if (typeof console === 'undefined') {
-  console = {
-    log: function() {
-      if(typeof blurconsole !== 'undefined' && typeof blurconsole.model !== 'undefined'
&& typeof blurconsole.model.logs !== 'undefined') {
-        var args = Array.prototype.slice.call(arguments);
-        blurconsole.model.logs.logError(args.join(' '), 'javascript');
-      }
-    },
-    info: function() {
-      return console.log.apply(null, arguments);
-    },
-    warn: function() {
-      return console.log.apply(null, arguments);
-    },
-    error: function() {
-      return console.log.apply(null, arguments);
-    },
-    debug: function() {
-      return console.log.apply(null, arguments);
-    }
-  }
+    console = (function() {
+        'use strict';
+
+        var log = function() {
+            if(typeof blurconsole !== 'undefined' && typeof blurconsole.model !==
'undefined' && typeof blurconsole.model.logs !== 'undefined') {
+                var args = Array.prototype.slice.call(arguments);
+                blurconsole.model.logs.logError(args.join(' '), 'javascript');
+            }
+        };
+
+        var info = function() {
+            return console.log.apply(null, arguments);
+        };
+
+        var warn = function() {
+            return console.log.apply(null, arguments);
+        };
+
+        var error = function() {
+            return console.log.apply(null, arguments);
+        };
+
+        var debug = function() {
+            return console.log.apply(null, arguments);
+        };
+
+        return {
+            log: log,
+            info: info,
+            warn: warn,
+            error: error,
+            debug: debug
+        };
+    }());
 }
\ No newline at end of file


Mime
View raw message