Changeset 25792 for extensions/rv_gmaps


Ignore:
Timestamp:
Dec 5, 2013, 9:35:51 PM (10 years ago)
Author:
rvelices
Message:

rv_gmaps improvements on mobile/tablets

Location:
extensions/rv_gmaps/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • extensions/rv_gmaps/trunk/changelog.txt

    r23519 r25792  
    112.6.a
    22- piwigo 2.6
     3- mobile/tablet improvement
    34
    452.5.d
  • extensions/rv_gmaps/trunk/map_data.php

    r18609 r25792  
    3131$where_sql = rvm_bounds_to_sql( $page['box'] );
    3232
    33 $img_fields = ' i.id,i.representative_ext,i.name,i.comment,i.file,i.path,i.lat,i.lon';
     33$img_fields = ' i.id,i.representative_ext,i.name,i.comment,i.file,i.path,i.lat,i.lon,i.width,i.height,i.rotation';
    3434
    3535$was_flat = @$page['flat'];
     
    126126
    127127                $page_url = str_replace(array('123456789','dummy_file'), array($img['id'], get_filename_wo_extension($img['file'])), $page_url_model);
     128                $thumb = new DerivativeImage($thumb_params, new SrcImage($img));
     129                $thsize = $thumb->get_size();
    128130
    129131    if ($j) echo( "," );
    130     echo "{tn:", jsgm_str( DerivativeImage::url( $thumb_params,$img ) );
    131     echo ",name:", jsgm_str( render_element_name($img) );
    132     echo ",comment:", jsgm_str( render_element_description($img) );
    133     echo ",page_url:", jsgm_str( $page_url );
     132    echo "{tn:", jsgm_str( $thumb->get_url() );
     133                echo ",w:",$thsize[0],',h:',$thsize[1];
     134    echo ",t:", jsgm_str( render_element_name($img) );
     135    echo ",d:", jsgm_str( render_element_description($img) );
     136    echo ",url:", jsgm_str( $page_url );
    134137    echo "}";
    135138  }
  • extensions/rv_gmaps/trunk/template/data_handler.js

    r21892 r25792  
    212212buildCurrentPictureHtml: function( marker )
    213213{
    214         var imageDetail = marker.pwg.images[marker.currentImageIndex];
     214        var imageDetail = marker.pwg.images[marker.currentImageIndex],
     215                dpr = window.devicePixelRatio || 1,
     216                w = Math.round(imageDetail.w/dpr),
     217                h = Math.round(imageDetail.h/dpr);
     218       
    215219        var res = "";
    216         res += '<div class="gmiw_imageTitle">' + imageDetail.name + "</div>";
     220        res += '<div class="gmiw_imageTitle">' + imageDetail.t + "</div>";
    217221        res +=
    218222'<div class="gmiw_imageContent">' +
    219223'<div class="gmiw_imageWrap">'+
    220   '<a href="'+imageDetail.page_url+'">' +
    221   '<img src="' + imageDetail.tn + '" alt="thumb" />'+
     224  '<a href="'+imageDetail.url+'">' +
     225  '<img src="' + imageDetail.tn + '" alt="thumb" width='+w+' height='+h+'>'+
    222226'</a></div>' +
    223 '<div class="gmiw_imageComment">' + imageDetail.comment + '</div>' +
     227'<div class="gmiw_imageComment">' + imageDetail.d + '</div>' +
    224228'</div>';
    225229        return res;
  • extensions/rv_gmaps/trunk/template/map.tpl

    r23587 r25792  
    174174
    175175<div id="titlebar">
    176   <div class="titlebar_links" >
    177     <span id="dataLoadStatus"></span>
    178     <a id="aKml" href="" type="application/vnd.google-earth.kml+xml" class="gmnoprint"><img src="//maps.google.com/mapfiles/ms/view_as_kml.png" width="16" height="16" alt="kml"> <span>KML</span></a>
    179     <a id="aLinkToThisPage" href="" class="gmnoprint"><img src="//maps.google.com/mapfiles/bar_icon_link.gif" alt="&lt;-&gt;" width="16" height="16"> <span>{'Link to this page'|@translate}</span></a>
     176        <div class="titlebar_links">
     177                <span id="dataLoadStatus"></span>
     178                <a id="aKml" href="" type="application/vnd.google-earth.kml+xml" class="gmnoprint"><img src="//maps.google.com/mapfiles/ms/view_as_kml.png" width="16" height="16" alt="kml"><span class="hideable"> KML</span></a>
     179                <a id="aLinkToThisPage" href="" class="gmnoprint"><img src="//maps.google.com/mapfiles/bar_icon_link.gif" alt="&lt;-&gt;" width="16" height="16"><span class="hideable"> {'Link to this page'|@translate}</span></a>
    180180    <a id="aBlowup" href="" onclick="return PwgDataHandler.blowupUrl(this.href);" class="gmnoprint" title="{'show all photos around this location'|@translate}">
    181181                        <img src="{$PLUGIN_ROOT_URL}/icons/pic_s.gif" alt="" title="{'show all photos around this location'|@translate}">
  • extensions/rv_gmaps/trunk/template/style.css

    r12706 r25792  
    8080        min-width: 150px;
    8181        width: 150px;
    82         margin-right: 10px;
    83         margin-left: 5px;
     82        margin-right: 5px;
     83        margin-left: 10px;
    8484        font-weight: bold;
    8585}
     
    139139
    140140
     141@media (max-width:980px){
     142        #q {
     143                max-width:200px;
     144        }
     145        #titlebar {
     146                height: 36px;
     147        }
     148
     149        #map {
     150                top: 36px;
     151        }
     152}
     153
     154@media (max-width:640px){
     155        #q {
     156                max-width: 150px;
     157        }
     158        .hideable {
     159                display:none;
     160        }
     161}
     162
     163@media (max-width:360px){
     164        #q {
     165                display: none;
     166        }
     167}
Note: See TracChangeset for help on using the changeset viewer.