Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
4e51d64c
Commit
4e51d64c
authored
Apr 02, 2020
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_document_scanner: unify video and cropper rendering
parent
2febf23a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
20 deletions
+23
-20
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/scanner_gadget_document_scanner_css.css
...m/web_page_module/scanner_gadget_document_scanner_css.css
+1
-1
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/scanner_gadget_document_scanner_css.xml
...m/web_page_module/scanner_gadget_document_scanner_css.xml
+2
-2
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/scanner_gadget_document_scanner_js.js
...tem/web_page_module/scanner_gadget_document_scanner_js.js
+16
-14
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/scanner_gadget_document_scanner_js.xml
...em/web_page_module/scanner_gadget_document_scanner_js.xml
+2
-2
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/documentscannercss.less.txt
...l_skins/erp5_document_scanner/documentscannercss.less.txt
+2
-1
No files found.
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/scanner_gadget_document_scanner_css.css
View file @
4e51d64c
...
...
@@ -20,7 +20,7 @@ div[data-gadget-url$="gadget_document_scanner.html"] .canvas {
text-align
:
center
;
}
div
[
data-gadget-url
$
=
"gadget_document_scanner.html"
]
.camera-input
{
min-height
:
360px
;
background-color
:
rgba
(
0
,
0
,
0
,
0.5
)
;
}
div
[
data-gadget-url
$
=
"gadget_document_scanner.html"
]
.page-number
{
display
:
inline
;
...
...
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/scanner_gadget_document_scanner_css.xml
View file @
4e51d64c
...
...
@@ -244,7 +244,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
982.6
1113.55569.43315
</string>
</value>
<value>
<string>
982.6
0162.8290.29303
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>
158581
6780.79
</float>
<float>
158581
5950.8
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/scanner_gadget_document_scanner_js.js
View file @
4e51d64c
...
...
@@ -191,10 +191,9 @@
guides
:
true
,
center
:
true
,
background
:
false
,
minContainerWidth
:
1
,
minContainerHeight
:
1
,
responsive
:
true
,
restore
:
true
,
minContainerWidth
:
0
,
minContainerHeight
:
0
,
responsive
:
false
,
// Avoid any cropper calculation or guessing
scalable
:
false
,
rotatable
:
false
,
...
...
@@ -430,11 +429,14 @@
text
:
result_list
[
1
][
0
]
}));
button_list
.
push
(
domsugar
(
'
button
'
,
{
type
:
'
button
'
,
'
class
'
:
'
auto-crop-btn ui-icon-fast-forward ui-btn-icon-left
'
,
text
:
result_list
[
1
][
3
]
}));
if
(
gadget
.
state
.
is_cropper_size_confirmed
)
{
button_list
.
push
(
domsugar
(
'
button
'
,
{
type
:
'
button
'
,
'
class
'
:
'
auto-crop-btn ui-icon-fast-forward ui-btn-icon-left
'
,
text
:
result_list
[
1
][
3
]
})
);
}
div
=
domsugar
(
'
div
'
,
{
'
class
'
:
'
camera
'
},
[
domsugar
(
'
div
'
,
{
'
class
'
:
'
camera-header
'
},
[
...
...
@@ -720,9 +722,7 @@
domsugar
(
'
label
'
,
{
'
class
'
:
'
page-number
'
,
text
:
gadget
.
state
.
page
+
1
})
])
]),
domsugar
(
'
div
'
,
{
'
class
'
:
'
img-container
'
},
[
domsugar
(
'
img
'
,
{
src
:
gadget
.
state
[
'
blob_url_
'
+
gadget
.
state
.
page
]})
]),
domsugar
(
'
img
'
,
{
src
:
gadget
.
state
[
'
blob_url_
'
+
gadget
.
state
.
page
]}),
// XXX TODO: why is the button rendering different from the other pages?
domsugar
(
'
div
'
,
{
'
class
'
:
'
edit-picture
'
},
button_list
),
result_list
[
1
]
...
...
@@ -742,7 +742,8 @@
preferred_cropped_canvas_data
:
gadget
.
cropper
.
getData
(),
display_step
:
'
display_video
'
,
page
:
gadget
.
state
.
page
+
1
,
page_count
:
gadget
.
state
.
page_count
+
1
page_count
:
gadget
.
state
.
page_count
+
1
,
is_cropper_size_confirmed
:
true
};
// Keep image date, as user may need to display it again
state_dict
[
'
blob_canvas_
'
+
gadget
.
state
.
page_count
]
=
canvas
;
...
...
@@ -788,7 +789,8 @@
display_step
:
'
display_video
'
,
page
:
1
,
page_count
:
0
,
camera_list
:
[]
camera_list
:
[],
is_cropper_size_confirmed
:
false
})
.
declareMethod
(
'
render
'
,
function
(
options
)
{
// This method is called during the ERP5 form rendering
...
...
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/scanner_gadget_document_scanner_js.xml
View file @
4e51d64c
...
...
@@ -244,7 +244,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
982.61
614.28913.46660
</string>
</value>
<value>
<string>
982.61
109.60561.44919
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>
15858
46471.58
</float>
<float>
15858
15745.95
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/documentscannercss.less.txt
View file @
4e51d64c
...
...
@@ -19,7 +19,8 @@ div[data-gadget-url$="gadget_document_scanner.html"] {
}
.camera-input {
min-height: 360px;
// Mimic cropper background
background-color: rgba(0, 0, 0, 0.5);
}
.page-number {
...
...
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