Sha256: a7205256da75745a0a645e71c95efd21de80c9cbce3707bd837f968014ced308

Contents?: true

Size: 354 Bytes

Versions: 9

Compression:

Stored size: 354 Bytes

Contents

import $ from 'jquery'

import { triggerInit } from './events'

export function refreshContext ($context) {
  const url = $context.data('context')

  $.get(url, function (data) {
    $context.html(data)
    triggerInit($context)
  })
}

export function refreshMainContext () {
  const $context = $('.app-main[data-context]')
  refreshContext($context)
}

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
trestle-0.9.8 frontend/js/core/contexts.js
trestle-0.9.7 frontend/js/core/contexts.js
trestle-0.9.6 frontend/js/core/contexts.js
trestle-0.9.5 frontend/js/core/contexts.js
trestle-0.9.4 frontend/js/core/contexts.js
trestle-0.9.3 frontend/js/core/contexts.js
trestle-0.9.2 frontend/js/core/contexts.js
trestle-0.9.1 frontend/js/core/contexts.js
trestle-0.9.0 frontend/js/core/contexts.js