Plugin Directory

Changeset 940411


Ignore:
Timestamp:
06/29/2014 04:03:11 PM (12 years ago)
Author:
der_maddis
Message:

moved post linking to startsection

Location:
wp-travelermap/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • wp-travelermap/trunk/admin/js/travelermap-admin.js

    r940337 r940411  
    169169                $('#tm_place_at_address').prop('disabled', false);
    170170                $('#tm_save_changes').prop('disabled', false);
    171             } else if (data.type === 'startsection') {
     171            } else if (data.type === 'endsection') {
    172172                $('#tm_type').prop('disabled', false);
    173173                $('#tm_title').prop('disabled', false);
     
    179179                $('#tm_place_at_address').prop('disabled', false);
    180180                $('#tm_save_changes').prop('disabled', false);
    181             } else if (data.type === 'endsection' || data.type === 'startendsection') {
     181            } else if (data.type === 'startsection' || data.type === 'startendsection') {
    182182                $('#tm_type').prop('disabled', false);
    183183                $('#tm_title').prop('disabled', false);
     
    311311        function _tm_generateMap() {
    312312            var obj = {};
    313             obj['version'] = "1.1.0";
     313            obj['version'] = "1.3.0";
    314314            obj['mapid'] = $('#tm_map').data('mapid');
    315315            obj['name'] = $('#tm_map_name').val();
     
    406406                                        return;
    407407                                    }
    408                                     if ($('#tm_type').val() !== 'endsection') {
     408                                    if ($('#tm_type').val() !== 'startsection' && $('#tm_type').val() !== 'startendsection') {
    409409                                        $('#tm_type').val('post');
    410410                                    }
  • wp-travelermap/trunk/admin/travelermap-admin.php

    r940337 r940411  
    4545    wp_enqueue_script('spectrum', TM_URL . "js/spectrum.js" , array('jquery'), '1.3.4', false);
    4646    wp_enqueue_script('json2');
    47     wp_enqueue_script('travelermap-admin', TM_URL . "admin/js/travelermap-admin.js" , array('jquery', 'jquery-ui-core', 'jquery-ui-widget'), '1.2.0', false);
    48     wp_enqueue_script('travelermap-frontend', TM_URL . "frontend/js/travelermap-frontend.js" , array('jquery'), '1.2.0', false);
     47    wp_enqueue_script('travelermap-admin', TM_URL . "admin/js/travelermap-admin.js" , array('jquery', 'jquery-ui-core', 'jquery-ui-widget'), '1.3.0', false);
     48    wp_enqueue_script('travelermap-frontend', TM_URL . "frontend/js/travelermap-frontend.js" , array('jquery'), '1.3.0', false);
    4949    wp_enqueue_style('tm-admin', TM_URL . "media/tm-admin.css" );
    5050    wp_enqueue_style('tm-frontend', TM_URL . "media/tm-frontend.css" );
  • wp-travelermap/trunk/admin/travelermap-upgrade.php

    r940336 r940411  
    3030        travelermap_upgrade_1_0_0_to_1_1_0();
    3131    }
     32    $currentVersion = get_option("travelermap_version");
    3233    if( version_compare($currentVersion, '1.2.0', '<')) {
    3334        travelermap_upgrade_1_1_0_to_1_2_0();
     35    }
     36    $currentVersion = get_option("travelermap_version");
     37    if( version_compare($currentVersion, '1.3.0', '<')) {
     38        travelermap_upgrade_1_2_0_to_1_3_0();
    3439    }
    3540}
    3641
    3742function travelermap_upgrade_1_0_0_to_1_1_0() {
    38     $settings = get_option('traverlermap_settings');
     43    $settings = get_option('travelermap_settings');
    3944   
    4045    if (!$settings) {
     
    5055
    5156function travelermap_upgrade_1_1_0_to_1_2_0() {
    52     $settings = get_option('traverlermap_settings');
     57    $settings = get_option('travelermap_settings');
    5358   
    5459    if (!$settings) {
     
    6368}
    6469
     70function travelermap_upgrade_1_2_0_to_1_3_0() {
     71    $settings = get_option('travelermap_settings');
     72   
     73    if (!$settings) {
     74        $settings = array(
     75        );
     76        update_option('travelermap_settings', $settings);
     77    }
     78
     79    update_option("travelermap_version", '1.3.0');
     80    update_option("travelermap_db_version", '1.3.0');
     81
     82}
     83
    6584travelermap_upgrade();
    6685
  • wp-travelermap/trunk/frontend/js/travelermap-frontend.js

    r940336 r940411  
    214214                            evt.target.setStyle({opacity: 0.5});
    215215                        });
     216                        currentLine.bindPopup(feature.title);
     217                        currentLine['tm_data'] = feature;
     218                        feature['_lf_object'] = currentLine;
    216219                        currentLine.addLatLng([feature.lat, feature.lng]);
    217220                        isInSection = true;
     
    225228                        //var nextPoint = findNextWaypointMarker(data,i);
    226229                        currentLine.addLatLng([feature.lat, feature.lng]);
    227                         currentLine.bindPopup(feature.title);
    228                         currentLine['tm_data'] = feature;
    229                         feature['_lf_object'] = currentLine;
    230230                        group.addLayer(currentLine);
    231231                        currentLine = L.geodesicPolyline([],{color:lineColor});
     
    240240                    } else if(feature.type === 'startendsection') {
    241241                        currentLine.addLatLng([feature.lat, feature.lng]);
    242                         currentLine.bindPopup(feature.title);
    243                         currentLine['tm_data'] = feature;
    244242                        group.addLayer(currentLine);
    245                         feature['_lf_object'] = currentLine;
    246243                        currentLine = L.geodesicPolyline([],{color:lineColor});
    247244                        currentLine.on('mouseover', function(evt) {
     
    257254                            evt.target.setStyle({opacity: 0.5});
    258255                        });
     256                        currentLine.bindPopup(feature.title);
     257                        currentLine['tm_data'] = feature;
     258                        feature['_lf_object'] = currentLine;
    259259                        currentLine.addLatLng([feature.lat, feature.lng]); //add as starting point
    260260                        var nextPoint = _findNextWaypointMarker(data,i+1);
     
    353353                }
    354354                var dateInfo = '<span>';
    355                 if(feature.type === 'endsection' || feature.type === 'startendsection') {
    356                     var start = _findStartSection(data, position-1);
    357                     if(start && start.departure) {
    358                         dateInfo += "Start: " + $.format.date(start.departure, _mapOptions.dateFormat) + ' | ';
    359                     } else if(start && start.arrival) {
    360                         dateInfo += "Start: " + $.format.date(start.arrival, _mapOptions.dateFormat) + ' | ';
    361                     }
    362                     if(feature.arrival) {
    363                         dateInfo += "End: " + $.format.date(feature.arrival, _mapOptions.dateFormat) + ' | ';
    364                     } else if(feature.departure) {
    365                         dateInfo += "End: " + $.format.date(feature.departure, _mapOptions.dateFormat) + ' | ';
     355                if(feature.type === 'startsection' || feature.type === 'startendsection') {
     356                    var end = _findEndSection(data, position+1);
     357                    if(feature.departure) {
     358                        dateInfo += "Start: " + $.format.date(feature.departure, _mapOptions.dateFormat) + ' | ';
     359                    } else if(feature.arrival) {
     360                        dateInfo += "Start: " + $.format.date(feature.arrival, _mapOptions.dateFormat) + ' | ';
     361                    }
     362                    if(end && end.arrival) {
     363                        dateInfo += "End: " + $.format.date(end.arrival, _mapOptions.dateFormat) + ' | ';
     364                    } else if(end && end.departure) {
     365                        dateInfo += "End: " + $.format.date(end.departure, _mapOptions.dateFormat) + ' | ';
    366366                    }
    367367                } else {
     
    391391                    for(var j = 0; j < data[i].data.length; j++) {
    392392                        var feature = data[i].data[j];
    393                         if(feature.type === 'startsection' || feature.type === 'waypoint') continue;
     393                        if(feature.type === 'endsection' || feature.type === 'waypoint') continue;
    394394                        var markerInfo = _createMarkerInfo(feature, data[i].data, j);
    395395                        _markerInfoMapping[data[i].name].push({marker: feature._lf_object, info: markerInfo});
  • wp-travelermap/trunk/frontend/travelermap-frontend.php

    r940337 r940411  
    8787    wp_enqueue_script('jquery-dateFormat', TM_URL . "js/jquery-dateFormat.min.js" , array('jquery'), '1.0.0', false);
    8888    wp_enqueue_script('json2');
    89     wp_enqueue_script('travelermap-frontend', TM_URL . "frontend/js/travelermap-frontend.js" , array('jquery'), '1.2.0', false);
     89    wp_enqueue_script('travelermap-frontend', TM_URL . "frontend/js/travelermap-frontend.js" , array('jquery'), '1.3.0', false);
    9090}
    9191
  • wp-travelermap/trunk/readme.txt

    r940336 r940411  
    11=== wp-travelermap ===
    2 Contributors: Mathis Zeiher
     2Contributors: der_maddis
    33Donate link: http://bitschubser.org
    44Tags: travel, map, waypoints
    55Requires at least: 3.9.0
    66Tested up to: 3.9.1
    7 Stable tag: 1.2.0
     7Stable tag: 1.3.0
    88License: MIT
    99License URI: http://opensource.org/licenses/MIT
     
    5151
    5252== Changelog ==
     53
     54= 1.3.0 =
     55* Moved Post linking from endsection to startsection
    5356
    5457= 1.2.0 =
  • wp-travelermap/trunk/wp-travelermap.php

    r940336 r940411  
    44Plugin URI: http://bitschubser.org/projects/wp-travelermap
    55Description: A simple Plugin to create travel routes and manage maps
    6 Version: 1.2.0
     6Version: 1.3.0
    77Author: Mathis Zeiher
    88Author URI: http://bitschubser.org/
     
    3232
    3333if ( ! defined( 'TM_VERSION' ) )   
    34     define( 'TM_VERSION', '1.2.0' );
     34    define( 'TM_VERSION', '1.3.0' );
    3535   
    3636if ( ! defined( 'TM_URL' ) )
Note: See TracChangeset for help on using the changeset viewer.