How to use the fullcalendar.ExternalDropping.getEmbeddedElData function in fullcalendar

To help you get started, we’ve selected a few fullcalendar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fullcalendar / fullcalendar / plugins / jquery-ui-draggable / main.ts View on Github external
calendar.handlExternalDragStart(
      ev.originalEvent,
      ((ui && ui.item) ? ui.item[0] : null) || ev.target,
      ev.name === 'dragstart' // don't watch mouse/touch movements if doing jqui drag (not sort)
    )
  }

  $document.on('dragstart sortstart', handleDragStart)

  calendar.one('destroy', function(calendar) {
    $document.off('dragstart sortstart', handleDragStart)
  })
})


const origGetEmbeddedElData = ExternalDropping.getEmbeddedElData

ExternalDropping.getEmbeddedElData = function(el, name, shouldParseJson = false) {
  let val = $(el).data(name) // will automatically parse JSON

  if (val != null) {
    return val
  }

  return origGetEmbeddedElData.apply(ExternalDropping, arguments)
}
github fullcalendar / fullcalendar / plugins / jquery-ui-draggable / main.ts View on Github external
((ui && ui.item) ? ui.item[0] : null) || ev.target,
      ev.name === 'dragstart' // don't watch mouse/touch movements if doing jqui drag (not sort)
    )
  }

  $document.on('dragstart sortstart', handleDragStart)

  calendar.one('destroy', function(calendar) {
    $document.off('dragstart sortstart', handleDragStart)
  })
})


const origGetEmbeddedElData = ExternalDropping.getEmbeddedElData

ExternalDropping.getEmbeddedElData = function(el, name, shouldParseJson = false) {
  let val = $(el).data(name) // will automatically parse JSON

  if (val != null) {
    return val
  }

  return origGetEmbeddedElData.apply(ExternalDropping, arguments)
}