lib/assets/javascripts/up/popup.js.coffee in upjs-rails-0.3.3 vs lib/assets/javascripts/up/popup.js.coffee in upjs-rails-0.4.0

- old
+ new

@@ -52,11 +52,11 @@ bottom: linkBox.top when "top-left" left: linkBox.left bottom: linkBox.top else - u.error("Unknown origin", origin) + u.error("Unknown origin %o", origin) $popup.attr('up-origin', origin) $popup.css(css) ensureInViewport($popup) ensureInViewport = ($popup) -> @@ -114,22 +114,20 @@ open even if the page changes in the background. @param {Object} [options.history=false] ### open = (linkOrSelector, options) -> $link = $(linkOrSelector) - + options = u.options(options) url = u.option($link.attr('href')) selector = u.option(options.target, $link.attr('up-popup'), 'body') origin = u.option(options.origin, $link.attr('up-origin'), config.origin) animation = u.option(options.animation, $link.attr('up-animation'), config.openAnimation) sticky = u.option(options.sticky, $link.is('[up-sticky]')) history = if up.browser.canPushState() then u.option(options.history, $link.attr('up-history'), false) else false close() $popup = createHiddenPopup($link, selector, sticky) - -# console.log("before replace", $link, $popup) up.replace(selector, url, history: history # source: true insert: -> updated($link, $popup, origin, animation)