Changeset 3459289
- Timestamp:
- 02/11/2026 08:03:47 PM (7 weeks ago)
- Location:
- eventcrafter-visual-timeline/trunk
- Files:
-
- 6 edited
-
admin/class-event-admin.php (modified) (1 diff)
-
admin/js/builder.js (modified) (1 diff)
-
assets/css/eventcrafter.css (modified) (1 diff)
-
blocks/eventcrafter-timeline/index.js (modified) (1 diff)
-
eventcrafter.php (modified) (7 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
eventcrafter-visual-timeline/trunk/admin/class-event-admin.php
r3448658 r3459289 55 55 'eventcrafter-admin-js', 56 56 EVENTCRAFTER_URL . 'admin/js/builder.js', 57 array('jquery', 'wp-color-picker' ),57 array('jquery', 'wp-color-picker', 'jquery-ui-sortable'), 58 58 $this->version, 59 59 true -
eventcrafter-visual-timeline/trunk/admin/js/builder.js
r3448658 r3459289 143 143 144 144 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 }); 145 169 } 146 170 -
eventcrafter-visual-timeline/trunk/assets/css/eventcrafter.css
r3448658 r3459289 119 119 color: #1e40af; 120 120 } 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 32 32 const layoutOptions = [ 33 33 { 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') } 35 36 ]; 36 37 -
eventcrafter-visual-timeline/trunk/eventcrafter.php
r3448742 r3459289 4 4 * Plugin URI: https://github.com/TableCrafter/eventcrafter-visual-timeline 5 5 * Description: Create beautiful vertical timelines, product roadmaps, and event history. Manage your events using the intuitive Visual Builder. 6 * Version: 1. 2.06 * Version: 1.3.0 7 7 * Author: Fahad Murtaza 8 8 * Author URI: https://github.com/fahdi … … 19 19 */ 20 20 if (!defined('EVENTCRAFTER_VERSION')) { 21 define('EVENTCRAFTER_VERSION', '1. 2.0');21 define('EVENTCRAFTER_VERSION', '1.3.0'); 22 22 } 23 23 if (!defined('EVENTCRAFTER_URL')) { … … 138 138 139 139 // Also try registering the post type directly as a backup 140 add_action('init', function () {140 add_action('init', function () { 141 141 if (!post_type_exists('eventcrafter_tl')) { 142 142 register_post_type('eventcrafter_tl', array( … … 159 159 // Initialize the plugin to register post types 160 160 EventCrafter::get_instance(); 161 161 162 162 // Handle migration from old post type name (ec_timeline) to new name (eventcrafter_timeline) 163 163 eventcrafter_migrate_post_type(); 164 164 165 165 // Flush rewrite rules to ensure custom post types work 166 166 flush_rewrite_rules(); … … 178 178 'suppress_filters' => false 179 179 )); 180 180 181 181 if (!empty($old_posts)) { 182 182 foreach ($old_posts as $post_id) { … … 186 186 'post_type' => 'eventcrafter_tl' 187 187 )); 188 188 189 189 // Migrate meta data using WordPress functions 190 190 $old_meta_value = get_post_meta($post_id, '_ec_timeline_data', true); … … 194 194 } 195 195 } 196 196 197 197 // Clear any object cache to ensure fresh data 198 198 wp_cache_flush(); -
eventcrafter-visual-timeline/trunk/readme.txt
r3448742 r3459289 3 3 Tags: timeline, json, roadmap, history, events 4 4 Requires at least: 5.0 5 Tested up to: 6. 96 Stable tag: 1. 2.05 Tested up to: 6.7 6 Stable tag: 1.3.0 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later … … 54 54 55 55 == 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 56 62 57 63 = 1.2.0 =
Note: See TracChangeset
for help on using the changeset viewer.