Skip to content

Commit

Permalink
Merge pull request mozilla-b2g#8485 from leob2g/Bug_834205_SIM_PIN_Di…
Browse files Browse the repository at this point in the history
…alog_Done

Bug 834205-Enable OK btn of SIM PIN Diaglog when backlight on/off
  • Loading branch information
jhford committed May 28, 2013
2 parents fceede1 + 1b03e76 commit 710ea32
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions apps/system/js/simcard_dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,20 @@ var SimPinDialog = {
valueEntered += String.fromCharCode(code);
}
displayField.value = encryption(valueEntered);
checkDialogDone();
});

inputField.addEventListener('focus', function() {
checkDialogDone();
});

function checkDialogDone() {
if (displayField.value.length >= 4)
self.dialogDone.disabled = false;
else
self.dialogDone.disabled = true;
});

}
function encryption(str) {
return (new Array(str.length + 1)).join('*');
}
Expand Down Expand Up @@ -318,7 +326,6 @@ var SimPinDialog = {
UtilityTray.hide(true);

this.systemDialog.show();
this.dialogDone.disabled = true;
this.action = action;
this.lockType = 'pin';
switch (action) {
Expand Down

0 comments on commit 710ea32

Please sign in to comment.