Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
d1006d7b
Commit
d1006d7b
authored
Oct 25, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Set setting_id parameter on the gadget state
parent
bda7f4cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
...mplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
+12
-11
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
...plateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.js
View file @
d1006d7b
...
...
@@ -200,18 +200,19 @@
// Page rendering
//////////////////////////////////////////
rJS
(
window
)
.
setState
({
setting_id
:
"
setting/
"
+
document
.
head
.
querySelector
(
'
script[data-renderjs-configuration="application_title"]
'
).
textContent
})
.
ready
(
function
()
{
var
gadget
=
this
,
setting_gadget
,
setting
;
this
.
props
=
{
loading_counter
:
0
,
content_element
:
this
.
element
.
querySelector
(
'
.gadget-content
'
),
setting_id
:
"
setting/
"
+
document
.
head
.
querySelector
(
'
script[data-renderjs-configuration="application_title"]
'
).
textContent
content_element
:
this
.
element
.
querySelector
(
'
.gadget-content
'
)
};
// Configure setting storage
return
gadget
.
getDeclaredGadget
(
"
setting_gadget
"
)
.
push
(
function
(
result
)
{
...
...
@@ -223,7 +224,7 @@
})
.
push
(
function
()
{
return
setting_gadget
.
get
(
gadget
.
props
.
setting_id
)
return
setting_gadget
.
get
(
gadget
.
state
.
setting_id
)
.
push
(
undefined
,
function
(
error
)
{
if
(
error
.
status_code
===
404
)
{
return
{};
...
...
@@ -266,7 +267,7 @@
}
}
return
setting_gadget
.
put
(
gadget
.
props
.
setting_id
,
setting
);
return
setting_gadget
.
put
(
gadget
.
state
.
setting_id
,
setting
);
})
.
push
(
function
()
{
// Configure jIO storage
...
...
@@ -296,7 +297,7 @@
.
allowPublicAcquisition
(
"
getSettingList
"
,
function
getSettingList
(
argument_list
)
{
var
key_list
=
argument_list
[
0
];
return
route
(
this
,
'
setting_gadget
'
,
'
get
'
,
[
this
.
props
.
setting_id
])
return
route
(
this
,
'
setting_gadget
'
,
'
get
'
,
[
this
.
state
.
setting_id
])
.
push
(
function
(
doc
)
{
var
i
,
result_list
=
[];
...
...
@@ -315,7 +316,7 @@
var
gadget
=
this
,
key
=
argument_list
[
0
],
default_value
=
argument_list
[
1
];
return
route
(
gadget
,
'
setting_gadget
'
,
'
get
'
,
[
gadget
.
props
.
setting_id
])
return
route
(
gadget
,
'
setting_gadget
'
,
'
get
'
,
[
gadget
.
state
.
setting_id
])
.
push
(
function
(
doc
)
{
return
doc
[
key
]
||
default_value
;
},
function
(
error
)
{
...
...
@@ -333,7 +334,7 @@
return
gadget
.
getDeclaredGadget
(
"
setting_gadget
"
)
.
push
(
function
(
result
)
{
jio_gadget
=
result
;
return
jio_gadget
.
get
(
gadget
.
props
.
setting_id
);
return
jio_gadget
.
get
(
gadget
.
state
.
setting_id
);
})
.
push
(
undefined
,
function
(
error
)
{
if
(
error
.
status_code
===
404
)
{
...
...
@@ -343,7 +344,7 @@
})
.
push
(
function
(
doc
)
{
doc
[
key
]
=
value
;
return
jio_gadget
.
put
(
gadget
.
props
.
setting_id
,
doc
);
return
jio_gadget
.
put
(
gadget
.
state
.
setting_id
,
doc
);
});
})
.
allowPublicAcquisition
(
"
translateHtml
"
,
function
translateHtml
(
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
View file @
d1006d7b
...
...
@@ -230,7 +230,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
971.116
49.40314.9062
</string>
</value>
<value>
<string>
971.116
71.54203.21998
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>
154045
8410.99
</float>
<float>
154045
9696.8
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
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