Plugin Directory

Changeset 715428


Ignore:
Timestamp:
05/20/2013 02:56:02 AM (13 years ago)
Author:
Sanskript
Message:

Fixed issue with google maps

Location:
soldpress/branches/0.9.5A
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • soldpress/branches/0.9.5A/general.php

    r715144 r715428  
    7070}
    7171
     72
    7273?>
  • soldpress/branches/0.9.5A/settings.php

    r715316 r715428  
    1515    register_setting( 'sc-settings-credential', 'sc-language' );
    1616    register_setting( 'sc-settings-sync', 'sc-sync-enabled' );
     17    register_setting( 'sc-settings-layout', 'sc-layout-agentlisting' );
     18    register_setting( 'sc-settings-layout', 'sc-layout-ariealmap' );
     19    register_setting( 'sc-settings-layout', 'sc-layout-streetviewmap' );   
     20    register_setting( 'sc-settings-layout', 'sc-layout-primarycolor' );
     21    register_setting( 'sc-settings-layout', 'sc-layout-secondarycolor' );
     22    register_setting( 'sc-settings-layout', 'sc-layout-analyticsclick' );
     23    register_setting( 'sc-settings-layout', 'sc-layout-analyticsview' );
     24    register_setting( 'sc-settings-layout', 'sc-layout-soldpresslogo' );
     25   
    1726}
    1827
     
    4756                        <td>
    4857                            <select name="sc-language" class="" id="sc-language">
    49                                 <option value="http://data.crea.ca/Login.svc/Login" <?php selected( 'http://data.crea.ca/Login.svc/Login', get_option( 'sc-url' ) ); ?>Production</option>
     58                                <option value="http://data.crea.ca/Login.svc/Login" <?php selected( 'http://data.crea.ca/Login.svc/Login', get_option( 'sc-url' ) ); ?>>Production</option>
    5059                                <option value="http://sample.data.crea.ca/Login.svc/Login" <?php selected( 'http://sample.data.crea.ca/Login.svc/Login', get_option( 'sc-url' ) ); ?>>Development</option>
    5160                            </select>
     
    7786                    <tr valign="top">
    7887                    <th scope="row">Debug Mode</th>
    79                     <td><input name="sc-debug" id ="sc-sync-enabled" value="1" type="checkbox" <?php checked( '1', get_option( 'sc-debug' ) ); ?>  /></td>
     88                    <td><input name="sc-debug" id ="sc-debug" value="1" type="checkbox" <?php checked( '1', get_option( 'sc-debug' ) ); ?>  /></td>
     89                    </tr>
     90                    <tr valign="top">
     91                    <th scope="row">Sync Enabled</th>
     92                    <td><input name="sc-sync-enabled" id ="sc-sync-enabled" value="1" type="checkbox" <?php checked( '1', get_option( 'sc-sync-enabled' ) ); ?>  /></td>
    8093                    </tr>
    8194                </table>
     
    136149                                    echo '<tr>';
    137150                                    //echo '<th scope="row" class="check-column"><input type="checkbox" name="schedules[]" class="entries" value="1"></th>';
    138                                     echo '<td><strong>'.$job.'</strong><div class="row-actions" style="margin:0; padding:0;"><a href="/wp-admin/options-general.php?page=soldpress&tab=sync_options&spa=runevt&job='.$job.'">Run Now</a></div></td>';                               
     151                                    echo '<td><strong>'.$job.'</strong><div class="row-actions" style="margin:0; padding:0;"><a href="options-general.php?page=soldpress&tab=sync_options&spa=runevt&job='.$job.'">Run Now</a></div></td>';                             
    139152                                    echo '<td>'.date("r", $key).'</td>';                           
    140153                                    $schedule = $value[key($value)];
     
    161174    <?php if( $active_tab == 'layout_options' ) {  ?>
    162175   
     176        <form method="post" action="options.php">
     177                <?php settings_fields( 'sc-settings-layout' ); ?>
    163178                <h3 class="title">Agent</h3>
    164179                <table class="form-table">
    165180                    <th scope="row">Display Listing Agent</th>
    166181                        <td>
    167                             <input name="sc-layout-agentlisting" id ="sc-layout-agentlisting" value="1" type="checkbox" <?php checked( '1', get_option( 'sc-layout-agentlisting' ) ); ?>  />
     182                            <input name="sc-layout-agentlisting" id ="sc-layout-agentlisting" value="1" type="checkbox" <?php checked( '1', get_option( 'sc-layout-agentlisting',1 ) ); ?>  />
    168183                        </td>
    169184                    </tr>
     
    173188                    <th scope="row">Display Arieal Map</th>
    174189                        <td>
    175                             <input name="sc-layout-ariealmap" id ="sc-layout-ariealmap" value="1" type="checkbox" <?php checked( '1', get_option( 'sc-layout-ariealmap' ) ); ?>  />
     190                            <input name="sc-layout-ariealmap" id ="sc-layout-ariealmap" value="1" type="checkbox" <?php checked( '1', get_option( 'sc-layout-ariealmap',1 ) ); ?>  />
    176191                        </td>
    177192                    </tr>
    178193                    <th scope="row">Display StreetView Map</th>
    179194                        <td>
    180                             <input name="sc-layout-streetviewmap" id ="sc-layout-streetviewmap" value="1" type="checkbox" <?php checked( '1', get_option( 'sc-layout-streetviewmap' ) ); ?>  />
     195                            <input name="sc-layout-streetviewmap" id ="sc-layout-streetviewmap" value="1" type="checkbox" <?php checked( '1', get_option( 'sc-layout-streetviewmap',0 ) ); ?>  />
    181196                        </td>
    182197                    </tr>
     
    186201                    <th scope="row">Primary Color</th>
    187202                        <td>
    188                             <input name="sc-layout-primarycolor" id ="sc-sync-enabled" value="1" type="checkbox" <?php checked( '1', get_option( 'sc-debug' ) ); ?> />
     203                            <input name="sc-layout-primarycolor" id ="sc-layout-primarycolor" value="" />
    189204                        </td>
    190205                    </tr>
    191206                    <th scope="row">Secondary Color</th>
    192207                        <td>
    193                             <input name="sc-layout-secondarycolor" id ="sc-sync-enabled" value="1" type="checkbox" <?php checked( '1', get_option( 'sc-debug' ) ); ?> />
    194                         </td>
    195                     </tr>
    196                 </table>
    197                 <h3 class="title">Relator(tm) Analyics</h3>
    198                 <table class="form-table">
    199                     <th scope="row">Click Analtics</th>
    200                         <td>
    201                             <input name="sc-layout-anyalticclick" id ="sc-sync-enabled" value="1" type="checkbox" <?php checked( '1', get_option( 'sc-debug' ) ); ?>  />
    202                         </td>
    203                     </tr>
    204                     <th scope="row">View Analtics</th>
    205                         <td>
    206                             <input name="sc-layout-anyalticview" id ="sc-sync-enabled" value="1" type="checkbox" <?php checked( '1', get_option( 'sc-debug' ) ); ?>  />
     208                            <input name="sc-layout-secondarycolor" id ="sc-layout-secondarycolor" value="" />
     209                        </td>
     210                    </tr>
     211                </table>
     212                <h3 class="title">Relator(tm) Analytics</h3>
     213                <table class="form-table">
     214                    <th scope="row">Click Analytics</th>
     215                        <td>
     216                            <input name="sc-layout-analyticsclick" id ="sc-layout-analyticsclick" value="1" type="checkbox" <?php checked( '1', get_option( 'sc-layout-analyticsclick',0) ); ?>  />
     217                        </td>
     218                    </tr>
     219                    <th scope="row">View Analytics</th>
     220                        <td>
     221                            <input name="sc-layout-analyticsview" id ="sc-layout-analyticsview" value="1" type="checkbox" <?php checked( '1', get_option( 'sc-layout-analyticsview',0 ) ); ?>  />
    207222                        </td>
    208223                    </tr>
    209224                </table>
    210225                <?php submit_button(); ?>   
     226        </form>
    211227    <?php } ?>
    212228    <?php if( $active_tab == 'about_options' ) {  ?>
    213229        A product of Sanskript Solution, Inc.
    214230       
    215         Support
    216        
    217         Crea
     231        Licsense Key:  "Premium Beta"
     232       
    218233               
    219234    <?php } ?>
  • soldpress/branches/0.9.5A/single-sp_property.php

    r715316 r715428  
    2727
    2828<?php get_header(); ?>
    29     <style>
    30    
    31 
    32     </style>
    3329    <h2><?php the_title(); ?></h2> 
    3430    <div class="well2">
     
    4541            ?>         
    4642        </div>
     43        <div id="disclaimer1">Test</div>
     44        <script>
     45
     46            var j = jQuery.noConflict()
     47            if (j('#disclaimer').length > 0) {
     48                alert('g');
     49                if (j.cookie('disclaimer_accepted') != 'yes') {
     50                    j('#disclaimer').modal({backdrop:'static',keyboard:false})
     51
     52                    j('#disclaimer').on('hide',function(){
     53                        j.cookie('disclaimer_accepted','yes',{expires:30});
     54                    })
     55                }   
     56           
     57            }   
     58        </script>
     59       
    4760        <div class="well3">
    4861            <div class="row">
     
    253266                    </table>   
    254267                </div>             
    255                 <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&"></script> <!-- &language=ja -->
     268                <script src="http://maps.google.com/maps/api/js?sensor=false&.js"></script>
    256269                <script>
    257270                    // Enable the visual refresh
    258                     google.maps.visualRefresh = true;
     271                    //google.maps.visualRefresh = true;
    259272
    260273                    var address = '<?php echo get_post_meta($post->ID,'dfd_UnparsedAddress',true); ?> , <?php echo get_post_meta($post->ID,'dfd_StateOrProvince',true); ?> <?php echo get_post_meta($post->ID,'dfd_PostalCode',true); ?>'; 
    261 
    262                            
    263                     var map;
    264                    
     274                    var map;               
    265275                    function initialize() {                 
    266276                        var geocoder = new google.maps.Geocoder();     
     
    272282                                    center: latlng,
    273283                                    mapTypeId: google.maps.MapTypeId.ROADMAP,
    274                                     //streetViewControl: true
     284                                    streetViewControl: true
    275285                                };
    276286                         
     287                                                           
    277288                                map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
    278                                 /*
    279                                 mapstreet = new google.maps.Map(document.getElementById('map-street'), mapOptions);                             
    280                                 var panoramaOptions = {
    281                                     position: map.latlngbyaddress,
    282                                       pov: {
    283                                         heading: 0,
    284                                         pitch: 0,
    285                                         zoom: 1
    286                                       },
    287                                     visible: true
    288                                 };
    289289                               
    290                                 var panorama = new  google.maps.StreetViewPanorama(document.getElementById("map-street"), panoramaOptions);
    291                                 mapstreet.setStreetView(panorama);
    292                                 panorama.setVisible(true);*/
     290                                var marker = new google.maps.Marker({
     291                                    position:results[0].geometry.location,                             
     292                                    map: map,
     293                                    scrollwheel: false,
     294                                    streetViewControl:true
     295                                });
    293296                               
     297                               
     298                                <?php if(get_option( 'sc-layout-streetviewmap',false)){ ?>
     299                               
     300                                    var mapOptionsStreet = {
     301                                        zoom: 14,
     302                                        center: latlng,
     303                                        mapTypeId: google.maps.MapTypeId.ROADMAP,
     304                                        streetViewControl: true
     305                                    };
     306                                   
     307                                    mapstreet = new google.maps.Map(document.getElementById('map-street'), mapOptionsStreet);   
     308                                   
     309                                    var panoramaOptions = {
     310                                        position: results[0].geometry.location,
     311                                          pov: {
     312                                            heading: 0,
     313                                            pitch: 0,
     314                                            zoom: 1
     315                                          },
     316                                        visible: true
     317                                    };
     318                                   
     319                                    var panorama = new  google.maps.StreetViewPanorama(document.getElementById("map-street"), panoramaOptions);
     320                                    mapstreet.setStreetView(panorama);
     321                                    panorama.setVisible(true);
     322                                <?php }; ?>                                 
    294323                            }else{
    295324                            //  alert("Geocode was not successful for the following reason: " + status);
     
    299328                   
    300329                    google.maps.event.addDomListener(window, 'load', initialize);
    301                 </script>               
     330                </script>
     331                <style>
     332                   
     333                </style>
     334
     335                <?php if(get_option('sc-layout-ariealmap',true)){ ?>               
    302336                <table class="table table-striped table-condensed ">
    303337                         <caption>Map</caption>
     
    305339                            <tr>
    306340                                <td>
    307                                     <!--<div id="map-street" class="well-map"></div>-->
    308                                     <div id="map-canvas" class="well-map"></div>                                   
     341                                    <?php if(get_option('sc-layout-streetviewmap',false)){ ?>
     342                                        <div id="map-street" class="well-map"></div>
     343                                    <?php }?>
     344                                   
     345                                    <div id="map-canvas" class="well-map"></div>   
     346                                                               
    309347                                </td>
    310348                            </tr>
    311349                        </tbody>
    312350                    </table>
     351                <?php }?>       
    313352            </div>
    314 
    315             <div class="span4 well2">
     353            <?php if(get_option('sc-layout-agentlisting',true)){ ?>
     354            <div class="span4 well2">           
    316355                <!-- Agent --><h3>Agent Details</h3>
    317356                <div class="row-fluid">
     
    389428                <p><small>Last Modified<?php echo get_post_meta($post->ID,'dfd_ModificationTimestamp',true); ?></small></p>     
    390429                    </div>
    391                 </div>
    392             </div> 
     430                </div>         
     431            </div>
     432        <?php }?>           
    393433        </div>             
    394434    </div>
  • soldpress/branches/0.9.5A/style/soldpress.css

    r715144 r715428  
     1   
     2    #map-street label { width: auto; display:inline; }
     3    #map-street img {max-width: none;}
     4    #map-canvas img {max-width: none;} 
     5    #map-canvas label { width: auto; display:inline; }
     6   
    17    .well2 {
    28        min-height: 20px;
  • soldpress/branches/0.9.5A/theme.php

    r715316 r715428  
    1919        'jquery.cycle2',
    2020         plugins_url( 'lib/jquery.cycle2/jquery.cycle2.min.js' , __FILE__ ),
     21        array('jquery'),
     22        '2',
     23        true);
     24       
     25    wp_enqueue_script(
     26        'jquery.cycle2.carousel',
     27         plugins_url( 'lib/jquery.cycle2/jquery.cycle2.carousel.js' , __FILE__ ),
    2128        array('jquery'),
    2229        '2',
Note: See TracChangeset for help on using the changeset viewer.