Sha256: a56f0b388f3f644d1320891b61b62dae2118c52f32761da64c31135886983276
Contents?: true
Size: 584 Bytes
Versions: 11
Compression:
Stored size: 584 Bytes
Contents
###** Play nice with Rails UJS ======================== ### up.rails = do -> u = up.util e = up.element isRails = -> !!(window.Rails || (window.jQuery?.rails)) u.each ['method', 'confirm'], (feature) -> dataAttribute = "data-#{feature}" upAttribute = "up-#{feature}" up.macro "[#{dataAttribute}]", (element) -> if isRails() && up.link.isFollowable(element) replacement = {} replacement[upAttribute] = element.getAttribute(dataAttribute) e.setMissingAttrs(element, replacement) element.removeAttribute(dataAttribute)
Version data entries
11 entries across 11 versions & 1 rubygems