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
a3c6df2f
Commit
a3c6df2f
authored
May 11, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Launcher: factorize some code
parent
206a30ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
31 deletions
+9
-31
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
+7
-29
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 @
a3c6df2f
...
@@ -38,10 +38,7 @@
...
@@ -38,10 +38,7 @@
}
}
function
route
(
my_root_gadget
,
my_scope
,
my_method
,
argument_list
)
{
function
route
(
my_root_gadget
,
my_scope
,
my_method
,
argument_list
)
{
return
RSVP
.
Queue
()
return
my_root_gadget
.
getDeclaredGadget
(
my_scope
)
.
push
(
function
()
{
return
my_root_gadget
.
getDeclaredGadget
(
my_scope
);
})
.
push
(
function
(
my_gadget
)
{
.
push
(
function
(
my_gadget
)
{
if
(
argument_list
)
{
if
(
argument_list
)
{
return
my_gadget
[
my_method
].
apply
(
my_gadget
,
argument_list
);
return
my_gadget
[
my_method
].
apply
(
my_gadget
,
argument_list
);
...
@@ -310,10 +307,7 @@
...
@@ -310,10 +307,7 @@
var
gadget
=
this
,
var
gadget
=
this
,
key
=
argument_list
[
0
],
key
=
argument_list
[
0
],
default_value
=
argument_list
[
1
];
default_value
=
argument_list
[
1
];
return
gadget
.
getDeclaredGadget
(
"
setting_gadget
"
)
return
route
(
gadget
,
'
setting_gadget
'
,
'
get
'
,
[
gadget
.
props
.
setting_id
])
.
push
(
function
(
jio_gadget
)
{
return
jio_gadget
.
get
(
gadget
.
props
.
setting_id
);
})
.
push
(
function
(
doc
)
{
.
push
(
function
(
doc
)
{
return
doc
[
key
]
||
default_value
;
return
doc
[
key
]
||
default_value
;
},
function
(
error
)
{
},
function
(
error
)
{
...
@@ -345,10 +339,7 @@
...
@@ -345,10 +339,7 @@
});
});
})
})
.
allowPublicAcquisition
(
"
translateHtml
"
,
function
(
argument_list
)
{
.
allowPublicAcquisition
(
"
translateHtml
"
,
function
(
argument_list
)
{
return
this
.
getDeclaredGadget
(
"
translation_gadget
"
)
return
route
(
this
,
'
translation_gadget
'
,
'
translateHtml
'
,
argument_list
);
.
push
(
function
(
translation_gadget
)
{
return
translation_gadget
.
translateHtml
(
argument_list
[
0
]);
});
})
})
// XXX Those methods may be directly integrated into the header,
// XXX Those methods may be directly integrated into the header,
...
@@ -391,33 +382,20 @@
...
@@ -391,33 +382,20 @@
})
})
.
allowPublicAcquisition
(
"
translate
"
,
function
(
argument_list
)
{
.
allowPublicAcquisition
(
"
translate
"
,
function
(
argument_list
)
{
return
this
.
getDeclaredGadget
(
"
translation_gadget
"
)
return
route
(
this
,
'
translation_gadget
'
,
'
translate
'
,
argument_list
);
.
push
(
function
(
translation_gadget
)
{
return
translation_gadget
.
translate
(
argument_list
[
0
]);
});
})
})
.
allowPublicAcquisition
(
"
redirect
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
redirect
"
,
function
(
param_list
)
{
return
this
.
getDeclaredGadget
(
'
router
'
)
return
route
(
this
,
'
router
'
,
'
redirect
'
,
param_list
);
.
push
(
function
(
router_gadget
)
{
return
router_gadget
.
redirect
.
apply
(
router_gadget
,
param_list
);
});
})
})
.
allowPublicAcquisition
(
'
reload
'
,
function
()
{
.
allowPublicAcquisition
(
'
reload
'
,
function
()
{
return
location
.
reload
();
return
location
.
reload
();
})
})
.
allowPublicAcquisition
(
"
getUrlParameter
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
getUrlParameter
"
,
function
(
param_list
)
{
return
this
.
getDeclaredGadget
(
'
router
'
)
return
route
(
this
,
'
router
'
,
'
getUrlParameter
'
,
param_list
);
.
push
(
function
(
router_gadget
)
{
return
router_gadget
.
getUrlParameter
.
apply
(
router_gadget
,
param_list
);
});
})
})
.
allowPublicAcquisition
(
"
getUrlFor
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
getUrlFor
"
,
function
(
param_list
)
{
return
this
.
getDeclaredGadget
(
'
router
'
)
return
route
(
this
,
'
router
'
,
'
getCommandUrlFor
'
,
param_list
);
.
push
(
function
(
router_gadget
)
{
return
router_gadget
.
getCommandUrlFor
.
apply
(
router_gadget
,
param_list
);
});
})
})
.
allowPublicAcquisition
(
"
updateHeader
"
,
function
(
param_list
)
{
.
allowPublicAcquisition
(
"
updateHeader
"
,
function
(
param_list
)
{
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
View file @
a3c6df2f
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
6.11431.6711.50466
</string>
</value>
<value>
<string>
96
7.30869.341.45038
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -248,7 +248,7 @@
...
@@ -248,7 +248,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
152
1043696.52
</float>
<float>
152
6055710.14
</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