Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mynij
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
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mynij
mynij
Commits
5104af10
Commit
5104af10
authored
Oct 19, 2020
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mynij Search: Fix error when there is no result from searx search.
parent
18460604
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
12 deletions
+32
-12
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_erp5_page_mynij_search_js.js
...eItem/web_page_module/gadget_erp5_page_mynij_search_js.js
+8
-6
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_erp5_page_mynij_search_js.xml
...Item/web_page_module/gadget_erp5_page_mynij_search_js.xml
+2
-2
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_mynij_result.js.js
...athTemplateItem/web_page_module/gadget_mynij_result.js.js
+14
-0
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_mynij_result.js.xml
...thTemplateItem/web_page_module/gadget_mynij_result.js.xml
+2
-2
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_mynij_style.css.css
...thTemplateItem/web_page_module/gadget_mynij_style.css.css
+4
-0
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_mynij_style.css.xml
...thTemplateItem/web_page_module/gadget_mynij_style.css.xml
+2
-2
No files found.
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_erp5_page_mynij_search_js.js
View file @
5104af10
...
...
@@ -169,6 +169,7 @@
.
declareMethod
(
"
add_searx_results
"
,
function
(
key
)
{
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
jIO
.
util
.
ajax
({
...
...
@@ -177,12 +178,9 @@
});
})
.
push
(
undefined
,
function
(
error
)
{
var
error_html
;
error_html
=
document
.
createElement
(
"
p
"
);
error_html
.
className
=
"
no-result
"
;
error_html
.
textContent
=
"
An error occured, please try again.
"
+
error
.
message
||
''
;
return
gadget
.
state
.
result_gadget
.
show_searx_result
(
error_html
);
return
gadget
.
state
.
result_gadget
.
add_searx_no_result
(
"
An error occured, please try again.
"
+
error
.
message
||
''
);
})
.
push
(
function
(
resultHTML
)
{
var
i
,
...
...
@@ -192,6 +190,10 @@
resultHTML
.
currentTarget
.
response
,
"
text/html
"
);
elements
=
doc
.
body
.
querySelectorAll
(
'
div.result.result-default
'
);
if
(
elements
.
length
===
0
)
return
gadget
.
state
.
result_gadget
.
add_searx_no_result
(
"
No result from your input, please update and try again.
"
);
for
(
i
=
0
;
i
<
elements
.
length
;
i
+=
1
)
{
promise_list
.
push
(
gadget
.
state
.
result_gadget
.
show_searx_result
(
elements
[
i
],
...
...
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_erp5_page_mynij_search_js.xml
View file @
5104af10
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
987.2
5983.38944.13892
</string>
</value>
<value>
<string>
987.2
6215.20691.32768
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
16031
09825.17
</float>
<float>
16031
24167.5
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_mynij_result.js.js
View file @
5104af10
...
...
@@ -95,6 +95,20 @@
});
})
.
declareMethod
(
"
add_searx_no_result
"
,
function
(
msg
)
{
var
error_html
,
list_item
=
document
.
createElement
(
"
li
"
),
loader
=
document
.
getElementById
(
"
searx-loading
"
),
list
=
document
.
getElementById
(
"
searx-results
"
);
loader
.
style
.
display
=
"
none
"
;
error_html
=
document
.
createElement
(
"
p
"
);
error_html
.
className
=
"
no-result
"
;
error_html
.
textContent
=
msg
;
list_item
.
appendChild
(
error_html
);
list
.
appendChild
(
list_item
);
})
.
declareMethod
(
"
show_searx_result
"
,
function
(
item
,
key
)
{
var
list
,
list_item
,
...
...
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_mynij_result.js.xml
View file @
5104af10
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
987.2
5959.50752.32221
</string>
</value>
<value>
<string>
987.2
6221.22837.50619
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
16031
09745.73
</float>
<float>
16031
24223.76
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_mynij_style.css.css
View file @
5104af10
...
...
@@ -32,6 +32,10 @@
display
:
none
;
}
.no-result
{
font-size
:
1.5em
;
}
@media
(
max-width
:
600px
)
{
#mynij-results
>
li
,
#searx-results
>
li
{
width
:
100%
;
...
...
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_mynij_style.css.xml
View file @
5104af10
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
987.26
073.25277.8823
</string>
</value>
<value>
<string>
987.26
223.8725.60620
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
16031
15441.29
</float>
<float>
16031
24265.14
</float>
<string>
UTC
</string>
</tuple>
</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