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
bbc199d6
Commit
bbc199d6
authored
Oct 18, 2021
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_mynij_search: Add more results button for searx and hide "About Mynij" menu in result page
parent
0d83e39e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
73 additions
and
21 deletions
+73
-21
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_erp5_page_mynij_search_js.js
...eItem/web_page_module/gadget_erp5_page_mynij_search_js.js
+30
-7
bt5/erp5_web_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/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_mynij_result.html.html
...emplateItem/web_page_module/gadget_mynij_result.html.html
+5
-1
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_mynij_result.html.xml
...TemplateItem/web_page_module/gadget_mynij_result.html.xml
+2
-2
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_mynij_result.js.js
...athTemplateItem/web_page_module/gadget_mynij_result.js.js
+4
-3
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_mynij_result.js.xml
...thTemplateItem/web_page_module/gadget_mynij_result.js.xml
+2
-2
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_mynij_style.css.css
...thTemplateItem/web_page_module/gadget_mynij_style.css.css
+26
-2
bt5/erp5_web_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/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_erp5_page_mynij_search_js.js
View file @
bbc199d6
...
...
@@ -156,18 +156,31 @@
this
.
element
.
querySelector
(
"
#search_input
"
).
value
=
""
;
return
this
.
state
.
result_gadget
.
clear
()
.
push
(
function
()
{
var
topmenu
,
more
;
document
.
getElementById
(
"
logo-search
"
).
classList
.
remove
(
'
hide
'
);
topmenu
=
gadget
.
element
.
querySelector
(
"
.search-mbar
"
);
more
=
gadget
.
element
.
querySelector
(
"
.searx-more
"
);
if
(
topmenu
)
topmenu
.
classList
.
remove
(
'
hide
'
);
if
(
more
)
more
.
classList
.
add
(
'
hide
'
);
return
gadget
.
state
.
result_gadget
.
hideResultBox
();
});
})
.
declareJob
(
"
defer_search
"
,
function
(
search_text
,
index
,
limit
)
{
var
gadget
=
this
,
top
=
document
.
getElementById
(
"
logo-search
"
);
top
=
document
.
getElementById
(
"
logo-search
"
),
topmenu
=
gadget
.
element
.
querySelector
(
"
.search-mbar
"
),
more
=
gadget
.
element
.
querySelector
(
"
.searx-more
"
);;
if
(
top
)
{
if
(
top
)
top
.
classList
.
add
(
"
hide
"
);
}
if
(
topmenu
)
topmenu
.
classList
.
add
(
'
hide
'
);
if
(
more
)
more
.
classList
.
add
(
'
hide
'
);
return
gadget
.
state
.
result_gadget
.
startLoading
()
.
push
(
function
()
{
return
gadget
.
state
.
result_gadget
.
showResultBox
();
...
...
@@ -232,14 +245,14 @@
})
.
declareMethod
(
"
add_searx_results
"
,
function
(
key
)
{
var
gadget
=
this
;
var
gadget
=
this
,
query
=
encodeURI
(
key
);
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
var
count
=
gadget
.
state
.
proxies
.
length
,
rng
=
Math
.
floor
(
Math
.
random
()
*
Math
.
floor
(
count
)),
proxy
=
gadget
.
state
.
proxies
[
rng
],
query
=
encodeURI
(
key
);
proxy
=
gadget
.
state
.
proxies
[
rng
];
return
jIO
.
util
.
ajax
({
url
:
proxy
+
"
?url=
"
+
gadget
.
state
.
searx
+
"
%3Fq%3D
"
+
query
+
"
%26category_general%3Don%26theme%3Doscar
"
...
...
@@ -272,7 +285,17 @@
elements
[
i
],
key
));
}
return
RSVP
.
all
(
promise_list
);
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
return
RSVP
.
all
(
promise_list
);
})
.
push
(
function
()
{
var
slink
=
gadget
.
state
.
searx
+
"
?q=
"
+
query
+
"
&category_general=on
"
,
more
=
gadget
.
element
.
querySelector
(
"
.searx-more
"
);
if
(
more
)
more
.
classList
.
remove
(
'
hide
'
);
return
gadget
.
state
.
result_gadget
.
setSearxMoreLink
(
slink
);
});
});
})
...
...
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_erp5_page_mynij_search_js.xml
View file @
bbc199d6
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
995.3
0660.45437.22203
</string>
</value>
<value>
<string>
995.3
6151.33301.32136
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
1634
243052.5
</float>
<float>
1634
572335.06
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_mynij_result.html.html
View file @
bbc199d6
...
...
@@ -31,7 +31,11 @@
<section
class=
"section-result"
>
<ul
id=
"searx-results"
>
</ul>
<div
class=
"searx-more"
><p><a
class=
"searx-morelink"
href=
"#"
>
More results
</a></p></div>
<div
class=
"searx-more hide"
>
<p>
<a
class=
"btn-link searx-morelink"
href=
"#"
target=
"_blank"
>
More results...
</a>
</p>
</div>
<div
id=
"searx-loading"
class=
"loading"
style=
"display: none"
><div
class=
"loader"
></div></div>
</section>
</div>
...
...
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_mynij_result.html.xml
View file @
bbc199d6
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
99
1.47441.48178.21742
</string>
</value>
<value>
<string>
99
5.36137.28711.55790
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
16
19781040.0
8
</float>
<float>
16
34572133.9
8
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_mynij_result.js.js
View file @
bbc199d6
...
...
@@ -270,9 +270,10 @@
return
short_url
;
})
.
declareMethod
(
"
setSearxMoreLink
"
,
function
(
query
)
{
var
link
=
this
.
querySelector
(
'
searx-morelink
'
);
link
.
href
=
"
https://searx.info/search?q=
"
+
query
+
"
&category_general=on
"
;
.
declareMethod
(
"
setSearxMoreLink
"
,
function
(
query_url
)
{
var
link
=
this
.
element
.
querySelector
(
'
.searx-morelink
'
);
if
(
link
)
link
.
href
=
query_url
;
});
}(
window
,
RSVP
,
rJS
,
document
,
DOMParser
,
URL
));
\ No newline at end of file
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_mynij_result.js.xml
View file @
bbc199d6
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
99
0.5192.14888.10222
</string>
</value>
<value>
<string>
99
5.36111.10544.48008
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
16
19793226.18
</float>
<float>
16
34569900.92
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_mynij_style.css.css
View file @
bbc199d6
...
...
@@ -149,7 +149,6 @@ div[data-gadget-scope='header'] .ui-header .ui-controlgroup-controls button[data
.searx-more
{
margin
:
20px
10px
;
display
:
none
;
}
.searx-morelink
{
...
...
@@ -790,7 +789,7 @@ button::-moz-focus-inner {
color
:
white
;
font-weight
:
600
;
transition
:
background
0.25s
ease-in-out
;
border-top-right-radius
:
5
px
;
border-top-right-radius
:
2
px
;
border-bottom-right-radius
:
5px
;
width
:
100%
;
}
...
...
@@ -807,6 +806,31 @@ button::-moz-focus-inner {
transform
:
translateY
(
1px
);
}
.btn-link
{
display
:
inline-block
;
margin-bottom
:
0
;
font-weight
:
400
;
text-align
:
center
;
vertical-align
:
middle
;
cursor
:
pointer
;
border
:
1px
solid
#ccc
;
white-space
:
nowrap
;
padding
:
6px
12px
;
font-size
:
14px
;
line-height
:
1.42857143
;
border-radius
:
4px
;
user-select
:
none
;
color
:
#333
;
background-color
:
#fff
;
}
.btn-link
:hover
,
btn-link
:active
{
text-decoration
:
none
;
color
:
#333
;
background-color
:
#e6e6e6
;
border-color
:
#ff1979
;
}
@media
screen
and
(
max-width
:
820px
)
{
.search-label
{
border-radius
:
0
;
...
...
bt5/erp5_web_mynij_search/PathTemplateItem/web_page_module/gadget_mynij_style.css.xml
View file @
bbc199d6
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
995.3
0743.40827.28928
</string>
</value>
<value>
<string>
995.3
6127.30011.11366
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
1634
247970.27
</float>
<float>
1634
572415.39
</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