Commit fcc89087 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Prevent default action on link going to nowhere

parent 02dad53f
......@@ -4,8 +4,9 @@
function PathLocks() {}
PathLocks.init = function(url, path) {
return $('a.path-lock').on('click', function() {
return $('a.path-lock').on('click', function(e) {
var $lockBtn, currentState, toggleAction;
e.preventDefault();
$lockBtn = $(this);
currentState = $lockBtn.data('state');
toggleAction = currentState === 'lock' ? 'unlock' : 'lock';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment