Sha256: 48c3808cf300ee922c0e93d48f954314d00a8f68f5a24dd60326daeb457d67b7

Contents?: true

Size: 699 Bytes

Versions: 1

Compression:

Stored size: 699 Bytes

Contents

class Embeditor.Adapters.CoverItLive extends Embeditor.Adapters.StaticTemplate
    className: "CoverItLive"

    @Template = Embeditor.Template('cover_it_live')

    @QueryDefaults =
        maxwidth  : 620
        maxheight : 550

    @Matchers = [
        new RegExp "/altcast_code=([^/]+)/", "gi"
    ]

    swap: ->
        # If the href doesn't match our known URL schemes
        # for this adapter, then let's not bother trying.
        match = @_parseUrl()
        return false if not match

        event_id = match[1]

        @embed CoverItLive.Template
            maxheight   : @queryParams.maxheight,
            maxwidth    : @queryParams.maxwidth,
            event_id    : event_id

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
embeditor-rails-0.1.0 app/assets/javascripts/embeditor/adapters/cover_it_live.js.coffee