You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2012/05/10 11:40:14 UTC
svn commit: r1336564 - in
/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp:
WEB-INF/ resource-manager/ tobago-resource/ tobago-resource/html/
tobago-resource/html/standard/ tobago-resource/html/standard/standard/
tobago-resource...
Author: lofwyr
Date: Thu May 10 09:40:14 2012
New Revision: 1336564
URL: http://svn.apache.org/viewvc?rev=1336564&view=rev
Log:
Test: Checking the order of the script includes (is related to TOBAGO-913)
Added:
myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tobago-resource/
myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tobago-resource/html/
myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tobago-resource/html/standard/
myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tobago-resource/html/standard/standard/
myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tobago-resource/html/standard/standard/image/
myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tobago-resource/html/standard/standard/script/
myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tobago-resource/html/standard/standard/script/tobago.js
Modified:
myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/WEB-INF/tobago-config.xml
myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/resource-manager/script.xhtml
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/WEB-INF/tobago-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/WEB-INF/tobago-config.xml?rev=1336564&r1=1336563&r2=1336564&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/WEB-INF/tobago-config.xml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/WEB-INF/tobago-config.xml Thu May 10 09:40:14 2012
@@ -29,6 +29,8 @@
<supported-theme>charlotteville</supported-theme>
</theme-config>
+ <resource-dir>tobago-resource</resource-dir>
+
<renderers>
<renderer>
<name>TreeCommand</name>
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/resource-manager/script.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/resource-manager/script.xhtml?rev=1336564&r1=1336563&r2=1336564&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/resource-manager/script.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/resource-manager/script.xhtml Thu May 10 09:40:14 2012
@@ -23,30 +23,37 @@
xmlns:f="http://java.sun.com/jsf/core">
<tc:page id="page" width="300px" height="500px">
<f:facet name="layout">
- <tc:gridLayout rows="30px;auto;auto;auto"/>
+ <tc:gridLayout rows="30px;auto;auto;auto;auto"/>
</f:facet>
<tc:out value="Tests the order of included script files. The field shows the position of the include in the HTML head."/>
<tx:in readonly="true" fieldId="standard" label="Standard"/>
+ <tx:in readonly="true" fieldId="standardApp" label="Standard Application"/>
<tx:in readonly="true" fieldId="scarborough" label="Scarborough"/>
<tx:in readonly="true" fieldId="application" label="Application"/>
<tc:script onload="check()">
function check() {
var posStandard = jQuery("head>script[src='/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js']").prevAll().size();
+ var posStandardApp = jQuery("head>script[src='/tobago-resource/html/standard/standard/script/tobago.js']").prevAll().size();
var posScarborough = jQuery("head>script[src='/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago.js']").prevAll().size();
var posApp = jQuery("head>script[src='/script/tobago.js']").prevAll().size();
jQuery(Tobago.Utils.escapeClientId("page:standard")).attr('value', posStandard);
+ jQuery(Tobago.Utils.escapeClientId("page:standardApp")).attr('value', posStandardApp);
jQuery(Tobago.Utils.escapeClientId("page:scarborough")).attr('value', posScarborough);
jQuery(Tobago.Utils.escapeClientId("page:application")).attr('value', posApp);
- if (posStandard > posScarborough) {
- LOG.error("Script for theme 'standard' must be included before the script of 'scarborough'!");
+ if (posStandard >= posStandardApp) {
+ LOG.error("Script for theme 'standard' must be included before the application specific script of 'standard'!");
}
- if (posScarborough > posApp) {
+ if (posStandardApp >= posScarborough) {
+ LOG.error("Application specific script for theme 'standard' must be included before the script of 'scarborough'!");
+ }
+
+ if (posScarborough >= posApp) {
LOG.error("Script for theme 'scarborough' must be included before the application specific script!");
}
}
Added: myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tobago-resource/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tobago-resource/html/standard/standard/script/tobago.js?rev=1336564&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tobago-resource/html/standard/standard/script/tobago.js (added)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-test/src/main/webapp/tobago-resource/html/standard/standard/script/tobago.js Thu May 10 09:40:14 2012
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * This entry is to test order of included JS Files.
+ * Used in resource-manager/script.xhtml
+ */
+