Skip to content

Remove jQuery $('#md_modal') backward compatibility when Core 4.3 deprecated #32

Description

@BadWolf42

// TODO: Remove jQuery $('#md_modal') backward compatibility when Core 4.3 deprecated

    // Add access to history on gauge
    document.querySelector('#gauge-container-#id#').addEventListener('click', function(event) {
      if (!event.target.classList.contains('hidden') && event.target.hasAttribute('cmd-id')) {
        if (typeof jeeDialog !== 'undefined') {
          jeeDialog.dialog({
           id: 'md_cmdHistory',
           title: 'Historique',
           contentUrl: 'index.php?v=d&modal=cmd.history&id=' + event.target.getAttribute('cmd-id')
           });
        } else {
          // TODO: Remove jQuery $('#md_modal') backward compatibility when Core 4.3 deprecated
          $('#md_modal').dialog({title: "Historique"}).load('index.php?v=d&modal=cmd.history&id='+event.target.getAttribute('cmd-id')).dialog('open');
        }
      }

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions