Changeset 18776


Ignore:
Timestamp:
2010/08/04 19:58:44 (10 years ago)
Author:
nanasess
bzr:base-revision:
ohkouchi@loop-az.jp-20100804045224-nsulc26bh1ttqfrb
bzr:committer:
Kentaro Ohkouchi <ohkouchi@loop-az.jp>
bzr:file-ids:

data/Smarty/templates/default/abouts/index.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fabouts%2Findex.tpl
data/Smarty/templates/default/admin/basis/index.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fadmin%2Fbasis%2Findex.tpl
data/Smarty/templates/default/admin/main_frame.tpl 15732@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fadmin%2Fmain_frame.tpl
data/Smarty/templates/default/site_frame.tpl 15747@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2FSmarty%2Ftemplates%2Fdefault%2Fsite_frame.tpl
data/class/pages/admin/basis/LC_Page_Admin_Basis.php 15291@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fadmin%2Fbasis%2FLC_Page_Admin_Basis.php
html/install/sql/create_table_mysql.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Fcreate_table_mysql.sql
html/install/sql/create_table_pgsql.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Fcreate_table_pgsql.sql
bzr:mapping-version:
v4
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
ohkouchi@loop-az.jp-20100804105840-a6xa4trwb84a6phz
bzr:revno:
2259
bzr:revprop:branch-nick:
branches/version-2_5-dev
bzr:root:
branches/version-2_5-dev
bzr:text-parents:

data/Smarty/templates/default/abouts/index.tpl ohkouchi@loop-az.jp-20100614082324-fsyp4ss6t8s1l9hk
data/Smarty/templates/default/admin/basis/index.tpl svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_5-dev:18764
data/Smarty/templates/default/admin/main_frame.tpl ohkouchi@loop-az.jp-20100614082324-fsyp4ss6t8s1l9hk
data/Smarty/templates/default/site_frame.tpl ohkouchi@loop-az.jp-20100614082324-fsyp4ss6t8s1l9hk
data/class/pages/admin/basis/LC_Page_Admin_Basis.php ohkouchi@loop-az.jp-20100803084717-9sbbuk4o59x5sio4
html/install/sql/create_table_pgsql.sql svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_5-dev:18764
bzr:timestamp:
2010-08-04 19:58:40.608000040 +0900
bzr:user-agent:
bzr2.1.2+bzr-svn1.0.2
svn:original-date:
2010-08-04T10:58:40.608000Z
Message:

店舗概要ページに地図を掲載する対応(#795)

Location:
branches/version-2_5-dev
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/Smarty/templates/default/abouts/index.tpl

    r18700 r18776  
    2323*}--> 
    2424<!--▼CONTENTS--> 
     25<!--{assign var=_site value=$arrSiteInfo}--> 
     26<script type="text/javascript">//<![CDATA[ 
     27$(function() { 
     28    $("#maps").css({ 
     29        'margin-top': '15px', 
     30        'margin-left': 'auto', 
     31        'margin-right': 'auto', 
     32        'width': '98%', 
     33        'height': '300px' 
     34    }); 
     35    var lat = <!--{$_site.latitude}--> 
     36    var lng = <!--{$_site.longitude}--> 
     37    if (lat && lng) { 
     38        var latlng = new google.maps.LatLng(lat, lng); 
     39        var mapOptions = {zoom: 15, 
     40                          center: latlng, 
     41                          mapTypeId: google.maps.MapTypeId.ROADMAP}; 
     42        var map = new google.maps.Map($("#maps").get(0), mapOptions); 
     43        var marker = new google.maps.Marker({map: map, position: latlng}); 
     44    } else { 
     45        $("#maps").remove(); 
     46    } 
     47}); 
     48//]]> 
     49</script> 
    2550<div id="undercolumn"> 
    2651 
     
    2954 
    3055    <table summary="当サイトについて"> 
    31  
    32     <!--{assign var=_site value=$arrSiteInfo}--> 
    3356 
    3457      <!--{if strlen($_site.shop_name)}--> 
     
    97120    </table> 
    98121 
     122    <div id="maps"></div> 
    99123  </div> 
    100124</div> 
  • branches/version-2_5-dev/data/Smarty/templates/default/admin/basis/index.tpl

    r18764 r18776  
    2222 */ 
    2323*}--> 
     24<script type="text/javascript" src="<!--{$TPL_DIR}-->jquery.fancybox/jquery.mousewheel-3.0.2.pack.js"></script> 
     25<script type="text/javascript" src="<!--{$TPL_DIR}-->jquery.fancybox/jquery.fancybox-1.3.1.pack.js"></script> 
     26<link rel="stylesheet" href="<!--{$TPL_DIR}-->jquery.fancybox/jquery.fancybox-1.3.1.css" type="text/css" media="screen" /> 
     27<script type="text/javascript">//<![CDATA[ 
     28$(function() { 
     29    var geocoder = new google.maps.Geocoder(); 
     30 
     31    $("#codeAddress").click(function() { 
     32        var result = true; 
     33        var address = $("#addr01").val() + $("#addr02").val(); 
     34        if (geocoder && address) { 
     35            geocoder.geocode({'address': address}, function (results, status) { 
     36                if (status == google.maps.GeocoderStatus.OK) { 
     37                    latlng = results[0].geometry.location; 
     38                    $("#latitude").val(latlng.lat()); 
     39                    $("#longitude").val(latlng.lng()); 
     40                 } else { 
     41                     alert('住所の場所が見つかりません'); 
     42                 } 
     43            }); 
     44        } else { 
     45            alert('住所の場所が見つかりません'); 
     46        } 
     47    }); 
     48 
     49    $("a#mapAddress").fancybox({onStart: function() { 
     50        var lat = $("#latitude").val(); 
     51        var lng = $("#longitude").val(); 
     52 
     53        var latlng; 
     54        if (lat && lng) { 
     55            latlng = new google.maps.LatLng(lat, lng); 
     56        } else { 
     57            var address = $("#addr01").val() + $("#addr02").val(); 
     58            if (geocoder) { 
     59                geocoder.geocode({'address': address}, function(results, status) { 
     60                    if (status == google.maps.GeocoderStatus.OK) { 
     61                        latlng = results[0].geometry.location; 
     62                     } 
     63                }); 
     64            } 
     65        } 
     66 
     67        if (!latlng) { 
     68            // 座標が取得できない場合は北緯35度東経135度から取得 
     69            latlng = new google.maps.LatLng(35, 135); 
     70        } 
     71 
     72        var mapOptions = {zoom: 15, 
     73                          center: latlng, 
     74                          mapTypeId: google.maps.MapTypeId.ROADMAP}; 
     75        var map = new google.maps.Map($("#maps").get(0), mapOptions); 
     76        var marker = new google.maps.Marker({map: map, position: latlng}); 
     77        marker.setDraggable(true); 
     78 
     79        // TODO Maker のダブルクリックにも対応したい 
     80        $("#inputPoint").click(function() { 
     81            latlng = marker.getPosition(); 
     82            $("#latitude").val(latlng.lat()); 
     83            $("#longitude").val(latlng.lng()); 
     84            $.fancybox.close(); 
     85        }); 
     86    }}); 
     87}); 
     88//]]> 
     89</script> 
    2490<form name="form1" id="form1" method="post" action="?"> 
    2591<input type="hidden" name="mode" value="<!--{$tpl_mode}-->" /> 
     
    90156        <p> 
    91157          <span class="attention"><!--{$arrErr.addr01}--></span> 
    92           <input type="text" name="addr01" value="<!--{$arrForm.addr01|escape}-->" maxlength="<!--{$smarty.const.STEXT_LEN}-->" size="60" class="box60" style="<!--{if $arrErr.addr01 != ""}-->background-color: <!--{$smarty.const.ERR_COLOR}-->;<!--{/if}-->" /><span class="attention"> (上限<!--{$smarty.const.STEXT_LEN}-->文字)</span><br /> 
     158          <input type="text" name="addr01" value="<!--{$arrForm.addr01|escape}-->" maxlength="<!--{$smarty.const.STEXT_LEN}-->" size="60" class="box60" style="<!--{if $arrErr.addr01 != ""}-->background-color: <!--{$smarty.const.ERR_COLOR}-->;<!--{/if}-->" id="addr01" /><span class="attention"> (上限<!--{$smarty.const.STEXT_LEN}-->文字)</span><br /> 
    93159          <!--{$smarty.const.SAMPLE_ADDRESS1}--> 
    94160        </p> 
    95161        <p> 
    96162          <span class="attention"><!--{$arrErr.addr02}--></span> 
    97           <input type="text" name="addr02" value="<!--{$arrForm.addr02|escape}-->"  maxlength="<!--{$smarty.const.STEXT_LEN}-->" size="60" class="box60" style="<!--{if $arrErr.addr02 != ""}-->background-color: <!--{$smarty.const.ERR_COLOR}-->;<!--{/if}-->" /><span class="attention"> (上限<!--{$smarty.const.STEXT_LEN}-->文字)</span><br /> 
     163          <input type="text" name="addr02" value="<!--{$arrForm.addr02|escape}-->"  maxlength="<!--{$smarty.const.STEXT_LEN}-->" size="60" class="box60" style="<!--{if $arrErr.addr02 != ""}-->background-color: <!--{$smarty.const.ERR_COLOR}-->;<!--{/if}-->" id="addr02" /><span class="attention"> (上限<!--{$smarty.const.STEXT_LEN}-->文字)</span><br /> 
    98164          <!--{$smarty.const.SAMPLE_ADDRESS2}--> 
    99165        </p> 
     
    214280  </table> 
    215281 
     282  <h2>地図設定</h2> 
     283  <table id="basis-index-func"> 
     284    <tr> 
     285      <th>緯度/経度情報</th> 
     286      <td> 
     287        <span class="attention"><!--{$arrErr.latitude}--></span> 
     288        <span class="attention"><!--{$arrErr.longitude}--></span> 
     289        緯度: <input type="text" name="latitude" value="<!--{$arrForm.latitude|escape}-->" maxlength="<!--{$smarty.const.STEXT_LEN}-->" size="30" class="box30" style="<!--{if $arrErr.latitude != ""}-->background-color: <!--{$smarty.const.ERR_COLOR}-->;<!--{/if}-->" id="latitude" /> 
     290        経度: <input type="text" name="longitude" value="<!--{$arrForm.longitude|escape}-->" maxlength="<!--{$smarty.const.STEXT_LEN}-->" size="30" class="box30" style="<!--{if $arrErr.longitude != ""}-->background-color: <!--{$smarty.const.ERR_COLOR}-->;<!--{/if}-->" id="longitude" /> 
     291        <input type="button" name="codeAddress" id="codeAddress" value="住所より自動取得" /> 
     292        <a href="#maparea" id="mapAddress">地図で設定</a> 
     293      </td> 
     294    </tr> 
     295 </table> 
     296 
    216297  <div class="btn"> 
    217298    <button type="submit"><span>この内容で登録する</span></button> 
    218299  </div> 
    219300</div> 
     301<div style="display: none"> 
     302  <div id="maparea"> 
     303    <div id="maps" style="width: 300px; height: 300px"></div> 
     304    <input type="button" id="inputPoint" value="この位置を入力" /> 
     305  </div> 
     306</div> 
    220307<!--{* ▲登録テーブルここまで *}--> 
    221308</form> 
  • branches/version-2_5-dev/data/Smarty/templates/default/admin/main_frame.tpl

    r18700 r18776  
    3030<link rel="stylesheet" href="<!--{$TPL_DIR}-->css/admin_contents.css" type="text/css" media="all" /> 
    3131<link rel="stylesheet" href="<!--{$TPL_DIR}-->css/admin_file_manager.css" type="text/css" media="all" /> 
     32<script type="text/javascript" src="http://www.google.com/jsapi?key=xxx"></script> 
     33<script type="text/javascript">//<![CDATA[ 
     34    google.load("maps", "3", {other_params:'sensor=false'}); 
     35//]]> 
     36</script> 
    3237<script type="text/javascript" src="<!--{$TPL_DIR}-->js/navi.js"></script> 
    3338<script type="text/javascript" src="<!--{$TPL_DIR}-->js/win_op.js"></script> 
  • branches/version-2_5-dev/data/Smarty/templates/default/site_frame.tpl

    r18700 r18776  
    2828<link rel="stylesheet" href="<!--{$TPL_DIR}-->css/import.css" type="text/css" media="all" /> 
    2929<link rel="alternate" type="application/rss+xml" title="RSS" href="<!--{$smarty.const.SITE_URL}-->rss/<!--{$smarty.const.DIR_INDEX_URL}-->" /> 
     30<script type="text/javascript" src="http://www.google.com/jsapi?key=xxx"></script> 
     31<script type="text/javascript">//<![CDATA[ 
     32    google.load("maps", "3", {other_params:'sensor=false'}); 
     33//]]> 
     34</script> 
    3035<script type="text/javascript" src="<!--{$TPL_DIR}-->js/css.js"></script> 
    3136<script type="text/javascript" src="<!--{$TPL_DIR}-->js/navi.js"></script> 
  • branches/version-2_5-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis.php

    r18772 r18776  
    164164            "good_traded", 
    165165            "message", 
    166             "regular_holiday_ids" 
    167  
     166            "regular_holiday_ids", 
     167            "latitude", 
     168            "longitude" 
    168169        ); 
    169170        return $arrCol; 
     
    271272        $objErr->doFunc(array("メッセージ", "message", LLTEXT_LEN), array("MAX_LENGTH_CHECK")); 
    272273 
     274        $objErr->doFunc(array("緯度", "latitude", STEXT_LEN), array("NUM_POINT_CHECK", "MAX_LENGTH_CHECK")); 
     275        $objErr->doFunc(array("経度", "longitude", STEXT_LEN), array("NUM_POINT_CHECK", "MAX_LENGTH_CHECK")); 
    273276        return $objErr->arrErr; 
    274277    } 
  • branches/version-2_5-dev/html/install/sql/create_table_mysql.sql

    r18775 r18776  
    147147    good_traded text, 
    148148    message text, 
    149     regular_holiday_ids text 
     149    regular_holiday_ids text, 
     150    latitude text, 
     151    longitude text 
    150152) TYPE=InnoDB; 
    151153 
  • branches/version-2_5-dev/html/install/sql/create_table_pgsql.sql

    r18764 r18776  
    147147    good_traded text, 
    148148    message text, 
    149     regular_holiday_ids text 
     149    regular_holiday_ids text, 
     150    latitude text, 
     151    longitude text 
    150152); 
    151153 
Note: See TracChangeset for help on using the changeset viewer.