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
554312dc
Commit
554312dc
authored
Oct 13, 2020
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mynij Search: Rename some gadget improve style
parent
6d90855c
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
731 additions
and
135 deletions
+731
-135
bt5/Mynij Search/PathTemplateItem/portal_skins/erp5_mynij/WebSection_getMynijSearchPrecacheManifestList.py
...p5_mynij/WebSection_getMynijSearchPrecacheManifestList.py
+5
-4
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_erp5_mynij_panel_html.html
...ateItem/web_page_module/gadget_erp5_mynij_panel_html.html
+73
-0
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_erp5_mynij_panel_html.xml
...lateItem/web_page_module/gadget_erp5_mynij_panel_html.xml
+8
-12
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_erp5_mynij_panel_js.js
...emplateItem/web_page_module/gadget_erp5_mynij_panel_js.js
+399
-0
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_erp5_mynij_panel_js.xml
...mplateItem/web_page_module/gadget_erp5_mynij_panel_js.xml
+109
-0
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_erp5_page_mynij_search_html.html
...m/web_page_module/gadget_erp5_page_mynij_search_html.html
+22
-0
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_erp5_page_mynij_search_html.xml
...em/web_page_module/gadget_erp5_page_mynij_search_html.xml
+2
-2
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
+0
-0
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
+3
-3
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_mynij_result.html.html
...emplateItem/web_page_module/gadget_mynij_result.html.html
+13
-11
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_mynij_style.css.css
...thTemplateItem/web_page_module/gadget_mynij_style.css.css
+92
-0
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_mynij_style.css.xml
...thTemplateItem/web_page_module/gadget_mynij_style.css.xml
+2
-2
bt5/Mynij Search/PathTemplateItem/web_page_module/mynij_results.css.css
...ch/PathTemplateItem/web_page_module/mynij_results.css.css
+0
-99
bt5/Mynij Search/PathTemplateItem/web_site_module/mynij_search/app.xml
...rch/PathTemplateItem/web_site_module/mynij_search/app.xml
+2
-2
bt5/Mynij Search/bt/template_path_list
bt5/Mynij Search/bt/template_path_list
+1
-0
No files found.
bt5/Mynij Search/PathTemplateItem/portal_skins/erp5_mynij/WebSection_getMynijSearchPrecacheManifestList.py
View file @
554312dc
url_list
=
[
"gadget_officejs_mynij_search.configuration"
,
"gadget_officejs_mynij_search_router.html"
,
"gadget_erp5_page_mynij_home.html"
,
"gadget_erp5_page_mynij_home.js"
,
"gadget_erp5_mynij_panel.html"
,
"gadget_erp5_mynij_panel.js"
,
"gadget_erp5_page_mynij_search.html"
,
"gadget_erp5_page_mynij_search.js"
,
"gadget_mynij_model.html"
,
"gadget_mynij_model.js"
,
"gadget_mynij_parser.html"
,
"gadget_mynij_parser.js"
,
"gadget_mynij_result.html"
,
"gadget_mynij_result.js"
,
"mynij_results.css"
,
"gadget_mynij_home.css"
,
"mynij-style.css"
,
"mynij_logo.png"
,
"mynij_google_logo.png"
,
"action_mynij_search_build_index.html"
,
...
...
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_erp5_mynij_panel_html.html
0 → 100644
View file @
554312dc
<!DOCTYPE html>
<html>
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width"
/>
<title>
ERP5 Panel
</title>
<!--
data-i18n=Editable
-->
<!-- renderjs -->
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"handlebars.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_global.js"
type=
"text/javascript"
></script>
<script
id=
"panel-template-header"
type=
"text/x-handlebars-template"
>
<
div
data
-
role
=
"
header
"
class
=
"
ui-bar-inherit
"
>
<
div
class
=
"
ui-controlgroup ui-controlgroup-horizontal ui-btn-left
"
>
<
div
class
=
"
ui-controlgroup-controls
"
>
<
button
data
-
i18n
=
"
Close
"
class
=
"
ui-btn ui-btn-icon-notext ui-icon-delete
"
>
Close
<
/button
>
<
/div
>
<
/div
>
<
/div
>
</script>
<script
id=
"panel-template-body"
type=
"text/x-handlebars-template"
>
<
div
class
=
"
ui-content
"
>
<
form
class
=
"
dialog_form
"
>
<
button
type
=
"
submit
"
class
=
"
ui-btn ui-btn-b ui-btn-inline
ui-icon-action ui-btn-icon-right ui-screen-hidden
"
>
Submit
<
/button
>
<
div
data
-
gadget
-
url
=
"
gadget_erp5_searchfield.html
"
data
-
gadget
-
scope
=
"
erp5_searchfield
"
data
-
gadget
-
sandbox
=
"
public
"
><
/div
>
<
/form
>
<
ul
data
-
role
=
"
listview
"
class
=
"
ui-listview
"
data
-
enhanced
=
"
true
"
><
/ul
>
<
dl
><
/dl
>
<
/div
>
</script>
<script
id=
"panel-template-body-list"
type=
"text/x-handlebars-template"
>
<
li
class
=
"
ui-first-child
"
><
a
href
=
"
{{mynij_search_href}}
"
class
=
"
ui-btn ui-btn-icon-left ui-icon-search
"
data
-
i18n
=
"
Search
"
>
Search
<
/a></
li
>
<
li
><
a
href
=
"
{{source_list_href}}
"
class
=
"
ui-btn ui-btn-icon-left ui-icon-sitemap
"
data
-
i18n
=
"
Sources
"
accesskey
=
"
s
"
>
Sources
<
/a></
li
>
<
li
><
a
href
=
"
{{sync_href}}
"
class
=
"
ui-btn ui-btn-icon-left ui-icon-refresh
"
data
-
i18n
=
"
Synchronize
"
>
Synchronize
<
/a></
li
>
<
li
class
=
"
ui-last-child
"
><
a
href
=
"
{{storage_href}}
"
class
=
"
ui-btn ui-btn-icon-left ui-icon-gear
"
data
-
i18n
=
"
Storages
"
>
Storages
<
/a></
li
>
</script>
<script
id=
"panel-template-body-desktop"
type=
"text/x-handlebars-template"
>
<
dt
class
=
"
ui-content-title ui-body-c ui-btn ui-btn-icon-left ui-icon-eye
"
data
-
i18n
=
"
Views
"
>
Views
<
/dt
>
{{
#
each
view_list
}}
<
dd
data
-
role
=
"
listview
"
data
-
theme
=
"
c
"
data
-
inset
=
"
true
"
class
=
"
document-listview
"
>
<
a
data
-
i18n
=
"
{{title}}
"
class
=
"
ui-body-inherit
"
href
=
"
{{href}}
"
>
{{
title
}}
<
/a
>
<
/dd
>
{{
/
each
}}
<
dt
class
=
"
ui-content-title ui-body-c ui-btn ui-btn-icon-left ui-icon-cogs
"
data
-
i18n
=
"
Decisions
"
>
Decisions
<
/dt
>
{{
#
each
workflow_list
}}
<
dd
data
-
role
=
"
listview
"
data
-
theme
=
"
c
"
data
-
inset
=
"
true
"
class
=
"
document-listview
"
>
<
a
data
-
i18n
=
"
{{title}}
"
class
=
"
ui-body-inherit
"
href
=
"
{{href}}
"
>
{{
title
}}
<
/a
>
<
/dd
>
{{
/
each
}}
</script>
<!-- custom script -->
<script
src=
"gadget_erp5_mynij_panel.js"
type=
"text/javascript"
></script>
</head>
<body>
<div
class=
"jqm-navmenu-panel"
></div>
</body>
</html>
\ No newline at end of file
bt5/Mynij Search/PathTemplateItem/web_page_module/
mynij_results.css
.xml
→
bt5/Mynij Search/PathTemplateItem/web_page_module/
gadget_erp5_mynij_panel_html
.xml
View file @
554312dc
...
...
@@ -2,7 +2,7 @@
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Web
Styl
e"
module=
"erp5.portal_type"
/>
<global
name=
"Web
Pag
e"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
...
...
@@ -69,11 +69,11 @@
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/
css
</string>
</value>
<value>
<string>
text/
html
</string>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
mynij_results.css
</string>
</value>
<value>
<string>
gadget_erp5_mynij_panel.html
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
...
...
@@ -83,17 +83,15 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
mynij_results.css
</string>
</value>
<value>
<string>
gadget_erp5_mynij_panel_html
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<none/>
</value>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web
Styl
e
</string>
</value>
<value>
<string>
Web
Pag
e
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
...
...
@@ -103,13 +101,11 @@
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Mynij Result gadget CSS
</string>
</value>
<value>
<string>
Gadget ERP5 Mynij Panel
</string>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<none/>
</value>
<value>
<string>
001
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_erp5_mynij_panel_js.js
0 → 100644
View file @
554312dc
/*jslint nomen: true, indent: 2, maxerr: 3, unparam: true */
/*global window, document, rJS, Handlebars, RSVP, Node, loopEventListener */
(
function
(
window
,
document
,
rJS
,
Handlebars
,
RSVP
,
Node
,
loopEventListener
)
{
"
use strict
"
;
/////////////////////////////////////////////////////////////////
// temlates
/////////////////////////////////////////////////////////////////
// Precompile templates while loading the first gadget instance
var
gadget_klass
=
rJS
(
window
),
template_element
=
gadget_klass
.
__template_element
,
panel_template_header
=
Handlebars
.
compile
(
template_element
.
getElementById
(
"
panel-template-header
"
)
.
innerHTML
),
panel_template_body
=
Handlebars
.
compile
(
template_element
.
getElementById
(
"
panel-template-body
"
)
.
innerHTML
),
panel_template_body_list
=
Handlebars
.
compile
(
template_element
.
getElementById
(
"
panel-template-body-list
"
)
.
innerHTML
),
panel_template_body_desktop
=
Handlebars
.
compile
(
template_element
.
getElementById
(
"
panel-template-body-desktop
"
)
.
innerHTML
);
function
getElementList
(
gadget
,
element_list
)
{
var
i
=
0
,
element_info_list
=
[],
url_for_parameter_list
=
[],
element_info
,
key
;
for
(
key
in
element_list
)
{
if
(
element_list
.
hasOwnProperty
(
key
))
{
element_info
=
element_list
[
key
];
url_for_parameter_list
.
push
({
command
:
'
change
'
,
options
:
element_info
});
element_info_list
[
i
]
=
{
reference
:
element_info
.
reference
,
title
:
element_info
.
title
};
i
+=
1
;
}
}
return
gadget
.
getUrlForList
(
url_for_parameter_list
)
.
push
(
function
(
url_list
)
{
var
action_list
=
[],
j
,
element
;
for
(
j
=
0
;
j
<
url_list
.
length
;
j
+=
1
)
{
element
=
{
href
:
url_list
[
j
],
icon
:
null
,
name
:
element_info_list
[
j
].
reference
,
title
:
element_info_list
[
j
].
title
};
action_list
.
push
(
element
);
}
return
action_list
;
});
}
function
appendDt
(
fragment
,
dt_title
,
dt_icon
,
action_list
)
{
var
dt_element
=
document
.
createElement
(
'
dt
'
),
dd_element
,
a_element
,
i
;
dt_element
.
textContent
=
dt_title
;
dt_element
.
setAttribute
(
'
class
'
,
'
ui-btn-icon-left ui-icon-
'
+
dt_icon
);
fragment
.
appendChild
(
dt_element
);
for
(
i
=
0
;
i
<
action_list
.
length
;
i
+=
1
)
{
dd_element
=
document
.
createElement
(
'
dd
'
);
dd_element
.
setAttribute
(
'
class
'
,
'
document-listview
'
);
a_element
=
document
.
createElement
(
'
a
'
);
a_element
.
setAttribute
(
'
class
'
,
action_list
[
i
].
class_name
);
a_element
.
href
=
action_list
[
i
].
href
;
a_element
.
textContent
=
action_list
[
i
].
title
;
dd_element
.
appendChild
(
a_element
);
fragment
.
appendChild
(
dd_element
);
}
}
gadget_klass
.
setState
({
visible
:
false
,
desktop
:
false
})
//////////////////////////////////////////////
// acquired method
//////////////////////////////////////////////
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
translateHtml
"
,
"
translateHtml
"
)
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
getUrlParameter
"
,
"
getUrlParameter
"
)
.
declareAcquiredMethod
(
"
getUrlForList
"
,
"
getUrlForList
"
)
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.
declareMethod
(
'
toggle
'
,
function
()
{
return
this
.
changeState
({
visible
:
!
this
.
state
.
visible
});
})
.
declareMethod
(
'
close
'
,
function
()
{
return
this
.
changeState
({
visible
:
false
});
})
.
declareMethod
(
'
render
'
,
function
(
options
)
{
var
erp5_document
=
options
.
erp5_document
,
workflow_list
,
view_list
,
context
=
this
;
if
(
erp5_document
!==
undefined
)
{
workflow_list
=
erp5_document
.
_links
.
action_workflow
||
[];
view_list
=
erp5_document
.
_links
.
action_object_view
||
[];
if
(
workflow_list
.
constructor
!==
Array
)
{
workflow_list
=
[
workflow_list
];
}
if
(
view_list
.
constructor
!==
Array
)
{
view_list
=
[
view_list
];
}
// Prevent has much as possible to modify the DOM panel
// stateChange prefer to compare strings
workflow_list
=
JSON
.
stringify
(
workflow_list
);
view_list
=
JSON
.
stringify
(
view_list
);
}
return
context
.
getUrlParameter
(
'
editable
'
)
.
push
(
function
(
editable
)
{
return
context
.
changeState
({
workflow_list
:
workflow_list
,
view_list
:
view_list
,
global
:
true
,
view_action_dict
:
options
.
view_action_dict
||
false
,
editable
:
options
.
editable
||
editable
||
false
});
});
})
.
onStateChange
(
function
(
modification_dict
)
{
var
context
=
this
,
gadget
=
this
,
queue
=
new
RSVP
.
Queue
(),
tmp_element
;
if
(
modification_dict
.
hasOwnProperty
(
"
visible
"
))
{
if
(
this
.
state
.
visible
)
{
if
(
!
this
.
element
.
classList
.
contains
(
'
visible
'
))
{
this
.
element
.
classList
.
toggle
(
'
visible
'
);
}
}
else
{
if
(
this
.
element
.
classList
.
contains
(
'
visible
'
))
{
this
.
element
.
classList
.
remove
(
'
visible
'
);
}
}
}
if
(
modification_dict
.
hasOwnProperty
(
"
global
"
))
{
queue
.
push
(
function
()
{
// XXX: Customize panel header!
return
context
.
translateHtml
(
panel_template_header
()
+
panel_template_body
()
);
})
.
push
(
function
(
my_translated_or_plain_html
)
{
tmp_element
=
document
.
createElement
(
'
div
'
);
tmp_element
.
innerHTML
=
my_translated_or_plain_html
;
return
context
.
declareGadget
(
'
gadget_erp5_searchfield.html
'
,
{
scope
:
"
erp5_searchfield
"
,
element
:
tmp_element
.
querySelector
(
'
[data-gadget-scope="erp5_searchfield"]
'
)
});
})
.
push
(
function
(
search_gadget
)
{
return
search_gadget
.
render
({
focus
:
false
});
})
.
push
(
function
()
{
context
.
element
.
querySelector
(
"
div
"
).
appendChild
(
tmp_element
);
if
(
!
modification_dict
.
view_action_dict
)
{
return
context
.
listenResize
();
}
});
}
if
(
modification_dict
.
hasOwnProperty
(
"
editable
"
))
{
queue
// Update the global links
.
push
(
function
()
{
return
RSVP
.
all
([
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
"
mynij_search
"
}}),
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
"
ojs_configurator
"
}}),
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
"
ojs_sync
"
,
'
auto_repair
'
:
true
}}),
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
"
ojs_local_controller
"
}})
]);
})
.
push
(
function
(
result_list
)
{
return
context
.
translateHtml
(
panel_template_body_list
({
"
mynij_search_href
"
:
result_list
[
0
],
"
storage_href
"
:
result_list
[
1
],
"
sync_href
"
:
result_list
[
2
],
"
source_list_href
"
:
result_list
[
3
]
})
);
})
.
push
(
function
(
result
)
{
context
.
element
.
querySelector
(
"
ul
"
).
innerHTML
=
result
;
});
}
if
((
this
.
state
.
global
===
true
)
&&
(
modification_dict
.
hasOwnProperty
(
"
desktop
"
)
||
modification_dict
.
hasOwnProperty
(
"
editable
"
)
||
modification_dict
.
hasOwnProperty
(
"
workflow_list
"
)
||
modification_dict
.
hasOwnProperty
(
"
view_list
"
)))
{
if
(
!
(
this
.
state
.
desktop
&&
(
this
.
state
.
view_list
!==
undefined
)))
{
queue
.
push
(
function
()
{
gadget
.
element
.
querySelector
(
"
dl
"
).
textContent
=
''
;
});
}
else
{
queue
.
push
(
function
()
{
var
i
=
0
,
promise_list
=
[],
workflow_list
=
JSON
.
parse
(
gadget
.
state
.
workflow_list
),
view_list
=
JSON
.
parse
(
gadget
.
state
.
view_list
);
for
(
i
=
0
;
i
<
workflow_list
.
length
;
i
+=
1
)
{
promise_list
.
push
(
gadget
.
getUrlFor
({
command
:
'
change
'
,
options
:
{
view
:
workflow_list
[
i
].
href
,
page
:
undefined
}
})
);
}
for
(
i
=
0
;
i
<
view_list
.
length
;
i
+=
1
)
{
promise_list
.
push
(
gadget
.
getUrlFor
({
command
:
'
change
'
,
options
:
{
view
:
view_list
[
i
].
href
,
page
:
undefined
}
})
);
}
return
RSVP
.
all
(
promise_list
);
})
.
push
(
function
(
result_list
)
{
var
i
,
result_workflow_list
=
[],
result_view_list
=
[],
workflow_list
=
JSON
.
parse
(
gadget
.
state
.
workflow_list
),
view_list
=
JSON
.
parse
(
gadget
.
state
.
view_list
);
for
(
i
=
0
;
i
<
workflow_list
.
length
;
i
+=
1
)
{
result_workflow_list
.
push
({
title
:
workflow_list
[
i
].
title
,
href
:
result_list
[
i
]
});
}
for
(
i
=
0
;
i
<
view_list
.
length
;
i
+=
1
)
{
result_view_list
.
push
({
title
:
view_list
[
i
].
title
,
href
:
result_list
[
i
+
workflow_list
.
length
]
});
}
gadget
.
element
.
querySelector
(
"
dl
"
).
innerHTML
=
panel_template_body_desktop
({
workflow_list
:
result_workflow_list
,
view_list
:
result_view_list
});
});
}
}
if
(
modification_dict
.
view_action_dict
)
{
queue
.
push
(
function
()
{
return
RSVP
.
all
([
getElementList
(
gadget
,
modification_dict
.
view_action_dict
.
view_list
),
getElementList
(
gadget
,
modification_dict
.
view_action_dict
.
action_list
)
]);
})
.
push
(
function
(
view_action_list
)
{
var
dl_element
,
dl_fragment
=
document
.
createDocumentFragment
();
dl_element
=
gadget
.
element
.
querySelector
(
"
dl
"
);
while
(
dl_element
.
firstChild
)
{
dl_element
.
removeChild
(
dl_element
.
firstChild
);
}
if
(
view_action_list
[
0
].
length
>
0
)
{
appendDt
(
dl_fragment
,
"
VIEWS
"
,
'
eye
'
,
view_action_list
[
0
]);
dl_element
.
appendChild
(
dl_fragment
);
}
if
(
view_action_list
[
1
].
length
>
0
)
{
appendDt
(
dl_fragment
,
"
ACTIONS
"
,
'
cogs
'
,
view_action_list
[
1
]);
dl_element
.
appendChild
(
dl_fragment
);
}
});
}
return
queue
;
})
/////////////////////////////////////////////////////////////////
// declared services
/////////////////////////////////////////////////////////////////
.
onEvent
(
'
click
'
,
function
(
evt
)
{
if
((
evt
.
target
.
nodeType
===
Node
.
ELEMENT_NODE
)
&&
(
evt
.
target
.
tagName
===
'
BUTTON
'
))
{
return
this
.
toggle
();
}
},
false
,
false
)
.
declareJob
(
'
listenResize
'
,
function
()
{
// resize should be only trigger after the render method
// as displaying the panel rely on external gadget (for translation for example)
var
result
,
event
,
context
=
this
;
function
extractSizeAndDispatch
()
{
if
(
window
.
matchMedia
(
"
(min-width: 85em)
"
).
matches
)
{
return
context
.
changeState
({
desktop
:
true
});
}
return
context
.
changeState
({
desktop
:
false
});
}
result
=
loopEventListener
(
window
,
'
resize
'
,
false
,
extractSizeAndDispatch
);
event
=
document
.
createEvent
(
"
Event
"
);
event
.
initEvent
(
'
resize
'
,
true
,
true
);
window
.
dispatchEvent
(
event
);
return
result
;
})
.
allowPublicAcquisition
(
'
notifyChange
'
,
function
(
argument_list
,
scope
)
{
if
(
scope
===
'
erp5_checkbox
'
)
{
var
context
=
this
;
return
context
.
getDeclaredGadget
(
'
erp5_checkbox
'
)
.
push
(
function
(
gadget
)
{
return
gadget
.
getContent
();
})
.
push
(
function
(
result
)
{
var
options
=
{
editable
:
undefined
};
if
(
result
.
editable
.
length
===
1
)
{
options
.
editable
=
true
;
}
return
context
.
redirect
({
command
:
'
change
'
,
options
:
options
});
});
}
// Typing a search query should not modify the header status
return
;
})
.
allowPublicAcquisition
(
'
notifyValid
'
,
function
()
{
// Typing a search query should not modify the header status
return
;
})
.
onEvent
(
'
submit
'
,
function
()
{
var
gadget
=
this
;
return
gadget
.
getDeclaredGadget
(
"
erp5_searchfield
"
)
.
push
(
function
(
search_gadget
)
{
return
search_gadget
.
getContent
();
})
.
push
(
function
(
data
)
{
var
options
=
{
page
:
"
ojs_document_list
"
};
if
(
data
.
search
)
{
options
.
extended_search
=
data
.
search
;
}
// Remove focus from the search field
document
.
activeElement
.
blur
();
return
gadget
.
redirect
({
command
:
'
display
'
,
options
:
options
});
});
},
false
,
true
)
.
onEvent
(
'
blur
'
,
function
(
evt
)
{
// XXX Horrible hack to clear the search when focus is lost
// This does not follow renderJS design, as a gadget should not touch
// another gadget content
if
(
evt
.
target
.
type
===
'
search
'
)
{
evt
.
target
.
value
=
""
;
}
},
true
,
false
);
}(
window
,
document
,
rJS
,
Handlebars
,
RSVP
,
Node
,
loopEventListener
));
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_erp5_mynij_panel_js.xml
0 → 100644
View file @
554312dc
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Web Script"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Access_contents_information_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Add_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Change_local_roles_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_Modify_portal_content_Permission
</string>
</key>
<value>
<tuple>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
_View_Permission
</string>
</key>
<value>
<tuple>
<string>
Anonymous
</string>
<string>
Assignee
</string>
<string>
Assignor
</string>
<string>
Associate
</string>
<string>
Auditor
</string>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
content_md5
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_erp5_mynij_panel.js
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
gadget_erp5_mynij_panel_js
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<string>
en
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Web Script
</string>
</value>
</item>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Gadget Mynij Panel JS
</string>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
<value>
<string>
001
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_erp5_page_mynij_
home.
html.html
→
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_erp5_page_mynij_
search_
html.html
View file @
554312dc
<!doctype html>
<html>
<head>
<title>
Mynij
</title>
<title>
Mynij
Search
</title>
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_erp5_page_mynij_
home
.js"
type=
"text/javascript"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
gadget_mynij_hom
e.css"
>
<script
src=
"gadget_erp5_page_mynij_
search
.js"
type=
"text/javascript"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"
mynij-styl
e.css"
>
</head>
<body>
<div
id=
"search_div"
>
<div
id=
"search_div"
>
<form
id =
"search_bar"
>
<input
type=
"search"
id =
"search_input"
required
>
</form>
<select
id=
"select_index"
></select>
</div>
<div
id =
"gadget_result"
data-gadget-url=
"gadget_mynij_result.html"
data-gadget-scope=
"result"
data-gadget-sandbox=
"public"
>
<div
data-gadget-url=
"gadget_mynij_model.html"
data-gadget-scope=
"model"
data-gadget-sandbox=
"public"
>
<div
id =
"gadget_result"
data-gadget-url=
"gadget_mynij_result.html"
data-gadget-scope=
"result"
data-gadget-sandbox=
"public"
>
<div
data-gadget-url=
"gadget_mynij_model.html"
data-gadget-scope=
"model"
data-gadget-sandbox=
"public"
>
</body>
</html>
\ No newline at end of file
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_erp5_page_mynij_
home.
html.xml
→
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_erp5_page_mynij_
search_
html.xml
View file @
554312dc
...
...
@@ -73,7 +73,7 @@
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_erp5_page_mynij_
home
.html
</string>
</value>
<value>
<string>
gadget_erp5_page_mynij_
search
.html
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
...
...
@@ -83,7 +83,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
gadget_erp5_page_mynij_
home.
html
</string>
</value>
<value>
<string>
gadget_erp5_page_mynij_
search_
html
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
...
...
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_erp5_page_mynij_
home
.js
→
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_erp5_page_mynij_
search_js
.js
View file @
554312dc
File moved
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_erp5_page_mynij_
home
.xml
→
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_erp5_page_mynij_
search_js
.xml
View file @
554312dc
...
...
@@ -73,7 +73,7 @@
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_erp5_page_mynij_
home
.js
</string>
</value>
<value>
<string>
gadget_erp5_page_mynij_
search
.js
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
...
...
@@ -83,7 +83,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
gadget_erp5_page_mynij_
home
</string>
</value>
<value>
<string>
gadget_erp5_page_mynij_
search_js
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
...
...
@@ -103,7 +103,7 @@
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Mynij
home
JS
</string>
</value>
<value>
<string>
Mynij
Search
JS
</string>
</value>
</item>
<item>
<key>
<string>
version
</string>
</key>
...
...
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_mynij_result.html.html
View file @
554312dc
...
...
@@ -5,18 +5,20 @@
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_mynij_result.js"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"mynij
_results
.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"mynij
-style
.css"
>
</head>
<body>
<div
id=
"results"
>
<div
id =
"mynij"
><img
src=
"mynij_logo.png"
>
<ul
id=
"mynij-results"
>
</ul>
</div>
<div
id =
"google"
><img
src=
"mynij_google_logo.png"
>
<ul
id=
"searx-results"
>
</ul>
</div>
<div
id=
"results"
class=
"result-box"
>
<div
id =
"mynij"
class=
"mynij-results"
>
<div
class=
"logo-img"
><img
src=
"mynij_logo.png"
></div>
<ul
id=
"mynij-results"
>
</ul>
</div>
<div
id =
"google"
class=
"searx-results"
>
<div
class=
"logo-img"
><img
src=
"mynij_google_logo.png"
></div>
<ul
id=
"searx-results"
>
</ul>
</div>
</div>
</body>
</html>
\ No newline at end of file
</html>
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_mynij_
hom
e.css.css
→
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_mynij_
styl
e.css.css
View file @
554312dc
...
...
@@ -131,3 +131,95 @@ input[type="button"]:hover{
right: 0;
padding: 5%;
} */
.result-box
{
display
:
flex
;
}
.result-box
:after
{
content
:
""
;
clear
:
both
;
}
.mynij-results
,
.searx-results
{
margin-top
:
20px
;
flex
:
50%
;
}
.logo-img
{
width
:
100%
;
text-align
:
left
;
height
:
80px
;
}
.logo-img
img
{
height
:
100%
;
}
#mynij-results
>
li
,
#searx-results
>
li
{
list-style-type
:
none
;
position
:
relative
;
margin-bottom
:
20px
;
padding-top
:
1%
;
padding-bottom
:
1%
;
padding-left
:
1%
;
background
:
#fff
;
color
:
#2b2b5d
;
width
:
90%
;
max-width
:
40em
;
text-align
:
left
;
}
.title
{
color
:
#3c459e
;
text-decoration
:
none
;
font-size
:
1.3em
;
max-width
:
40em
;
}
.link
,
.link
:visited
{
text-decoration
:
none
;
color
:
#009933
;
max-width
:
40em
;
}
.body
{
color
:
#444444
;
max-width
:
40em
;
}
#mynij-results
>
a
,
#searx-results
>
a
{
position
:
relative
;
}
.highlight
{
font-weight
:
bold
;
}
#mynij-results
>
a
:after
,
#searx-results
>
a
:after
{
content
:
''
;
position
:
absolute
;
bottom
:
-.4em
;
left
:
50%
;
right
:
50%
;
height
:
1px
;
background
:
#2b2b5d
;
transition
:
all
ease
.2s
;
}
#mynij-results
>
a
:hover:after
,
#searx-results
>
a
:hover:after
{
left
:
0
;
right
:
0
;
height
:
2px
;
}
#mynij-results
>
a
:before
,
#searx-results
>
a
:before
{
position
:
absolute
;
transform
:
translateX
(
-100%
);
left
:
-10px
;
color
:
#2b2b5d
;
opacity
:
.3
;
font-weight
:
100
;
font-size
:
.8em
;
}
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_mynij_
hom
e.css.xml
→
bt5/Mynij Search/PathTemplateItem/web_page_module/gadget_mynij_
styl
e.css.xml
View file @
554312dc
...
...
@@ -73,7 +73,7 @@
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
gadget_mynij_hom
e.css
</string>
</value>
<value>
<string>
mynij-styl
e.css
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
...
...
@@ -83,7 +83,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
gadget_mynij_
hom
e.css
</string>
</value>
<value>
<string>
gadget_mynij_
styl
e.css
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
...
...
bt5/Mynij Search/PathTemplateItem/web_page_module/mynij_results.css.css
deleted
100644 → 0
View file @
6d90855c
#results
{
display
:
flex
;
padding-top
:
3%
;
width
:
100%
;
}
#mynij
,
#google
{
width
:
45%
;
margin
:
auto
;
text-align
:
center
;
margin-top
:
inherit
;
}
#mynij
>
img
{
max-width
:
15%
;
}
#google
>
img
{
max-width
:
20%
;
}
#gadget_result
{
display
:
flex
;
}
#mynij-results
,
#searx-results
{
margin-top
:
10%
;
text-align
:
left
;
}
#mynij-results
>
li
,
#searx-results
>
li
{
margin
:
auto
;
list-style-type
:
none
;
position
:
relative
;
margin-top
:
5%
;
padding-top
:
1%
;
padding-bottom
:
1%
;
padding-left
:
1%
;
background
:
#fff
;
color
:
#2b2b5d
;
width
:
90%
;
max-width
:
40em
;
text-align
:
left
;
box-shadow
:
0
2px
5px
0
rgba
(
0
,
0
,
0
,
0.26
);
border-radius
:
8px
;
}
.title
{
color
:
#1122CC
;
text-decoration
:
none
;
font-size
:
x-large
;
max-width
:
40em
;
}
.link
,
.link
:visited
{
text-decoration
:
none
;
color
:
#009933
;
max-width
:
40em
;
}
.body
{
color
:
#444444
;
max-width
:
40em
;
}
#mynij-results
>
a
,
#searx-results
>
a
{
position
:
relative
;
}
.highlight
{
font-weight
:
bold
;
}
#mynij-results
>
a
:after
,
#searx-results
>
a
:after
{
content
:
''
;
position
:
absolute
;
bottom
:
-.4em
;
left
:
50%
;
right
:
50%
;
height
:
1px
;
background
:
#2b2b5d
;
transition
:
all
ease
.2s
;
}
#mynij-results
>
a
:hover:after
,
#searx-results
>
a
:hover:after
{
left
:
0
;
right
:
0
;
height
:
2px
;
}
#mynij-results
>
a
:before
,
#searx-results
>
a
:before
{
position
:
absolute
;
transform
:
translateX
(
-100%
);
left
:
-10px
;
color
:
#2b2b5d
;
opacity
:
.3
;
font-weight
:
100
;
font-size
:
.8em
;
}
\ No newline at end of file
bt5/Mynij Search/PathTemplateItem/web_site_module/mynij_search/app.xml
View file @
554312dc
...
...
@@ -299,7 +299,7 @@
</item>
<item>
<key>
<string>
configuration_default_view_action_reference
</string>
</key>
<value>
<string>
jio_view
</string>
</value>
<value>
<string>
mynij_search
</string>
</value>
</item>
<item>
<key>
<string>
configuration_frontpage_gadget_url
</string>
</key>
...
...
@@ -311,7 +311,7 @@
</item>
<item>
<key>
<string>
configuration_panel_gadget_url
</string>
</key>
<value>
<string>
gadget_erp5_
ojs
_panel.html
</string>
</value>
<value>
<string>
gadget_erp5_
mynij
_panel.html
</string>
</value>
</item>
<item>
<key>
<string>
configuration_precache_manifest_script_list
</string>
</key>
...
...
bt5/Mynij Search/bt/template_path_list
View file @
554312dc
...
...
@@ -6,6 +6,7 @@ web_page_module/gadget_erp5_mynij_**
web_page_module/gadget_erp5_page_mynij_**
web_page_module/gadget_mynij_**
web_page_module/gadget_officejs_mynij_**
web_page_module/mynij-**
web_page_module/mynij_**
web_site_module/mynij_search
web_site_module/mynij_search/**
\ No newline at end of file
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