Plugin Directory

Changeset 3452535


Ignore:
Timestamp:
02/03/2026 03:16:52 AM (2 months ago)
Author:
optimal360
Message:

Version 1.1.5 (fixes divi support)

Location:
optimal-360
Files:
22 added
4 edited

Legend:

Unmodified
Added
Removed
  • optimal-360/trunk/assets/divi-builder.js

    r3452530 r3452535  
    3838            log('Project selected:', sanitizedUUID, sanitizedName);
    3939
    40             // Find and update the project_uuid input field - try multiple approaches
    41             var $uuidInput = $('input[id*="project_uuid"], textarea[id*="project_uuid"], input[name*="project_uuid"]');
    42            
    43             // Also try in Visual Builder's app frame
    44             if (!$uuidInput.length && window.ET_Builder && ET_Builder.Frames && ET_Builder.Frames.app) {
    45                 try {
    46                     var $appFrame = $(ET_Builder.Frames.app.document);
    47                     $uuidInput = $appFrame.find('input[id*="project_uuid"], textarea[id*="project_uuid"]');
    48                 } catch(e) {
    49                     log('Could not access app frame:', e);
    50                 }
    51             }
    52 
    53             if ($uuidInput.length) {
    54                 $uuidInput.val(sanitizedUUID).trigger('input').trigger('change').trigger('blur');
    55                 log('Updated input field');
     40            // Find the input field - search broadly
     41            var $uuidInput = null;
     42           
     43            // Strategy 1: Search by ID/name containing project_uuid
     44            $uuidInput = $('input[id*="project_uuid"], textarea[id*="project_uuid"], input[name*="project_uuid"]');
     45            log('Strategy 1 found:', $uuidInput.length);
     46           
     47            // Strategy 2: Search near our button
     48            if (!$uuidInput.length) {
     49                var $btn = $('.optimal360-select-btn');
     50                if ($btn.length) {
     51                    $uuidInput = $btn.closest('div').parent().find('input[type="text"], textarea').first();
     52                    log('Strategy 2 found:', $uuidInput.length);
     53                }
     54            }
     55           
     56            // Strategy 3: Find input with "Showcase" nearby
     57            if (!$uuidInput.length) {
     58                $('input[type="text"], textarea').each(function() {
     59                    var $input = $(this);
     60                    var parentText = $input.closest('div').parent().text().toLowerCase();
     61                    if (parentText.indexOf('showcase') !== -1) {
     62                        $uuidInput = $input;
     63                        log('Strategy 3 found input');
     64                        return false;
     65                    }
     66                });
     67            }
     68
     69            if ($uuidInput && $uuidInput.length) {
     70                // Set the value
     71                $uuidInput.val(sanitizedUUID);
     72               
     73                // Trigger various events to notify Divi/React
     74                $uuidInput.trigger('input');
     75                $uuidInput.trigger('change');
     76                $uuidInput.trigger('blur');
     77                $uuidInput.trigger('keyup');
     78               
     79                // For React-based inputs, we may need to set the value directly
     80                var inputEl = $uuidInput[0];
     81                var nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, 'value').set;
     82                if (nativeInputValueSetter) {
     83                    nativeInputValueSetter.call(inputEl, sanitizedUUID);
     84                    inputEl.dispatchEvent(new Event('input', { bubbles: true }));
     85                    inputEl.dispatchEvent(new Event('change', { bubbles: true }));
     86                }
     87               
     88                log('Updated input field to:', sanitizedUUID);
    5689            } else {
    57                 log('Could not find input field');
     90                log('Could not find input field - please paste manually:', sanitizedUUID);
     91                alert('Showcase selected: ' + sanitizedUUID + '\n\nPlease paste this code into the Showcase Code field.');
    5892            }
    5993
  • optimal-360/trunk/includes/divi-module.php

    r3452530 r3452535  
    1111
    1212    public $slug       = 'et_pb_optimal360_showcase';
    13     public $vb_support = 'on';
     13    public $vb_support = 'partial';
    1414
    1515    protected $module_credits = array(
  • optimal-360/trunk/optml360-extension.php

    r3452530 r3452535  
    33 * Plugin Name: Optimal 360
    44 * Description: Turn simple 4K videos into 3D 360 showcases for your websites.
    5  * Version: 1.1.4
     5 * Version: 1.1.5
    66 * Author: Optimal 360
    77 * Author URI: https://optml360.com
  • optimal-360/trunk/readme.txt

    r3452532 r3452535  
    66Requires at least: 5.0
    77Tested up to: 6.8
    8 Stable tag: 1.1.4
     8Stable tag: 1.1.5
    99Requires PHP: 7.0
    1010License: GPLv3
Note: See TracChangeset for help on using the changeset viewer.