Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
third-party
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cooperatic-foodcoops
third-party
Commits
ce00307d
Commit
ce00307d
authored
Oct 10, 2022
by
Félicie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first commit
parent
71e4b8bb
Pipeline
#2424
passed with stage
in 1 minute 23 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
47 deletions
+1
-47
shelf_inventory.js
shelfs/static/js/shelf_inventory.js
+0
-46
shelf_inventory.html
templates/shelfs/shelf_inventory.html
+1
-1
No files found.
shelfs/static/js/shelf_inventory.js
View file @
ce00307d
...
...
@@ -1230,52 +1230,6 @@ function init() {
$
(
this
).
off
(
'wheel.disableScroll'
);
});
// client-side validation of numeric inputs, optionally replacing separator sign(s).
$
(
"input.number"
).
on
(
"keydown"
,
function
(
e
)
{
// allow function keys and decimal separators
if
(
// backspace, delete, tab, escape, enter, comma and .
$
.
inArray
(
e
.
keyCode
,
[
46
,
8
,
9
,
27
,
13
,
110
,
188
,
190
])
!==
-
1
||
// Ctrl/cmd+A, Ctrl/cmd+C, Ctrl/cmd+X
(
$
.
inArray
(
e
.
keyCode
,
[
65
,
67
,
88
])
!==
-
1
&&
(
e
.
ctrlKey
===
true
||
e
.
metaKey
===
true
))
||
// home, end, left, right
(
e
.
keyCode
>=
35
&&
e
.
keyCode
<=
39
))
{
/*
// optional: replace commas with dots in real-time (for en-US locals)
if (e.keyCode === 188) {
e.preventDefault();
$(this).val($(this).val() + ".");
}
// optional: replace decimal points (num pad) and dots with commas in real-time (for EU locals)
if (e.keyCode === 110 || e.keyCode === 190) {
e.preventDefault();
$(this).val($(this).val() + ",");
}
*/
return
;
}
// block any non-number
if
((
e
.
shiftKey
||
(
e
.
keyCode
<
48
||
e
.
keyCode
>
57
))
&&
(
e
.
keyCode
<
96
||
e
.
keyCode
>
105
))
{
e
.
preventDefault
();
}
});
// Manual and textual input
$
(
'#search_input'
).
keypress
(
function
(
e
)
{
if
(
e
.
which
>=
48
&&
e
.
which
<=
57
)
{
// figures [0-9]
...
...
templates/shelfs/shelf_inventory.html
View file @
ce00307d
...
...
@@ -59,7 +59,7 @@
</div>
<div
class=
"col-3 center"
>
<label
for=
"edition_input"
id=
"edition_input_label"
>
Qté :
</label>
<input
type=
"
text"
class=
"number
input_small"
id=
"edition_input"
autocomplete=
"off"
required
>
<input
type=
"
number"
class=
"
input_small"
id=
"edition_input"
autocomplete=
"off"
required
>
<span
id=
"product_uom"
></span>
<i
class=
"fa fa-undo"
id=
"reset_to_previous_qty"
style=
"display:none;"
></i>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment