[FogBugz #321] Pouvoir saisir le code PIN au clavier #384

Open
opened 2023-07-04 07:27:21 +02:00 by fbenoist68 · 5 comments

Assigned To: CLOSED
Project: Mobile Portal
Area: Divers
Category: Fonctionnalité
Priority: A fixer impérativement

Assigned To: CLOSED Project: Mobile Portal Area: Divers Category: Fonctionnalité Priority: A fixer impérativement
Poster
Owner

Event ID: 1423
Date: 2014-07-11T16:00:18Z
Person: Frederik Benoist
Description: Fermé par Frederik Benoist

Event ID: 1423 Date: 2014-07-11T16:00:18Z Person: Frederik Benoist Description: Fermé par Frederik Benoist
Poster
Owner

Event ID: 1422
Date: 2014-07-11T16:00:17Z
Person: Frederik Benoist
Description: Résolu (Implémenté) and assigned to Frederik Benoist by Frederik Benoist

Event ID: 1422 Date: 2014-07-11T16:00:17Z Person: Frederik Benoist Description: Résolu (Implémenté) and assigned to Frederik Benoist by Frederik Benoist
Poster
Owner

Event ID: 1421
Date: 2014-07-11T16:00:11Z
Person: Frederik Benoist
Description: Modifié par Frederik Benoist

En fait non ... car souci de sécurité.

 

    $('#mdl_pin').keydown(function(e) {
        var keycode = (event.keyCode ? event.keyCode : event.which);
        //KeyCode for digits 0-9 is 96 to 105 on the numeric pad.
        //KeyCode for digits 0-9 is 48 to 57 on the regular digit keys on a qwerty keyboard.
        //keyCode 8 is for backspace
        //keyCode 47 is for /
 
        if ((keycode >= 48 && keycode <= 57) || (keycode >= 96 && keycode <= 105)) {
            doKeyPIN(String.fromCharCode((96 <= keycode && keycode <= 105) ? keycode - 48 : keycode));
            return true;
        } else if ((event.which === 8) || (event.which === 47)) {
            doKeyPIN('X');
            return false;
        } else
            return false;
    });
 
 
Je laisse backspace et slash quand même.
Event ID: 1421 Date: 2014-07-11T16:00:11Z Person: Frederik Benoist Description: Modifié par Frederik Benoist <p> En fait non ... car souci de s&eacute;curit&eacute;.</p> <p> &nbsp;</p> <div> &nbsp; &nbsp; $(&#39;#mdl_pin&#39;).keydown(function(e) {</div> <div> &nbsp; &nbsp; &nbsp; &nbsp; var keycode = (event.keyCode ? event.keyCode : event.which);</div> <div> &nbsp; &nbsp; &nbsp; &nbsp; //KeyCode for digits 0-9 is 96 to 105 on the numeric pad.</div> <div> &nbsp; &nbsp; &nbsp; &nbsp; //KeyCode for digits 0-9 is 48 to 57 on the regular digit keys on a qwerty keyboard.</div> <div> &nbsp; &nbsp; &nbsp; &nbsp; //keyCode 8 is for backspace</div> <div> &nbsp; &nbsp; &nbsp; &nbsp; //keyCode 47 is for /</div> <div> &nbsp;</div> <div> &nbsp; &nbsp; &nbsp; &nbsp; if ((keycode &gt;= 48 &amp;&amp; keycode &lt;= 57) || (keycode &gt;= 96 &amp;&amp; keycode &lt;= 105)) {</div> <div> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; doKeyPIN(String.fromCharCode((96 &lt;= keycode &amp;&amp; keycode &lt;= 105) ? keycode - 48 : keycode));</div> <div> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return true;</div> <div> &nbsp; &nbsp; &nbsp; &nbsp; } else if ((event.which === 8) || (event.which === 47)) {</div> <div> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; doKeyPIN(&#39;X&#39;);</div> <div> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return false;</div> <div> &nbsp; &nbsp; &nbsp; &nbsp; } else</div> <div> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return false;</div> <div> &nbsp; &nbsp; });</div> <div> &nbsp;</div> <div> &nbsp;</div> <div> Je laisse backspace et slash quand m&ecirc;me.</div>
Poster
Owner

Event ID: 1416
Date: 2014-07-10T07:32:09Z
Person: Frederik Benoist
Description: Attribué à Frederik Benoist par Frederik Benoist

Event ID: 1416 Date: 2014-07-10T07:32:09Z Person: Frederik Benoist Description: Attribué à Frederik Benoist par Frederik Benoist
Poster
Owner

Event ID: 1415
Date: 2014-07-10T07:32:08Z
Person: Frederik Benoist
Description: Ouvert par Frederik Benoist

Event ID: 1415 Date: 2014-07-10T07:32:08Z Person: Frederik Benoist Description: Ouvert par Frederik Benoist
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: fbenoist68/mobileportal#384
There is no content yet.