Browse Source

Use openNotification instead of alert (main.js)

Marien Fressinaud 11 years ago
parent
commit
c0d0279b03
1 changed files with 4 additions and 4 deletions
  1. 4 4
      p/scripts/main.js

+ 4 - 4
p/scripts/main.js

@@ -1012,7 +1012,7 @@ function init_crypto_form() {
 			async: false
 			async: false
 		}).done(function (data) {
 		}).done(function (data) {
 			if (data.salt1 == '' || data.nonce == '') {
 			if (data.salt1 == '' || data.nonce == '') {
-				alert('Invalid user!');
+				openNotification('Invalid user!', 'bad');
 			} else {
 			} else {
 				try {
 				try {
 					var strong = window.Uint32Array && window.crypto && (typeof window.crypto.getRandomValues === 'function'),
 					var strong = window.Uint32Array && window.crypto && (typeof window.crypto.getRandomValues === 'function'),
@@ -1020,16 +1020,16 @@ function init_crypto_form() {
 						c = dcodeIO.bcrypt.hashSync(data.nonce + s, strong ? 4 : poormanSalt());
 						c = dcodeIO.bcrypt.hashSync(data.nonce + s, strong ? 4 : poormanSalt());
 					$('#challenge').val(c);
 					$('#challenge').val(c);
 					if (s == '' || c == '') {
 					if (s == '' || c == '') {
-						alert('Crypto error!');
+						openNotification('Crypto error!', 'bad');
 					} else {
 					} else {
 						success = true;
 						success = true;
 					}
 					}
 				} catch (e) {
 				} catch (e) {
-					alert('Crypto exception! ' + e);
+					openNotification('Crypto exception! ' + e, 'bad');
 				}
 				}
 			}
 			}
 		}).fail(function() {
 		}).fail(function() {
-			alert('Communication error!');
+			openNotification('Communication error!', 'bad');
 		});
 		});
 
 
 		$submit_button.removeAttr('disabled');
 		$submit_button.removeAttr('disabled');