Skip to content
This repository has been archived by the owner on Mar 23, 2020. It is now read-only.

Commit

Permalink
[showpassword] make passwork icon clickable to CHANGE state
Browse files Browse the repository at this point in the history
  • Loading branch information
xeroc committed Jul 16, 2016
1 parent 2a4ba5d commit d6c860d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
16 changes: 10 additions & 6 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,16 @@ $('input[name=name]').keyup(processKeyPress);
$('input[name=password]').keyup(processKeyPress);
$('input[name=passwordConfirm]').keyup(processKeyPress);

$(".glyphicon-eye-open").mousedown(function(){
$(this).prev().attr('type','text');
}).mouseup(function(){
$(this).prev().attr('type','password');
}).mouseout(function(){
$(this).prev().attr('type','password');
$(".showpwdicon").click(function(){
if ($(this).prev().attr('type') == "text") {
$(this).prev().attr('type','password');
$(this).addClass('glyphicon-eye-open')
$(this).removeClass('glyphicon-eye-close')
} else {
$(this).prev().attr('type','text');
$(this).addClass('glyphicon-eye-close')
$(this).removeClass('glyphicon-eye-open')
}
});

$("#printBtn").click(function() {
Expand Down
4 changes: 2 additions & 2 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ <h3 class="panel-title">Plaintext Password</h3>
<label><i class="fa fa-key"></i> Password</label>
<div class="password">
<input class="form-control" class="form-control" type=password name="password" />
<span class="glyphicon glyphicon-eye-open"></span>
<span class="glyphicon glyphicon-eye-open showpwdicon"></span>
</div>
</div>
<div class="form-group">
<label><i class="fa fa-key"></i> Confirm Password</label>
<div class="password">
<input class="form-control" class="form-control" type=password name="passwordConfirm" />
<span class="glyphicon glyphicon-eye-open"></span>
<span class="glyphicon glyphicon-eye-open showpwdicon"></span>
</div>
</div>
<div class="form-group hidden-print result">
Expand Down

0 comments on commit d6c860d

Please sign in to comment.