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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
4d1faa3b
Commit
4d1faa3b
authored
Apr 06, 2020
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_document_scanner: stop saving the cropper area in the backend
parent
5dce448a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
5 additions
and
156 deletions
+5
-156
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/scanner_gadget_document_scanner_js.js
...tem/web_page_module/scanner_gadget_document_scanner_js.js
+2
-3
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/Base_getDocumentScannerSelectionName.py
..._document_scanner/Base_getDocumentScannerSelectionName.py
+0
-1
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_getDocumentScannerSelectionName.xml
...document_scanner/Base_getDocumentScannerSelectionName.xml
+0
-62
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_getPreferredCropperSettingsFromSelection.py
..._scanner/Base_getPreferredCropperSettingsFromSelection.py
+0
-11
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_getPreferredCropperSettingsFromSelection.xml
...scanner/Base_getPreferredCropperSettingsFromSelection.xml
+0
-62
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_uploadDocumentFromCameraByActivity.py
...cument_scanner/Base_uploadDocumentFromCameraByActivity.py
+0
-14
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_viewUploadDocumentFromCameraDialog/your_document_scanner_gadget.xml
...DocumentFromCameraDialog/your_document_scanner_gadget.xml
+1
-1
No files found.
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/scanner_gadget_document_scanner_js.js
View file @
4d1faa3b
...
@@ -819,7 +819,7 @@
...
@@ -819,7 +819,7 @@
active_process
:
default_value
.
active_process
,
active_process
:
default_value
.
active_process
,
image_list
:
default_value
.
image_list
,
image_list
:
default_value
.
image_list
,
camera_list
:
camera_list
,
camera_list
:
camera_list
,
preferred_cropped_canvas_data
:
JSON
.
parse
(
options
.
preferred_cropped_canvas_data
)
,
preferred_cropped_canvas_data
:
{}
,
preferred_image_settings_data
:
JSON
.
parse
(
options
.
preferred_image_settings_data
),
preferred_image_settings_data
:
JSON
.
parse
(
options
.
preferred_image_settings_data
),
device_id
:
device_id
,
device_id
:
device_id
,
key
:
options
.
key
,
key
:
options
.
key
,
...
@@ -1005,8 +1005,7 @@
...
@@ -1005,8 +1005,7 @@
result
=
{
result
=
{
data_json
:
JSON
.
stringify
({
data_json
:
JSON
.
stringify
({
active_process
:
gadget
.
state
.
active_process
,
active_process
:
gadget
.
state
.
active_process
,
image_list
:
image_list
,
image_list
:
image_list
preferred_cropped_canvas_data
:
gadget
.
state
.
preferred_cropped_canvas_data
})
})
};
};
return
result
;
return
result
;
...
...
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/scanner_gadget_document_scanner_js.xml
View file @
4d1faa3b
...
@@ -244,7 +244,7 @@
...
@@ -244,7 +244,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
98
2.62866.16795.56132
</string>
</value>
<value>
<string>
98
3.1655.22186.31027
</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>
158
5922429.0
2
</float>
<float>
158
6181306.4
2
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_getDocumentScannerSelectionName.py
deleted
100644 → 0
View file @
5dce448a
return
"document_scanner_selection"
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_getDocumentScannerSelectionName.xml
deleted
100644 → 0
View file @
5dce448a
<?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_getPreferredCropperSettingsFromSelection.py
deleted
100644 → 0
View file @
5dce448a
import
json
portal
=
context
.
getPortalObject
()
selection_mapping
=
portal
.
portal_selections
.
getSelectionParamsFor
(
context
.
Base_getDocumentScannerSelectionName
(),
REQUEST
=
context
.
REQUEST
)
or
{}
canvas_data
=
selection_mapping
.
get
(
context
.
REQUEST
[
"HTTP_USER_AGENT"
])
or
{}
return
json
.
dumps
(
canvas_data
)
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_getPreferredCropperSettingsFromSelection.xml
deleted
100644 → 0
View file @
5dce448a
<?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_getPreferredCropperSettingsFromSelection
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_uploadDocumentFromCameraByActivity.py
View file @
4d1faa3b
...
@@ -7,20 +7,6 @@ translateString = portal.Base_translateString
...
@@ -7,20 +7,6 @@ translateString = portal.Base_translateString
active_process_url
=
data_dict
.
pop
(
"active_process"
)
active_process_url
=
data_dict
.
pop
(
"active_process"
)
image_list
=
data_dict
.
pop
(
"image_list"
)
image_list
=
data_dict
.
pop
(
"image_list"
)
preferred_cropped_canvas_data
=
data_dict
.
pop
(
"preferred_cropped_canvas_data"
)
or
{}
selection_mapping
=
portal
.
portal_selections
.
getSelectionParamsFor
(
context
.
Base_getDocumentScannerSelectionName
(),
REQUEST
=
context
.
REQUEST
)
or
{}
http_user_agent
=
context
.
REQUEST
[
"HTTP_USER_AGENT"
]
selection_mapping
[
http_user_agent
]
=
preferred_cropped_canvas_data
or
{}
portal
.
portal_selections
.
setSelectionParamsFor
(
context
.
Base_getDocumentScannerSelectionName
(),
selection_mapping
,
context
.
REQUEST
)
# Avoid to pass huge images to the activity
# Avoid to pass huge images to the activity
kw
.
pop
(
"your_document_scanner_gadget"
,
None
)
kw
.
pop
(
"your_document_scanner_gadget"
,
None
)
...
...
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/Base_viewUploadDocumentFromCameraDialog/your_document_scanner_gadget.xml
View file @
4d1faa3b
...
@@ -165,7 +165,7 @@
...
@@ -165,7 +165,7 @@
<dictionary>
<dictionary>
<item>
<item>
<key>
<string>
_text
</string>
</key>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: [(\'preferred_image_settings_data\', context.Base_getPreferredImageSettingsFromPreference()), (
\'preferred_cropped_canvas_data\', context.Base_getPreferredCropperSettingsFromSelection()), (
"store_new_image_cropped_method", \'Base_storeNewImageCropped\')]
</string>
</value>
<value>
<string>
python: [(\'preferred_image_settings_data\', context.Base_getPreferredImageSettingsFromPreference()), ("store_new_image_cropped_method", \'Base_storeNewImageCropped\')]
</string>
</value>
</item>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
...
...
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