You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2010/11/20 12:24:36 UTC
svn commit: r1037172 - in /myfaces/tobago/trunk/tobago-theme: ./
tobago-theme-scarborough/
tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/
tobago-theme-speyside/ tobago-theme-standard/ t...
Author: bommel
Date: Sat Nov 20 11:24:35 2010
New Revision: 1037172
URL: http://svn.apache.org/viewvc?rev=1037172&view=rev
Log:
(TOBAGO-943) Consolidation of the Tobago JavaScript files and css files
Modified:
myfaces/tobago/trunk/tobago-theme/pom.xml
myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/pom.xml
myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-sheet.js
myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/pom.xml
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/pom.xml
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/calendar.js
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/theme-config.js
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tabgroup.js
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Modified: myfaces/tobago/trunk/tobago-theme/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/pom.xml?rev=1037172&r1=1037171&r2=1037172&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/pom.xml (original)
+++ myfaces/tobago/trunk/tobago-theme/pom.xml Sat Nov 20 11:24:35 2010
@@ -26,6 +26,12 @@
<name>Tobago Themes</name>
<artifactId>tobago-theme</artifactId>
+ <build>
+ <plugins>
+
+ </plugins>
+ </build>
+
<modules>
<module>tobago-theme-standard</module>
<module>tobago-theme-scarborough</module>
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/pom.xml?rev=1037172&r1=1037171&r2=1037172&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/pom.xml (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/pom.xml Sat Nov 20 11:24:35 2010
@@ -40,35 +40,62 @@
</configuration>
</plugin>
<plugin>
- <artifactId>myfaces-javascript-plugin</artifactId>
- <groupId>org.apache.myfaces.buildtools</groupId>
- <version>1.0.1</version>
- <extensions>true</extensions>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
<executions>
<execution>
- <id>compile</id>
+ <id>strip-javascript</id>
<goals>
- <goal>compile</goal>
+ <goal>run</goal>
</goals>
- <phase>process-resources</phase>
+ <phase>compile</phase>
<configuration>
- <descriptor>${basedir}/src/main/build/standard-javascript.xml</descriptor>
- <sourceDirectory>${basedir}/src/main/resources/</sourceDirectory>
+ <target>
+ <concat destfile="${project.build.directory}/javascript-min/scarborough/script/tobago.min.js">
+ <filelist
+ dir="${basedir}/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script"
+ files="theme-config.js,tobago-sheet.js"/>
+ </concat>
+ <replaceregexp match="^;;;.*$" replace="" byline="true">
+ <fileset dir="${project.build.directory}/javascript-min">
+ <include name="**/tobago.min.js"/>
+ </fileset>
+ </replaceregexp>
+ </target>
</configuration>
</execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-apache-regexp</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
<execution>
- <id>compress</id>
+ <id>compress-standard</id>
<goals>
- <goal>compress</goal>
+ <goal>exec</goal>
</goals>
- <phase>process-resources</phase>
+ <phase>compile</phase>
<configuration>
- <scripts>org/apache/myfaces/tobago/renderkit/html/scarborough/standard/</scripts>
- <includes>
- <include>**/tobago.min.js</include>
- </includes>
- <compressor>yahooUI</compressor>
- <webappDirectory>target/classes</webappDirectory>
+ <executable>java</executable>
+ <arguments>
+ <argument>-jar</argument>
+ <argument>../tobago-theme-standard/lib/compiler-20100917.jar</argument>
+ <argument>--js</argument>
+ <argument>${project.build.directory}/javascript-min/scarborough/script/tobago.min.js</argument>
+ <argument>--js_output_file</argument>
+ <argument>
+ target/classes/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago.min.js
+ </argument>
+ </arguments>
</configuration>
</execution>
</executions>
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-sheet.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-sheet.js?rev=1037172&r1=1037171&r2=1037172&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-sheet.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-sheet.js Sat Nov 20 11:24:35 2010
@@ -30,13 +30,13 @@ function tobagoSheetEditPagingRow(span,
var text = Tobago.element(commandId + Tobago.SUB_COMPONENT_SEP + "text");
if (text) {
- LOG.debug("text gefunden");
+;;; LOG.debug("text gefunden");
span = text.parentNode;
var hiddenId = commandId + Tobago.SUB_COMPONENT_SEP + "value";
span.style.cursor = 'auto';
input = text.inputElement;
if (! input) {
- LOG.debug("creating new input");
+;;; LOG.debug("creating new input");
input = document.createElement('input');
text.inputElement = input;
input.textElement = text;
@@ -53,9 +53,8 @@ function tobagoSheetEditPagingRow(span,
span.replaceChild(input, text);
input.focus();
input.select();
- }
- else {
- LOG.debug("Can't find start field! ");
+ } else {
+;;; LOG.debug("Can't find start field! ");
}
}
@@ -65,7 +64,7 @@ function delayedHideInput(event) {
if (input) {
setTimeout('hideInput("' + input.id + '", 100)');
} else {
- LOG.debug("Can't find input field! ");
+;;; LOG.debug("Can't find input field! ");
}
}
function hideInput(inputId) {
@@ -74,7 +73,7 @@ function hideInput(inputId) {
input.parentNode.style.cursor = 'pointer';
input.parentNode.replaceChild(input.textElement, input);
} else {
- LOG.debug("Can't find input field! " + inputId);
+;;; LOG.debug("Can't find input field! " + inputId);
}
}
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/pom.xml?rev=1037172&r1=1037171&r2=1037172&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/pom.xml (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/pom.xml Sat Nov 20 11:24:35 2010
@@ -143,35 +143,62 @@
</executions>
</plugin>
<plugin>
- <artifactId>myfaces-javascript-plugin</artifactId>
- <groupId>org.apache.myfaces.buildtools</groupId>
- <version>1.0.1</version>
- <extensions>true</extensions>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
<executions>
<execution>
- <id>compile</id>
+ <id>strip-javascript</id>
<goals>
- <goal>compile</goal>
+ <goal>run</goal>
</goals>
- <phase>process-resources</phase>
+ <phase>compile</phase>
<configuration>
- <descriptor>${basedir}/src/main/build/standard-javascript.xml</descriptor>
- <sourceDirectory>${basedir}/src/main/resources/</sourceDirectory>
+ <target>
+ <concat destfile="${project.build.directory}/javascript-min/speyside/script/tobago.min.js">
+ <filelist
+ dir="${basedir}/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/script"
+ files="theme-config.js"/>
+ </concat>
+ <replaceregexp match="^;;;.*$" replace="" byline="true">
+ <fileset dir="${project.build.directory}/javascript-min">
+ <include name="**/tobago.min.js"/>
+ </fileset>
+ </replaceregexp>
+ </target>
</configuration>
</execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-apache-regexp</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
<execution>
- <id>compress</id>
+ <id>compress-standard</id>
<goals>
- <goal>compress</goal>
+ <goal>exec</goal>
</goals>
- <phase>process-resources</phase>
+ <phase>compile</phase>
<configuration>
- <scripts>org/apache/myfaces/tobago/renderkit/html/speyside/standard/</scripts>
- <includes>
- <include>**/tobago.min.js</include>
- </includes>
- <compressor>yahooUI</compressor>
- <webappDirectory>target/classes</webappDirectory>
+ <executable>java</executable>
+ <arguments>
+ <argument>-jar</argument>
+ <argument>../tobago-theme-standard/lib/compiler-20100917.jar</argument>
+ <argument>--js</argument>
+ <argument>${project.build.directory}/javascript-min/speyside/script/tobago.min.js</argument>
+ <argument>--js_output_file</argument>
+ <argument>
+ target/classes/org/apache/myfaces/tobago/renderkit/html/speyside/standard/script/tobago.min.js
+ </argument>
+ </arguments>
</configuration>
</execution>
</executions>
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/pom.xml?rev=1037172&r1=1037171&r2=1037172&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/pom.xml (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/pom.xml Sat Nov 20 11:24:35 2010
@@ -28,51 +28,108 @@
<build>
<plugins>
<!--<plugin>
- <groupId>gr.abiss.mvn.plugins</groupId>
- <artifactId>mvn-jstools</artifactId>
- <version>0.1</version>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>wagon-maven-plugin</artifactId>
+ <version>1.0-beta-3</version>
+ <executions>
+ <execution>
+ <id>closure-compiler</id>
+ <phase>initialize</phase>
+ <goals>
+ <goal>download-single</goal>
+ </goals>
+ <configuration>
+ <serverId>code-google</serverId>
+ <url>http://closure-compiler.googlecode.com/files/</url>
+ <fromFile>compiler-20100917.zip</fromFile>
+ <toDir>${project.build.directory}/closure-compiler</toDir>
+ </configuration>
+ </execution>
+ </executions>
</plugin>-->
<plugin>
- <artifactId>myfaces-javascript-plugin</artifactId>
- <groupId>org.apache.myfaces.buildtools</groupId>
- <version>1.0.1</version>
- <extensions>true</extensions>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
<executions>
<execution>
- <id>compile-standard</id>
+ <id>strip-javascript</id>
<goals>
- <goal>compile</goal>
+ <goal>run</goal>
</goals>
- <phase>process-resources</phase>
+ <phase>compile</phase>
<configuration>
- <descriptor>${basedir}/src/main/build/standard-javascript.xml</descriptor>
- <sourceDirectory>${basedir}/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard</sourceDirectory>
+ <target>
+ <concat destfile="${project.build.directory}/javascript-min/standard/script/tobago.min.js">
+ <filelist
+ dir="${basedir}/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script"
+ files="tobago.js,calendar.js,dateConverter.js,theme-config.js,tobago-menu.js,tobago-sheet.js,
+ tobago-tabgroup.js,tobago-tree.js"/>
+ </concat>
+ <concat destfile="${project.build.directory}/javascript-min/msie_6_0/script/tobago.min.js">
+ <filelist
+ dir="${basedir}/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/msie_6_0/script"
+ files="tobago.js"/>
+ </concat>
+ <replaceregexp match="^;;;.*$" replace="" byline="true">
+ <fileset dir="${project.build.directory}/javascript-min">
+ <include name="**/tobago.min.js"/>
+ </fileset>
+ </replaceregexp>
+ </target>
</configuration>
</execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-apache-regexp</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
<execution>
- <id>compile-msie</id>
+ <id>compress-standard</id>
<goals>
- <goal>compile</goal>
+ <goal>exec</goal>
</goals>
- <phase>process-resources</phase>
+ <phase>compile</phase>
<configuration>
- <descriptor>${basedir}/src/main/build/msie-javascript.xml</descriptor>
- <sourceDirectory>${basedir}/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/msie_6_0</sourceDirectory>
+ <executable>java</executable>
+ <arguments>
+ <argument>-jar</argument>
+ <argument>lib/compiler-20100917.jar</argument>
+ <argument>--js</argument>
+ <argument>${project.build.directory}/javascript-min/standard/script/tobago.min.js</argument>
+ <argument>--js_output_file</argument>
+ <argument>
+ target/classes/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.min.js
+ </argument>
+ </arguments>
</configuration>
</execution>
<execution>
- <id>compress</id>
+ <id>compress-msie_6_0</id>
<goals>
- <goal>compress</goal>
+ <goal>exec</goal>
</goals>
- <phase>process-resources</phase>
+ <phase>compile</phase>
<configuration>
- <scripts>org/apache/myfaces/tobago/renderkit/html/standard</scripts>
- <includes>
- <include>**/tobago.min.js</include>
- </includes>
- <compressor>yahooUI</compressor>
- <webappDirectory>target/classes</webappDirectory>
+ <executable>java</executable>
+ <arguments>
+ <argument>-jar</argument>
+ <argument>lib/compiler-20100917.jar</argument>
+ <argument>--js</argument>
+ <argument>${project.build.directory}/javascript-min/msie_6_0/script/tobago.min.js</argument>
+ <argument>--js_output_file</argument>
+ <argument>
+ target/classes/org/apache/myfaces/tobago/renderkit/html/standard/msie_6_0/script/tobago.min.js
+ </argument>
+ </arguments>
</configuration>
</execution>
</executions>
@@ -95,14 +152,6 @@
</excludes>
</configuration>
</plugin>
- <!--<plugin>
- <groupId>ro.isdc.wro4j</groupId>
- <artifactId>wro4j-maven-plugin</artifactId>
- <version>1.3.1</version>
- <configuration>
-
- </configuration>
- </plugin>-->
</plugins>
</build>
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/calendar.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/calendar.js?rev=1037172&r1=1037171&r2=1037172&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/calendar.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/calendar.js Sat Nov 20 11:24:35 2010
@@ -397,7 +397,7 @@ function tbgInitTimeParse(timeId, dateId
var minutes = date.getMinutes();
var seconds = date.getSeconds();
- LOG.debug("init time :" + hours + ":" + minutes + ":" + seconds);
+;;; LOG.debug("init time :" + hours + ":" + minutes + ":" + seconds);
tbgInitTimeData(timeId, hours, minutes, seconds);
}
}
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/theme-config.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/theme-config.js?rev=1037172&r1=1037171&r2=1037172&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/theme-config.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/theme-config.js Sat Nov 20 11:24:35 2010
@@ -32,7 +32,7 @@ Tobago.Config = {
if (name) {
return this[name][key];
} else {
- LOG.warn("Tobago.Config.get("+ name + ", " + key + ") = undefined" );
+;;; LOG.warn("Tobago.Config.get("+ name + ", " + key + ") = undefined" );
return 0;
}
},
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js?rev=1037172&r1=1037171&r2=1037172&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js Sat Nov 20 11:24:35 2010
@@ -30,7 +30,7 @@ Tobago.Sheets = {
// Info: 2nd parameter "enableAjax" was rededicated to "firstRowIndex"
Tobago.Sheet = function(sheetId, firstRowIndex, checkedImage, uncheckedImage, selectable, columnSelectorIndex, autoReload,
clickActionId, clickReloadComponentId, dblClickActionId, dblClickReloadComponentId, renderedPartially) {
- this.startTime = new Date();
+;;; this.startTime = new Date();
this.id = sheetId;
Tobago.Sheets.put(this);
this.checkedImage = checkedImage;
@@ -79,10 +79,10 @@ Tobago.Sheet = function(sheetId, firstRo
this.setup();
- LOG.debug("New Sheet with id " + this.id);
- this.endTime = new Date();
- LOG.debug("Sheet-setup time = " + (this.setupEnd.getTime() - this.setupStart.getTime()));
- LOG.debug("Sheet-total time = " + (this.endTime.getTime() - this.startTime.getTime()));
+;;; LOG.debug("New Sheet with id " + this.id);
+;;; this.endTime = new Date();
+;;; LOG.debug("Sheet-setup time = " + (this.setupEnd.getTime() - this.setupStart.getTime()));
+;;; LOG.debug("Sheet-total time = " + (this.endTime.getTime() - this.startTime.getTime()));
};
Tobago.Sheet.prototype.sortOnclickRegExp
@@ -173,8 +173,8 @@ Tobago.Sheet.prototype.doSort = function
while (element && !element.sorterId) {
element = element.parentNode;
}
- LOG.debug("element.id = " + element.id);
- LOG.debug("sorterId = " + element.sorterId);
+;;; LOG.debug("element.id = " + element.id);
+;;; LOG.debug("sorterId = " + element.sorterId);
this.reloadWithAction(event.srcElement, element.sorterId);
};
@@ -209,7 +209,7 @@ Tobago.Sheet.prototype.doPaging = functi
};
Tobago.Sheet.prototype.reloadWithAction = function(source, action, options) {
- LOG.debug("reload sheet with action \"" + action + "\"");
+;;; LOG.debug("reload sheet with action \"" + action + "\"");
var reloadOptions = Tobago.extend({}, this.options);
reloadOptions = Tobago.extend(reloadOptions, options);
Tobago.createOverlay(Tobago.element(this.id));
@@ -256,7 +256,7 @@ Tobago.Sheet.prototype.insertTarget = fu
input.select();
}
else {
- LOG.error("Can't find text field with id = \"" + textId + "\"!");
+;;; LOG.error("Can't find text field with id = \"" + textId + "\"!");
}
};
@@ -766,7 +766,7 @@ Tobago.Sheet.prototype.endResize = funct
var table = jQuery("#" + this.id.replace(/:/g, "\\:") + ">div>table");
jQuery("colgroup>col", table).eq(columnNr).attr("width", this.newWidth);
- var index = columnNr * 1 + 1;
+ var index = parseInt(columnNr, 10) + 1;
jQuery("td:nth-child(" + index + ")", table).children().borderBoxWidth(this.newWidth);
// this.adjustScrollBars();
this.adjustHeaderDiv();
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tabgroup.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tabgroup.js?rev=1037172&r1=1037171&r2=1037172&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tabgroup.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-tabgroup.js Sat Nov 20 11:24:35 2010
@@ -18,11 +18,11 @@
Tobago.TabGroup = function(tabGroupId, activeIndex, size, renderedPartially) {
this.tabGroupId = tabGroupId,
- this.activeIndex = activeIndex * 1;
+ this.activeIndex = parseInt(activeIndex, 10);
this.size = size;
this.activeTabId = tabGroupId + Tobago.SUB_COMPONENT_SEP2 + activeIndex;
this.renderedPartially = renderedPartially;
- LOG.debug("activeTabId : " + this.activeTabId);
+;;; LOG.debug("activeTabId : " + this.activeTabId);
Tobago.element(this.tabGroupId).jsObject = this;
Tobago.addJsObject(this);
@@ -41,16 +41,16 @@ Tobago.TabGroup = function(tabGroupId, a
this.options = {
};
- LOG.debug("onComplete = " + this.options.onComplete);
+;;; LOG.debug("onComplete = " + this.options.onComplete);
this.setUp();
Tobago.addAjaxComponent(this.tabGroupId, this);
};
Tobago.TabGroup.prototype.setUp = function() {
- LOG.debug("tabgroup id " + this.tabGroupId);
- LOG.debug("setup tabgroup " + this.activeTabId);
- LOG.debug("activeIndex " + this.activeIndex);
+;;; LOG.debug("tabgroup id " + this.tabGroupId);
+;;; LOG.debug("setup tabgroup " + this.activeTabId);
+;;; LOG.debug("activeIndex " + this.activeIndex);
var i = 0;
var idPrefix = this.activeTabId + Tobago.SUB_COMPONENT_SEP2;
@@ -59,7 +59,7 @@ Tobago.TabGroup.prototype.setUp = functi
var anchor = Tobago.element(idPrefix + i);
if (anchor) {
- LOG.debug("observe tab " + anchor.id);
+;;; LOG.debug("observe tab " + anchor.id);
// if (i != this.activeIndex) {
// Event.observe(anchor, "click", this.reload.bindAsEventListener(this));
// }
@@ -98,7 +98,7 @@ Tobago.TabGroup.prototype.setUp = functi
};
Tobago.TabGroup.prototype.next = function(event) {
- LOG.debug("Reload ");
+;;; LOG.debug("Reload ");
if (event) {
var element = Tobago.element(event);
if (!element.id) {
@@ -109,7 +109,7 @@ Tobago.TabGroup.prototype.next = functio
//LOG.error(element.id);
var idPrefix = element.id.substring(0, element.id.lastIndexOf(Tobago.SUB_COMPONENT_SEP2) + Tobago.SUB_COMPONENT_SEP2.length);
//LOG.error(idPrefix);
- for (var i = (this.activeIndex * 1) + 1; i < this.size; i++) {
+ for (var i = parseInt(this.activeIndex, 10) + 1; i < this.size; i++) {
var id = idPrefix + i;
var span = Tobago.element(id);
if (span && span.className.indexOf('tobago-tab-link-markup-disabled') == -1) {
@@ -125,8 +125,8 @@ Tobago.TabGroup.prototype.next = functio
hidden.value = this.activeIndex;
}
else {
- LOG.warn("No hidden field for tabindex Id='" + this.tabGroupId + Tobago.SUB_COMPONENT_SEP2 + "activeIndex" + "'");
- LOG.warn("aId = " + aId);
+;;; LOG.warn("No hidden field for tabindex Id='" + this.tabGroupId + Tobago.SUB_COMPONENT_SEP2 + "activeIndex" + "'");
+;;; LOG.warn("aId = " + aId);
}
if (Tobago.Transport.hasTransport()) {
var id = idPrefix + this.activeIndex;
@@ -138,13 +138,13 @@ Tobago.TabGroup.prototype.next = functio
}
}
} else {
- LOG.info("No reload Event");
+;;; LOG.info("No reload Event");
}
};
Tobago.TabGroup.prototype.previous = function(event) {
- LOG.debug("Reload ");
+;;; LOG.debug("Reload ");
if (event) {
var element = Tobago.element(event);
if (!element.id) {
@@ -171,8 +171,8 @@ Tobago.TabGroup.prototype.previous = fun
hidden.value = this.activeIndex;
}
else {
- LOG.warn("No hidden field for tabindex Id='" + this.tabGroupId + Tobago.SUB_COMPONENT_SEP2 + "activeIndex" + "'");
- LOG.warn("aId = " + aId);
+;;; LOG.warn("No hidden field for tabindex Id='" + this.tabGroupId + Tobago.SUB_COMPONENT_SEP2 + "activeIndex" + "'");
+;;; LOG.warn("aId = " + aId);
}
if (Tobago.Transport.hasTransport()) {
var id = idPrefix + this.activeIndex;
@@ -184,7 +184,7 @@ Tobago.TabGroup.prototype.previous = fun
}
}
} else {
- LOG.info("No reload Event");
+;;; LOG.info("No reload Event");
}
};
@@ -194,7 +194,7 @@ Tobago.TabGroup.prototype.prepareReload
};
Tobago.TabGroup.prototype.reloadWithAction = function(event) {
- LOG.debug("Reload ");
+;;; LOG.debug("Reload ");
if (event) {
var element = Tobago.element(event);
if (!element.id) {
@@ -204,15 +204,15 @@ Tobago.TabGroup.prototype.reloadWithActi
if (element.className && element.className.indexOf("tobago-tab-link") != -1) {
var aId = Tobago.findAnchestorWithTagName(element, 'span').id;
this.activeIndex = aId.substring(aId.lastIndexOf(Tobago.SUB_COMPONENT_SEP2) + Tobago.SUB_COMPONENT_SEP2.length);
- LOG.debug("Request tab with index " + this.activeIndex);
+;;; LOG.debug("Request tab with index " + this.activeIndex);
var hidden = Tobago.element(this.tabGroupId + Tobago.SUB_COMPONENT_SEP2 + "activeIndex");
if (hidden) {
hidden.value = this.activeIndex;
}
else {
- LOG.warn("No hidden field for tabindex Id='" + this.tabGroupId + Tobago.SUB_COMPONENT_SEP2 + "activeIndex" + "'");
- LOG.warn("aId = " + aId);
+;;; LOG.warn("No hidden field for tabindex Id='" + this.tabGroupId + Tobago.SUB_COMPONENT_SEP2 + "activeIndex" + "'");
+;;; LOG.warn("aId = " + aId);
}
if (Tobago.Transport.hasTransport()) {
this.removeRelatedAcceleratorKeys(aId.substring(0, aId.lastIndexOf(Tobago.SUB_COMPONENT_SEP2) + Tobago.SUB_COMPONENT_SEP2.length));
@@ -223,7 +223,7 @@ Tobago.TabGroup.prototype.reloadWithActi
}
}
} else {
- LOG.info("No reload Event");
+;;; LOG.info("No reload Event");
}
};
@@ -241,7 +241,7 @@ Tobago.TabGroup.prototype.removeRelatedA
Tobago.TabGroup.prototype.afterDoUpdateSuccess = function() {
this.activeTabId = Tobago.element(this.tabGroupId).firstChild.id;
- LOG.debug("activeTabId : " + this.activeTabId);
+;;; LOG.debug("activeTabId : " + this.activeTabId);
this.setUp();
};
@@ -260,7 +260,7 @@ function tobago_nextTab(type, controlId,
+ '__activeIndex' /* TabGroupRenderer.ACTIVE_INDEX_POSTFIX*/);
var selectedIndex = 0;
if (hidden) {
- selectedIndex = hidden.value * 1;
+ selectedIndex = parseInt(hidden.value, 10);
}
//LOG.error("Selected Index: " + selectedIndex);
for (i = selectedIndex + 1; i < size; i++) {
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=1037172&r1=1037171&r2=1037172&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Sat Nov 20 11:24:35 2010
@@ -19,31 +19,31 @@ var TbgTimer = {
startTbgJs: new Date(),
log: function() {
- var tbgjs = this.endTbgJs.getTime() - this.startTbgJs.getTime();
+;;; var tbgjs = this.endTbgJs.getTime() - this.startTbgJs.getTime();
// var htmljs = this.endBody.getTime() - this.startHtml.getTime();
- var bodyjs = this.endBody.getTime() - this.startBody.getTime();
- var onloadjs = this.endOnload.getTime() - this.startOnload.getTime();
- var bodyToOnload = this.startOnload.getTime() - this.endBody.getTime();
- var totaljs = this.endTotal.getTime() - this.startTbgJs.getTime();
- var appOnload = this.endAppOnload.getTime() - this.startAppOnload.getTime();
+;;; var bodyjs = this.endBody.getTime() - this.startBody.getTime();
+;;; var onloadjs = this.endOnload.getTime() - this.startOnload.getTime();
+;;; var bodyToOnload = this.startOnload.getTime() - this.endBody.getTime();
+;;; var totaljs = this.endTotal.getTime() - this.startTbgJs.getTime();
+;;; var appOnload = this.endAppOnload.getTime() - this.startAppOnload.getTime();
// LOG.show();
- if (TbgHeadStart) {
- LOG.debug('startTbgJs-TbgHeadStart: ' + (this.startTbgJs.getTime() - TbgHeadStart.getTime()));
- }
- LOG.debug('startBody-startTbgJs: ' + (this.startBody.getTime() - this.startTbgJs.getTime()));
- LOG.debug('startTbgJs:' + this.startTbgJs.getTime());
- LOG.debug('startBody: ' + this.startBody.getTime());
- LOG.debug('parse tobago.js ' + tbgjs);
+;;; if (TbgHeadStart) {
+;;; LOG.debug('startTbgJs-TbgHeadStart: ' + (this.startTbgJs.getTime() - TbgHeadStart.getTime()));
+;;; }
+;;; LOG.debug('startBody-startTbgJs: ' + (this.startBody.getTime() - this.startTbgJs.getTime()));
+;;; LOG.debug('startTbgJs:' + this.startTbgJs.getTime());
+;;; LOG.debug('startBody: ' + this.startBody.getTime());
+;;; LOG.debug('parse tobago.js ' + tbgjs);
// LOG.debug("parse htmltotal " + htmljs);
- LOG.debug('parse body ' + bodyjs);
- LOG.debug('between body and onload ' + bodyToOnload);
- LOG.debug('execute onload ' + onloadjs);
- LOG.debug('execute appOnload ' + appOnload);
- LOG.debug('until appOnload ' + (this.startAppOnload.getTime() - this.startOnload.getTime()));
- LOG.debug('until scriptLoaders ' + (this.startScriptLoaders.getTime() - this.startOnload.getTime()));
- LOG.debug('time scriptLoaders ' + (this.endScriptLoaders.getTime() - this.startScriptLoaders.getTime()));
- LOG.debug('until nach onload ' + (this.endOnload.getTime() - this.startTbgJs.getTime()));
- LOG.debug('total ' + totaljs);
+;;; LOG.debug('parse body ' + bodyjs);
+;;; LOG.debug('between body and onload ' + bodyToOnload);
+;;; LOG.debug('execute onload ' + onloadjs);
+;;; LOG.debug('execute appOnload ' + appOnload);
+;;; LOG.debug('until appOnload ' + (this.startAppOnload.getTime() - this.startOnload.getTime()));
+;;; LOG.debug('until scriptLoaders ' + (this.startScriptLoaders.getTime() - this.startOnload.getTime()));
+;;; LOG.debug('time scriptLoaders ' + (this.endScriptLoaders.getTime() - this.startScriptLoaders.getTime()));
+;;; LOG.debug('until nach onload ' + (this.endOnload.getTime() - this.startTbgJs.getTime()));
+;;; LOG.debug('total ' + totaljs);
}
};
@@ -132,7 +132,7 @@ var Tobago = {
createHtmlId: function() {
var id = '__tbg_id_' + this.htmlIdIndex++;
- LOG.debug('created id = ' + id);
+;;; LOG.debug('created id = ' + id);
return id;
},
@@ -150,7 +150,7 @@ var Tobago = {
set: function(keyAccelerator) {
var key = keyAccelerator.modifier + keyAccelerator.key;
if (this[key]) {
- LOG.warn('Ignoring duplicate key: ' + keyAccelerator.modifier + '-' + keyAccelerator.key + ' with function: ' + keyAccelerator.func.valueOf());
+;;; LOG.warn('Ignoring duplicate key: ' + keyAccelerator.modifier + '-' + keyAccelerator.key + ' with function: ' + keyAccelerator.func.valueOf());
} else {
// LOG.debug("add accelerator for " + keyAccelerator.modifier + "-" + keyAccelerator.key);
this[key] = keyAccelerator;
@@ -258,9 +258,9 @@ var Tobago = {
// new LOG.LogArea({hide: false});
// LOG.show();
- if (TbgTimer.endBody) {
- TbgTimer.startOnload = new Date();
- }
+;;; if (TbgTimer.endBody) {
+;;; TbgTimer.startOnload = new Date();
+;;; }
this.page = this.element(pageId);
this.form = this.element(this.page.id + this.SUB_COMPONENT_SEP + 'form');
this.addBindEventListener(this.form, 'submit', this, 'onSubmit');
@@ -274,15 +274,15 @@ var Tobago = {
// XXX not nice...
xxx_tobagoInit();
- if (TbgTimer.endBody) {
- TbgTimer.startAppOnload = new Date();
- }
+;;; if (TbgTimer.endBody) {
+;;; TbgTimer.startAppOnload = new Date();
+;;; }
if (this.applicationOnload) {
this.applicationOnload();
}
- if (TbgTimer.endBody) {
- TbgTimer.endAppOnload = new Date();
- }
+;;; if (TbgTimer.endBody) {
+;;; TbgTimer.endAppOnload = new Date();
+;;; }
this.addBindEventListener(document, 'keypress', this.acceleratorKeys, 'observe');
@@ -292,26 +292,26 @@ var Tobago = {
}
window.setTimeout(Tobago.finishPageLoading, 1);
- if (TbgTimer.endBody) {
- TbgTimer.endOnload = new Date();
- }
+;;; if (TbgTimer.endBody) {
+;;; TbgTimer.endOnload = new Date();
+;;; }
},
finishPageLoading: function() {
Tobago.registerCurrentScripts();
- if (TbgTimer.endBody) {
- TbgTimer.startScriptLoaders = new Date();
- }
+;;; if (TbgTimer.endBody) {
+;;; TbgTimer.startScriptLoaders = new Date();
+;;; }
Tobago.startScriptLoaders();
- if (TbgTimer.endBody) {
- TbgTimer.endScriptLoaders = new Date();
- }
+;;; if (TbgTimer.endBody) {
+;;; TbgTimer.endScriptLoaders = new Date();
+;;; }
Tobago.pageIsComplete = true;
Tobago.setFocus();
- if (TbgTimer.endBody) {
- TbgTimer.endTotal = new Date();
- TbgTimer.log();
- }
+;;; if (TbgTimer.endBody) {
+;;; TbgTimer.endTotal = new Date();
+;;; TbgTimer.log();
+;;; }
},
@@ -521,7 +521,7 @@ var Tobago = {
if (!this.isSubmit) {
this.isSubmit = true;
var req = Tobago.Transport.requests.shift(); // remove this from queue
- LOG.debug('request removed: ' + req.toString());
+;;; LOG.debug('request removed: ' + req.toString());
var oldAction = Tobago.action.value;
var oldTarget = Tobago.form.target;
Tobago.action.value = actionId;
@@ -608,7 +608,7 @@ var Tobago = {
if (stateContainer) {
stateContainer.innerHTML = state;
} else {
- LOG.error("Can't find stateContainer!");
+;;; LOG.error("Can't find stateContainer!");
}
},
@@ -642,7 +642,7 @@ var Tobago = {
* Register a script file to prevent multiple loadings via Ajax.
*/
registerScript: function(scriptId) {
- LOG.debug('register: ' + scriptId);
+;;; LOG.debug('register: ' + scriptId);
this.registeredScripts[this.genScriptId(scriptId)] = true;
},
@@ -740,18 +740,18 @@ var Tobago = {
scriptLoader.executeCommands();
}
} else {
- var start = new Date().getTime();
- LOG.debug('start 1 of ' + this.scriptLoaders.length + ' Loaders');
- if (this.tbgScLoSt) {
- LOG.debug('time scriptLoader ' + (start - this.tbgScLoSt));
- }
- this.tbgScLoSt = start;
+;;; var start = new Date().getTime();
+;;; LOG.debug('start 1 of ' + this.scriptLoaders.length + ' Loaders');
+;;; if (this.tbgScLoSt) {
+;;; LOG.debug('time scriptLoader ' + (start - this.tbgScLoSt));
+;;; }
+;;; this.tbgScLoSt = start;
if (this.scriptLoaders.length > 0) {
this.scriptLoadingActive = true;
this.scriptLoaders.shift().ensureScripts();
} else {
this.scriptLoadingActive = false;
- LOG.debug('last time scriptLoader ' + (new Date().getTime() - this.tbgScLoSt));
+;;; LOG.debug('last time scriptLoader ' + (new Date().getTime() - this.tbgScLoSt));
delete this.tbgScLoSt;
}
}
@@ -788,7 +788,7 @@ var Tobago = {
} else if (container === undefined) {
Tobago.Updater.update(source, actionId, id, options);
} else {
- LOG.warn('Illegal Container for reload:' + (typeof container));
+;;; LOG.warn('Illegal Container for reload:' + (typeof container));
}
},
@@ -986,7 +986,7 @@ var Tobago = {
*/
popupBlink: function(element) {
var id = jQuery(element).attr('id');
- LOG.debug("Blink: Popup id is '" + id + "'");
+;;; LOG.debug("Blink: Popup id is '" + id + "'");
Tobago.addCssClass(id, 'tobago-popup-blink');
setTimeout("Tobago.removeCssClass('" + id + "', 'tobago-popup-blink')", 20);
},
@@ -1131,7 +1131,7 @@ var Tobago = {
try { // focus() on not visible elements breaks IE
focusElement.focus();
} catch (ex) {
- LOG.warn('Exception when setting focus on : \"' + this.focusId + '\"');
+;;; LOG.warn('Exception when setting focus on : \"' + this.focusId + '\"');
}
} else if (typeof this.focusId == 'undefined') {
var lowestTabIndex = 32768; // HTML max tab index value + 1
@@ -1175,7 +1175,7 @@ var Tobago = {
}
}
} else if (this.focusId.length > 0) {
- LOG.warn('Cannot find component to set focus : \"' + this.focusId + '\"');
+;;; LOG.warn('Cannot find component to set focus : \"' + this.focusId + '\"');
}
},
@@ -1297,12 +1297,12 @@ var Tobago = {
createOverlay: function(element) {
element = Tobago.element(element);
if (!element) {
- LOG.warn('no element to create overlay');
+;;; LOG.warn('no element to create overlay');
return;
}
var position = Tobago.getRuntimeStyle(element).position;
if (position == 'static') {
- LOG.debug('replace position ' + position + ' with relative');
+;;; LOG.debug('replace position ' + position + ' with relative');
element.style.position = 'relative';
}
if (this.getBrowser().type == 'msie' && this.getBrowser().version < 7) {
@@ -1349,7 +1349,7 @@ var Tobago = {
element.removeChild(iframe);
}
} else {
- LOG.warn("Can't find Overlay : \"" + element.id + '-overlay' + '\"');
+;;; LOG.warn("Can't find Overlay : \"" + element.id + '-overlay' + '\"');
}
return element;
},
@@ -1391,7 +1391,7 @@ var Tobago = {
else if (element.detachEvent) { // IE
element.detachEvent('on' + event, myFunction);
} else {
- LOG.debug('Unknown Element: ' + typeof element);
+;;; LOG.debug('Unknown Element: ' + typeof element);
}
},
@@ -1561,12 +1561,12 @@ var Tobago = {
// TODO check if this is still ok
doEditorCommand: function(element, id) {
- LOG.debug('doEditorCommand()');
+;;; LOG.debug('doEditorCommand()');
var ta = this.element(id);
var text = ta.value;
var marked = text.substring(ta.selectionStart, ta.selectionEnd);
- LOG.debug('text = ' + marked);
- LOG.debug('start = ' + ta.selectionStart + ' end =' + ta.selectionEnd);
+;;; LOG.debug('text = ' + marked);
+;;; LOG.debug('start = ' + ta.selectionStart + ' end =' + ta.selectionEnd);
ta.selectionStart--;
ta.focus();
},
@@ -1583,16 +1583,19 @@ var Tobago = {
// LOG.debug("arg = " + arg);
try {
- if (typeof arg == 'string') {
+ if (typeof arg === 'string') {
// LOG.debug("arg is string ");
return document.getElementById(arg);
- } else if (typeof arg.currentTarget == 'object') {
+ }
+ if (typeof arg.currentTarget == 'object') {
// LOG.debug("arg is DOM event ");
return arg.currentTarget;
- } else if (typeof arg.srcElement == 'object') {
+ }
+ if (typeof arg.srcElement == 'object') {
// LOG.debug("arg is IE event ");
return arg.srcElement; // IE doesn't support currentTarget, hope src target helps
- } else if (typeof arg.tagName == 'string') {
+ }
+ if (typeof arg.tagName == 'string') {
// LOG.debug("arg is HTML element ");
return arg;
}
@@ -1600,9 +1603,9 @@ var Tobago = {
} catch (ex) {
return undefined;
}
- if (! (typeof arg == 'undefined')) {
- LOG.error('arg is unknown: ' + typeof arg + ' : ' + arg);
- }
+;;; if (! (arg === undefined)) {
+;;; LOG.error('arg is unknown: ' + typeof arg + ' : ' + arg);
+;;; }
return undefined;
},
@@ -1873,7 +1876,7 @@ Tobago.AcceleratorKey = function(func, k
});
Tobago.acceleratorKeys.set(this);
} else {
- LOG.warn('Cannot observe key event for ' + modifier + '-' + key);
+;;; LOG.warn('Cannot observe key event for ' + modifier + '-' + key);
}
} else {
Tobago.acceleratorKeys.set(this);
@@ -1888,7 +1891,7 @@ Tobago.ScriptLoader = function(names, do
this.ensureScript = function(src) {
this.actualScript = src;
if (!Tobago.hasScript(this.actualScript)) {
- LOG.debug('Load script ' + src);
+;;; LOG.debug('Load script ' + src);
this.scriptElement = document.createElement('script');
this.scriptElement.type = 'text/javascript';
this.scriptElement.src = src;
@@ -1902,7 +1905,7 @@ Tobago.ScriptLoader = function(names, do
var head = document.getElementsByTagName('head')[0];
head.appendChild(this.scriptElement);
} else {
- LOG.debug('found script ' + src);
+;;; LOG.debug('found script ' + src);
this.ensureScripts();
}
@@ -1960,8 +1963,8 @@ Tobago.ScriptLoader = function(names, do
try {
eval(this.doAfter);
} catch (ex) {
- LOG.error(ex);
- LOG.error('errorCode: ' + this.doAfter.valueOf());
+;;; LOG.error(ex);
+;;; LOG.error('errorCode: ' + this.doAfter.valueOf());
throw ex;
}
};
@@ -2004,9 +2007,9 @@ Tobago.Transport = {
index = this.requests.push(req);
//LOG.debug('index = ' + index)
} else if (!this.pageSubmited) { // AJAX case
- LOG.debug('Current ActionId = ' + this.currentActionId + ' action= ' + actionId);
+;;; LOG.debug('Current ActionId = ' + this.currentActionId + ' action= ' + actionId);
if (actionId && this.currentActionId == actionId) {
- LOG.debug('Ignoring request');
+;;; LOG.debug('Ignoring request');
// If actionId equals currentActionId assume double request: do nothing
return false;
}
@@ -2018,11 +2021,11 @@ Tobago.Transport = {
}
//LOG.debug('index = ' + index)
if (index == 1) {
- LOG.debug('Execute request!');
+;;; LOG.debug('Execute request!');
this.startTime = new Date().getTime();
this.requests[0]();
} else {
- LOG.debug('Request queued!');
+;;; LOG.debug('Request queued!');
}
return true;
},
@@ -2030,9 +2033,9 @@ Tobago.Transport = {
requestComplete: function() {
this.requests.shift();
this.currentActionId = null;
- LOG.debug('Request complete! Duration: ' + (new Date().getTime() - this.startTime) + 'ms; Queue size : ' + this.requests.length);
+;;; LOG.debug('Request complete! Duration: ' + (new Date().getTime() - this.startTime) + 'ms; Queue size : ' + this.requests.length);
if (this.requests.length > 0) {
- LOG.debug('Execute request!');
+;;; LOG.debug('Execute request!');
this.startTime = new Date().getTime();
this.requests[0]();
}
@@ -2078,7 +2081,7 @@ Tobago.Transport.JqueryTransport = {
requestObject.timeout = requestOptions.timeout;
requestObject.success = function(data, textStatus) {
- LOG.debug('requestObject.success()');
+;;; LOG.debug('requestObject.success()');
requestOptions.resultData = data;
requestOptions.textStatus = textStatus;
@@ -2086,7 +2089,7 @@ Tobago.Transport.JqueryTransport = {
};
requestObject.error = function(xhr, textStatus, errorThrown) {
- LOG.debug('requestOptions.error() : ' + textStatus);
+;;; LOG.debug('requestOptions.error() : ' + textStatus);
requestOptions.xhr = xhr;
requestOptions.textStatus = textStatus;
Tobago.Updater.onError(requestOptions);
@@ -2119,7 +2122,7 @@ Tobago.Transport.DojoTransport = {
requestObject.timeout = requestOptions.timeout;
requestObject.load = function(data, ioArgs) {
- LOG.debug('requestObject.success()');
+;;; LOG.debug('requestObject.success()');
requestOptions.resultData = data;
requestOptions.xhr = ioArgs.xhr;
try {
@@ -2151,7 +2154,7 @@ Tobago.Transport.DojoTransport = {
},
error: function(data, ioArgs) {
- LOG.error('Request failed : ' + ioArgs.xhr.status);
+;;; LOG.error('Request failed : ' + ioArgs.xhr.status);
requestOptions.xhr = ioArgs.xhr;
if (ioArgs.xhr.status == 304) {
requestOptions.textStatus = 'notmodified';
@@ -2177,16 +2180,21 @@ function tobago_showHidden() {
}
}
-
+/** @nosideeffects */
var LOG = {
+ /** @nosideeffects */
debug: function(text) {
},
+ /** @nosideeffects */
info: function(text) {
},
+ /** @nosideeffects */
warn: function(text) {
},
+ /** @nosideeffects */
error: function(text) {
},
+ /** @nosideeffects */
show: function() {
}
};
@@ -2229,7 +2237,7 @@ Tobago.Updater = {
update: function(source, actionId, ajaxComponentIds, options) {
// LOG.show();
- LOG.debug('Updater.update(\"' + actionId + '\", \"' + ajaxComponentIds + '\")');
+;;; LOG.debug('Updater.update(\"' + actionId + '\", \"' + ajaxComponentIds + '\")');
if (Tobago.Transport.hasTransport()) {
// LOG.info("hasTransport");
@@ -2282,14 +2290,14 @@ Tobago.Updater = {
var queued = Tobago.Transport.ajaxTransport.request(requestOptions);
if (!queued) {
- LOG.error('error on update: not queued!');
+;;; LOG.error('error on update: not queued!');
if (!ids) {
ids = Tobago.parsePartialIds(ajaxComponentIds);
}
this.doErrorUpdate(ids);
}
} else {
- LOG.info('No Ajax transport found! Doing full page reload.');
+;;; LOG.info('No Ajax transport found! Doing full page reload.');
Tobago.submitAction(source, actionId);
}
},
@@ -2306,14 +2314,14 @@ Tobago.Updater = {
},
showFailureMessage: function() {
- LOG.info('Ajax request failed!');
+;;; LOG.info('Ajax request failed!');
},
onSuccess: function(requestOptions) {
- LOG.debug('Tobago.Updater.onSuccess()');
+;;; LOG.debug('Tobago.Updater.onSuccess()');
if (!requestOptions.resultData || !requestOptions.resultData.tobagoAjaxResponse) {
// unknown response do full page reload
- LOG.warn('initiating full reload');
+;;; LOG.warn('initiating full reload');
if (Tobago.Updater.WAIT_ON_ERROR) {
alert('wait: initiating full reload');
}
@@ -2323,7 +2331,7 @@ Tobago.Updater = {
if (requestionObjects.resultData.jsfState) {
Tobago.replaceJsfState(requestOptions.resultData.jsfState);
}
- LOG.info('full reload requested');
+;;; LOG.info('full reload requested');
if (Tobago.Updater.WAIT_ON_RELOAD) {
alert('wait: full reload requeste: responseCode = ' + requestOptions.resultData.responseCode);
}
@@ -2334,9 +2342,9 @@ Tobago.Updater = {
var doneIds = {};
for (var partId in requestOptions.resultData) {
- LOG.debug(partId + '= ' + requestOptions.resultData[partId]);
+;;; LOG.debug(partId + '= ' + requestOptions.resultData[partId]);
if (partId.indexOf('ajaxPart_') == 0) {
- LOG.debug('doUpdate partId = ' + partId);
+;;; LOG.debug('doUpdate partId = ' + partId);
this.updateComponent(requestOptions.resultData[partId]);
doneIds[requestOptions.resultData[partId].ajaxId] = true;
}
@@ -2351,7 +2359,7 @@ Tobago.Updater = {
for (var i = 0; i < requestedIds.length; i++) {
var id = requestedIds[i];
if (! doneIds[id]) {
- LOG.debug('handleMissingResponse id = ' + id);
+;;; LOG.debug('handleMissingResponse id = ' + id);
if (!data) {
data = {responseCode: Tobago.Updater.CODE_NOT_MODIFIED, html: 'error', script: function() {
}};
@@ -2365,7 +2373,7 @@ Tobago.Updater = {
handle304Response: function(ids) {
for (var i = 0; i < ids.length; i++) {
var id = ids[i];
- LOG.debug('handle304Response id = ' + id);
+;;; LOG.debug('handle304Response id = ' + id);
var data = {
ajaxId: id,
responseCode: Tobago.Updater.CODE_NOT_MODIFIED,
@@ -2380,7 +2388,7 @@ Tobago.Updater = {
onError: function(requestObject) {
- LOG.warn('Request failed : ' + requestObject.statusText);
+;;; LOG.warn('Request failed : ' + requestObject.statusText);
if (requestObject.statusText === 'timeout') {
Tobago.Updater.doErrorUpdate(Tobago.parsePartialIds(requestObject.ajaxComponentIds));
@@ -2393,9 +2401,9 @@ Tobago.Updater = {
updateComponent: function(componentData) {
var ajaxId = componentData.ajaxId;
- LOG.debug('update Component = ' + ajaxId);
+;;; LOG.debug('update Component = ' + ajaxId);
if (componentData.responseCode == Tobago.Updater.CODE_RELOAD_REQUIRED) {
- LOG.debug('nop do reload = ');
+;;; LOG.debug('nop do reload = ');
// nop
} else {
var container = Tobago.ajaxComponents[ajaxId];
@@ -2409,7 +2417,7 @@ Tobago.Updater = {
container.doUpdate(componentData);
} else {
- LOG.info('no ajax container = ' + ajaxId);
+;;; LOG.info('no ajax container = ' + ajaxId);
// LOG.debugAjaxComponents();
Tobago.Updater.doUpdate(componentData);
}
@@ -2442,7 +2450,7 @@ Tobago.Updater = {
}
} catch (e) {
// todo: improve exception handling
- LOG.error('Error in doUpdate: ' + e);
+;;; LOG.error('Error in doUpdate: ' + e);
}
break;
case Tobago.Updater.CODE_NOT_MODIFIED:
@@ -2455,11 +2463,11 @@ Tobago.Updater = {
if (typeof this.afterDoUpdateError == 'function') {
this.afterDoUpdateError();
}
- LOG.warn("ERROR 500 when updating component id = '" + data.ajaxId + "'");
+;;; LOG.warn("ERROR 500 when updating component id = '" + data.ajaxId + "'");
Tobago.deleteOverlay(Tobago.element(Tobago.ajaxComponents[data.ajaxId]));
break;
default:
- LOG.error('Unknown response code: ' + data.responseCode + " for component id = '" + data.ajaxId + "'");
+;;; LOG.error('Unknown response code: ' + data.responseCode + " for component id = '" + data.ajaxId + "'");
Tobago.deleteOverlay(Tobago.element(Tobago.ajaxComponents[data.ajaxId]));
break;
}
@@ -2532,7 +2540,7 @@ function xxx_tobagoInit(elements) {
// inputSuggest.js
Tobago.AutocompleterAjax = function(elementId, required, requiredClass, options) {
- LOG.debug('new Tobago.AutocompleterAjax ' + elementId);
+;;; LOG.debug('new Tobago.AutocompleterAjax ' + elementId);
this.id = elementId;
this.required = required;
this.requiredClass = requiredClass;
@@ -2622,7 +2630,7 @@ Tobago.AutocompleterAjax.prototype.fetch
this.currentTimeout = undefined;
if (!this.requestActive) {
this.requestActive = true;
- LOG.debug('fetchSuggestions() request Suggestions for ' + input.value);
+;;; LOG.debug('fetchSuggestions() request Suggestions for ' + input.value);
Tobago.Updater.update(input, input.id, input.id, this.options);
} else {
this.rerequest = true;
@@ -2634,7 +2642,7 @@ Tobago.AutocompleterAjax.prototype.befor
this.rerequest = false;
this.requestActive = true;
var input = Tobago.element(this.id);
- LOG.debug('doUpdate() request Suggestions for ' + input.value);
+;;; LOG.debug('doUpdate() request Suggestions for ' + input.value);
Tobago.Updater.update(input, input.id, input.id, this.options);
return false;
} else {
@@ -2657,7 +2665,7 @@ Tobago.AutocompleterAjax.prototype.after
Tobago.AutocompleterAjax.prototype.suggest = function() {
if (this.suggestions == null) {
- LOG.error('No suggestions object!');
+;;; LOG.error('No suggestions object!');
return;
}
var div = Tobago.element(this.id + '_suggestDiv');
@@ -2734,7 +2742,7 @@ Tobago.AutocompleterAjax.prototype.selec
this.closeSuggest(false);
var suggestItem = a.sugggestItem;
- LOG.debug('item.value : ' + suggestItem.value);
+;;; LOG.debug('item.value : ' + suggestItem.value);
var input = Tobago.element(this.id);
input.value = suggestItem.value;
@@ -2744,7 +2752,7 @@ Tobago.AutocompleterAjax.prototype.selec
if (suggestItem.values) {
for (var i = 0; i < suggestItem.values.length; i++) {
var item = suggestItem.values[i];
- LOG.debug(item.id + ' = ' + item.value);
+;;; LOG.debug(item.id + ' = ' + item.value);
Tobago.element(item.id).value = item.value;
}
}
@@ -2752,7 +2760,7 @@ Tobago.AutocompleterAjax.prototype.selec
}
var nextFocusElement = input;
- LOG.debug(' suggestItem.nextFocusId = ' + a.nextFocusId);
+;;; LOG.debug(' suggestItem.nextFocusId = ' + a.nextFocusId);
if (a.nextFocusId) {
var element = Tobago.element(a.nextFocusId);
if (element) {
@@ -2927,4 +2935,4 @@ function setPopupPara(width, height, opt
}
-TbgTimer.endTbgJs = new Date();
+;;; TbgTimer.endTbgJs = new Date();