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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gabriel Monnerat
erp5
Commits
09f7c9b2
Commit
09f7c9b2
authored
Jan 27, 2020
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_document_scanner: Avoid text editors complaining that we are using reserved word
parent
89c4ef1c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
24 deletions
+24
-24
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/rjs_gadget_document_scanner_js.js
...ateItem/web_page_module/rjs_gadget_document_scanner_js.js
+22
-22
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_js.js
View file @
09f7c9b2
...
@@ -246,7 +246,7 @@
...
@@ -246,7 +246,7 @@
// Do not allow to show again the current image
// Do not allow to show again the current image
// or do not allow to show sending image (to simplify button management)
// or do not allow to show sending image (to simplify button management)
disabled
:
(
i
===
gadget
.
state
.
page
)
||
(
gadget
.
state
[
'
blob_state_
'
+
i
]
===
'
sending
'
),
disabled
:
(
i
===
gadget
.
state
.
page
)
||
(
gadget
.
state
[
'
blob_state_
'
+
i
]
===
'
sending
'
),
class
:
'
show-img
'
,
'
class
'
:
'
show-img
'
,
'
data-page
'
:
i
'
data-page
'
:
i
}));
}));
}
}
...
@@ -258,7 +258,7 @@
...
@@ -258,7 +258,7 @@
text
:
'
New
'
,
text
:
'
New
'
,
// Do not allow to show again the current image
// Do not allow to show again the current image
disabled
:
(
len
===
gadget
.
state
.
page
-
1
),
disabled
:
(
len
===
gadget
.
state
.
page
-
1
),
class
:
'
new-btn
'
'
class
'
:
'
new-btn
'
}));
}));
return
domsugar
(
'
ol
'
,
thumbnail_dom_list
);
return
domsugar
(
'
ol
'
,
thumbnail_dom_list
);
...
@@ -301,7 +301,7 @@
...
@@ -301,7 +301,7 @@
.
push
(
function
(
result_list
)
{
.
push
(
function
(
result_list
)
{
var
button_list
=
[
var
button_list
=
[
domsugar
(
'
button
'
,
{
type
:
'
button
'
,
domsugar
(
'
button
'
,
{
type
:
'
button
'
,
class
:
'
take-picture-btn ui-btn-icon-left ui-icon-circle
'
,
'
class
'
:
'
take-picture-btn ui-btn-icon-left ui-icon-circle
'
,
text
:
result_list
[
1
][
0
]
text
:
result_list
[
1
][
0
]
})
})
],
],
...
@@ -310,21 +310,21 @@
...
@@ -310,21 +310,21 @@
if
(
result_list
[
0
].
length
>
1
)
{
if
(
result_list
[
0
].
length
>
1
)
{
button_list
.
push
(
button_list
.
push
(
domsugar
(
'
button
'
,
{
type
:
'
button
'
,
domsugar
(
'
button
'
,
{
type
:
'
button
'
,
class
:
'
change-camera-btn ui-icon-refresh ui-btn-icon-left
'
,
'
class
'
:
'
change-camera-btn ui-icon-refresh ui-btn-icon-left
'
,
text
:
result_list
[
1
][
1
]
text
:
result_list
[
1
][
1
]
})
})
);
);
}
}
div
=
domsugar
(
'
div
'
,
{
class
:
'
camera
'
},
[
div
=
domsugar
(
'
div
'
,
{
'
class
'
:
'
camera
'
},
[
domsugar
(
'
div
'
,
{
class
:
'
camera-header
'
},
[
domsugar
(
'
div
'
,
{
'
class
'
:
'
camera-header
'
},
[
domsugar
(
'
h4
'
,
[
domsugar
(
'
h4
'
,
[
'
Page
'
,
'
Page
'
,
domsugar
(
'
label
'
,
{
class
:
'
page-number
'
,
text
:
gadget
.
state
.
page
})
domsugar
(
'
label
'
,
{
'
class
'
:
'
page-number
'
,
text
:
gadget
.
state
.
page
})
])
])
]),
]),
domsugar
(
'
div
'
,
{
class
:
'
camera-input
'
},
[
video
]),
domsugar
(
'
div
'
,
{
'
class
'
:
'
camera-input
'
},
[
video
]),
domsugar
(
'
div
'
,
{
class
:
'
edit-picture
'
},
button_list
),
domsugar
(
'
div
'
,
{
'
class
'
:
'
edit-picture
'
},
button_list
),
buildPreviousThumbnailDom
(
gadget
)
buildPreviousThumbnailDom
(
gadget
)
]);
]);
...
@@ -357,7 +357,7 @@
...
@@ -357,7 +357,7 @@
var
// blob_url = URL.createObjectURL(blob),
var
// blob_url = URL.createObjectURL(blob),
// img = domsugar('img', {src: blob_url});
// img = domsugar('img', {src: blob_url});
bitmap
=
result_list
[
1
],
bitmap
=
result_list
[
1
],
canvas
=
domsugar
(
'
canvas
'
,
{
class
:
'
canvas
'
}),
canvas
=
domsugar
(
'
canvas
'
,
{
'
class
'
:
'
canvas
'
}),
defer
=
RSVP
.
defer
();
defer
=
RSVP
.
defer
();
// Prepare the cropper canvas
// Prepare the cropper canvas
...
@@ -365,21 +365,21 @@
...
@@ -365,21 +365,21 @@
canvas
.
height
=
bitmap
.
height
;
canvas
.
height
=
bitmap
.
height
;
canvas
.
getContext
(
'
2d
'
).
drawImage
(
bitmap
,
0
,
0
);
canvas
.
getContext
(
'
2d
'
).
drawImage
(
bitmap
,
0
,
0
);
div
=
domsugar
(
'
div
'
,
{
class
:
'
camera
'
},
[
div
=
domsugar
(
'
div
'
,
{
'
class
'
:
'
camera
'
},
[
domsugar
(
'
div
'
,
{
class
:
'
camera-header
'
},
[
domsugar
(
'
div
'
,
{
'
class
'
:
'
camera-header
'
},
[
domsugar
(
'
h4
'
,
[
domsugar
(
'
h4
'
,
[
'
Page
'
,
'
Page
'
,
domsugar
(
'
label
'
,
{
class
:
'
page-number
'
,
text
:
gadget
.
state
.
page
})
domsugar
(
'
label
'
,
{
'
class
'
:
'
page-number
'
,
text
:
gadget
.
state
.
page
})
])
])
]),
]),
canvas
,
canvas
,
domsugar
(
'
div
'
,
{
class
:
'
edit-picture
'
},
[
domsugar
(
'
div
'
,
{
'
class
'
:
'
edit-picture
'
},
[
domsugar
(
'
button
'
,
{
type
:
'
button
'
,
domsugar
(
'
button
'
,
{
type
:
'
button
'
,
class
:
'
reset-btn ui-btn-icon-left ui-icon-times
'
,
'
class
'
:
'
reset-btn ui-btn-icon-left ui-icon-times
'
,
text
:
result_list
[
0
][
0
]
text
:
result_list
[
0
][
0
]
}),
}),
domsugar
(
'
button
'
,
{
type
:
'
button
'
,
domsugar
(
'
button
'
,
{
type
:
'
button
'
,
class
:
'
confirm-btn ui-btn-icon-left ui-icon-check
'
,
'
class
'
:
'
confirm-btn ui-btn-icon-left ui-icon-check
'
,
text
:
result_list
[
0
][
1
]
text
:
result_list
[
0
][
1
]
})
})
]),
]),
...
@@ -407,7 +407,7 @@
...
@@ -407,7 +407,7 @@
var
button_list
=
[
var
button_list
=
[
// XXX TODO: improve icon
// XXX TODO: improve icon
domsugar
(
'
button
'
,
{
type
:
'
button
'
,
domsugar
(
'
button
'
,
{
type
:
'
button
'
,
class
:
'
delete-btn ui-btn-icon-left ui-icon-times
'
,
'
class
'
:
'
delete-btn ui-btn-icon-left ui-icon-times
'
,
text
:
translation_list
[
0
]
text
:
translation_list
[
0
]
})
})
],
],
...
@@ -417,22 +417,22 @@
...
@@ -417,22 +417,22 @@
button_list
.
push
(
button_list
.
push
(
// XXX TODO improve icon
// XXX TODO improve icon
domsugar
(
'
button
'
,
{
type
:
'
button
'
,
domsugar
(
'
button
'
,
{
type
:
'
button
'
,
class
:
'
retry-btn ui-btn-icon-left ui-icon-times
'
,
'
class
'
:
'
retry-btn ui-btn-icon-left ui-icon-times
'
,
text
:
translation_list
[
1
]
text
:
translation_list
[
1
]
})
})
);
);
}
}
div
=
domsugar
(
'
div
'
,
{
class
:
'
camera
'
},
[
div
=
domsugar
(
'
div
'
,
{
'
class
'
:
'
camera
'
},
[
domsugar
(
'
div
'
,
{
class
:
'
camera-header
'
},
[
domsugar
(
'
div
'
,
{
'
class
'
:
'
camera-header
'
},
[
domsugar
(
'
h4
'
,
[
domsugar
(
'
h4
'
,
[
'
Page
'
,
'
Page
'
,
domsugar
(
'
label
'
,
{
class
:
'
page-number
'
,
text
:
gadget
.
state
.
page
+
1
})
domsugar
(
'
label
'
,
{
'
class
'
:
'
page-number
'
,
text
:
gadget
.
state
.
page
+
1
})
])
])
]),
]),
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?
// XXX TODO: why is the button rendering different from the other pages?
domsugar
(
'
div
'
,
{
class
:
'
edit-picture
'
},
button_list
),
domsugar
(
'
div
'
,
{
'
class
'
:
'
edit-picture
'
},
button_list
),
buildPreviousThumbnailDom
(
gadget
)
buildPreviousThumbnailDom
(
gadget
)
]);
]);
...
...
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/rjs_gadget_document_scanner_js.xml
View file @
09f7c9b2
...
@@ -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.2
1983.29656.41591
</string>
</value>
<value>
<string>
981.2
9059.2195.37614
</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
79708838.71
</float>
<float>
15
80133331.88
</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