Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Fix the bad user management data scroller
Browse files Browse the repository at this point in the history
Fix the ridiculous width of the scroller,
the current page always being '1',
the synchronisation between the header and footer scrollers.
  • Loading branch information
djansen-redhat committed Oct 19, 2014
1 parent 19ee1dd commit 729563b
Showing 1 changed file with 60 additions and 76 deletions.
136 changes: 60 additions & 76 deletions zanata-war/src/main/webapp/admin/usermanager.xhtml
Expand Up @@ -41,53 +41,46 @@
<h:form id="usermanagerForm">
<s:token allowMultiplePosts="true"/>

<div style="text-align: center">
<rich:dataScroller renderIfSinglePage="false" for="userList"
maxPages="100" page="#{userAction.userPagedListDataModel.scrollerPage}"
id="scroller" fastControls="hide" render="scroller2" >
<f:facet name="first">
<h:outputText value="" styleClass="icon-to-start"/>
</f:facet>
<f:facet name="previous">
<h:outputText value="" styleClass="icon-left-open"/>
</f:facet>
<f:facet name="next">
<h:outputText value="" styleClass="icon-right-open-1"/>
</f:facet>
<f:facet name="fastforward">
<h:outputText value="" styleClass="icon-fast-fw-1"/>
</f:facet>
<f:facet name="last">
<h:outputText value="" styleClass="icon-to-end"/>
</f:facet>
<f:facet name="first_disabled">
<h:outputText value="" styleClass="icon-to-start"/>
</f:facet>
<f:facet name="previous_disabled">
<h:outputText value="" styleClass="icon-left-open"/>
</f:facet>
<f:facet name="next_disabled">
<h:outputText value="" styleClass="icon-right-open-1"/>
</f:facet>
<f:facet name="fastforward_disabled">
<h:outputText value="" styleClass="icon-fast-fw-1"/>
</f:facet>
<f:facet name="last_disabled">
<h:outputText value="" styleClass="icon-to-end"/>
</f:facet>
</rich:dataScroller>
</div>

<rich:dataTable id="userList" cellspacing="0" styleClass="fullwidth"
value="#{userAction.userPagedListDataModel}" var="user"
rows="#{userAction.userPagedListDataModel.pageSize}"
columnClasses="centered,centered,centered,centered">
<f:facet name="header">
<rich:dataScroller renderIfSinglePage="false" maxPages="25"
id="scroller" fastControls="hide" reRender="scroller,scroller2" >
<f:facet name="first">
<h:outputText value="" styleClass="icon-to-start"/>
</f:facet>
<f:facet name="previous">
<h:outputText value="" styleClass="icon-left-open"/>
</f:facet>
<f:facet name="next">
<h:outputText value="" styleClass="icon-right-open-1"/>
</f:facet>
<f:facet name="last">
<h:outputText value="" styleClass="icon-to-end"/>
</f:facet>
<f:facet name="first_disabled">
<h:outputText value="" styleClass="icon-to-start"/>
</f:facet>
<f:facet name="previous_disabled">
<h:outputText value="" styleClass="icon-left-open"/>
</f:facet>
<f:facet name="next_disabled">
<h:outputText value="" styleClass="icon-right-open-1"/>
</f:facet>
<f:facet name="last_disabled">
<h:outputText value="" styleClass="icon-to-end"/>
</f:facet>
</rich:dataScroller>
</f:facet>
<rich:column width="auto">
<f:facet name="header">
<h:panelGroup>
<h:outputText value="#{msgs['jsf.Username']}"/>
<br/>
<h:inputText id="username_filter_input" onkeydown="if(event.keyCode == 13) {return false}"
<h:inputText id="username_filter_input"
onkeydown="if(event.keyCode == 13) {return false}"
value="#{userAction.userPagedListDataModel.filter}"
styleClass="filter_input">
<a4j:ajax event="keyup" render="userList"
Expand Down Expand Up @@ -126,45 +119,36 @@
</button>
</s:fragment>
</h:column>
<f:facet name="footer">
<rich:dataScroller renderIfSinglePage="false" fastControls="hide"
maxPages="25" id="scroller2" reRender="scroller,scroller2">
<f:facet name="first">
<h:outputText value="" styleClass="icon-to-start"/>
</f:facet>
<f:facet name="previous">
<h:outputText value="" styleClass="icon-left-open"/>
</f:facet>
<f:facet name="next">
<h:outputText value="" styleClass="icon-right-open-1"/>
</f:facet>
<f:facet name="last">
<h:outputText value="" styleClass="icon-to-end"/>
</f:facet>
<f:facet name="first_disabled">
<h:outputText value="" styleClass="icon-to-start"/>
</f:facet>
<f:facet name="previous_disabled">
<h:outputText value="" styleClass="icon-left-open"/>
</f:facet>
<f:facet name="next_disabled">
<h:outputText value="" styleClass="icon-right-open-1"/>
</f:facet>
<f:facet name="last_disabled">
<h:outputText value="" styleClass="icon-to-end"/>
</f:facet>
</rich:dataScroller>
</f:facet>
</rich:dataTable>

<div style="text-align: center">
<rich:dataScroller renderIfSinglePage="false" for="userList"
page="#{userAction.userPagedListDataModel.scrollerPage}"
maxPages="100" id="scroller2" render="scroller" fastControls="hide">
<f:facet name="first">
<h:outputText value="" styleClass="icon-to-start"/>
</f:facet>
<f:facet name="previous">
<h:outputText value="" styleClass="icon-left-open"/>
</f:facet>
<f:facet name="next">
<h:outputText value="" styleClass="icon-right-open-1"/>
</f:facet>
<f:facet name="fastforward">
<h:outputText value="" styleClass="icon-fast-fw-1"/>
</f:facet>
<f:facet name="last">
<h:outputText value="" styleClass="icon-to-end"/>
</f:facet>
<f:facet name="first_disabled">
<h:outputText value="" styleClass="icon-to-start"/>
</f:facet>
<f:facet name="previous_disabled">
<h:outputText value="" styleClass="icon-left-open"/>
</f:facet>
<f:facet name="next_disabled">
<h:outputText value="" styleClass="icon-right-open-1"/>
</f:facet>
<f:facet name="fastforward_disabled">
<h:outputText value="" styleClass="icon-fast-fw-1"/>
</f:facet>
<f:facet name="last_disabled">
<h:outputText value="" styleClass="icon-to-end"/>
</f:facet>
</rich:dataScroller>
</div>

</h:form>
</ui:define>

Expand Down

0 comments on commit 729563b

Please sign in to comment.