Author: bleathem
Date: 2013-07-03 17:53:52 -0400 (Wed, 03 Jul 2013)
New Revision: 23244
Added:
branches/enterprise/3.3.1.SP3_test_patch/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable2.xhtml
Modified:
branches/enterprise/3.3.1.SP3_test_patch/ui/scrollableDataTable/src/main/javascript/ClientUILib.js
Log:
RF-7169: Fixed the browser detection for msie >= 9 broswers running in msie 8 document
mode
Added:
branches/enterprise/3.3.1.SP3_test_patch/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable2.xhtml
===================================================================
---
branches/enterprise/3.3.1.SP3_test_patch/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable2.xhtml
(rev 0)
+++
branches/enterprise/3.3.1.SP3_test_patch/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable2.xhtml 2013-07-03
21:53:52 UTC (rev 23244)
@@ -0,0 +1,88 @@
+<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+ <style>
+ .scrolls{
+ width:300px;
+ height:200px;
+ overflow:auto;
+ }
+ </style>
+ <h:form>
+ <rich:spacer height="30" />
+ <rich:scrollableDataTable rowKeyVar="rkv" frozenColCount="1"
height="400px"
+ width="400px" id="carList" rows="40"
columnClasses="col"
+ value="#{dataTableScrollerBean.allCars}" var="category"
sortMode="single"
+ binding="#{dataTableScrollerBean.table}"
+ sortOrder="#{dataTableScrollerBean.order}"
+ selection="#{dataTableScrollerBean.selection}">
+
+ <rich:column id="make">
+ <f:facet name="header"><h:outputText
styleClass="headerText" value="Make" /></f:facet>
+ <h:outputText value="#{category.make}" />
+ </rich:column>
+ <rich:column id="model">
+ <f:facet name="header"><h:outputText
styleClass="headerText" value="Model" /></f:facet>
+ <h:outputText value="#{category.model}" />
+ <h:inputText value=""/>
+ </rich:column>
+ <rich:column id="price">
+ <f:facet name="header"><h:outputText
styleClass="headerText" value="Price" /></f:facet>
+ <h:outputText value="#{category.price}" />
+ </rich:column>
+ <rich:column id="mileage">
+ <f:facet name="header"><h:outputText
styleClass="headerText" value="Mileage" /></f:facet>
+ <h:outputText value="#{category.mileage}" />
+ </rich:column>
+ <rich:column width="200px" id="vin">
+ <f:facet name="header"><h:outputText
styleClass="headerText" value="VIN" /></f:facet>
+ <h:outputText value="#{category.vin}" />
+ </rich:column>
+ <rich:column id="stock">
+ <f:facet name="header"><h:outputText
styleClass="headerText" value="Stock" /></f:facet>
+ <h:outputText value="#{category.stock}" />
+ <h:inputText value=""/>
+ </rich:column>
+ </rich:scrollableDataTable>
+ <rich:spacer height="20px"/>
+ <a4j:commandButton value="Show Current Selection"
reRender="table"
+ action="#{dataTableScrollerBean.takeSelection}"
+ oncomplete="javascript:Richfaces.showModalPanel('panel');"/>
+ </h:form>
+ <rich:modalPanel id="panel" autosized="false"
keepVisualState="false" width="315" height="230">
+ <f:facet name="header">
+ <h:outputText value="Selected Rows"/>
+ </f:facet>
+ <f:facet name="controls">
+ <span style="cursor:pointer"
onclick="javascript:Richfaces.hideModalPanel('panel')">X</span>
+ </f:facet>
+ <h:panelGroup layout="block" styleClass="scrolls">
+ <rich:dataTable value="#{dataTableScrollerBean.selectedCars}"
var="sel" id="table">
+ <rich:column>
+ <f:facet name="header"><h:outputText value="Make"
/></f:facet>
+ <h:outputText value="#{sel.make}" />
+ </rich:column>
+ <rich:column id="model">
+ <f:facet name="header"><h:outputText value="Model"
/></f:facet>
+ <h:inputText value=""/>
+ </rich:column>
+ <rich:column id="price">
+ <f:facet name="header"><h:outputText value="Price"
/></f:facet>
+ <h:outputText value="#{sel.price}" />
+ </rich:column>
+ <rich:column id="mileage">
+ <f:facet name="header"><h:outputText value="Mileage"
/></f:facet>
+ <h:outputText value="#{sel.mileage}" />
+ </rich:column>
+ <rich:column id="stock">
+ <f:facet name="header"><h:outputText value="Stock"
/></f:facet>
+ <h:inputText value=""/>
+ </rich:column>
+ </rich:dataTable>
+ </h:panelGroup>
+ </rich:modalPanel>
+</ui:composition>
Modified:
branches/enterprise/3.3.1.SP3_test_patch/ui/scrollableDataTable/src/main/javascript/ClientUILib.js
===================================================================
---
branches/enterprise/3.3.1.SP3_test_patch/ui/scrollableDataTable/src/main/javascript/ClientUILib.js 2013-06-28
17:52:42 UTC (rev 23243)
+++
branches/enterprise/3.3.1.SP3_test_patch/ui/scrollableDataTable/src/main/javascript/ClientUILib.js 2013-07-03
21:53:52 UTC (rev 23244)
@@ -99,30 +99,37 @@
var ua = navigator.userAgent.toLowerCase();
/** @type Boolean */
this.isOpera = (ua.indexOf('opera') > -1);
- /** @type Boolean */
+ /** @type Boolean */
this.isSafari = (ua.indexOf('webkit') > -1);
- /** @type Boolean */
+ /** @type Boolean */
this.isIE = (window.ActiveXObject);
+ if (typeof document.documentMode !== 'undefined') {
+ /** @type Boolean */
+ this.isIE7 = (document.documentMode === 7);
+ /** @type Boolean */
+ this.isIE8 = (document.documentMode === 8);
+ } else {
+ /** @type Boolean */
+ this.isIE7 = (ua.indexOf('msie 7') > -1);
+ /** @type Boolean */
+ this.isIE8 = (ua.indexOf('msie 8') > -1);
+ }
/** @type Boolean */
- this.isIE7 = (ua.indexOf('msie 7') > -1);
- /** @type Boolean */
- this.isIE8 = (ua.indexOf('msie 8') > -1);
- /** @type Boolean */
this.isGecko = !this.isSafari && (ua.indexOf('gecko') > -1);
-
+
if(ua.indexOf("windows") != -1 || ua.indexOf("win32") != -1){
- /** @type Boolean */
- this.isWindows = true;
+ /** @type Boolean */
+ this.isWindows = true;
}else if(ua.indexOf("macintosh") != -1){
/** @type Boolean */
- this.isMac = true;
+ this.isMac = true;
}
if(this.isIE && !this.isIE7){
- try{
- document.execCommand("BackgroundImageCache", false, true);
- }catch(e){}
- }
- }
+ try{
+ document.execCommand("BackgroundImageCache", false, true);
+ }catch(e){}
+ }
+ }
};
var ClientUILogger = {