Sha256: 5ab9e883b5eaf4993b812acf3353b05690fddf14ed3ad9e7663607aa90c52d9d

Contents?: true

Size: 573 Bytes

Versions: 19

Compression:

Stored size: 573 Bytes

Contents

class ELA.Router extends Backbone.Router
  routes:
    '': 'index'
    '(app/)*path': 'load'

  initialize: ->
    ELA.store = new Persist.Store('ilr_app')
    ELA.app = new ELA.Models.App()
    ELA.view = new ELA.Views.App
      model: ELA.app
      el: $('#app')
    ELA.view.render()

  index: ->
    ELA.app.set(path: null)

  load: (path, params) ->
    if params?
      try
        params = JSON.parse(decodeURI(params))
      catch
        alert(t('messages.invalidParameters'))
        params = null
    ELA.app.set
      path: path.split('/')
      params: params

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
ela-4.1.6 app/js/lib/router.coffee
ela-4.1.5 app/js/lib/router.coffee
ela-4.1.4 app/js/lib/router.coffee
ela-4.1.3 app/js/lib/router.coffee
ela-4.1.2 app/js/lib/router.coffee
ela-4.1.1 app/js/lib/router.coffee
ela-4.1.0 app/js/lib/router.coffee
ela-4.0.0 app/js/lib/router.coffee
ela-3.4.3 app/js/lib/router.coffee
ela-3.4.2 app/js/lib/router.coffee
ela-3.4.0 app/js/lib/router.coffee
ela-3.3.1 app/js/lib/router.coffee
ela-3.3.0 app/js/lib/router.coffee
ela-3.2.0 app/js/lib/router.coffee
ela-3.1.1 app/js/lib/router.coffee
ela-3.1.0 app/js/lib/router.coffee
ela-3.0.0 app/js/lib/router.coffee
ela-2.0.0 app/js/lib/router.coffee
ela-1.1.0 app/js/lib/router.coffee