###* Modal dialogs (WIP). @class up.modal ### up.modal = (-> # configuration = # width: 600 # height: 400 # template: # """ #
#
#
# # Close # ESC # #
#
#
# """ # # defaults = (defaults) -> # up.util.extend(configuration, defaults) # # open = (link, options) -> # $link = $(link) # url = $link.attr("href") # selector = $link.attr("up-modal") || $link.attr("up-target") || 'body' # options.source = true # replace(selector, url, options) # options = up.util.options(options, configuration) # createElements() # update(options) # # close = -> # if $container # $container.remove() # $container = null source = -> $('.up-modal').find('[up-source]').attr('up-source') # defaults: defaults # open: open # close: close source: source )()