Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (12 sloc) 373 Bytes
$.widget 'ui.defValRef',
_create: ->
e = @element
url ?= e.attr "data-def-val-ref-url"
url = [@options.baseUrl, url].da_joinUrls()
url = url.replace new RegExp("\\$val"), e.attr("data-def-val-ref-val")
that = @
$.ajax
url : url
data : {"$format" : "json"}
success : (d) ->
e.val that.options.onSuccess(d)