mirror of
https://github.com/nextcloud/passman.git
synced 2025-01-31 03:38:25 +08:00
Improvements to password meter
This commit is contained in:
parent
c1a2e959ef
commit
b123ac850f
1 changed files with 4 additions and 3 deletions
|
@ -27,20 +27,21 @@
|
||||||
scope.toggleScore = function () {
|
scope.toggleScore = function () {
|
||||||
scope.scoreShown = !scope.scoreShown;
|
scope.scoreShown = !scope.scoreShown;
|
||||||
}
|
}
|
||||||
jQuery('.match-sequence').hide()
|
jQuery('.match-sequence').hide();
|
||||||
scope.toggleMatchBreakdown = function () {
|
scope.toggleMatchBreakdown = function () {
|
||||||
scope.matchBreakdown = true;
|
scope.matchBreakdown = true;
|
||||||
var width = ($window.innerWidth > 420) ? $window.innerWidth * 0.85 : $window.innerWidth * 0.8;
|
var width = ($window.innerWidth > 420) ? $window.innerWidth * 0.85 : $window.innerWidth * 0.8;
|
||||||
var ms_elem = jQuery('.match-sequence');
|
var ms_elem = jQuery('.match-sequence:eq(0)');
|
||||||
ms_elem.dialog({
|
ms_elem.dialog({
|
||||||
title: 'Password breakdown',
|
title: 'Password breakdown',
|
||||||
width: width,
|
width: width,
|
||||||
open: function () {
|
open: function () {
|
||||||
var _totalWidth = 0;
|
var _totalWidth = 0;
|
||||||
ms_elem.find('.sequence').each(function (key, el) {
|
ms_elem.find('.sequence').each(function (key, el) {
|
||||||
_totalWidth += jQuery(el).width()+20;
|
_totalWidth += jQuery(el).width() + 20;
|
||||||
});
|
});
|
||||||
if (_totalWidth < $window.innerWidth * 0.85) {
|
if (_totalWidth < $window.innerWidth * 0.85) {
|
||||||
|
ms_elem.width(_totalWidth);
|
||||||
ms_elem.dialog("option", "width", _totalWidth);
|
ms_elem.dialog("option", "width", _totalWidth);
|
||||||
jQuery('.ui-dialog').position({
|
jQuery('.ui-dialog').position({
|
||||||
my: "center",
|
my: "center",
|
||||||
|
|
Loading…
Reference in a new issue