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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Rafael Monnerat
erp5
Commits
480729e3
Commit
480729e3
authored
Oct 08, 2018
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support_request_ui: display relative time
using momentjs that's already bundled in jiodev.js
parent
5a41f560
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
8 deletions
+18
-8
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_pt_form_view_discussable_html.xml
...e/gadget_supportrequest_pt_form_view_discussable_html.xml
+1
-1
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_pt_form_view_discussable_js.js
...dule/gadget_supportrequest_pt_form_view_discussable_js.js
+14
-4
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_pt_form_view_discussable_js.xml
...ule/gadget_supportrequest_pt_form_view_discussable_js.xml
+1
-1
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/PostModule_createHTMLPostForSupportRequest.py
...ort_request/PostModule_createHTMLPostForSupportRequest.py
+1
-1
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequest_getCommentPostListAsJson.py
...upport_request/SupportRequest_getCommentPostListAsJson.py
+1
-1
No files found.
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_pt_form_view_discussable_html.xml
View file @
480729e3
...
@@ -252,7 +252,7 @@
...
@@ -252,7 +252,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1538
885951.97
</float>
<float>
1538
971816.32
</float>
<string>
GMT+9
</string>
<string>
GMT+9
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_pt_form_view_discussable_js.js
View file @
480729e3
/*global window, rJS, RSVP, calculatePageTitle, FormData, URI, jIO*/
/*global window, rJS, RSVP, calculatePageTitle, FormData, URI, jIO
, moment
*/
/*jslint nomen: true, indent: 2, maxerr: 3 */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
,
calculatePageTitle
)
{
(
function
(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
moment
)
{
"
use strict
"
;
"
use strict
"
;
rJS
(
window
)
rJS
(
window
)
...
@@ -152,6 +152,16 @@
...
@@ -152,6 +152,16 @@
page_title
:
all_result
[
7
]
page_title
:
all_result
[
7
]
});
});
})
})
.
push
(
function
()
{
// set locale for momentjs
return
gadget
.
jio_getAttachment
(
'
post_module
'
,
gadget
.
hateoas_url
+
"
/Localizer/get_selected_language
"
,
{
format
:
'
text
'
}
).
push
(
function
(
lang
){
moment
.
locale
(
lang
);
})
})
.
push
(
function
()
{
.
push
(
function
()
{
return
gadget
.
jio_getAttachment
(
return
gadget
.
jio_getAttachment
(
'
post_module
'
,
'
post_module
'
,
...
@@ -181,7 +191,7 @@
...
@@ -181,7 +191,7 @@
for
(
i
=
0
;
i
<
post_list
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
post_list
.
length
;
i
+=
1
)
{
s
+=
'
<li>
'
+
s
+=
'
<li>
'
+
'
By <strong>
'
+
post_list
[
i
][
0
]
+
'
</strong>
'
+
'
By <strong>
'
+
post_list
[
i
][
0
]
+
'
</strong>
'
+
'
- <time
>
'
+
post_list
[
i
][
1
]
+
'
</time><br/>
'
;
'
- <time
datetime="
'
+
post_list
[
i
][
1
]
+
'
" title="
'
+
moment
(
post_list
[
i
][
1
]).
format
(
'
LLLL
'
)
+
'
">
'
+
moment
(
post_list
[
i
][
1
]).
fromNow
()
+
'
</time><br/>
'
;
if
(
post_list
[
i
][
3
]
!==
null
&&
result_list
[
i
]
!==
null
)
{
if
(
post_list
[
i
][
3
]
!==
null
&&
result_list
[
i
]
!==
null
)
{
post_list
[
i
][
3
]
=
result_list
[
i
];
post_list
[
i
][
3
]
=
result_list
[
i
];
}
}
...
@@ -269,4 +279,4 @@
...
@@ -269,4 +279,4 @@
.
onEvent
(
'
submit
'
,
function
()
{
.
onEvent
(
'
submit
'
,
function
()
{
this
.
submitPostComment
();
this
.
submitPostComment
();
});
});
}(
window
,
rJS
,
RSVP
,
calculatePageTitle
));
}(
window
,
rJS
,
RSVP
,
calculatePageTitle
,
moment
));
\ No newline at end of file
\ No newline at end of file
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_pt_form_view_discussable_js.xml
View file @
480729e3
...
@@ -252,7 +252,7 @@
...
@@ -252,7 +252,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1538
886067.22
</float>
<float>
1538
972059.78
</float>
<string>
GMT+9
</string>
<string>
GMT+9
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/PostModule_createHTMLPostForSupportRequest.py
View file @
480729e3
...
@@ -53,7 +53,7 @@ if successor_list:
...
@@ -53,7 +53,7 @@ if successor_list:
portal
.
portal_sessions
[
portal
.
portal_sessions
[
'%s.latest_comment'
%
follow_up_value
.
getRelativeUrl
()][
'comment_post_list'
]
=
(
'%s.latest_comment'
%
follow_up_value
.
getRelativeUrl
()][
'comment_post_list'
]
=
(
post
.
Base_getOwnerTitle
(),
post
.
Base_getOwnerTitle
(),
post
.
getStartDate
().
rfc822
(),
post
.
getStartDate
().
ISO8601
(),
post
.
asStrippedHTML
(),
post
.
asStrippedHTML
(),
successor_link
,
successor_link
,
successor_name
,
successor_name
,
...
...
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequest_getCommentPostListAsJson.py
View file @
480729e3
...
@@ -23,7 +23,7 @@ for event in event_list:
...
@@ -23,7 +23,7 @@ for event in event_list:
comment_list
.
append
((
comment_list
.
append
((
event
.
getSourceTitle
(),
event
.
getSourceTitle
(),
event
.
getStartDate
().
rfc822
(),
event
.
getStartDate
().
ISO8601
(),
event
.
asStrippedHTML
(),
event
.
asStrippedHTML
(),
attachment_link
,
attachment_link
,
attachment_name
,
attachment_name
,
...
...
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