Changeset 301


Ignore:
Timestamp:
12/14/11 17:20:45 (13 years ago)
Author:
vmipsl
Message:

evo MGI 009 _ affichage des dates pour les plate-formes mobiles

Location:
ether_megapoli/trunk/web
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • ether_megapoli/trunk/web/data/plateform.jsp

    r298 r301  
    1010    <tiles:put name="insertJsOrJsp" type="string"> 
    1111        <ether:htmlJs jsFile="classesForJQuery/Loading"/> 
     12        <ether:htmlJs jsFile="calendar/anytime"/> 
    1213    </tiles:put> 
    1314 
     
    3233        <div id="containerMobilePlateforms" class="plateformElement"></div> 
    3334 
    34         <BR/> 
    35  
    3635        <div id="messages"><bean:message key="data.access.plat.fixe"/>&nbsp;:</div> 
    3736        <div id="containerFixePlateforms" class="plateformElement"></div> 
     
    4847            interfaceTexts["data.access.plat2"] = '<bean:message key="data.access.plat2" arg0=""/>'; 
    4948            interfaceTexts["data.access.plat2.s"] = '<bean:message key="data.access.plat2" arg0="s"/>'; 
     49            interfaceTexts["app.measure.dates"] = '<bean:message key="app.measure.dates"/>'; 
    5050 
    5151            var InterfacePlateform = Class.create( { 
    5252 
    53                 initialize: function( nbPlateforms, jSonPlateforms ) 
     53                initialize: function( nbPlateforms, jSonPlateforms, mapPlateforms ) 
    5454                { 
    5555                    this.numberPlateforms = nbPlateforms || false; 
    5656                    this.jSonPlateforms = jSonPlateforms || null; 
     57                    this.mapPlateforms = mapPlateforms || false; 
    5758                    this.containerMobilePlateforms = $( "#containerMobilePlateforms" ); 
    5859                    this.containerFixePlateforms = $( "#containerFixePlateforms" ); 
     
    9091                    jQuery.each( this.jSonPlateforms, jQuery.proxy( function( i, item ) 
    9192                    { 
     93                        var divMainPlateform = $( document.createElement( "div" ) ); 
     94                        divMainPlateform.addClass( "containerElement_main_plateform" ); 
     95 
    9296                        var divPlateform = $( document.createElement( "div" ) ); 
    9397                        divPlateform.html( item.name ); 
    9498                        divPlateform.addClass( "containerElement containerElement_plateform" ); 
    9599                        divPlateform.bind( "click", item, this.onSelectPlateform ); 
     100 
    96101                        if( "MOBILE" == item.type ) 
    97102                        { 
    98103                            numberMobilePlateforms++; 
    99                             this.containerMobilePlateforms.append( divPlateform ); 
     104                            this.containerMobilePlateforms.append( divMainPlateform ); 
     105                            divMainPlateform.append( divPlateform ); 
     106 
     107                            var divPlateformDates = $( document.createElement( "div" ) ); 
     108                            var dateString = interfaceTexts["app.measure.dates"] + " :<BR/>"; 
     109                            jQuery.each( this.mapPlateforms[item.id], function( j, itemDate ) 
     110                            { 
     111                                dateString += "&nbsp;" + formatDate( new Date( itemDate.time ), "%Y-%m-%d" ); 
     112                                if( 9 > j % 10 ) 
     113                                    dateString += "&nbsp;&nbsp;&nbsp;"; 
     114                                else 
     115                                    dateString += "&nbsp;<BR/>"; 
     116                            } ); 
     117                            divPlateformDates.html( dateString ); 
     118                            divPlateformDates.addClass( "containerElement_plateform_dates" ); 
     119                            divMainPlateform.append( divPlateformDates ); 
     120 
     121                            divPlateform.mouseover( function( e ) 
     122                            { 
     123                                divPlateformDates.toggle(); 
     124                            } ); 
     125 
     126                            divPlateform.mouseout( function( e ) 
     127                            { 
     128                                divPlateformDates.toggle(); 
     129                            } ); 
     130 
    100131                        } 
    101132                        else 
    102133                        { 
    103134                            numberFixePlateforms++; 
    104                             this.containerFixePlateforms.append( divPlateform ); 
     135                            this.containerFixePlateforms.append( divMainPlateform ); 
     136                            divMainPlateform.append( divPlateform ); 
    105137                        } 
    106138                    }, this ) ); 
     
    129161            } ); 
    130162 
    131             new InterfacePlateform( ${nbPlateforms}, ${plateforms} ); 
     163            new InterfacePlateform( ${nbPlateforms}, ${plateforms}, ${mapPlateforms} ); 
    132164        </script> 
    133165 
  • ether_megapoli/trunk/web/resources/css/megapoli.css

    r298 r301  
    202202.containerElement_plateform { 
    203203    width: 84px; 
     204    float: left; 
     205} 
     206 
     207#containerMobilePlateforms .containerElement_main_plateform .containerElement_plateform:hover { 
     208    -moz-border-radius: 4px 0 0 4px; 
     209    -webkit-border-radius: 4px 0 0 4px; 
     210} 
     211 
     212.containerElement_plateform_dates { 
     213    display: none; 
     214    -moz-border-radius: 0 4px 4px 4px; 
     215    -webkit-border-radius: 0 4px 4px 4px; 
     216    background: #70739C; 
     217    color: white; 
     218    float: left; 
     219} 
     220 
     221.containerElement_main_plateform { 
     222    float: left; 
     223    width: 900px; 
     224} 
     225 
     226#containerMobilePlateforms { 
     227    padding-bottom: 117px; 
    204228} 
    205229 
  • ether_megapoli/trunk/web/src/ApplicationResources.properties

    r290 r301  
    453453app.coordinator=Coordinateur 
    454454app.technician=Technicien 
     455app.measure.dates=Dates de mesures 
    455456 
    456457data.visualization.general.text=Dans cette zone, vous pouvez visualiser en ligne les donn\u00E9es disponibles. Plusieurs types de visualisations vous sont propos\u00E9s :<ul><li>un param\u00E8tre pour un site</li><li>un param\u00E8tre pour plusieurs sites</li><li>diff\u00E9rents param\u00E8tre pour un site</li><li>des visualisations en 2D</li></ul> 
  • ether_megapoli/trunk/web/src/ApplicationResources_en.properties

    r290 r301  
    454454app.coordinator=Coordinator 
    455455app.technician=Technician 
     456app.measure.dates=Measures dates 
    456457 
    457458data.visualization.general.text=In this area you can visualize available data with the following types of visualization : <ul><li>one parameter by plateform</li><li>one parameter by many plateforms</li><li>differents parameters by plateform</li><li>2D visualizations</li></ul> 
  • ether_megapoli/trunk/web/src/com/ether/ControllerData.java

    r298 r301  
    6262    { 
    6363        final List<Plateforme> plateforms = getEtherService().getAllPlateforms(); 
     64        final Map<Integer, List<Date>> map = new HashMap<Integer, List<Date>>( plateforms.size() ); 
    6465 
    6566        for( final Plateforme plateform : plateforms ) 
     
    6768            if( "MOBILE".equals( plateform.getTypePlateforme().getTypePlateformeNom() ) ) 
    6869            { 
    69                 List<Date> dates = getEtherService().getAllMeasureDateByPlateformId( plateform.getPlateformeId() ); 
    70                 final String bob = "bib"; 
     70                final List<Date> dates = getEtherService().getAllMeasureDateByPlateformId( plateform.getPlateformeId() ); 
     71                map.put( plateform.getPlateformeId(), dates ); 
    7172            } 
    7273        } 
     
    7576        result.put( "nbPlateforms", plateforms.size() ); 
    7677        result.put( "plateforms", getJsonHelper().toJSON( plateforms ) ); 
     78        result.put( "mapPlateforms", map ); 
    7779        return result; 
    7880    } 
Note: See TracChangeset for help on using the changeset viewer.