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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Georgios Dagkakis
erp5
Commits
25745080
Commit
25745080
authored
Dec 06, 2016
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Launcher: merge all ready functions into only one
parent
b09ac1af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
64 deletions
+65
-64
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
+63
-62
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 @
25745080
...
@@ -206,77 +206,78 @@
...
@@ -206,77 +206,78 @@
// Page rendering
// Page rendering
//////////////////////////////////////////
//////////////////////////////////////////
rJS
(
window
)
rJS
(
window
)
.
ready
(
function
(
g
)
{
.
ready
(
function
()
{
g
.
props
=
{};
var
gadget
=
this
;
return
g
.
getElement
()
this
.
props
=
{
.
push
(
function
(
element
)
{
loading_counter
:
0
,
g
.
props
.
loading_counter
=
0
;
content_element
:
this
.
element
.
querySelector
(
'
.gadget-content
'
)
g
.
props
.
element
=
element
;
};
g
.
props
.
content_element
=
element
.
querySelector
(
'
.gadget-content
'
);
});
// Configure setting storage
})
return
gadget
.
getDeclaredGadget
(
"
setting_gadget
"
)
// Configure setting storage
.
ready
(
function
(
g
)
{
return
g
.
getDeclaredGadget
(
"
setting_gadget
"
)
.
push
(
function
(
jio_gadget
)
{
.
push
(
function
(
jio_gadget
)
{
return
jio_gadget
.
createJio
({
return
jio_gadget
.
createJio
({
type
:
"
indexeddb
"
,
type
:
"
indexeddb
"
,
database
:
"
setting
"
database
:
"
setting
"
});
});
});
})
})
.
ready
(
function
(
g
)
{
// Extract configuration parameters stored in HTML
// XXX Will work only if top gadget...
var
element_list
=
document
.
querySelectorAll
(
"
[data-renderjs-configuration]
"
),
len
=
element_list
.
length
,
key
,
value
,
i
,
queue
=
new
RSVP
.
Queue
();
function
push
(
a
,
b
)
{
queue
.
push
(
function
()
{
return
setSetting
(
g
,
a
,
b
);
});
}
for
(
i
=
0
;
i
<
len
;
i
+=
1
)
{
.
push
(
function
()
{
key
=
element_list
[
i
].
getAttribute
(
'
data-renderjs-configuration
'
);
// Extract configuration parameters stored in HTML
value
=
element_list
[
i
].
textContent
;
// XXX Will work only if top gadget...
g
.
props
[
key
]
=
value
;
var
element_list
=
push
(
key
,
value
);
document
.
head
}
.
querySelectorAll
(
"
script[data-renderjs-configuration]
"
),
return
queue
;
len
=
element_list
.
length
,
})
key
,
.
ready
(
function
(
g
)
{
value
,
return
setSetting
(
g
,
'
hateoas_url
'
,
i
,
(
new
URI
(
g
.
props
.
hateoas_url
))
queue
=
new
RSVP
.
Queue
();
.
absoluteTo
(
location
.
href
)
.
toString
()
function
push
(
a
,
b
)
{
);
queue
.
push
(
function
()
{
})
return
setSetting
(
gadget
,
a
,
b
);
// Configure jIO storage
});
.
ready
(
function
(
g
)
{
}
var
jio_gadget
;
return
g
.
getDeclaredGadget
(
"
jio_gadget
"
)
for
(
i
=
0
;
i
<
len
;
i
+=
1
)
{
.
push
(
function
(
result
)
{
key
=
element_list
[
i
].
getAttribute
(
'
data-renderjs-configuration
'
);
jio_gadget
=
result
;
value
=
element_list
[
i
].
textContent
;
return
getSetting
(
g
,
'
jio_storage_description
'
);
gadget
.
props
[
key
]
=
value
;
push
(
key
,
value
);
}
return
queue
;
})
.
push
(
function
()
{
return
setSetting
(
gadget
,
'
hateoas_url
'
,
(
new
URI
(
gadget
.
props
.
hateoas_url
))
.
absoluteTo
(
location
.
href
)
.
toString
()
);
})
.
push
(
function
()
{
// Configure jIO storage
return
RSVP
.
all
([
gadget
.
getDeclaredGadget
(
"
jio_gadget
"
),
getSetting
(
gadget
,
'
jio_storage_description
'
)
]);
})
.
push
(
function
(
result_list
)
{
return
result_list
[
0
].
createJio
(
result_list
[
1
]);
})
.
push
(
function
()
{
return
gadget
.
getDeclaredGadget
(
'
panel
'
);
})
})
.
push
(
function
(
result
)
{
return
jio_gadget
.
createJio
(
result
);
});
})
.
ready
(
function
(
g
)
{
return
g
.
getDeclaredGadget
(
'
panel
'
)
.
push
(
function
(
panel_gadget
)
{
.
push
(
function
(
panel_gadget
)
{
return
panel_gadget
.
render
();
return
panel_gadget
.
render
();
});
})
})
.
ready
(
function
(
g
)
{
.
push
(
function
()
{
return
g
.
getDeclaredGadget
(
'
router
'
)
return
gadget
.
getDeclaredGadget
(
'
router
'
);
})
.
push
(
function
(
router_gadget
)
{
.
push
(
function
(
router_gadget
)
{
return
router_gadget
.
start
();
return
router_gadget
.
start
();
});
});
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_launcher_js.xml
View file @
25745080
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
95
4.34539.19221.9523
</string>
</value>
<value>
<string>
95
5.49842.36679.60381
</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>
14
76198512.38
</float>
<float>
14
81029313.69
</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