Changeset 172


Ignore:
Timestamp:
08/31/11 16:51:42 (13 years ago)
Author:
vmipsl
Message:

Interface _ plusieurs graphs possible sur le même quicklook

Location:
ether_megapoli/trunk/web
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • ether_megapoli/trunk/web/resources/css/ether.css

    r170 r172  
    44 
    55.pair,.impair { 
    6         width: 234px; 
     6        width: 210px; 
    77        padding-top: 3px; 
    88        padding-bottom: 3px; 
  • ether_megapoli/trunk/web/resources/css/visu_parameter_by_pf.css

    r171 r172  
    22#containerPlateforms, #containerParameters, #containerCalendar { 
    33    margin-top: 10px; 
     4} 
     5 
     6.containerParameter { 
     7    width: 250px; 
    48} 
    59 
     
    1418} 
    1519 
     20#containerOptionTitle, #containerOptionType, #containerOptionCalendar { 
     21    margin-bottom: 25px; 
     22} 
     23 
    1624#containerOptionTitle { 
    17     margin-top: 25px; 
    18     margin-bottom: 25px; 
     25    margin-right: 22px; 
    1926} 
    2027 
    2128#containerButtons { 
    2229    margin-top: 25px; 
     30} 
     31 
     32#containerOptionPlotsSelect { 
     33    margin-bottom: 15px; 
     34    margin-top: 10px; 
    2335} 
    2436 
     
    6779} 
    6880 
     81.messages_number_parameters { 
     82    color: #806159; 
     83    font-weight: bold; 
     84    vertical-align: middle; 
     85    font-size: 80%; 
     86    margin-top: 2px; 
     87} 
     88 
     89.select_plot_option .select_item_middle:hover { 
     90    background-color: #ffffff; 
     91    color: #70739C; 
     92} 
     93 
    6994/** ************************************ **/ 
    7095/** ************ CALENDAR ************** **/ 
  • ether_megapoli/trunk/web/resources/js/Button.js

    r89 r172  
    1111//******************************************************** 
    1212 
    13 var Button = Class.create({ 
     13var Button = Class.create( { 
    1414    initialize: function( param ) 
    1515    { 
     
    2121        this.classNameText = param.classNameText ? param.classNameText : false; 
    2222        this.callbackOnClick = param.onClick ? param.onClick : false; 
     23        this.callbackOnMouseOver = param.onMouseOver ? param.onMouseOver : false; 
     24        this.callbackOnMouseOut = param.onMouseOut ? param.onMouseOut : false; 
    2325        this.boolDisabled = false; 
    2426        this.boolSelected = false; 
     
    2628 
    2729        // Create button elements 
    28         this.divContainer = $(document.createElement("button")); 
    29         if(this.className) 
    30                 this.divContainer.className = this.className; 
     30        this.divContainer = $( document.createElement( "button" ) ); 
     31        if( this.className ) 
     32            this.divContainer.className = this.className; 
    3133        this.divContainer.atMe = this; 
    3234        this.divContainer.id = this.id; 
    3335        if( this.parent ) 
    34             this.parent.appendChild(this.divContainer); 
     36            this.parent.appendChild( this.divContainer ); 
    3537 
    36         this.divText = $(document.createElement("div")); 
    37         if(this.classNameText) 
    38                 this.divText.className = "button_text"; 
     38        this.divText = $( document.createElement( "div" ) ); 
     39        if( this.classNameText ) 
     40            this.divText.className = "button_text"; 
    3941        this.divText.innerHTML = this.value; 
    40         this.divContainer.appendChild(this.divText); 
    41          
     42        this.divContainer.appendChild( this.divText ); 
     43 
    4244        // Define button events 
    43         Event.observe(this.divContainer, 'click', this.onClick.bindAsEventListener(this)); 
    44         Event.observe(this.divContainer, 'mouseover', this.onHover.bindAsEventListener(this)); 
     45        Event.observe( this.divContainer, 'click', this.onClick.bindAsEventListener( this ) ); 
     46        Event.observe( this.divContainer, 'mouseover', this.onHover.bindAsEventListener( this ) ); 
     47        Event.observe( this.divContainer, 'mouseout', this.onOut.bindAsEventListener( this ) ); 
    4548    }, 
    4649 
     
    5154        return this.divContainer; 
    5255    }, 
    53      
     56 
    5457    isDisable : function() 
    5558    { 
    5659        return this.boolDisabled; 
    5760    }, 
    58      
     61 
    5962    isSelected: function() 
    6063    { 
    6164        return this.boolSelected; 
    6265    }, 
    63      
     66 
    6467    setValue : function( value ) 
    6568    { 
     
    6770        this.divText.innerHTML = this.value; 
    6871    }, 
    69      
     72 
    7073    setCallbackOnClick : function( value ) 
    7174    { 
    7275        this.callbackOnClick = value; 
    7376    }, 
    74      
     77 
    7578    // Actions ******************************************************** 
    7679 
     
    7881    { 
    7982        this.boolDisabled = true; 
    80         this.divContainer.addClassName("disable"); 
     83        this.divContainer.addClassName( "disable" ); 
    8184    }, 
    82      
     85 
    8386    enable : function() 
    8487    { 
    8588        this.boolDisabled = false; 
    86         this.divContainer.removeClassName("disable"); 
     89        this.divContainer.removeClassName( "disable" ); 
    8790    }, 
    88      
     91 
    8992    select : function( value ) 
    9093    { 
    9194        this.boolSelected = value; 
    9295        if( this.boolSelected ) 
    93             this.divContainer.addClassName("selected"); 
     96            this.divContainer.addClassName( "selected" ); 
    9497        else 
    95             this.divContainer.removeClassName("selected"); 
     98            this.divContainer.removeClassName( "selected" ); 
    9699    }, 
    97      
     100 
    98101    show : function() 
    99102    { 
     
    117120                this.callbackOnClick(); 
    118121        } 
    119         Event.stop(event); 
     122        Event.stop( event ); 
    120123    }, 
    121124 
    122125    onHover : function( event ) 
    123126    { 
    124         Event.stop(event); 
     127        if( !this.isDisable() && this.callbackOnMouseOver ) 
     128            this.callbackOnMouseOver(); 
     129 
     130        Event.stop( event ); 
     131    }, 
     132 
     133    onOut: function() 
     134    { 
     135        if( !this.isDisable() && this.callbackOnMouseOut ) 
     136            this.callbackOnMouseOut(); 
    125137    } 
    126 }); 
     138} ); 
  • ether_megapoli/trunk/web/resources/js/Select.js

    r131 r172  
    33// Display a Select 
    44// 
    5 // obj objParam: {id, [parent], [specificClass], [maxOptionSize], [isDisable], [isDisplayed], [arrayData]} 
     5// obj objParam: {id, [parent], [specificClass], [maxOptionSize], [isDisable], [isDisplayed]} 
    66//    int objParam.id: id of the dom element 
    77//    [dom objParam.parent]: in which dom element to draw the button 
     
    1010//    [int objParam.isDisable]: is the Select disable by default? 
    1111//    [int objParam.isDisplayed]: is the Select opened by default? 
    12 //    [arr objParam.arrayData]: array of data to display 
    1312// 
    1413// Public functions 
     
    3837        this.indexOption = 0; 
    3938        this.isHover = false; 
    40         this.arrayData = objectParameter.arrayData ? objectParameter.arrayData : $A(); 
    4139        this.arrayOptions = $A(); 
     40        this.className = objectParameter.className ? "select_container " + objectParameter.className : "select_container"; 
     41        this.classNameOption = objectParameter.classNameOption ? "select_choicelist " + objectParameter.classNameOption : "select_choicelist"; 
    4242 
    4343        // Select div 
    4444        this.divSelect = document.createElement( "div" ); 
    4545        this.divSelect.id = this.id; 
    46         this.divSelect.className = "select_container"; 
     46        this.divSelect.className = this.className; 
    4747 
    4848        this.divSelectLeft = document.createElement( "div" ); 
     
    6363        this.divOption = document.createElement( "div" ); 
    6464        this.divSelect.id = this.id; 
    65         this.divOption.className = "select_choicelist"; 
     65        this.divOption.className = this.classNameOption; 
    6666        this.parent.appendChild( this.divOption ); 
    6767 
     
    9090    }, 
    9191 
     92    getSize: function() 
     93    { 
     94      return this.arrayOptions.size(); 
     95    }, 
     96 
    9297    // private 
    9398    toggleOption:function() 
     
    139144 
    140145    // public 
     146    /** 
     147     * This method indicates if the itemValue is already in the array 
     148     */ 
     149    content: function( itemValue ) 
     150    { 
     151        var resu = false; 
     152        this.arrayOptions.each( function( divOption ) 
     153        { 
     154            if( divOption.itemValue == itemValue ) 
     155            { 
     156                resu = true; 
     157                throw $break; 
     158            } 
     159        }.bind( this ) ); 
     160        return resu; 
     161    }, 
     162 
     163    // public 
    141164    add: function( itemValue, itemName, callback ) 
    142165    { 
    143  
    144166        var divOption = document.createElement( "div" ); 
    145167        divOption.className = "select_item_middle"; 
     
    177199            this.arrayOptions = this.arrayOptions.without( divOption ); 
    178200        }.bind( this ) ); 
     201    }, 
     202 
     203    // public 
     204    /** 
     205     * This method changes only the content of the divSelect without add the item to the array 
     206     * @param itemValue 
     207     * @param itemName 
     208     * @param callback 
     209     */ 
     210    changeSelectMiddle: function( itemValue, itemName, callback ) 
     211    { 
     212        this.add( itemValue, itemName, callback ); 
     213        this.select( itemValue, callback ); 
     214        this.remove( itemValue ); 
    179215    }, 
    180216 
  • ether_megapoli/trunk/web/resources/js/etherClasses.js

    r130 r172  
    109109            if( objectParameter.isExpiredTitle ) 
    110110                this.isExpiredTitle = objectParameter.isExpiredTitle; 
     111            this.onMouseOverContainer = objectParameter.onMouseOverContainer ? objectParameter.onMouseOverContainer : false; 
     112            this.onMouseOutContainer = objectParameter.onMouseOutContainer ? objectParameter.onMouseOutContainer : false; 
    111113        } 
    112114    }, 
     
    137139    }, 
    138140 
    139     onClickContainer: function( event ) 
     141    onHoverContainer: function( event ) 
    140142    { 
    141143        if( !event || (event.detail == undefined || 1 == event.detail) ) 
     
    143145    }, 
    144146 
     147    onClickContainer: function( event ) 
     148    { 
     149        if( !event || (event.detail == undefined || 1 == event.detail) ) 
     150            this.executeListenersFunction(); 
     151    }, 
     152 
    145153    selectWithParameter: function( classNameValue ) 
    146154    { 
     
    167175        if( this.divContainer ) 
    168176            Event.observe( this.divContainer, 'click', this.onClickContainer.bindAsEventListener( this ) ); 
     177        if( this.divContainer && this.onMouseOverContainer ) 
     178            Event.observe( this.divContainer, 'mouseover', this.onMouseOverContainer.bindAsEventListener( this ) ); 
     179        if( this.divContainer && this.onMouseOutContainer ) 
     180            Event.observe( this.divContainer, 'mouseout', this.onMouseOutContainer.bindAsEventListener( this ) ); 
    169181    }, 
    170182 
  • ether_megapoli/trunk/web/src/ApplicationResources.properties

    r171 r172  
    428428inWork=Page en cours de construction.. 
    429429all.visualization=Visualisation 
     430data.visualization.add=Ajouter 
    430431 
    431432data.visualization=Des donn\u00E9es 
     
    448449data.visualization.Unvalid_Period=P\u00E9riode non valide ! 
    449450data.visualization.titleChoice=Title 
    450 data.visualization.axe=Axes 
     451data.visualization.type=Type de trac\u00E9 
     452data.visualization.graph=Quicklook final : 
     453data.visualization.graph.noPlot=Aucun quicklook 
    451454data.visualization.button.clear=Effacer 
     455data.visualization.button.init=Initialiser 
    452456data.visualization.button.visualize=Visualisation 
    453457data.visualization.button.download=T\u00E9l\u00E9chargement 
     
    455459data.visualization.loading.data=Chargement des donn\u00E9es 
    456460data.visualization.quicklook=Quicklook 
     461data.visualization.parameter=param\u00E8tre(s) 
     462data.visualization.parameter.add=Ajouter le param\u00E8tre s\u00E9lectionn\u00E9 au quicklook final 
     463data.visualization.parameter.init=Vider la liste des param\u00E8tres 
    457464 
    458465data.visualization.axeType.TimeLine=S\u00E9rie temporelle (ligne) 
  • ether_megapoli/trunk/web/src/ApplicationResources_en.properties

    r171 r172  
    427427inWork=Work in progress.. 
    428428all.visualization=Visualization 
     429data.visualization.add=Add 
    429430 
    430431data.visualization=Datas 
     
    447448data.visualization.Unvalid_Period=Unvalid periode ! 
    448449data.visualization.titleChoice=Titre 
    449 data.visualization.axe=Axes 
     450data.visualization.type=Plot's type 
     451data.visualization.graph=Final quicklook : 
     452data.visualization.graph.noPlot=No quicklook 
    450453data.visualization.button.clear=Clear 
     454data.visualization.button.init=Init 
    451455data.visualization.button.visualize=Visualization 
    452456data.visualization.button.download=Download 
     
    454458data.visualization.loading.data=Data downloading 
    455459data.visualization.quicklook=Quicklook 
     460data.visualization.parameter=parameter(s) 
     461data.visualization.parameter.add=Add the selected parameter to the final quicklook 
     462data.visualization.parameter.init=Remove the parameters list 
    456463 
    457464data.visualization.axeType.TimeLine=Time serie (ligne) 
  • ether_megapoli/trunk/web/src/com/ether/Controller.java

    r133 r172  
    66import com.medias.database.objects.Parametre; 
    77import com.medias.database.objects.Plateforme; 
     8import com.medias.database.objects.TypePlateforme; 
    89import net.sf.json.JSONObject; 
    910import org.apache.commons.logging.Log; 
     
    2930    /** *********************************************************** **/ 
    3031    /** *********************** VIEWS ***************************** **/ 
    31     /** *********************************************************** **/ 
     32    /** 
     33     * ********************************************************** * 
     34     */ 
    3235    // Default view if methodName is unknown 
    3336    public ModelAndView home( final HttpServletRequest request, final HttpServletResponse response ) 
     
    4952    { 
    5053        final List<Plateforme> plateforms = _etherService.getAllPlateforms(); 
     54//        final List<Plateforme> plateforms = new ArrayList<Plateforme>(); 
     55//        final TypePlateforme type = new TypePlateforme( 1, "FIXE" ); 
     56//        final Plateforme pf = new Plateforme(); 
     57//        pf.setPlateformeId( 1 ); 
     58//        pf.setPlateformeNom( "LHVP" ); 
     59//        pf.setTypePlateforme( type ); 
     60//        plateforms.add( pf ); 
     61//        final Plateforme pf2 = new Plateforme(); 
     62//        pf2.setPlateformeId( 2 ); 
     63//        pf2.setPlateformeNom( "SIRTA" ); 
     64//        pf2.setTypePlateforme( type ); 
     65//        plateforms.add( pf2 ); 
    5166 
    5267        final Map<String, Object> model = new HashMap<String, Object>(); 
     
    5974    /** *********************************************************** **/ 
    6075    /** *********************** CALLS ***************************** **/ 
    61     /** *********************************************************** **/ 
     76    /** 
     77     * ********************************************************** * 
     78     */ 
    6279    @ControllerMethod(jsonResult = true) 
    6380    public JSONObject searchParametersByPlateform( @Mandatory @ParamName(ParameterConstants.PARAMETER_ID) final Integer plateformId ) 
     
    6582    { 
    6683        final List<Parametre> parametersByPlateform = _etherService.getParametersByPlateformId( plateformId ); 
     84//        final List<Parametre> parametersByPlateform = new ArrayList<Parametre>( 2 ); 
     85//        final Parametre p1 = new Parametre(); 
     86//        p1.setParametreId( 1 ); 
     87//        p1.setParametreNom( "JNO2" ); 
     88//        parametersByPlateform.add( p1 ); 
     89//        final Parametre p2 = new Parametre(); 
     90//        p2.setParametreId( 2 ); 
     91//        p2.setParametreNom( "CO2" ); 
     92//        parametersByPlateform.add( p2 ); 
    6793 
    6894        final JSONObject result = new JSONObject(); 
  • ether_megapoli/trunk/web/visualization/visu_parameter_by_pf-script.jsp

    r171 r172  
    1818        this.beginDate = false; 
    1919        this.endDate = false; 
     20        this.numberParameterToDisplay = 0; 
    2021 
    2122        /** *********** CONTAINERS *********** **/ 
     
    2425        this.containerButtons = $( "containerButtons" ); 
    2526        this.containerOptionCalendar = $( "containerOptionCalendar" ); 
    26         this.containerOptionAxe = $( "containerOptionAxe" ); 
     27        this.containerOptionType = $( "containerOptionType" ); 
     28        this.containerOptionPlotsSelect = $( "containerOptionPlotsSelect" ); 
     29        this.containerOptionPlotsButtons = $( "containerOptionPlotsButtons" ); 
    2730 
    2831        /** *********** LOADING *********** **/ 
     
    7073        } ); 
    7174 
    72         this.clearButton = new Button( {value:interfaceTexts["data.visualization.button.clear"], parent:this.containerOptionCalendar, id:"button_clear", className:"small", onClick:this.onClickClear.bind( this )} ); 
     75        this.clearCalendarButton = new Button( {value:interfaceTexts["data.visualization.button.clear"], parent:this.containerOptionCalendar, id:"button_clear_calendar", className:"small", onClick:this.onClickClear.bind( this )} ); 
    7376 
    7477        // Buttons and axe's types 
    7578        this.createButtons(); 
    76         this.createListAxes(); 
     79        this.createListTypes(); 
     80        this.createListPlots(); 
    7781    }, 
    7882 
     
    8589    }, 
    8690 
    87     createListAxes: function() 
     91    createListTypes: function() 
    8892    { 
    8993        var paramSelect = new Object(); 
    9094        paramSelect.id = "select_axes"; 
    91         paramSelect.parent = $( "containerOptionAxe" ); 
     95        paramSelect.parent = this.containerOptionType; 
    9296        this.selectAxes = new Select( paramSelect ); 
     97    }, 
     98 
     99    createListPlots: function() 
     100    { 
     101        var paramSelect = new Object(); 
     102        paramSelect.id = "select_plots"; 
     103        paramSelect.parent = this.containerOptionPlotsSelect; 
     104        paramSelect.classNameOption = "select_plot_option"; 
     105        this.selectPlots = new Select( paramSelect ); 
     106        this.selectPlots.add( null, interfaceTexts["data.visualization.graph.noPlot"] ); 
     107        this.selectPlots.selectFirst( false ); 
     108 
     109        this.selectPlotsPlateformType = false; 
     110 
     111        this.addPlotButton = new Button( {value:interfaceTexts["data.visualization.add"], parent:this.containerOptionPlotsButtons, id:"button_add_plot", className:"small", onClick:this.onClickAddPlot.bind( this ), onMouseOver:this.onMouseOverAddPlot.bind( this ), onMouseOut:this.onMouseOutAddPlot.bind( this )} ); 
     112        this.addPlotButton.disable(); 
     113        this.initPlotButton = new Button( {value:interfaceTexts["data.visualization.button.init"], parent:this.containerOptionPlotsButtons, id:"button_init_plot", className:"small", onClick:this.onClickInitPlot.bind( this ), onMouseOver:this.onMouseOverInitPlot.bind( this ), onMouseOut:this.onMouseOutInitPlot.bind( this )} ); 
    93114    }, 
    94115 
     
    130151    displayParameters: function() 
    131152    { 
    132         this.parameters = new ListParameters( this.jsonParameters, new Object() ); 
     153        var objectParameter = new Object(); 
     154        objectParameter.onMouseOverContainer = this.onMouseOverParameter; 
     155        objectParameter.onMouseOutContainer = this.onMouseOutParameter; 
     156        this.parameters = new ListParameters( this.jsonParameters, objectParameter ); 
    133157 
    134158        this.parameters.addOpenListener( this.onSelectParameter.bind( this ) ); 
     
    156180            this.selectedParameter = false; 
    157181 
    158         // Change plateformType's select 
     182        // Change axe's list select 
    159183        this.updateListAxes(); 
     184 
     185        this.addPlotButton.disable(); 
    160186 
    161187        $( "textareaTitle" ).value = this.selectedPlateform.getName(); 
     
    176202        this.selectedParameter.select(); 
    177203 
     204        // Change title 
    178205        $( "textareaTitle" ).value = this.selectedPlateform.getName() + " - " + this.selectedParameter.getName(); 
     206 
     207        // Update number and list of parameter to display 
     208        this.updateNumberAndListParameterToDisplay( 1 ); 
     209 
     210        // Enable/disable addPlot's button 
     211        if( !this.selectPlotsPlateformType || this.selectPlotsPlateformType == this.selectedPlateform.jsonElement.type ) 
     212            this.addPlotButton.enable(); 
     213        else 
     214            this.addPlotButton.disable(); 
     215 
    179216        this.testAllFields(); 
     217    }, 
     218 
     219    onMouseOverParameter: function() 
     220    { 
     221        this.divContainer.innerHTML = this.jsonElement.name + " (" + this.jsonElement.code + ")"; 
     222    }, 
     223 
     224    onMouseOutParameter: function() 
     225    { 
     226        this.divContainer.innerHTML = this.jsonElement.name; 
    180227    }, 
    181228 
     
    206253    }, 
    207254 
     255    onClickInitPlot: function() 
     256    { 
     257        this.updateNumberAndListParameterToDisplay( 0 ); 
     258    }, 
     259 
     260    onMouseOverInitPlot: function() 
     261    { 
     262//        this.initPlotButton.setValue(interfaceTexts["data.visualization.parameter.init"]); 
     263    }, 
     264 
     265    onMouseOutInitPlot: function() 
     266    { 
     267//        this.initPlotButton.setValue(interfaceTexts["data.visualization.button.init"]); 
     268    }, 
     269 
     270    onClickAddPlot: function() 
     271    { 
     272        this.updateNumberAndListParameterToDisplay( 2 ); 
     273    }, 
     274 
     275    onMouseOverAddPlot: function() 
     276    { 
     277//        this.addPlotButton.setValue(interfaceTexts["data.visualization.parameter.add"]); 
     278    }, 
     279 
     280    onMouseOutAddPlot: function() 
     281    { 
     282//        this.addPlotButton.setValue(interfaceTexts["data.visualization.add"]); 
     283    }, 
     284 
    208285    onClickVisualize: function() 
    209286    { 
    210287//        this.plotWindow.getContent().innerHTML = '<div class="loadingPlot"><img src="/Megapoli/resources/icons/loading_datas.gif"/></div>'; 
    211288 
    212         var url = "visualization/plotEther?plateformId=" + this.selectedPlateform.getId() 
    213                 + "&parameterId=" + this.selectedParameter.getId() 
     289//        var url = "visualization/plotEther?plateformId=" + this.selectedPlateform.getId() 
     290//                + "&parameterId=" + this.selectedParameter.getId() 
     291//                + "&dateBegin=" + this.beginDate 
     292//                + "&dateEnd=" + this.endDate 
     293//                + "&title=" + encodeURIComponent( $( "textareaTitle" ).value ) 
     294//                + "&axeType=" + this.selectAxes.getValue(); 
     295 
     296        var url = "visualization/plotEther?plateformId=14" 
     297                + "&parameterId=90" 
    214298                + "&dateBegin=" + this.beginDate 
    215299                + "&dateEnd=" + this.endDate 
     
    217301                + "&axeType=" + this.selectAxes.getValue(); 
    218302 
    219 //        var url = "visualization/plotEther?plateformId=14" 
    220 //                + "&parameterId=90" 
    221 //                + "&dateBegin=" + this.beginDate 
    222 //                + "&dateEnd=" + this.endDate 
    223 //                + "&title=" + encodeURIComponent( $( "textareaTitle" ).value ) 
    224 //                + "&axeType=" + this.selectAxes.getValue(); 
    225  
    226303        this.plotWindow.getContent().innerHTML = '<img src=' + url + ' />'; 
     304 
     305//        this.plotWindow.getContent().innerHTML = '<applet width="500" height="200" code="AppletPlot.class">Now somewhere in the black moutains...</applet>'; 
    227306        this.plotWindow.setSize( <%=EtherPlotServiceImpl.getMaxWidth()%>, <%=EtherPlotServiceImpl.getMaxHeight()%> ); 
    228307        this.plotWindow.show(); 
     
    285364 
    286365        this.selectAxes.selectFirst( false ); 
     366    }, 
     367 
     368    /** 
     369     * action = 0 --> init list 
     370     * action = 1 --> select parameter 
     371     * action = 2 --> add parameter 
     372     */ 
     373    updateNumberAndListParameterToDisplay: function( action ) 
     374    { 
     375        switch( action ) 
     376        { 
     377            case 0: 
     378                // INIT 
     379                if( this.selectedPlateform && this.selectedParameter ) 
     380                { 
     381                    this.selectPlots.clear(); 
     382                    this.selectPlotsPlateformType = false; 
     383                    this.selectPlots.changeSelectMiddle( this.selectedPlateform.getId() + "-" + this.selectedParameter.getId(), this.selectedPlateform.getName() + " - " + this.selectedParameter.getName() ); 
     384 
     385                    this.numberParameterToDisplay = 1; 
     386                    $( "messages_number_parameters" ).innerHTML = this.numberParameterToDisplay + " " + interfaceTexts["data.visualization.parameter"]; 
     387                } 
     388                else 
     389                { 
     390                    this.selectPlots.clear(); 
     391                    this.selectPlots.add( null, interfaceTexts["data.visualization.graph.noPlot"] ); 
     392                    this.selectPlots.selectFirst( false ); 
     393                    this.selectPlotsPlateformType = false; 
     394 
     395                    this.numberParameterToDisplay = 0; 
     396                    $( "messages_number_parameters" ).innerHTML = ""; 
     397                } 
     398                break; 
     399            case 1 : 
     400                // SELECT 
     401                if( 0 == this.numberParameterToDisplay ) 
     402                { 
     403                    this.selectPlots.clear(); 
     404                    this.numberParameterToDisplay = 1; 
     405                } 
     406 
     407                this.selectPlots.changeSelectMiddle( this.selectedPlateform.getId() + "-" + this.selectedParameter.getId(), this.selectedPlateform.getName() + " - " + this.selectedParameter.getName() ); 
     408                $( "messages_number_parameters" ).innerHTML = this.numberParameterToDisplay + " " + interfaceTexts["data.visualization.parameter"]; 
     409                break; 
     410            default: 
     411                // ADD 
     412                var plotValue = this.selectedPlateform.getId() + "-" + this.selectedParameter.getId(); 
     413                if( !this.selectPlots.content( plotValue ) ) 
     414                { 
     415                    this.selectPlots.add( plotValue, this.selectedPlateform.getName() + " - " + this.selectedParameter.getName() ); 
     416                    this.selectPlots.select( plotValue, false ); 
     417                    this.selectPlotsPlateformType = this.selectedPlateform.jsonElement.type; 
     418 
     419                    this.numberParameterToDisplay = this.selectPlots.getSize(); 
     420                } 
     421 
     422                $( "messages_number_parameters" ).innerHTML = this.numberParameterToDisplay + " " + interfaceTexts["data.visualization.parameter"]; 
     423                break; 
     424        } 
    287425    } 
    288426 
    289 } ); 
     427} ) 
     428        ; 
    290429 
    291430</script> 
  • ether_megapoli/trunk/web/visualization/visu_parameter_by_pf.jsp

    r171 r172  
    6262 
    6363        <div class="span-25"> 
    64             <div id="generalContainerPlateforms" class="span-7 colborder"> 
     64            <div id="generalContainerPlateforms" class="span-6 colborder"> 
    6565                <div id="messages"><bean:message key="data.visualization.selectPf"/></div> 
    6666 
     
    7474            </div> 
    7575 
    76             <div id="generalContainerOptions" class="span-10 last"> 
     76            <div id="generalContainerOptions" class="span-11 last"> 
    7777                <div id="containerOptionCalendar" class="span-10"> 
    7878                    <div id="messages" class="messagesHeight"><bean:message 
     
    8282                </div> 
    8383 
    84                 <div id="containerOptionTitle" class="span-8"> 
     84                <div id="containerOptionTitle" class="span-5"> 
    8585                    <div id="messages" class="messagesHeight"><bean:message key="data.visualization.titleChoice"/></div> 
    86                     <textarea id="textareaTitle" cols="37" rows="2"></textarea> 
     86                    <textarea id="textareaTitle" cols="25" rows="1"></textarea> 
    8787                </div> 
    8888 
    89                 <div id="containerOptionAxe" class="span-8"> 
    90                     <div id="messages" class="messagesHeight"><bean:message key="data.visualization.axe"/></div> 
     89                <div id="containerOptionType" class="span-5"> 
     90                    <div id="messages" class="messagesHeight"><bean:message key="data.visualization.type"/></div> 
     91                </div> 
     92 
     93                <div id="containerOptionPlots" class="span-10"> 
     94                    <div id="messages" class="messagesHeight span-4"><bean:message key="data.visualization.graph"/></div> 
     95                    <div id="messages_number_parameters" class="messagesHeight messages_number_parameters"></div> 
     96                    <div id="containerOptionPlotsSelect" class="span-10"></div> 
     97                    <div id="containerOptionPlotsButtons" class="span-10"></div> 
    9198                </div> 
    9299 
     
    107114            interfaceTexts["data.visualization.Unvalid_Period"] = "<bean:message key="data.visualization.Unvalid_Period"/>"; 
    108115            interfaceTexts["data.visualization.quicklook"] = "<bean:message key="data.visualization.quicklook"/>"; 
    109             interfaceTexts["data.visualization.titleChoice"] = "<bean:message key="data.visualization.titleChoice"/>"; 
    110             interfaceTexts["data.visualization.axe"] = "<bean:message key="data.visualization.axe"/>"; 
    111116            interfaceTexts["data.visualization.button.today"] = "<bean:message key="data.visualization.button.today"/>"; 
    112117            interfaceTexts["data.visualization.button.clear"] = "<bean:message key="data.visualization.button.clear"/>"; 
     
    119124            interfaceTexts["data.visualization.selectHour"] = "<bean:message key="data.visualization.selectHour"/>"; 
    120125            interfaceTexts["data.visualization.selectMinute"] = "<bean:message key="data.visualization.selectMinute"/>"; 
     126 
     127            interfaceTexts["data.visualization.graph.noPlot"] = "<bean:message key="data.visualization.graph.noPlot"/>"; 
     128            interfaceTexts["data.visualization.add"] = "<bean:message key="data.visualization.add"/>"; 
     129            interfaceTexts["data.visualization.button.init"] = "<bean:message key="data.visualization.button.init"/>"; 
     130            interfaceTexts["data.visualization.parameter"] = "<bean:message key="data.visualization.parameter"/>"; 
     131            interfaceTexts["data.visualization.parameter.add"] = "<bean:message key="data.visualization.parameter.add"/>"; 
     132            interfaceTexts["data.visualization.parameter.init"] = "<bean:message key="data.visualization.parameter.init"/>"; 
     133 
    121134 
    122135            interfaceTexts["<%=AxeTypeForFixedPlateform.TIME_LINE%>"] = "<bean:message key="data.visualization.axeType.TimeLine"/>"; 
Note: See TracChangeset for help on using the changeset viewer.