Plugin Directory

Changeset 2636216


Ignore:
Timestamp:
11/27/2021 07:22:04 AM (4 years ago)
Author:
traveledmap
Message:

handle retro-compatibility for trip step

Location:
traveledmap-trip-itinerary-embedded-map/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • traveledmap-trip-itinerary-embedded-map/trunk/README.md

    r2636211 r2636216  
    99 - Go to the cloned svn repository (see instructions below if the svn repository isn't cloned yet)
    1010 - Go inside the svn/trunk folder
    11  - `svn add .`
     11 - `svn add .` and `svn revert trunk/.git --depth infinity`
    1212 - `svn commit`
    1313 - `svn copy https://plugins.svn.wordpress.org/traveledmap-trip-itinerary-embedded-map/trunk https://plugins.svn.wordpress.org/traveledmap-trip-itinerary-embedded-map/tags/1.1.0 -m "message...."` (creates the tag)
  • traveledmap-trip-itinerary-embedded-map/trunk/plugin.php

    r2636211 r2636216  
    66 * Author: TraveledMap
    77 * Author URI: https://www.traveledmap.com
    8  * Version: 1.1.1
     8 * Version: 1.1.2
    99 * License: GPL2+
    1010 * License URI: https://www.gnu.org/licenses/gpl-2.0.txt
  • traveledmap-trip-itinerary-embedded-map/trunk/readme.txt

    r2636211 r2636216  
    66Tested up to: 5.8.2
    77Requires PHP: 5.6
    8 Stable tag: 1.1.1
     8Stable tag: 1.1.2
    99License: GPLv2
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    201201* Update version and fixes
    202202
     203= 1.1.1 =
     204* Handle retro-compatibility with 1.0.11
     205
    203206== Upgrade Notice ==
    204207= 1.1.0 =
  • traveledmap-trip-itinerary-embedded-map/trunk/src/shared/front-renderer.php

    r2636205 r2636216  
    4545
    4646            <script type="text/javascript">
     47              ' . TraveledMap_Utils::getStepBlockRetrocompatibilityJavascript() . '
     48
    4749              const handleTraveledMapTripBlockLoad = function () {
    4850                new TraveledMapTrip("' . $elementId . '", {
  • traveledmap-trip-itinerary-embedded-map/trunk/src/shared/utils/utils.php

    r2636205 r2636216  
    2525        return str_replace("%", "VH", $height);
    2626    }
     27
     28    public static function getStepBlockRetrocompatibilityJavascript() {
     29        return '
     30          // handle trip step retrocompatibility
     31          Array.from(document.getElementsByClassName("traveledmap-trip-anchor"))
     32            .forEach((el) => {
     33              console.log(el);
     34              if (!el.classList.contains("traveledmap-trip-step")) {
     35                el.classList.add("traveledmap-trip-step");
     36              }
     37              if (!el.getAttribute("data-step")) {
     38                el.setAttribute("data-step", el.getAttribute("id"))
     39              }
     40            });
     41        ';
     42    }
    2743}
  • traveledmap-trip-itinerary-embedded-map/trunk/src/widget/widget.php

    r2636205 r2636216  
    100100
    101101                <script type="text/javascript">
     102                  ' . TraveledMap_Utils::getStepBlockRetrocompatibilityJavascript() . '
     103
    102104                  const handleTraveledMapWidgetLoad = function () {
    103105                    new TraveledMapTrip("' . $elementId . '", {
Note: See TracChangeset for help on using the changeset viewer.