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
453c21a0
Commit
453c21a0
authored
Jun 24, 2022
by
Damien Moulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix loading on shelf admin add products
parent
9e0f8ad0
Pipeline
#2269
passed with stage
in 1 minute 25 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
shelfs_admin.js
shelfs/static/js/shelfs_admin.js
+6
-3
No files found.
shelfs/static/js/shelfs_admin.js
View file @
453c21a0
...
...
@@ -15,7 +15,6 @@ var main_content = $('#main-content'),
destroy_shelf_msg
=
$
(
'#destroy-shelf-msg'
),
adding_pdts_tpl
=
$
(
'#adding-products'
).
clone
()
.
removeAttr
(
'id'
),
add_products
=
$
(
'.add-products'
),
active_phase
=
'main'
,
add_to_shelf_product_ids
=
[],
barcodes
=
null
;
...
...
@@ -452,7 +451,8 @@ var recordProductsAddedShelf = function() {
});
if
(
is_time_to
(
'add_pdts_to_shelf'
,
5000
))
{
// prevent double click or browser hic up bug
main_content
.
find
(
'.add-products'
).
html
(
loading_img
);
openModal
();
// loading on
post_form
(
'/shelfs/admin/add_products'
,
{
bc
:
JSON
.
stringify
(
barcodes
),
shelf_id
:
id
},
...
...
@@ -468,6 +468,8 @@ var recordProductsAddedShelf = function() {
msg
+=
"
\
n"
+
bc
;
});
}
closeModal
();
alert
(
msg
);
backToMain
();
}
else
{
...
...
@@ -476,7 +478,8 @@ var recordProductsAddedShelf = function() {
else
if
(
typeof
rData
.
res
.
msg
!=
"undefined"
)
msg
=
rData
.
res
.
msg
;
alert
(
msg
);
main_content
.
find
(
'.add-products'
).
html
(
add_products
);
main_content
.
find
(
'.add-products'
).
show
();
closeModal
();
}
}
...
...
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