Plugin Directory

Changeset 3459289


Ignore:
Timestamp:
02/11/2026 08:03:47 PM (7 weeks ago)
Author:
fahdi
Message:

Update to v1.3.0

Location:
eventcrafter-visual-timeline/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • eventcrafter-visual-timeline/trunk/admin/class-event-admin.php

    r3448658 r3459289  
    5555                    'eventcrafter-admin-js',
    5656                    EVENTCRAFTER_URL . 'admin/js/builder.js',
    57                     array('jquery', 'wp-color-picker'),
     57                    array('jquery', 'wp-color-picker', 'jquery-ui-sortable'),
    5858                    $this->version,
    5959                    true
  • eventcrafter-visual-timeline/trunk/admin/js/builder.js

    r3448658 r3459289  
    143143       
    144144        initColorPickers();
     145        initSortable();
     146    }
     147
     148    function initSortable() {
     149        if ($container.data('ui-sortable')) {
     150            $container.sortable('refresh');
     151            return;
     152        }
     153
     154        $container.sortable({
     155            handle: '.ec-drag-handle',
     156            placeholder: 'ec-sortable-placeholder',
     157            forcePlaceholderSize: true,
     158            update: function(event, ui) {
     159                var newOrder = [];
     160                $container.find('.ec-event-card').each(function() {
     161                     var id = $(this).data('id');
     162                     var eventObj = currentState.events.find(function(ev) { return ev.id == id; });
     163                     if (eventObj) newOrder.push(eventObj);
     164                });
     165                currentState.events = newOrder;
     166                updateStorage();
     167            }
     168        });
    145169    }
    146170
  • eventcrafter-visual-timeline/trunk/assets/css/eventcrafter.css

    r3448658 r3459289  
    119119    color: #1e40af;
    120120}
     121/* Horizontal Layout */
     122.eventcrafter-layout-horizontal .eventcrafter-timeline {
     123    display: flex;
     124    flex-wrap: nowrap;
     125    overflow-x: auto;
     126    gap: 30px;
     127    padding: 40px 20px;
     128    position: relative;
     129    scrollbar-width: thin;
     130}
     131
     132.eventcrafter-layout-horizontal .eventcrafter-timeline::before {
     133    top: 50px; /* Adjust based on content height */
     134    bottom: auto;
     135    left: 0;
     136    right: 0;
     137    width: auto;
     138    height: 4px;
     139    background: var(--ec-line);
     140    z-index: 1;
     141}
     142
     143.eventcrafter-layout-horizontal .eventcrafter-item {
     144    flex: 0 0 300px; /* Fixed width cards */
     145    margin-bottom: 0;
     146    padding-left: 0;
     147    margin-top: 70px; /* Space for marker/line */
     148    position: relative;
     149}
     150
     151.eventcrafter-layout-horizontal .eventcrafter-marker {
     152    left: 50%;
     153    transform: translateX(-50%);
     154    top: -30px; /* Position on the line */
     155}
     156
     157/* Roadmap (Cards) Layout */
     158.eventcrafter-layout-roadmap .eventcrafter-timeline {
     159    display: grid;
     160    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
     161    gap: 20px;
     162}
     163
     164.eventcrafter-layout-roadmap .eventcrafter-timeline::before {
     165    display: none; /* No connecting line for pure cards */
     166}
     167
     168.eventcrafter-layout-roadmap .eventcrafter-item {
     169    margin: 0;
     170    padding: 0;
     171}
     172
     173.eventcrafter-layout-roadmap .eventcrafter-marker {
     174    display: none; /* No markers */
     175}
     176
     177/* Responsive: Collapse Horizontal to Vertical on Mobile */
     178@media (max-width: 768px) {
     179    .eventcrafter-layout-horizontal .eventcrafter-timeline {
     180        display: block;
     181        overflow-x: visible;
     182        padding: 20px 0;
     183    }
     184   
     185    .eventcrafter-layout-horizontal .eventcrafter-timeline::before {
     186        top: 0;
     187        bottom: 0;
     188        left: 20px;
     189        right: auto;
     190        width: 2px;
     191        height: auto;
     192    }
     193
     194    .eventcrafter-layout-horizontal .eventcrafter-item {
     195        margin-top: 0;
     196        margin-bottom: 30px;
     197        padding-left: 50px;
     198    }
     199
     200    .eventcrafter-layout-horizontal .eventcrafter-marker {
     201        left: 11px;
     202        top: 0;
     203        transform: none;
     204    }
     205}
  • eventcrafter-visual-timeline/trunk/blocks/eventcrafter-timeline/index.js

    r3448742 r3459289  
    3232            const layoutOptions = [
    3333                { value: 'vertical', label: __('Vertical', 'eventcrafter-visual-timeline') },
    34                 { value: 'horizontal', label: __('Horizontal', 'eventcrafter-visual-timeline') }
     34                { value: 'horizontal', label: __('Horizontal', 'eventcrafter-visual-timeline') },
     35                { value: 'roadmap', label: __('Roadmap (Cards)', 'eventcrafter-visual-timeline') }
    3536            ];
    3637
  • eventcrafter-visual-timeline/trunk/eventcrafter.php

    r3448742 r3459289  
    44 * Plugin URI: https://github.com/TableCrafter/eventcrafter-visual-timeline
    55 * Description: Create beautiful vertical timelines, product roadmaps, and event history. Manage your events using the intuitive Visual Builder.
    6  * Version: 1.2.0
     6 * Version: 1.3.0
    77 * Author: Fahad Murtaza
    88 * Author URI: https://github.com/fahdi
     
    1919 */
    2020if (!defined('EVENTCRAFTER_VERSION')) {
    21     define('EVENTCRAFTER_VERSION', '1.2.0');
     21    define('EVENTCRAFTER_VERSION', '1.3.0');
    2222}
    2323if (!defined('EVENTCRAFTER_URL')) {
     
    138138
    139139// Also try registering the post type directly as a backup
    140 add_action('init', function() {
     140add_action('init', function () {
    141141    if (!post_type_exists('eventcrafter_tl')) {
    142142        register_post_type('eventcrafter_tl', array(
     
    159159    // Initialize the plugin to register post types
    160160    EventCrafter::get_instance();
    161    
     161
    162162    // Handle migration from old post type name (ec_timeline) to new name (eventcrafter_timeline)
    163163    eventcrafter_migrate_post_type();
    164    
     164
    165165    // Flush rewrite rules to ensure custom post types work
    166166    flush_rewrite_rules();
     
    178178        'suppress_filters' => false
    179179    ));
    180    
     180
    181181    if (!empty($old_posts)) {
    182182        foreach ($old_posts as $post_id) {
     
    186186                'post_type' => 'eventcrafter_tl'
    187187            ));
    188            
     188
    189189            // Migrate meta data using WordPress functions
    190190            $old_meta_value = get_post_meta($post_id, '_ec_timeline_data', true);
     
    194194            }
    195195        }
    196        
     196
    197197        // Clear any object cache to ensure fresh data
    198198        wp_cache_flush();
  • eventcrafter-visual-timeline/trunk/readme.txt

    r3448742 r3459289  
    33Tags: timeline, json, roadmap, history, events
    44Requires at least: 5.0
    5 Tested up to: 6.9
    6 Stable tag: 1.2.0
     5Tested up to: 6.7
     6Stable tag: 1.3.0
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    5454
    5555== Changelog ==
     56
     57= 1.3.0 =
     58* **Feature**: Added Drag-and-Drop sorting in Visual Builder
     59* **Feature**: Added "Horizontal" timeline layout
     60* **Feature**: Added "Roadmap" (Cards) layout
     61* **Enhancement**: Updated Gutenberg block with new layout options
    5662
    5763= 1.2.0 =
Note: See TracChangeset for help on using the changeset viewer.