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
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
Levin Zimmermann
erp5
Commits
a7969c7d
Commit
a7969c7d
authored
Jun 22, 2020
by
Gabriel Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs_support_request_ui: New gadget to generate RSS Link
Also, remove RSS link from dashboard
parent
880fd080
Changes
20
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
707 additions
and
49 deletions
+707
-49
bt5/erp5_officejs_support_request_ui/ActionTemplateItem/portal_types/Support%20Request%20Module/generate_rss_link.xml
...al_types/Support%20Request%20Module/generate_rss_link.xml
+85
-0
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_html.html
.../web_page_module/gadget_supportrequest_homepage_html.html
+0
-1
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_html.xml
...m/web_page_module/gadget_supportrequest_homepage_html.xml
+3
-3
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_js.js
...Item/web_page_module/gadget_supportrequest_homepage_js.js
+5
-28
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_js.xml
...tem/web_page_module/gadget_supportrequest_homepage_js.xml
+2
-2
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_panel_html.xml
...Item/web_page_module/gadget_supportrequest_panel_html.xml
+2
-2
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_panel_js.js
...ateItem/web_page_module/gadget_supportrequest_panel_js.js
+8
-1
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_panel_js.xml
...teItem/web_page_module/gadget_supportrequest_panel_js.xml
+2
-2
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_generateRSSLinkUrl.py
...upport_request/SupportRequestModule_generateRSSLinkUrl.py
+2
-4
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_generateRSSLinkUrl.xml
...pport_request/SupportRequestModule_generateRSSLinkUrl.xml
+1
-1
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_viewGenerateRSSLinkDialog.xml
...equest/SupportRequestModule_viewGenerateRSSLinkDialog.xml
+135
-0
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_viewGenerateRSSLinkDialog/generate_rss_link_gadget.xml
...le_viewGenerateRSSLinkDialog/generate_rss_link_gadget.xml
+276
-0
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/gadget_generate_rss_link.css.css
...officejs_support_request/gadget_generate_rss_link.css.css
+10
-0
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/gadget_generate_rss_link.css.xml
...officejs_support_request/gadget_generate_rss_link.css.xml
+28
-0
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/gadget_generate_rss_link.html.xml
...fficejs_support_request/gadget_generate_rss_link.html.xml
+58
-0
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/gadget_generate_rss_link.html.zpt
...fficejs_support_request/gadget_generate_rss_link.html.zpt
+19
-0
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/gadget_generate_rss_link.js.js
...5_officejs_support_request/gadget_generate_rss_link.js.js
+36
-0
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/gadget_generate_rss_link.js.xml
..._officejs_support_request/gadget_generate_rss_link.js.xml
+32
-0
bt5/erp5_officejs_support_request_ui/bt/template_action_path_list
..._officejs_support_request_ui/bt/template_action_path_list
+1
-0
bt5/erp5_officejs_support_request_ui_test/TestTemplateItem/portal_components/test.erp5.testSupportRequest.py
...ateItem/portal_components/test.erp5.testSupportRequest.py
+2
-5
No files found.
bt5/erp5_officejs_support_request_ui/ActionTemplateItem/portal_types/Support%20Request%20Module/generate_rss_link.xml
0 → 100644
View file @
a7969c7d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ActionInformation"
module=
"Products.CMFCore.ActionInformation"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/object_jio_action
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_jio_action
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
generate_rss_link
</string>
</value>
</item>
<item>
<key>
<string>
permissions
</string>
</key>
<value>
<tuple>
<string>
View
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Action Information
</string>
</value>
</item>
<item>
<key>
<string>
priority
</string>
</key>
<value>
<float>
3.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Generate RSS
</string>
</value>
</item>
<item>
<key>
<string>
visible
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/SupportRequestModule_viewGenerateRSSLinkDialog
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_html.html
View file @
a7969c7d
...
...
@@ -21,7 +21,6 @@
<div
class=
"ui-field-contain"
>
<div
class=
"bottom"
>
<a><input
type=
"submit"
class=
"first-line-buttons ui-disabled"
data-i18n=
"[value]Submit New Support Request"
value=
"Submit New Support Request"
disabled
/></a>
<a
target=
"_blank"
><input
class=
"first-line-buttons ui-disabled"
type=
"submit"
data-i18n=
"[value]Generate RSS"
value=
"Generate RSS"
disabled
/></a>
</div>
</div>
...
...
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_html.xml
View file @
a7969c7d
...
...
@@ -238,7 +238,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
62.17075.21280.35942
</string>
</value>
<value>
<string>
9
83.3535.62274.35669
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -256,8 +256,8 @@
</tuple>
<state>
<tuple>
<float>
15
37518325.21
</float>
<string>
GMT+9
</string>
<float>
15
92854185.8
</float>
<string>
UTC
</string>
</tuple>
</state>
</object>
...
...
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_js.js
View file @
a7969c7d
...
...
@@ -108,7 +108,7 @@
throw
error
;
})
.
push
(
function
()
{
var
restore_filter_input
=
gadget
.
element
.
querySelectorAll
(
"
input
"
)[
2
];
var
restore_filter_input
=
gadget
.
element
.
querySelectorAll
(
"
input
"
)[
1
];
restore_filter_input
.
disabled
=
false
;
restore_filter_input
.
classList
.
remove
(
"
ui-disabled
"
);
});
...
...
@@ -264,7 +264,7 @@
})
.
declareService
(
function
()
{
var
gadget
=
this
,
restore_filter_input
=
gadget
.
element
.
querySelectorAll
(
"
input
"
)[
2
];
restore_filter_input
=
gadget
.
element
.
querySelectorAll
(
"
input
"
)[
1
];
return
gadget
.
getUrlParameter
(
'
extended_search
'
)
.
push
(
function
(
result
)
{
if
(
result
!==
undefined
)
{
...
...
@@ -277,29 +277,8 @@
var
gadget
=
this
;
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
var
generate_rss_input
=
gadget
.
element
.
querySelectorAll
(
"
input
"
)[
1
],
restore_filter_input
=
gadget
.
element
.
querySelectorAll
(
"
input
"
)[
2
],
one
=
new
RSVP
.
Queue
().
push
(
function
()
{
return
promiseEventListener
(
generate_rss_input
,
"
click
"
,
false
);
}).
push
(
function
()
{
generate_rss_input
.
disabled
=
true
;
generate_rss_input
.
classList
.
add
(
"
ui-disabled
"
);
return
gadget
.
getSetting
(
"
hateoas_url
"
)
.
push
(
function
(
hateoas_url
)
{
return
gadget
.
jio_getAttachment
(
'
support_request_module
'
,
hateoas_url
+
'
support_request_module
'
+
"
/SupportRequestModule_generateRSSLinkAsJson
"
);
})
.
push
(
function
(
result
)
{
generate_rss_input
.
parentNode
.
href
=
result
.
restricted_access_url
;
generate_rss_input
.
value
=
"
RSS Link
"
;
generate_rss_input
.
disabled
=
false
;
generate_rss_input
.
classList
.
remove
(
"
ui-disabled
"
);
});
}),
two
=
loopEventListener
(
restore_filter_input
,
"
click
"
,
false
,
function
()
{
var
restore_filter_input
=
gadget
.
element
.
querySelectorAll
(
"
input
"
)[
1
],
one
=
loopEventListener
(
restore_filter_input
,
"
click
"
,
false
,
function
()
{
restore_filter_input
.
disabled
=
true
;
restore_filter_input
.
classList
.
add
(
"
ui-disabled
"
);
return
gadget
.
redirect
({
...
...
@@ -311,9 +290,7 @@
});
},
true
);
generate_rss_input
.
disabled
=
false
;
generate_rss_input
.
classList
.
remove
(
"
ui-disabled
"
);
return
RSVP
.
all
([
one
,
two
]);
return
one
;
});
})
.
onStateChange
(
function
()
{
...
...
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_js.xml
View file @
a7969c7d
...
...
@@ -246,7 +246,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
98
3.46010.49549.22528
</string>
</value>
<value>
<string>
98
4.48957.14599.64153
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -264,7 +264,7 @@
</tuple>
<state>
<tuple>
<float>
15
88755553.56
</float>
<float>
15
92917663.81
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_panel_html.xml
View file @
a7969c7d
...
...
@@ -238,7 +238,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
98
3.35938.18075.42103
</string>
</value>
<value>
<string>
98
4.51645.41378.19729
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>
15
89291785.06
</float>
<float>
15
93352275.81
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_panel_js.js
View file @
a7969c7d
...
...
@@ -27,8 +27,10 @@
//////////////////////////////////////////////
// acquired method
//////////////////////////////////////////////
.
declareAcquiredMethod
(
"
jio_getAttachment
"
,
"
jio_getAttachment
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
translateHtml
"
,
"
translateHtml
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
/////////////////////////////////////////////////////////////////
...
...
@@ -260,7 +262,12 @@
});
},
false
,
true
)
.
onEvent
(
'
click
'
,
function
(
evt
)
{
if
((
evt
.
target
.
nodeType
===
Node
.
ELEMENT_NODE
)
&&
(
evt
.
target
.
tagName
===
'
BUTTON
'
))
{
return
this
.
toggle
();
}
},
false
,
false
)
.
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
...
...
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_panel_js.xml
View file @
a7969c7d
...
...
@@ -238,7 +238,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
76.15074.42522.46830
</string>
</value>
<value>
<string>
9
84.51645.41378.19729
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -256,7 +256,7 @@
</tuple>
<state>
<tuple>
<float>
15
59893029.52
</float>
<float>
15
93352467.41
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_generateRSSLink
AsJson
.py
→
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_generateRSSLink
Url
.py
View file @
a7969c7d
import
json
absolute_url
=
context
.
absolute_url
()
request_url
=
"%s/SupportRequestModule_viewLastSupportRequestListAsRss"
%
(
absolute_url
,)
portal
=
context
.
getPortalObject
()
person
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
if
person
is
None
:
return
json
.
dumps
({
'restricted_access_url'
:
request_url
})
return
request_url
access_token
=
None
...
...
@@ -35,4 +33,4 @@ url = "%s?access_token=%s&access_token_secret=%s" % (
access_token
.
getId
(),
reference
)
return
json
.
dumps
({
'restricted_access_url'
:
url
})
return
url
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_generateRSSLink
AsJson
.xml
→
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_generateRSSLink
Url
.xml
View file @
a7969c7d
...
...
@@ -54,7 +54,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SupportRequestModule_generateRSSLink
AsJson
</string>
</value>
<value>
<string>
SupportRequestModule_generateRSSLink
Url
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_viewGenerateRSSLinkDialog.xml
0 → 100644
View file @
a7969c7d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ERP5 Form"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
SupportRequestModule_viewGenerateRSSDialog
</string>
</value>
</item>
<item>
<key>
<string>
action_title
</string>
</key>
<value>
<string>
Refresh page
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
edit_order
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
enctype
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
group_list
</string>
</key>
<value>
<list>
<string>
left
</string>
<string>
right
</string>
<string>
center
</string>
<string>
bottom
</string>
<string>
hidden
</string>
</list>
</value>
</item>
<item>
<key>
<string>
groups
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
bottom
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
center
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
left
</string>
</key>
<value>
<list>
<string>
generate_rss_link_gadget
</string>
</list>
</value>
</item>
<item>
<key>
<string>
right
</string>
</key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SupportRequestModule_viewGenerateRSSLinkDialog
</string>
</value>
</item>
<item>
<key>
<string>
method
</string>
</key>
<value>
<string>
GET
</string>
</value>
</item>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
SupportRequestModule_generateRSSLink
</string>
</value>
</item>
<item>
<key>
<string>
pt
</string>
</key>
<value>
<string>
report_view
</string>
</value>
</item>
<item>
<key>
<string>
row_length
</string>
</key>
<value>
<int>
4
</int>
</value>
</item>
<item>
<key>
<string>
stored_encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Click the link bellow to obtain it
</string>
</value>
</item>
<item>
<key>
<string>
unicode_mode
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
update_action
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
update_action_title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_viewGenerateRSSLinkDialog/generate_rss_link_gadget.xml
0 → 100644
View file @
a7969c7d
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/gadget_generate_rss_link.css.css
0 → 100644
View file @
a7969c7d
div
[
data-gadget-url
$
=
"gadget_generate_rss_link.html"
]
button
{
padding
:
6pt
;
background-color
:
#FF6600
;
color
:
#FFFFFF
;
border-radius
:
0.325em
;
border-width
:
1px
;
border-style
:
solid
;
border-color
:
#FF6600
;
min-width
:
8em
;
}
\ No newline at end of file
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/gadget_generate_rss_link.css.xml
0 → 100644
View file @
a7969c7d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"File"
module=
"OFS.Image"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
gadget_generate_rss_link.css
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/css
</string>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/gadget_generate_rss_link.html.xml
0 → 100644
View file @
a7969c7d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate"
/>
</pickle>
<pickle>
<dictionary>
<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_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
<item>
<key>
<string>
expand
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
gadget_generate_rss_link.html
</string>
</value>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/gadget_generate_rss_link.html.zpt
0 → 100644
View file @
a7969c7d
<!DOCTYPE html>
<html>
<head>
<!--
data-i18n=Copied
-->
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no"
/>
<link
rel=
"stylesheet"
href=
"gadget_generate_rss_link.css"
>
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<script
src=
"gadget_generate_rss_link.js"
type=
"text/javascript"
></script>
</head>
<body>
<button
type=
"button"
class=
"ui-btn ui-icon-copy ui-btn-icon-notext ui-btn-right"
data-i18n=
"[value]Copy to Clipboard"
>
Copy to Clipboard
</button>
</body>
</html>
\ No newline at end of file
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/gadget_generate_rss_link.js.js
0 → 100644
View file @
a7969c7d
/*global rJS, window, navigator, RSVP*/
/*jslint nomen: true, maxlen:80, indent:2*/
(
function
(
rJS
,
window
,
navigator
,
RSVP
)
{
'
use strict
'
;
rJS
(
window
)
.
declareAcquiredMethod
(
"
getTranslationList
"
,
"
getTranslationList
"
)
.
declareMethod
(
'
render
'
,
function
(
options
)
{
return
this
.
changeState
({
rss_url
:
options
.
rss_url
});
})
.
onEvent
(
'
click
'
,
function
(
evt
)
{
var
gadget
=
this
,
root
=
this
.
element
,
button
=
evt
.
target
,
button_text
;
evt
.
preventDefault
();
return
gadget
.
getTranslationList
([
"
Copied
"
])
.
push
(
function
(
result
)
{
button_text
=
result
[
0
];
button
.
classList
.
remove
(
"
ui-icon-copy
"
);
return
navigator
.
clipboard
.
writeText
(
gadget
.
state
.
rss_url
);
})
.
push
(
function
()
{
button
.
classList
.
add
(
"
ui-icon-check
"
);
button
.
textContent
=
"
"
+
button_text
;
});
},
false
,
false
);
}(
rJS
,
window
,
navigator
,
RSVP
));
\ No newline at end of file
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/gadget_generate_rss_link.js.xml
0 → 100644
View file @
a7969c7d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"File"
module=
"OFS.Image"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_Cacheable__manager_id
</string>
</key>
<value>
<string>
must_revalidate_http_cache
</string>
</value>
</item>
<item>
<key>
<string>
__name__
</string>
</key>
<value>
<string>
gadget_generate_rss_link.js
</string>
</value>
</item>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
application/javascript
</string>
</value>
</item>
<item>
<key>
<string>
precondition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_officejs_support_request_ui/bt/template_action_path_list
View file @
a7969c7d
Support Request Module | fast_input
Support Request Module | generate_rss_link
Support Request Module | officejs_support_request_view
Support Request Module | view_last_support_request
Support Request | officejs_support_request_view
\ No newline at end of file
bt5/erp5_officejs_support_request_ui_test/TestTemplateItem/portal_components/test.erp5.testSupportRequest.py
View file @
a7969c7d
...
...
@@ -461,11 +461,8 @@ class TestSupportRequestRSSSOneEvent(SupportRequestRSSTestCase, DefaultTestRSSMi
self
.
_checkRSS
(
response
)
def
test_RSS_with_token
(
self
):
response
=
self
.
publish
(
"%s/support_request_module/SupportRequestModule_generateRSSLinkAsJson"
%
self
.
getWebSite
().
getPath
(),
basic
=
'%s:%s'
%
(
self
.
user
.
erp5_login
.
getReference
(),
self
.
user_password
))
restricted_access_url
=
json
.
loads
(
response
.
getBody
())[
'restricted_access_url'
]
# make it relative url
self
.
login
(
self
.
user
.
getUserId
())
restricted_access_url
=
self
.
portal
.
support_request_module
.
SupportRequestModule_generateRSSLinkUrl
()
parsed_url
=
urlparse
.
urlparse
(
restricted_access_url
)
restricted_access_url
=
restricted_access_url
.
replace
(
'%s://%s'
%
(
parsed_url
.
scheme
,
parsed_url
.
netloc
),
''
,
1
)
...
...
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