Convert CofeeScript to JavaScript

Compiled using `coffee -c` with CoffeeScript 1.12.6.
This commit is contained in:
Javi Martín
2019-07-03 00:11:16 +02:00
parent 2ff2100ebb
commit d93a029ce5
121 changed files with 2428 additions and 1924 deletions

View File

@@ -0,0 +1,34 @@
// Generated by CoffeeScript 1.12.6
(function() {
"use strict";
App.Managers = {
generatePassword: function() {
var chars, possible_chars;
possible_chars = "aAbcdeEfghiJkmnpqrstuUvwxyz23456789";
chars = Array.apply(null, {
length: 12
}).map(function() {
var i;
i = Math.floor(Math.random() * possible_chars.length);
return possible_chars.charAt(i);
});
return chars.join("");
},
togglePassword: function(type) {
return $("#user_password").prop("type", type);
},
initialize: function() {
$(".generate-random-value").on("click", function() {
return $("#user_password").val(App.Managers.generatePassword());
});
return $(".show-password").on("click", function() {
if ($("#user_password").is("input[type='password']")) {
return App.Managers.togglePassword("text");
} else {
return App.Managers.togglePassword("password");
}
});
}
};
}).call(this);