mirror of https://github.com/xwiki-labs/cryptpad
lint compliance
This commit is contained in:
parent
de7b8e99f1
commit
7fc3ff94a9
|
@ -1580,8 +1580,8 @@ define([
|
|||
var close = o.action(e);
|
||||
if (close) { hide(); }
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
};
|
||||
|
|
|
@ -1034,10 +1034,10 @@ define([
|
|||
if ([37, 38, 39, 40].indexOf(e.which) === -1) { return; }
|
||||
e.preventDefault();
|
||||
|
||||
// var click = function (el) {
|
||||
// if (!el) { return; }
|
||||
// APP.onElementClick(ev, $(el));
|
||||
// };
|
||||
var click = function (el) {
|
||||
if (!el) { return; }
|
||||
APP.onElementClick(ev, $(el));
|
||||
};
|
||||
|
||||
var $selection = findSelectedElements();
|
||||
if ($selection.length === 0) { return void click($elements.first()[0]); }
|
||||
|
@ -1057,17 +1057,17 @@ define([
|
|||
// Icon mode
|
||||
// Get the vertical and horizontal position of lastIndex
|
||||
// Filter all the elements to get those in the same line/column
|
||||
// var pos = $($elements.get(0)).position();
|
||||
// var $line = $elements.filter(function (idx, el) {
|
||||
// return $(el).position().top === pos.top;
|
||||
// });
|
||||
// var cols = $line.length;
|
||||
// var lines = Math.ceil(length/cols);
|
||||
var pos = $($elements.get(0)).position();
|
||||
var $line = $elements.filter(function (idx, el) {
|
||||
return $(el).position().top === pos.top;
|
||||
});
|
||||
var cols = $line.length;
|
||||
var lines = Math.ceil(length/cols);
|
||||
|
||||
// var lastPos = {
|
||||
// l : Math.floor(lastIndex/cols),
|
||||
// c : lastIndex - Math.floor(lastIndex/cols)*cols
|
||||
// };
|
||||
var lastPos = {
|
||||
l : Math.floor(lastIndex/cols),
|
||||
c : lastIndex - Math.floor(lastIndex/cols)*cols
|
||||
};
|
||||
|
||||
if (e.which === 37) {
|
||||
if (lastPos.c === 0) { return; }
|
||||
|
@ -3187,8 +3187,8 @@ define([
|
|||
dropdownActive.find('li').attr('tabindex', '-1');
|
||||
dropdownActive.attr('tabindex', '-1');
|
||||
$(document).off('keydown');
|
||||
menuButton.attr('aria-expanded', 'false');
|
||||
menuButton.focus();
|
||||
$button.attr('aria-expanded', 'false');
|
||||
$button.focus();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue