You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2011/07/04 23:25:18 UTC
svn commit: r1142814 -
/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-console.js
Author: hlship
Date: Mon Jul 4 21:25:18 2011
New Revision: 1142814
URL: http://svn.apache.org/viewvc?rev=1142814&view=rev
Log:
Consolidate some vars, as directed by yuicompressor
Change function name from "float" to "display", as "float" is a JavaScript reserved word
Modified:
tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-console.js
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-console.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-console.js?rev=1142814&r1=1142813&r2=1142814&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-console.js (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/t5-console.js Mon Jul 4 21:25:18 2011
@@ -14,10 +14,9 @@
T5.define("console", function() {
- //FireFox throws an exception is you reference the console when it is not enabled.
+ // FireFox throws an exception is you reference the console when it is not enabled.
- var nativeConsoleExists = false;
- var nativeConsole = {};
+ var nativeConsoleExists = false, nativeConsole = {}, floatingConsole;
try {
if (console) {
@@ -28,9 +27,7 @@ T5.define("console", function() {
catch (e) {
}
- var floatingConsole;
-
- function float(className, message) {
+ function display(className, message) {
if (!floatingConsole) {
floatingConsole = new Element("div", { "class" : "t-console" });
@@ -57,14 +54,14 @@ T5.define("console", function() {
function level(className, consolefn) {
return function (message) {
- float(className, message);
+ display(className, message);
consolefn && consolefn(message);
}
}
function error(message) {
- float("t-err", message);
+ display("t-err", message);
if (nativeConsoleExists) {
console.error(message);