pas de double readme. Page de démo en HTML 5
This commit is contained in:
parent
a23447608b
commit
e2c9c6c6bc
1 changed files with 51 additions and 58 deletions
|
@ -1,65 +1,58 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<!DOCTYPE html>
|
||||||
[(#REM) Cf.: http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
|
<html dir="#LANG_DIR" lang="#LANG" class="[(#LANG_DIR)][ (#LANG)] no-js">
|
||||||
]<!--[if lt IE 7 ]> <html dir="#LANG_DIR" lang="#LANG" xmlns="http://www.w3.org/1999/xhtml" xml:lang="#LANG" class="[(#LANG_DIR)][ (#LANG)] no-js ie ie6"> <![endif]-->
|
<head>
|
||||||
<!--[if IE 7 ]> <html dir="#LANG_DIR" lang="#LANG" xmlns="http://www.w3.org/1999/xhtml" xml:lang="#LANG" class="[(#LANG_DIR)][ (#LANG)] no-js ie ie7"> <![endif]-->
|
[(#REM) Page de démo accessible sous /?page=demo/libphonenumber_demo ]
|
||||||
<!--[if IE 8 ]> <html dir="#LANG_DIR" lang="#LANG" xmlns="http://www.w3.org/1999/xhtml" xml:lang="#LANG" class="[(#LANG_DIR)][ (#LANG)] no-js ie ie8"> <![endif]-->
|
<script src="[(#CHEMIN{js/html5-qrcode.min.js}|timestamp)]" type="text/javascript"></script>
|
||||||
<!--[if IE 9 ]> <html dir="#LANG_DIR" lang="#LANG" xmlns="http://www.w3.org/1999/xhtml" xml:lang="#LANG" class="[(#LANG_DIR)][ (#LANG)] no-js ie ie9"> <![endif]-->
|
<script type='text/javascript'>/*<![CDATA[*/(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement);/*]]>*/</script>
|
||||||
<!--[if (gt IE 9)|!(IE)]><!--> <html dir="#LANG_DIR" lang="#LANG" xmlns="http://www.w3.org/1999/xhtml" xml:lang="#LANG" class="[(#LANG_DIR)][ (#LANG)] no-js"> <!--<![endif]-->
|
<title>[(#NOM_SITE_SPIP|textebrut)][ - (#SLOGAN_SITE_SPIP|textebrut)]</title>
|
||||||
<head>
|
[<meta name="description" content="(#DESCRIPTIF_SITE_SPIP|couper{150}|attribut_html)" />]
|
||||||
[(#REM) Page de démo accessible sous /?page=demo/libphonenumber_demo ]
|
<INCLURE{fond=inclure/head} />
|
||||||
<script src="[(#CHEMIN{js/html5-qrcode.min.js}|timestamp)]" type="text/javascript"></script>
|
|
||||||
<script type='text/javascript'>/*<![CDATA[*/(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement);/*]]>*/</script>
|
|
||||||
<title>[(#NOM_SITE_SPIP|textebrut)][ - (#SLOGAN_SITE_SPIP|textebrut)]</title>
|
|
||||||
[<meta name="description" content="(#DESCRIPTIF_SITE_SPIP|couper{150}|attribut_html)" />]
|
|
||||||
<INCLURE{fond=inclure/head} />
|
|
||||||
<style type="text/css">
|
|
||||||
.page{text-align:center; margin-top:10em}
|
|
||||||
.libphonenumber{margin:0 auto; width:800px; text-align:left;}
|
|
||||||
.reponse_formulaire_erreur{color:red}
|
|
||||||
.editer_force_telephone{display:none}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
|
<style type="text/css">
|
||||||
|
.page{text-align:center; margin-top:10em}
|
||||||
|
.libphonenumber{margin:0 auto; width:800px; text-align:left;}
|
||||||
|
.reponse_formulaire_erreur{color:red}
|
||||||
|
.editer_force_telephone{display:none}
|
||||||
|
</style>
|
||||||
|
|
||||||
</head>
|
<script>
|
||||||
|
jQuery(function() {
|
||||||
|
console.log("coucou");
|
||||||
|
|
||||||
<body>
|
function onScanSuccess(decodedText, decodedResult) {
|
||||||
<div class="page" style="background-color:white; color:black;">
|
// handle the scanned code as you like, for example:
|
||||||
<div class="inner">
|
console.log(`Code matched = ${decodedText}`, decodedResult);
|
||||||
<h1>Lecteur de qrcode</h1>
|
$('#resultat').fadeIn().val(decodedText);
|
||||||
|
$('#reader').fadeOut();
|
||||||
|
}
|
||||||
|
|
||||||
<div id="reader" width="600px"></div>
|
function onScanFailure(error) {
|
||||||
<textarea name="" id="resultat" style="display:none; width: 100%"></textarea>
|
// handle scan failure, usually better to ignore and keep scanning.
|
||||||
<br>
|
// for example:
|
||||||
<br>
|
console.warn(`Code scan error = ${error}`);
|
||||||
<br>
|
}
|
||||||
<br>
|
|
||||||
|
|
||||||
|
let html5QrcodeScanner = new Html5QrcodeScanner(
|
||||||
|
"reader",
|
||||||
|
{ fps: 10, qrbox: {width: 400, height: 400}},
|
||||||
|
/* verbose= */ false);
|
||||||
|
|
||||||
|
html5QrcodeScanner.render(onScanSuccess, onScanFailure);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="page" style="background-color:white; color:black;">
|
||||||
|
<div class="inner">
|
||||||
|
<h1>Lecteur de qrcode</h1>
|
||||||
|
|
||||||
|
<div id="reader" width="600px"></div>
|
||||||
|
<textarea name="" id="resultat" style="display:none; width: 100%"></textarea>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div><!--.page-->
|
</body>
|
||||||
</body>
|
|
||||||
<script>
|
|
||||||
jQuery(function() {
|
|
||||||
console.log("coucou");
|
|
||||||
|
|
||||||
function onScanSuccess(decodedText, decodedResult) {
|
|
||||||
// handle the scanned code as you like, for example:
|
|
||||||
console.log(`Code matched = ${decodedText}`, decodedResult);
|
|
||||||
$('#resultat').fadeIn().val(decodedText);
|
|
||||||
$('#reader').fadeOut();
|
|
||||||
}
|
|
||||||
|
|
||||||
function onScanFailure(error) {
|
|
||||||
// handle scan failure, usually better to ignore and keep scanning.
|
|
||||||
// for example:
|
|
||||||
console.warn(`Code scan error = ${error}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
let html5QrcodeScanner = new Html5QrcodeScanner(
|
|
||||||
"reader",
|
|
||||||
{ fps: 10, qrbox: {width: 400, height: 400}},
|
|
||||||
/* verbose= */ false);
|
|
||||||
|
|
||||||
html5QrcodeScanner.render(onScanSuccess, onScanFailure);
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Add table
Reference in a new issue