diff options
author | Morris Jobke <morris.jobke@gmail.com> | 2013-03-13 11:03:52 +0100 |
---|---|---|
committer | Morris Jobke <morris.jobke@gmail.com> | 2014-01-15 11:10:12 +0100 |
commit | 5c1a9f35f16a8a871bcef24a45478ac92af9a9e1 (patch) | |
tree | 040662a510f5466a0b9275fee9724e605e17f4ee /core/js | |
parent | 34559ef11428c9a2a1b83f8a63d650d1fa0be49e (diff) | |
download | nextcloud-server-5c1a9f35f16a8a871bcef24a45478ac92af9a9e1.tar.gz nextcloud-server-5c1a9f35f16a8a871bcef24a45478ac92af9a9e1.zip |
Indicate password strength using strengthify
* uses zxcvbn
* outsourced to separate jquery plugin
* async loading
* hide strength meter if input is empty
* feedback if user enters weakest password
* fade in and out
* show tipsy with strength
* Opera 12, IE8-10, FF 23, Chromium 29
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/setup.js | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/core/js/setup.js b/core/js/setup.js index 0863be35886..279b5fbebb9 100644 --- a/core/js/setup.js +++ b/core/js/setup.js @@ -7,9 +7,9 @@ $(document).ready(function() { oracle:!!$('#hasOracle').val(), mssql:!!$('#hasMSSQL').val() }; - + $('#selectDbType').buttonset(); - + if($('#hasSQLite').val()){ $('#use_other_db').hide(); $('#use_oracle_db').hide(); @@ -63,17 +63,27 @@ $(document).ready(function() { form.submit(); return false; }); - + // Expand latest db settings if page was reloaded on error var currentDbType = $('input[type="radio"]:checked').val(); - + if (currentDbType === undefined){ $('input[type="radio"]').first().click(); } - + if (currentDbType === 'sqlite' || (dbtypes.sqlite && currentDbType === undefined)){ $('#datadirContent').hide(250); $('#databaseField').hide(250); } - + + $('#adminpass').strengthify({ + zxcvbn: OC.linkTo('3rdparty','zxcvbn/js/zxcvbn.js'), + titles: [ + t('core', 'Very weak password'), + t('core', 'Weak password'), + t('core', 'So-so password'), + t('core', 'Good password'), + t('core', 'Strong password') + ] + }); }); |