Sha256: 099e2755e2ea4d5ed0ca8d98dfa81154efaad53b2d37d9b7b5c0654767d98255
Contents?: true
Size: 554 Bytes
Versions: 11
Compression:
Stored size: 554 Bytes
Contents
scrivito.editors._file_dropzone = (fields, callback) -> fields.each(-> setup $(this), callback) setup = (el, callback) -> el.on 'dragenter', -> el.children().not('img').css(pointerEvents: 'none') el.addClass('image-editor-dragover') and off el.on 'dragleave', -> el.children().not('img').css(pointerEvents: 'auto') el.removeClass('image-editor-dragover') and off el.on 'drop', (e) -> el.removeClass 'image-editor-dragover' if (files = e.originalEvent.dataTransfer?.files)?.length is 1 callback el, files[0] off
Version data entries
11 entries across 11 versions & 1 rubygems