Changeset 501


Ignore:
Timestamp:
01/30/11 23:04:28 (2 years ago)
Author:
philsmart
Message:

added hide/show control panel

Location:
raptor-web/trunk/src/main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • raptor-web/trunk/src/main/java/uk/ac/cardiff/raptorweb/model/GraphModel.java

    r423 r501  
    88import javax.faces.event.ValueChangeEvent; 
    99 
    10 import org.apache.log4j.Logger; 
     10import org.slf4j.Logger; 
     11import org.slf4j.LoggerFactory; 
     12 
    1113 
    1214import uk.ac.cardiff.model.wsmodel.StatisticalUnitInformation; 
     
    1517 
    1618public class GraphModel implements Serializable{ 
    17         static Logger log = Logger.getLogger(GraphModel.class); 
     19        static Logger log = LoggerFactory.getLogger(GraphModel.class); 
    1820 
    1921        //private String selectedStatisticalUnit; 
     
    2325        private StatisticalUnitInformation selectedStatisticalUnit; 
    2426        private String processingResult; 
     27        private boolean showControlPanel; 
    2528 
    2629 
     
    3538            chartOptions.setyMajorGridCount(-1); 
    3639            chartOptions.setChartHeight(ChartOptions.ChartHeight.MEDIUM); 
     40            showControlPanel=true; 
    3741        } 
    3842 
     
    97101        } 
    98102 
     103        public void setShowControlPanel(boolean showControlPanel) { 
     104            log.debug("showControlPanel {}",showControlPanel); 
     105            this.showControlPanel = showControlPanel; 
     106        } 
     107 
     108        public boolean isShowControlPanel() { 
     109            log.debug("Showing control panel {}",showControlPanel); 
     110            return showControlPanel; 
     111        } 
     112         
     113        public void toggleShowControlPanel(){ 
     114            showControlPanel = !showControlPanel; 
     115        } 
     116 
    99117 
    100118 
  • raptor-web/trunk/src/main/resources/log4j.properties

    r497 r501  
    1010log4j.logger.uk.ac = DEBUG, stdout 
    1111#log4j.logger.org.quartz=DEBUG,stdout 
    12 log4j.logger.org.springframework.security=DEBUG, stdout 
     12#log4j.logger.org.springframework.security=DEBUG, stdout 
  • raptor-web/trunk/src/main/webapp/WEB-INF/flows/reports/graphicalReports.jspx

    r484 r501  
    1818                                <tr:panelBorderLayout> 
    1919 
     20                                        <f:facet name="top"> 
     21                                                <tr:panelGroupLayout layout="horizontal"> 
     22                                                        <tr:outputText value="Control Panel Visible"/> 
     23                                                        <tr:spacer width="3px"/> 
     24                                                        <tr:commandLink text="#{flowScope.websession.graphmodel.showControlPanel}" action="#{flowScope.websession.graphmodel.toggleShowControlPanel}"/> 
     25                                                </tr:panelGroupLayout> 
     26                                        </f:facet> 
     27 
    2028                                        <f:facet name="start"> 
    2129 
    22                                                 <tr:panelBox text="Control Panel"> 
    23  
    24                                                 <tr:panelGroupLayout layout="horizontal"> 
     30                                                <tr:panelBox text="Control Panel" 
     31                                                        rendered="#{flowScope.websession.graphmodel.showControlPanel}" 
     32                                                        partialTriggers="controlPanelOnOff"> 
     33 
     34                                                        <tr:panelGroupLayout layout="horizontal"> 
    2535                                                                <tr:spacer width="5px" /> 
    2636                                                                <tr:statusIndicator /> 
     
    3141                                                                        </f:facet> 
    3242                                                                        <f:facet name="ready"> 
    33                                                                                 <tr:outputText value="#{flowScope.websession.graphmodel.processingResult}" /> 
     43                                                                                <tr:outputText 
     44                                                                                        value="#{flowScope.websession.graphmodel.processingResult}" /> 
    3445                                                                        </f:facet> 
    3546                                                                </tr:statusIndicator> 
     
    204215 
    205216                                                                                <tr:table id="reportDownloadTable" 
    206                                                                                         value="#{flowScope.websession.reportmodel.reportsForDownload}" bandingInterval="2" 
    207                                                                                         banding="row" var="row" 
     217                                                                                        value="#{flowScope.websession.reportmodel.reportsForDownload}" 
     218                                                                                        bandingInterval="2" banding="row" var="row" 
    208219                                                                                        rendered="#{not empty flowScope.websession.reportmodel.reportsForDownload}" 
    209220                                                                                        partialTriggers=":generateExcelReport :reportDownloadTable:removeReportCommandLink" 
     
    268279                                                                        rendered="#{not empty flowScope.websession.graphmodel.currentGraph}" /> 
    269280                                                                <tr:selectOneChoice id="chartTypeSelector" 
    270                                                                         value="#{flowScope.websession.graphmodel.chartOptions.graphType}" autoSubmit="true" 
    271                                                                         partialSubmit="true" 
     281                                                                        value="#{flowScope.websession.graphmodel.chartOptions.graphType}" 
     282                                                                        autoSubmit="true" partialSubmit="true" 
    272283                                                                        rendered="#{not empty flowScope.websession.graphmodel.currentGraph}"> 
    273284                                                                        <f:selectItem itemLabel="verticalBar" itemValue="verticalBar" /> 
     
    366377 
    367378                                                <tr:panelFormLayout rows="7" labelWidth="5%"> 
    368                                                         <tr:table value="#{flowScope.websession.graphmodel.currentTableGraph.rows}" 
     379                                                        <tr:table 
     380                                                                value="#{flowScope.websession.graphmodel.currentTableGraph.rows}" 
    369381                                                                bandingInterval="2" banding="row" var="row" width="95%" 
    370382                                                                rendered="#{not empty flowScope.websession.graphmodel.currentTableGraph}"> 
Note: See TracChangeset for help on using the changeset viewer.