Skip to content

Commit 22a4956

Browse files
committed
Updated to API v1.2.0
1 parent a1fc8fb commit 22a4956

File tree

15 files changed

+60
-135
lines changed

15 files changed

+60
-135
lines changed

index.html

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<!-- Start page for the Datalogic Java SDK samples -->
2-
32
<!DOCTYPE html>
4-
<html>
5-
3+
<html lang="en">
64
<head>
75
<title>Javascript SDK Sample Apps</title>
86
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -11,7 +9,6 @@
119
<link rel="stylesheet" type="text/css" href="samples/styles/index.css">
1210
<link rel="stylesheet" type="text/css" href="samples/styles/styles.css">
1311
</head>
14-
1512
<body>
1613
<header>
1714
<img class="logo" src="samples/res/logo.jpg" alt="Datalogic">
@@ -44,7 +41,6 @@ <h3>Barcode Functions</h3>
4441
<img class="card-icon" src="samples/res/keyboard.svg" alt="Avatar">
4542
<a class="test-page-link" href="samples/keyboard.html">Keyboard Configuration</a>
4643
</div>
47-
4844
</div>
4945

5046
<h3>Peripherals</h3>
@@ -97,5 +93,4 @@ <h3>Cradle Functions</h3>
9793
</div>
9894
</div>
9995
</body>
100-
101-
</html>
96+
</html>

lib/dl_barcode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class DLBcdMgr {
9191

9292
/**
9393
* Set the values of multiple properties.
94-
* @param {Array<number>} ids List of PropertyIDs.
94+
* @param {Array<number>} ids List of {@link BcdPropIds}.
9595
* @param {Array<any>} values List of values to set properties to.
9696
* @returns {boolean} True if all properties are set.
9797
*/

lib/dl_keyboard.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Interface for keyboard functions.
22

3-
const DL_KEYBOARD_MGR_VER = 4;
3+
const DL_KEYBOARD_MGR_VER = 5;
44

55
class DLKbdMgr {
66
/**
@@ -17,18 +17,18 @@ class DLKbdMgr {
1717
}
1818

1919
/**
20-
* Enable/disable all triggers on the device.
21-
* @param {boolean} enable Enable/disable all triggers.
22-
* @returns {boolean} True if all triggers on the device have been successfully enabled/disabled.
20+
* Enable/disable all physical triggers on the device.
21+
* @param {boolean} enable Enable/disable all physical triggers.
22+
* @returns {boolean} True if all physical triggers on the device have been successfully enabled/disabled.
2323
*/
2424
enableTriggers(enable) {
2525
return this.getDLKeyboardMgr().enableTriggers(enable);
2626
}
2727

2828
/**
29-
* Show/hide the software keyboard on the device.
30-
* @param {boolean} show True to show, false to hide the keyboard.
31-
* @returns {boolean} True if the keyboard operation request was accepted.
29+
* Show/Hide the soft keyboard.
30+
* @param {boolean} show Set to true to show, false to hide the keyboard.
31+
* @returns {boolean} True if the keyboard operation was accepted.
3232
*/
3333
showSoftKeyboard(show) {
3434
return this.getDLKeyboardMgr().showSoftKeyboard(show);

samples/barcode.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<!-- Demonstrates the usage of barcode scanning APIs -->
2-
32
<!DOCTYPE html>
4-
<html>
5-
3+
<html lang="en">
64
<head>
75
<title>Barcode Scanning</title>
86
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -13,7 +11,6 @@
1311
<script type="text/javascript" charset="utf-8" src="../lib/dl_barcode.js"></script>
1412
<script type="text/javascript" charset="utf-8" src="../lib/dl_keyboard.js"></script>
1513
</head>
16-
1714
<body>
1815
<!-- Header and page title -->
1916
<center>
@@ -47,5 +44,4 @@ <h3>Data:</h3>
4744
<div id="data">&nbsp</div>
4845
</div>
4946
</body>
50-
5147
</html>

samples/camera.html

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
11
<!-- Demonstrates the use of the camera -->
2-
32
<!DOCTYPE html>
4-
<html>
5-
3+
<html lang="en">
64
<head>
75
<title>Camera</title>
86
<link rel="icon" type="image/x-icon" href="res/favicon.ico">
97
<link rel="stylesheet" type="text/css" href="styles/styles.css">
108
<link rel="stylesheet" type="text/css" href="styles/camera.css">
119
<script type="text/javascript" charset="utf-8" src="scripts/camera.js"></script>
1210
</head>
13-
1411
<body>
15-
1612
<!-- Camera -->
1713
<main id="camera">
18-
1914
<!-- Camera sensor -->
2015
<canvas id="camera--sensor"></canvas>
2116

@@ -27,8 +22,6 @@
2722

2823
<!-- Camera trigger -->
2924
<button id="camera--trigger" class="blue-footer-button">Take a picture</button>
30-
3125
</main>
3226
</body>
33-
3427
</html>

samples/config.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<!-- Demonstrates the usage of property configuration APIs -->
2-
32
<!DOCTYPE html>
4-
<html>
5-
3+
<html lang="en">
64
<head>
75
<title>Scanning Configuration</title>
86
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -13,7 +11,6 @@
1311
<script src="../lib/dl_barcode.js"></script>
1412
<script src="../lib/dl_keyboard.js"></script>
1513
</head>
16-
1714
<body>
1815
<!-- Header and page title-->
1916
<center>
@@ -91,5 +88,4 @@ <h3>Status:</h3>
9188
</table>
9289
</center>
9390
</body>
94-
9591
</html>

samples/keyboard.html

Lines changed: 30 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<!-- Demonstrates the usage of single property configuration APIs -->
2-
32
<!DOCTYPE html>
4-
<html>
5-
3+
<html lang="en">
64
<head>
75
<title>Keyboard Configuration</title>
86
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -13,49 +11,35 @@
1311
<script type="text/javascript" charset="utf-8" src="../lib/dl_keyboard.js"></script>
1412
<script type="text/javascript" charset="utf-8" src="../lib/dl_barcode.js"></script>
1513
</head>
16-
1714
<body>
18-
<!-- Header and page title -->
19-
<center>
20-
<div class="banner">Visit datalogic.github.io/javascript/overview/ for full SDK documentation</div>
21-
<h2>Keyboard Configuration</h2>
22-
</center>
23-
<hr>
24-
25-
<!-- Software Keyboard Header -->
26-
<center>
27-
<h3>Software Keyboard Configuration</h3>
28-
</center>
29-
30-
<center>
31-
<div id="softkb_label">Soft keyboard test input:</div>
32-
<input id="softkb_input" class="keyboard-input-box" type="text" autocomplete="off"><br><br>
33-
<button id="softkb_show" class="keyboard-test-button" type="button">Show Keyboard</button>
34-
<button id="softkb_hide" class="keyboard-test-button" type="button">Hide Keyboard</button><br>
35-
<div id="softkb_status">Ready.</div>
36-
</center>
37-
<hr>
38-
39-
<!-- Trigger Header -->
40-
<center>
41-
<h3>Trigger Configuration</h3>
42-
</center>
43-
44-
<!-- Input controls -->
45-
<center>
46-
<div id="enabled_label">Triggers enabled here:</div>
47-
<input id="enabled" class="keyboard-input-box" type="text">
48-
<div id="disabled_label">Triggers disabled here:</div>
49-
<input id="disabled" class="keyboard-input-box" type="text">
50-
</center>
51-
<br><br>
52-
53-
<!-- Status -->
54-
<div>
55-
<h3>Status:</h3>
56-
<div id="status">Initialized.</div>
57-
</div>
58-
<hr>
15+
<!-- Header and page title -->
16+
<center>
17+
<div class="banner">Visit datalogic.github.io/javascript/overview/ for full SDK documentation</div>
18+
<h2>Keyboard Configuration</h2>
19+
</center>
20+
21+
<!-- Software keyboard config -->
22+
<br><hr>
23+
<center>
24+
<h3>Soft Keyboard Configuration</h3>
25+
<div id="softkb_label">Soft keyboard test input:</div>
26+
<input id="softkb_input" class="keyboard-input-box" type="text" autocomplete="off"><br><br>
27+
<button id="softkb_show" class="keyboard-test-button" type="button">Show Keyboard</button>
28+
<button id="softkb_hide" class="keyboard-test-button" type="button">Hide Keyboard</button><br><br>
29+
<h3>Status:</h3>
30+
<div id="softkb_status">Ready.</div>
31+
</center>
32+
33+
<!-- Trigger config -->
34+
<br><hr>
35+
<center>
36+
<h3>Trigger Configuration</h3>
37+
<div id="enabled_label">Triggers enabled here:</div>
38+
<input id="enabled" class="keyboard-input-box" type="text">
39+
<div id="disabled_label">Triggers disabled here:</div>
40+
<input id="disabled" class="keyboard-input-box" type="text"><br><br>
41+
<h3>Trigger status:</h3>
42+
<div id="trig_status">Initialized.</div>
43+
</center>
5944
</body>
60-
6145
</html>

samples/led.html

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<!-- Demonstrates the usage of cradle APIs -->
2-
32
<!DOCTYPE html>
4-
<html>
5-
3+
<html lang="en">
64
<head>
75
<title>Cradle LEDs</title>
86
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -12,20 +10,13 @@
1210
<script type="text/javascript" charset="utf-8" src="scripts/led.js"></script>
1311
<script type="text/javascript" charset="utf-8" src="../lib/dl_cradle.js"></script>
1412
</head>
15-
1613
<body>
1714
<!-- Header and page title -->
1815
<center>
1916
<div class="banner">Visit datalogic.github.io/javascript/overview/ for full SDK documentation</div>
2017
<h2>Cradle LEDs</h2>
2118
</center>
2219

23-
<!-- Action buttons -->
24-
<center>
25-
</center>
26-
27-
28-
2920
<!-- Buttons -->
3021
<center>
3122
<table>
@@ -47,7 +38,6 @@ <h2>Cradle LEDs</h2>
4738
</tr>
4839
</table>
4940
<button class="action-button" id="toggle">Toggle</button>
50-
5141
</center>
5242

5343
<!-- Status -->
@@ -58,5 +48,4 @@ <h3>Status:</h3>
5848
</div>
5949
<hr>
6050
</body>
61-
6251
</html>

samples/listeners.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<!-- Demonstrates the usage of cradle APIs -->
2-
32
<!DOCTYPE html>
4-
<html>
5-
3+
<html lang="en">
64
<head>
75
<title>Cradle Listeners</title>
86
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -12,7 +10,6 @@
1210
<script type="text/javascript" charset="utf-8" src="scripts/listeners.js"></script>
1311
<script type="text/javascript" charset="utf-8" src="../lib/dl_cradle.js"></script>
1412
</head>
15-
1613
<body>
1714
<!-- Header and page title -->
1815
<center>
@@ -44,5 +41,4 @@ <h3>Callback:</h3>
4441
<div id="callback">&nbsp</div>
4542
</div>
4643
</body>
47-
4844
</html>

samples/location.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<!-- Demonstrates requesting location information-->
2-
32
<!DOCTYPE html>
4-
<html>
5-
3+
<html lang="en">
64
<head>
75
<title>Location</title>
86
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -12,7 +10,6 @@
1210
<link rel="stylesheet" type="text/css" href="styles/location.css">
1311
<script src="scripts/location.js"></script>
1412
</head>
15-
1613
<body>
1714
<!-- Header and page title -->
1815
<center>
@@ -30,5 +27,4 @@ <h3 id="longitude">Longitude: </h3>
3027
<button id="find-me" class="blue-footer-button">Show my location</button><br/>
3128

3229
</body>
33-
3430
</html>

0 commit comments

Comments
 (0)