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
1
Merge Requests
1
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
Boxiang Sun
erp5
Commits
32ca5e01
Commit
32ca5e01
authored
Aug 24, 2017
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs_support_request_ui: New implementation.
parent
37a57752
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
430 additions
and
116 deletions
+430
-116
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_css.css
...em/web_page_module/gadget_supportrequest_homepage_css.css
+20
-0
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_css.xml
...em/web_page_module/gadget_supportrequest_homepage_css.xml
+332
-0
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_html.html
.../web_page_module/gadget_supportrequest_homepage_html.html
+6
-6
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
-5
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_js.js
...Item/web_page_module/gadget_supportrequest_homepage_js.js
+60
-64
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_js.xml
...tem/web_page_module/gadget_supportrequest_homepage_js.xml
+3
-5
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_discussable_css.css
...e_module/rjs_gadget_erp5_pt_form_view_discussable_css.css
+0
-21
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_discussable_css.xml
...e_module/rjs_gadget_erp5_pt_form_view_discussable_css.xml
+2
-2
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_getRSSLinkAsJson.py
..._support_request/SupportRequestModule_getRSSLinkAsJson.py
+0
-0
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_getRSSLinkAsJson.xml
...support_request/SupportRequestModule_getRSSLinkAsJson.xml
+1
-1
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_viewLastSupportRequestList/listbox.xml
...pportRequestModule_viewLastSupportRequestList/listbox.xml
+1
-10
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_viewLastSupportRequestListAsRss/listbox_support_link.xml
..._viewLastSupportRequestListAsRss/listbox_support_link.xml
+1
-1
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequest_getSupportRequestLink.py
...s_support_request/SupportRequest_getSupportRequestLink.py
+0
-0
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequest_getSupportRequestLink.xml
..._support_request/SupportRequest_getSupportRequestLink.xml
+1
-1
No files found.
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_css.css
0 → 100644
View file @
32ca5e01
#wrap1
iframe
{
height
:
100%
;
}
#wrap2
iframe
{
height
:
100%
;
}
#generate-rss
{
padding
:
8pt
;
margin-top
:
30pt
;
margin-right
:
12pt
;
background-color
:
#FF6600
;
color
:
#FFFFFF
;
border-radius
:
0.325em
;
border-width
:
1px
;
border-style
:
solid
;
min-width
:
8em
;
line-height
:
1.5
;
}
\ No newline at end of file
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_css.xml
0 → 100644
View file @
32ca5e01
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_html.html
View file @
32ca5e01
...
...
@@ -17,8 +17,8 @@
<!-- custom script -->
<script
src=
"gadget_erp5_page_homepage.js"
type=
"text/javascript"
></script>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"gadget_erp5_p
t_form_view_discussabl
e.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"gadget_erp5_p
age_homepag
e.css"
>
</head>
<body>
<h1
style=
"font-size:2em;font-weight:bold;text-align:center"
>
Customer Support Dashboard
</h1>
...
...
@@ -30,18 +30,18 @@
<div
class=
'left'
style=
"height:50%; width:80%"
>
<div
id=
"wrap1"
style=
"height:300px;"
></div>
</div>
<div
class=
'right'
style=
"height:50%; width:80%"
>
<div
id=
"wrap2"
style=
"height:300px;"
></div>
</div>
</div>
<div
class=
'bottom'
>
<a
id=
"generate-rss"
>
Generate RSS
</a>
</div>
<div
data-gadget-url=
"gadget_erp5_page_form.html"
data-gadget-scope=
"test"
></div>
...
...
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_html.xml
View file @
32ca5e01
...
...
@@ -66,9 +66,7 @@
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
contributor/person_module/erp5_officejs_support_request_ui_test_person_002
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -236,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.39
192.36126.39662
</string>
</value>
<value>
<string>
961.39
461.64521.8755
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -254,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>
1503
481031.13
</float>
<float>
1503
502469.82
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_js.js
View file @
32ca5e01
/*global document, window, Option, rJS, RSVP, Chart, loopEventListener*/
/*global document, window, Option, rJS, RSVP, Chart, loopEventListener
, console
*/
/*jslint nomen: true, indent: 2, maxerr: 150 */
(
function
(
window
,
rJS
,
RSVP
,
loopEventListener
)
{
"
use strict
"
;
...
...
@@ -26,25 +26,26 @@
.
allowPublicAcquisition
(
"
updateHeader
"
,
function
()
{
return
;
})
.
declareMethod
(
'
getSearchCriteria
'
,
function
(
name
,
seriesName
)
{
.
declareMethod
(
'
getSearchCriteria
'
,
function
(
name
,
seriesName
)
{
console
.
log
(
"
In getSearchCriteria
"
);
var
search_criteria
;
console
.
log
(
name
,
seriesName
);
if
(
seriesName
!=
'
Support Request
'
)
{
var
cur_mid_night
=
new
Date
();
if
(
seriesName
!==
'
Support Request
'
)
{
var
cur_mid_night
=
new
Date
(),
begin_date
,
end_date
,
days_2
=
new
Date
(),
days_7
=
new
Date
(),
days_30
=
new
Date
();
cur_mid_night
.
setHours
(
0
,
0
,
0
,
0
);
cur_mid_night
.
setDate
(
cur_mid_night
.
getDate
()
+
1
);
var
days_2
=
new
Date
(),
days_7
=
new
Date
(),
days_30
=
new
Date
();
days_2
.
setDate
(
cur_mid_night
.
getDate
()
-
2
);
days_7
.
setDate
(
cur_mid_night
.
getDate
()
-
7
);
days_30
.
setDate
(
cur_mid_night
.
getDate
()
-
30
);
days_2
.
setHours
(
0
,
0
,
0
,
0
);
days_7
.
setHours
(
0
,
0
,
0
,
0
);
days_30
.
setHours
(
0
,
0
,
0
,
0
);
var
begin_date
,
end_date
;
if
(
name
===
'
Less than 2 days
'
)
{
begin_date
=
days_2
;
cur_mid_night
.
setDate
(
cur_mid_night
.
getDate
()
+
1
);
end_date
=
cur_mid_night
;
}
else
if
(
name
===
'
2-7 days
'
)
{
begin_date
=
days_7
;
...
...
@@ -61,9 +62,8 @@
console
.
log
(
name
);
console
.
log
(
end_date
);
console
.
log
(
end_date
.
toISOString
());
search_criteria
=
'
( translated_simulation_state_title: "
'
+
seriesName
+
'
" AND modification_date: >=
'
+
begin_date
.
toISOString
().
slice
(
0
,
10
)
+
'
AND modification_date: <=
'
+
end_date
.
toISOString
().
slice
(
0
,
10
)
+
'
)
'
;
}
else
{
search_criteria
=
'
( translated_simulation_state_title: "
'
+
seriesName
+
'
" AND modification_date: >=
'
+
begin_date
.
toISOString
().
slice
(
0
,
10
)
+
'
AND modification_date: <
'
+
end_date
.
toISOString
().
slice
(
0
,
10
)
+
'
)
'
;
}
else
{
search_criteria
=
'
( translated_simulation_state_title: "
'
+
name
+
'
")
'
;
}
console
.
log
(
"
Search criteria:
"
,
search_criteria
);
...
...
@@ -76,7 +76,7 @@
return
gadget
.
getSearchCriteria
(
params
[
0
][
0
],
params
[
0
][
1
])
.
push
(
function
(
search_criteria
)
{
gadget
.
changeState
({
extended_search
:
search_criteria
});
});
});
// method code
})
/////////////////////////////////////////////////////////////////
...
...
@@ -88,16 +88,16 @@
return
gadget
.
changeState
({
render
:
true
})
.
push
(
function
()
{
return
gadget
.
updateHeader
({
page_title
:
'
Support Requests Home Page
'
});
})
.
push
(
function
()
{
return
gadget
.
changeState
({
field_listbox_begin_from
:
options
.
field_listbox_begin_from
.
push
(
function
()
{
return
gadget
.
updateHeader
({
page_title
:
'
Support Requests Home Page
'
});
})
});
.
push
(
function
()
{
return
gadget
.
changeState
({
field_listbox_begin_from
:
options
.
field_listbox_begin_from
});
});
})
.
declareJob
(
"
renderGraph
"
,
function
()
{
var
gadget
=
this
,
...
...
@@ -230,45 +230,44 @@
title
:
"
Support Request activites
"
}
}
}
);
});
});
})
.
onStateChange
(
function
(
modification_dict
)
{
var
gadget
=
this
,
queue
=
new
RSVP
.
Queue
();
if
(
modification_dict
.
hasOwnProperty
(
"
extended_search
"
))
{
// render the erp5 listbox
queue
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
"
test
"
)
})
.
push
(
function
(
result_list
)
{
var
erp5_form
=
result_list
,
tmp
;
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
"
test
"
);
})
.
push
(
function
(
result_list
)
{
var
erp5_form
=
result_list
,
tmp
;
tmp
=
JSON
.
parse
(
erp5_form
.
state
.
erp5_form
);
tmp
.
extended_search
=
modification_dict
.
extended_search
;
return
erp5_form
.
changeState
({
erp5_form
:
JSON
.
stringify
(
tmp
)});
});
tmp
=
JSON
.
parse
(
erp5_form
.
state
.
erp5_form
);
tmp
.
extended_search
=
modification_dict
.
extended_search
;
return
erp5_form
.
changeState
({
erp5_form
:
JSON
.
stringify
(
tmp
)});
});
}
if
(
modification_dict
.
hasOwnProperty
(
"
field_listbox_begin_from
"
))
{
// render the erp5 listbox
queue
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
"
test
"
)
})
.
push
(
function
(
result_list
)
{
var
erp5_form
=
result_list
,
tmp
;
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
"
test
"
);
})
.
push
(
function
(
result_list
)
{
var
erp5_form
=
result_list
,
tmp
;
tmp
=
JSON
.
parse
(
erp5_form
.
state
.
erp5_form
);
tmp
.
field_listbox_begin_from
=
modification_dict
.
field_listbox_begin_from
;
return
erp5_form
.
changeState
({
erp5_form
:
JSON
.
stringify
(
tmp
)});
});
tmp
=
JSON
.
parse
(
erp5_form
.
state
.
erp5_form
);
tmp
.
field_listbox_begin_from
=
modification_dict
.
field_listbox_begin_from
;
return
erp5_form
.
changeState
({
erp5_form
:
JSON
.
stringify
(
tmp
)});
});
}
if
(
modification_dict
.
hasOwnProperty
(
"
render
"
))
{
queue
...
...
@@ -285,11 +284,11 @@
view_list
=
erp5_document
.
_links
.
action_object_view
||
[],
test_href
;
//last_href;
if
(
view_list
.
constructor
!==
Array
)
{
view_list
=
[
view_list
];
}
for
(
i
=
0
;
i
<
view_list
.
length
;
i
+=
1
)
{
/*
if (view_list[i].name === 'view_last_support_request') {
...
...
@@ -300,7 +299,7 @@
test_href
=
view_list
[
i
].
href
;
}
}
if
(
test_href
===
undefined
)
{
throw
new
Error
(
'
Cant find the list document view
'
);
}
...
...
@@ -316,7 +315,7 @@
jio_key
:
"
support_request_module
"
,
view
:
test_href
}),
gadget
.
renderGraph
()
,
//Launched as service, not blocking
gadget
.
renderGraph
()
//Launched as service, not blocking
]);
});
}
...
...
@@ -325,8 +324,7 @@
console
.
log
(
error
);
});
return
queue
;
//})
//})
})
.
declareService
(
function
()
{
var
gadget
=
this
;
...
...
@@ -337,20 +335,19 @@
return
gadget
.
getSetting
(
"
hateoas_url
"
)
.
push
(
function
(
hateoas_url
)
{
return
gadget
.
jio_getAttachment
(
'
support_request_module
'
,
hateoas_url
+
'
support_request_module
'
+
"
/SupportRequestModule_getRSSWithToke
n
"
)
.
push
(
function
(
result
)
{
rss_button
.
href
=
result
.
restricted_access_url
;
rss_button
.
innerHTML
=
"
RSS Link
"
;
rss_button
.
target
=
"
_blank
"
;
})
})
'
support_request_module
'
,
hateoas_url
+
'
support_request_module
'
+
"
/SupportRequestModule_getRSSLinkAsJso
n
"
)
.
push
(
function
(
result
)
{
rss_button
.
href
=
result
.
restricted_access_url
;
rss_button
.
innerHTML
=
"
RSS Link
"
;
rss_button
.
target
=
"
_blank
"
;
});
});
}
click_event
.
returnValue
=
true
;
}
// Listen to form submit
return
loopEventListener
(
gadget
.
element
.
querySelector
(
"
#generate-rss
"
),
...
...
@@ -386,8 +383,7 @@
}
},
false
,
false
)
.
onEvent
(
'
submit
'
,
function
()
{
var
curElement
=
document
.
activeElement
;
var
gadget
=
this
;
var
curElement
=
document
.
activeElement
,
gadget
=
this
;
if
(
curElement
.
name
===
'
restore
'
)
{
console
.
log
(
"
Restore button cliked!
"
);
}
else
if
(
curElement
.
name
===
'
create
'
)
{
...
...
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_homepage_js.xml
View file @
32ca5e01
...
...
@@ -66,9 +66,7 @@
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
contributor/person_module/erp5_officejs_support_request_ui_test_person_002
</string>
</tuple>
<tuple/>
</value>
</item>
<item>
...
...
@@ -238,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.39
351.42999.18875
</string>
</value>
<value>
<string>
961.39
594.58186.7577
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -256,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>
1503
490171.5
7
</float>
<float>
1503
504898.3
7
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_discussable_css.css
View file @
32ca5e01
hr
#post_item
{
border-color
:
#0E81C2
;
}
#wrap1
iframe
{
height
:
100%
;
}
#wrap2
iframe
{
height
:
100%
;
}
#generate-rss
{
padding
:
8pt
;
margin-top
:
30pt
;
margin-right
:
12pt
;
background-color
:
#FF6600
;
color
:
#FFFFFF
;
border-radius
:
0.325em
;
border-width
:
1px
;
border-style
:
solid
;
min-width
:
8em
;
line-height
:
1.5
;
}
\ No newline at end of file
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_discussable_css.xml
View file @
32ca5e01
...
...
@@ -242,7 +242,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
961.3
8112.35462.38963
</string>
</value>
<value>
<string>
961.3
9462.18361.64392
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>
15034
18576.
4
</float>
<float>
15034
96700.1
4
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_getRSS
WithToke
n.py
→
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_getRSS
LinkAsJso
n.py
View file @
32ca5e01
File moved
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequest
_getNexediJSLink
.xml
→
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequest
Module_getRSSLinkAsJson
.xml
View file @
32ca5e01
...
...
@@ -54,7 +54,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SupportRequest
_getNexediJSLink
</string>
</value>
<value>
<string>
SupportRequest
Module_getRSSLinkAsJson
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_viewLastSupportRequestList/listbox.xml
View file @
32ca5e01
...
...
@@ -438,16 +438,7 @@
<item>
<key>
<string>
sort_columns
</string>
</key>
<value>
<list>
<tuple>
<string>
post_start_date_hidden
</string>
<string>
Comment Date
</string>
</tuple>
<tuple>
<string>
post_start_date
</string>
<string>
Comment Date
</string>
</tuple>
</list>
<list/>
</value>
</item>
<item>
...
...
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequestModule_viewLastSupportRequestListAsRss/listbox_support_link.xml
View file @
32ca5e01
...
...
@@ -116,7 +116,7 @@
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: cell.SupportRequest_get
NexediJS
Link()
</string>
</value>
<value>
<string>
python: cell.SupportRequest_get
SupportRequest
Link()
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequest_get
NexediJS
Link.py
→
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequest_get
SupportRequest
Link.py
View file @
32ca5e01
File moved
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequest
Module_getRSSWithToken
.xml
→
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/SupportRequest
_getSupportRequestLink
.xml
View file @
32ca5e01
...
...
@@ -54,7 +54,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SupportRequest
Module_getRSSWithToken
</string>
</value>
<value>
<string>
SupportRequest
_getSupportRequestLink
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
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