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
Ekaterina
erp5
Commits
b8e6ceb8
Commit
b8e6ceb8
authored
Jul 04, 2018
by
Xiaowu Zhang
Committed by
Romain Courteaud
Jul 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_officejs_support_request_ui] Add dedicated preference page
parent
9d0b0878
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
822 additions
and
9 deletions
+822
-9
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_appcache.xml
...teItem/web_page_module/gadget_supportrequest_appcache.xml
+5
-5
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_page_preference_html.html
...ge_module/gadget_supportrequest_page_preference_html.html
+32
-0
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_page_preference_html.xml
...age_module/gadget_supportrequest_page_preference_html.xml
+324
-0
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_page_preference_js.js
...b_page_module/gadget_supportrequest_page_preference_js.js
+137
-0
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_page_preference_js.xml
..._page_module/gadget_supportrequest_page_preference_js.xml
+320
-0
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_panel_js.js
...ateItem/web_page_module/gadget_supportrequest_panel_js.js
+1
-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
+3
-3
No files found.
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_appcache.xml
View file @
b8e6ceb8
...
...
@@ -155,8 +155,8 @@ gadget_erp5_page_homepage.html\n
gadget_erp5_page_homepage.js\n
gadget_erp5_page_list.html\n
gadget_erp5_page_list.js\n
gadget_erp5_page_preference.html\n
gadget_erp5_page_preference.js\n
gadget_erp5_page_
supportrequest_
preference.html\n
gadget_erp5_page_
supportrequest_
preference.js\n
gadget_erp5_page_support_request_fast_view_dialog.html\n
gadget_erp5_page_support_request_fast_view_dialog.js\n
gadget_erp5_panel.png?format=png\n
...
...
@@ -343,7 +343,7 @@ NETWORK:\n
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
2.24350.22363.64716
</string>
</value>
<value>
<string>
96
6.44322.37377.38894
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -361,8 +361,8 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>
15
06522160.66
</float>
<string>
UTC
</string>
<float>
15
23022776.2
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
...
...
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_page_preference_html.html
0 → 100644
View file @
b8e6ceb8
<!DOCTYPE html>
<html>
<!--
data-i18n=User
data-i18n=Language
-->
<head>
<meta
http-equiv=
"Content-type"
content=
"text/html; charset=utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no"
/>
<title>
ERP5 Support Request Page Preferences
</title>
<!-- renderjs -->
<script
src=
"rsvp.js"
type=
"text/javascript"
></script>
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
<!-- custom script -->
<script
src=
"gadget_erp5_page_supportrequest_preference.js"
type=
"text/javascript"
></script>
</head>
<body>
<form
class=
"preference"
>
<button
type=
"submit"
class=
"ui-btn ui-btn-b ui-btn-inline
ui-icon-edit ui-btn-icon-right ui-screen-hidden"
></button>
<div
data-gadget-url=
"gadget_erp5_form.html"
data-gadget-scope=
"erp5_form"
data-gadget-sandbox=
"public"
>
</div>
</form>
</body>
</html>
\ No newline at end of file
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_page_preference_html.xml
0 → 100644
View file @
b8e6ceb8
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_page_preference_js.js
0 → 100644
View file @
b8e6ceb8
/*global window, rJS, RSVP */
/*jslint indent: 2, maxerr: 3 */
(
function
(
window
,
rJS
,
RSVP
)
{
"
use strict
"
;
rJS
(
window
)
/////////////////////////////////////////////////////////////////
// handle acquisition
/////////////////////////////////////////////////////////////////
.
declareAcquiredMethod
(
"
updateHeader
"
,
"
updateHeader
"
)
.
declareAcquiredMethod
(
"
translate
"
,
"
translate
"
)
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
setSetting
"
,
"
setSetting
"
)
.
declareAcquiredMethod
(
"
jio_get
"
,
"
jio_get
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
jio_allDocs
"
,
"
jio_allDocs
"
)
.
declareAcquiredMethod
(
"
notifySubmitting
"
,
"
notifySubmitting
"
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
"
notifySubmitted
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
/////////////////////////////////////////////////////////////////
// declared methods
/////////////////////////////////////////////////////////////////
.
declareMethod
(
"
render
"
,
function
()
{
var
gadget
=
this
,
user
=
"
Who are you?
"
,
header_dict
=
{
page_title
:
'
Preferences
'
,
page_icon
:
'
sliders
'
,
save_action
:
true
};
return
gadget
.
getUrlFor
({
command
:
'
display
'
})
.
push
(
function
(
front_url
)
{
header_dict
.
front_url
=
front_url
;
return
gadget
.
updateHeader
(
header_dict
);
})
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
"
erp5_form
"
);
})
.
push
(
function
(
erp5_form
)
{
gadget
.
state
.
erp5_form
=
erp5_form
;
return
gadget
.
getSetting
(
'
me
'
);
})
.
push
(
function
(
me
)
{
if
(
me
!==
undefined
)
{
return
gadget
.
jio_allDocs
({
query
:
'
relative_url:"
'
+
me
+
'
"
'
,
select_list
:
[
'
title
'
]
})
.
push
(
function
(
result
)
{
user
=
result
.
data
.
rows
[
0
].
value
.
title
;
});
}
})
.
push
(
function
()
{
return
RSVP
.
all
([
gadget
.
getSetting
(
"
language_map
"
),
gadget
.
getSetting
(
"
selected_language
"
),
gadget
.
getSetting
(
"
default_selected_language
"
),
gadget
.
translate
(
"
User
"
),
gadget
.
translate
(
"
Language
"
)
]);
})
.
push
(
function
(
results
)
{
var
selected_language
=
results
[
1
]
||
results
[
2
],
key
,
list_item
=
[],
options
=
JSON
.
parse
(
results
[
0
]);
gadget
.
state
.
old_selected_lang
=
selected_language
;
for
(
key
in
options
)
{
if
(
options
.
hasOwnProperty
(
key
))
{
list_item
.
push
([
options
[
key
],
key
]);
}
}
return
gadget
.
state
.
erp5_form
.
render
({
erp5_document
:
{
"
_embedded
"
:
{
"
_view
"
:
{
'
User
'
:
{
"
default
"
:
user
,
"
editable
"
:
0
,
"
key
"
:
"
field_user
"
,
"
title
"
:
results
[
3
],
"
type
"
:
"
StringField
"
},
'
Language
'
:
{
"
default
"
:
selected_language
,
"
editable
"
:
1
,
"
items
"
:
list_item
,
"
key
"
:
"
field_language
"
,
"
title
"
:
results
[
4
],
"
type
"
:
"
ListField
"
}
}},
"
_links
"
:
{
"
type
"
:
{
// form_list display portal_type in header
name
:
""
}
}
},
form_definition
:
{
group_list
:
[[
"
left
"
,
[[
"
User
"
],
[
"
Language
"
]]
]]
}
});
});
})
.
declareMethod
(
'
triggerSubmit
'
,
function
()
{
this
.
element
.
querySelector
(
'
button
'
).
click
();
})
.
onEvent
(
'
submit
'
,
function
()
{
var
gadget
=
this
,
selected_lang
;
return
gadget
.
notifySubmitting
()
.
push
(
function
()
{
return
gadget
.
state
.
erp5_form
.
getContent
();
})
.
push
(
function
(
data
)
{
selected_lang
=
data
.
field_language
;
return
gadget
.
setSetting
(
"
selected_language
"
,
selected_lang
);
})
.
push
(
function
()
{
if
(
gadget
.
state
.
old_selected_lang
!==
selected_lang
)
{
return
gadget
.
redirect
({
command
:
'
change_language
'
,
options
:
{
language
:
selected_lang
}
});
}
return
gadget
.
notifySubmitted
();
});
});
}(
window
,
rJS
,
RSVP
));
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_page_preference_js.xml
0 → 100644
View file @
b8e6ceb8
This diff is collapsed.
Click to expand it.
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_panel_js.js
View file @
b8e6ceb8
...
...
@@ -93,7 +93,7 @@
queue
.
push
(
function
()
{
return
RSVP
.
all
([
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
"
preference
"
}}),
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
"
supportrequest_
preference
"
}}),
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
"
logout
"
}}),
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
page
:
"
search
"
}}),
context
.
getUrlFor
({
command
:
'
display
'
,
options
:
{
jio_key
:
"
support_request_module
"
,
page
:
"
list
"
}})
...
...
bt5/erp5_officejs_support_request_ui/PathTemplateItem/web_page_module/gadget_supportrequest_panel_js.xml
View file @
b8e6ceb8
...
...
@@ -234,7 +234,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
2.11319.31770.36949
</string>
</value>
<value>
<string>
96
6.44322.37377.38894
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -252,8 +252,8 @@
</tuple>
<state>
<tuple>
<float>
15
05740406.52
</float>
<string>
UTC
</string>
<float>
15
23022102.41
</float>
<string>
GMT+2
</string>
</tuple>
</state>
</object>
...
...
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