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
138
Merge Requests
138
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
217c1139
Commit
217c1139
authored
Feb 13, 2020
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_document_scanner: Improve code to display a better Cropper area
parent
565eff02
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
7 deletions
+18
-7
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/rjs_gadget_document_scanner_css.css
...eItem/web_page_module/rjs_gadget_document_scanner_css.css
+11
-1
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/rjs_gadget_document_scanner_css.xml
...eItem/web_page_module/rjs_gadget_document_scanner_css.xml
+2
-2
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/rjs_gadget_document_scanner_js.js
...ateItem/web_page_module/rjs_gadget_document_scanner_js.js
+3
-2
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/rjs_gadget_document_scanner_js.xml
...teItem/web_page_module/rjs_gadget_document_scanner_js.xml
+2
-2
No files found.
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/rjs_gadget_document_scanner_css.css
View file @
217c1139
...
@@ -33,6 +33,10 @@ div[data-gadget-url$="gadget_document_scanner.html"] .edit-picture {
...
@@ -33,6 +33,10 @@ div[data-gadget-url$="gadget_document_scanner.html"] .edit-picture {
text-align
:
center
;
text-align
:
center
;
}
}
div
[
data-gadget-url
$
=
"gadget_document_scanner.html"
]
.edit-picture
{
padding-top
:
0.5em
;
}
div
[
data-gadget-url
$
=
"gadget_document_scanner.html"
]
.camera
,
div
[
data-gadget-url
$
=
"gadget_document_scanner.html"
]
.camera
,
div
[
data-gadget-url
$
=
"gadget_document_scanner.html"
]
.camera-input
{
div
[
data-gadget-url
$
=
"gadget_document_scanner.html"
]
.camera-input
{
display
:
inline-block
;
display
:
inline-block
;
...
@@ -67,7 +71,13 @@ div[data-gadget-url$="gadget_document_scanner.html"] > .camera > .thumbnail-list
...
@@ -67,7 +71,13 @@ div[data-gadget-url$="gadget_document_scanner.html"] > .camera > .thumbnail-list
}
}
div
[
data-gadget-url
$
=
"gadget_document_scanner.html"
]
.show-img
{
div
[
data-gadget-url
$
=
"gadget_document_scanner.html"
]
.show-img
{
width
:
21%
;
padding-left
:
0.2em
;
}
div
[
data-gadget-url
$
=
"gadget_document_scanner.html"
]
.thumbnail-list
>
button
{
max-width
:
25%
;
display
:
inline
;
float
:
left
;
}
}
div
[
data-gadget-url
$
=
"gadget_document_scanner.html"
]
.upload-error
{
div
[
data-gadget-url
$
=
"gadget_document_scanner.html"
]
.upload-error
{
...
...
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/rjs_gadget_document_scanner_css.xml
View file @
217c1139
...
@@ -244,7 +244,7 @@
...
@@ -244,7 +244,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
981.
42527.16024.21179
</string>
</value>
<value>
<string>
981.
53994.46343.31095
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -262,7 +262,7 @@
...
@@ -262,7 +262,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15
75027025.78
</float>
<float>
15
81629502.14
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/rjs_gadget_document_scanner_js.js
View file @
217c1139
...
@@ -60,6 +60,7 @@
...
@@ -60,6 +60,7 @@
// creating Cropper is asynchronous
// creating Cropper is asynchronous
return
new
RSVP
.
Promise
(
function
(
resolve
,
reject
)
{
return
new
RSVP
.
Promise
(
function
(
resolve
,
reject
)
{
cropper
=
new
Cropper
(
element
,
{
cropper
=
new
Cropper
(
element
,
{
viewMode
:
3
,
data
:
data
,
data
:
data
,
ready
:
function
()
{
ready
:
function
()
{
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
()
...
@@ -514,7 +515,7 @@
...
@@ -514,7 +515,7 @@
throw
new
Error
(
'
Unhandled display step:
'
+
gadget
.
state
.
display_step
);
throw
new
Error
(
'
Unhandled display step:
'
+
gadget
.
state
.
display_step
);
}
}
// Only refresh the thumbnail
list
// Only refresh the thumbnail
area
// if display_step is not modified
// if display_step is not modified
return
buildPreviousThumbnailDom
(
gadget
)
return
buildPreviousThumbnailDom
(
gadget
)
.
push
(
function
(
result
)
{
.
push
(
function
(
result
)
{
...
@@ -574,7 +575,7 @@
...
@@ -574,7 +575,7 @@
.
push
(
function
()
{
.
push
(
function
()
{
var
canvas
=
gadget
.
cropper
.
getCroppedCanvas
();
var
canvas
=
gadget
.
cropper
.
getCroppedCanvas
();
return
new
Promise
(
function
(
resolve
)
{
return
new
Promise
(
function
(
resolve
)
{
canvas
.
toBlob
(
resolve
,
'
image/jpeg
'
,
0.85
);
canvas
.
toBlob
(
resolve
);
});
});
})
})
.
push
(
function
(
blob
)
{
.
push
(
function
(
blob
)
{
...
...
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/rjs_gadget_document_scanner_js.xml
View file @
217c1139
...
@@ -244,7 +244,7 @@
...
@@ -244,7 +244,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
981.5
3435.24231.47104
</string>
</value>
<value>
<string>
981.5
4005.25628.18841
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -262,7 +262,7 @@
...
@@ -262,7 +262,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1581
596045.4
1
</float>
<float>
1581
630274.
1
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
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