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
144
Merge Requests
144
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
73fe7b45
Commit
73fe7b45
authored
Nov 20, 2019
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_document_scanner: few improvements
parent
7f3417da
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
75 additions
and
15 deletions
+75
-15
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_getDocumentScannerSelectionName.py
..._document_scanner/Base_getDocumentScannerSelectionName.py
+1
-0
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_getDocumentScannerSelectionName.xml
...document_scanner/Base_getDocumentScannerSelectionName.xml
+62
-0
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_getPreferredCropperSettingsFromPreference.py
...scanner/Base_getPreferredCropperSettingsFromPreference.py
+3
-6
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_storeDocumentFromCameraInActiveProcess.py
...nt_scanner/Base_storeDocumentFromCameraInActiveProcess.py
+6
-7
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/gadget_document_scanner.css.css
...ins/erp5_document_scanner/gadget_document_scanner.css.css
+3
-2
No files found.
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_getDocumentScannerSelectionName.py
0 → 100644
View file @
73fe7b45
return
"document_scanner_selection"
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_getDocumentScannerSelectionName.xml
0 → 100644
View file @
73fe7b45
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Base_getDocumentScannerSelectionName
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_getPreferredCropperSettingsFromPreference.py
View file @
73fe7b45
...
...
@@ -2,12 +2,9 @@ import json
portal
=
context
.
getPortalObject
()
active_preference
=
portal
.
portal_preferences
.
getActiveUserPreference
()
if
not
active_preference
:
active_preference
=
portal
.
portal_preferences
.
getActivePreference
()
canvas_data
=
active_preference
and
\
json
.
loads
(
active_preference
.
getPreferredCroppedCanvasData
(
"{}"
))
or
{}
canvas_data
=
portal
.
portal_selections
.
getSelectionParamsFor
(
context
.
Base_getDocumentScannerSelectionName
(),
REQUEST
=
context
.
REQUEST
)
or
{}
canvas_data
[
"dialog_method"
]
=
context
.
Base_storeDocumentFromCameraInActiveProcess
.
getId
()
...
...
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_storeDocumentFromCameraInActiveProcess.py
View file @
73fe7b45
...
...
@@ -6,14 +6,13 @@ translateString = portal.Base_translateString
gadget_data
=
json
.
loads
(
document_scanner_gadget
)
image_str
=
decodestring
(
gadget_data
.
pop
(
"input_value"
))
preferred_cropped_canvas_data
=
json
.
dumps
(
gadget_data
[
"preferred_cropped_canvas_data"
])
preferred_cropped_canvas_data
=
gadget_data
[
"preferred_cropped_canvas_data"
]
or
{}
active_preference
=
portal
.
portal_preferences
.
getActiveUserPreference
()
if
not
active_preference
:
active_preference
=
portal
.
portal_preferences
.
getActivePreference
()
if
active_preference
and
preferred_cropped_canvas_data
:
active_preference
.
setPreferredCroppedCanvasData
(
preferred_cropped_canvas_data
)
portal
.
portal_selections
.
setSelectionParamsFor
(
context
.
Base_getDocumentScannerSelectionName
(),
preferred_cropped_canvas_data
,
context
.
REQUEST
)
if
not
image_str
:
if
batch_mode
:
...
...
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/gadget_document_scanner.css.css
View file @
73fe7b45
...
...
@@ -53,9 +53,10 @@ div[data-gadget-scope="field_your_document_scanner_gadget"] {
.reset-btn
,
.confirm-btn
,
.edit-btn
,
.take-picture-btn
,
.capture-btn
,
.change-camera-btn
,
.confirm-btn
{
font-size
:
44px
;
color
:
#212529
;
padding
:
0
16px
0
16px
;
padding
:
3pt
;
border
:
1px
solid
rgba
(
0
,
0
,
0
,
0.14
);
border-radius
:
0.325em
;
}
.take-picture-btn
,
.capture-btn
,
.confirm-btn
,
...
...
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