Sha256: e871eb7c06affa0f51b681a9094a8be724febdaa203586c35ac1df18edd28b66

Contents?: true

Size: 427 Bytes

Versions: 9

Compression:

Stored size: 427 Bytes

Contents

/* global Turbolinks */

import turbolinks from './turbolinks'

// The visit function is used to direct the user to the given URL. It is provided as an abstraction as the redirection
// is handled differently depending on whether or not Turbolinks is enabled.
//
//     Trestle.visit("/admin/pages");
//
export default function (url) {
  if (turbolinks) {
    Turbolinks.visit(url)
  } else {
    document.location = url
  }
}

Version data entries

9 entries across 9 versions & 1 rubygems

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