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
Lukas Niegsch
erp5
Commits
7e2fac60
Commit
7e2fac60
authored
Nov 28, 2019
by
Roque
Committed by
Roque
Dec 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Launcher: add setSettingList method
parent
08a65f23
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
22 deletions
+41
-22
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
+39
-20
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 @
7e2fac60
...
@@ -274,6 +274,36 @@
...
@@ -274,6 +274,36 @@
});
});
}
}
function
setSettingDict
(
gadget
,
setting_dict
)
{
var
jio_gadget
,
update_setting
;
return
gadget
.
getDeclaredGadget
(
"
setting_gadget
"
)
.
push
(
function
(
result
)
{
jio_gadget
=
result
;
return
jio_gadget
.
get
(
gadget
.
state
.
setting_id
);
})
.
push
(
undefined
,
function
(
error
)
{
if
(
error
.
status_code
===
404
)
{
return
{};
}
throw
error
;
})
.
push
(
function
(
doc
)
{
for
(
var
key
in
setting_dict
)
{
if
(
setting_dict
.
hasOwnProperty
(
key
))
{
if
(
!
doc
.
hasOwnProperty
(
key
)
||
doc
[
key
]
!==
setting_dict
[
key
])
{
doc
[
key
]
=
setting_dict
[
key
];
update_setting
=
true
;
}
}
}
if
(
update_setting
)
{
return
jio_gadget
.
put
(
gadget
.
state
.
setting_id
,
doc
);
}
});
}
rJS
(
window
)
rJS
(
window
)
// Add mutex protected defered gadget loader.
// Add mutex protected defered gadget loader.
...
@@ -423,25 +453,14 @@
...
@@ -423,25 +453,14 @@
});
});
})
})
.
allowPublicAcquisition
(
"
setSetting
"
,
function
setSetting
(
argument_list
)
{
.
allowPublicAcquisition
(
"
setSetting
"
,
function
setSetting
(
argument_list
)
{
var
jio_gadget
,
var
setting_dict
=
{};
gadget
=
this
,
setting_dict
[
argument_list
[
0
]]
=
argument_list
[
1
];
key
=
argument_list
[
0
],
return
setSettingDict
(
this
,
setting_dict
);
value
=
argument_list
[
1
];
})
return
gadget
.
getDeclaredGadget
(
"
setting_gadget
"
)
.
allowPublicAcquisition
(
"
setSettingList
"
,
.
push
(
function
(
result
)
{
function
setSettingList
(
argument_list
)
{
jio_gadget
=
result
;
var
setting_dict
=
argument_list
[
0
];
return
jio_gadget
.
get
(
gadget
.
state
.
setting_id
);
return
setSettingDict
(
this
,
setting_dict
);
})
.
push
(
undefined
,
function
(
error
)
{
if
(
error
.
status_code
===
404
)
{
return
{};
}
throw
error
;
})
.
push
(
function
(
doc
)
{
doc
[
key
]
=
value
;
return
jio_gadget
.
put
(
gadget
.
state
.
setting_id
,
doc
);
});
})
})
.
allowPublicAcquisition
(
"
translateHtml
"
,
function
translateHtml
(
.
allowPublicAcquisition
(
"
translateHtml
"
,
function
translateHtml
(
argument_list
argument_list
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
View file @
7e2fac60
...
@@ -234,7 +234,7 @@
...
@@ -234,7 +234,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
978.2230
3.65392.421
5
</string>
</value>
<value>
<string>
978.2230
4.53878.149
5
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -252,7 +252,7 @@
...
@@ -252,7 +252,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
157
4872658.82
</float>
<float>
157
7703410.93
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</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