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
Labels
Merge Requests
138
Merge Requests
138
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
07d31edc
Commit
07d31edc
authored
Sep 04, 2014
by
Sven Franck
Committed by
Sebastien Robin
Sep 09, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: move tab gadget back inside form gadget
parent
06cb4783
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
22 deletions
+32
-22
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_js.xml
...i/PathTemplateItem/web_page_module/rjs_gadget_erp5_js.xml
+2
-9
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_html.xml
...tem/web_page_module/rjs_gadget_erp5_pt_form_view_html.xml
+7
-2
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.xml
...eItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.xml
+18
-8
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_tab_list_js.xml
...plateItem/web_page_module/rjs_gadget_erp5_tab_list_js.xml
+5
-3
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_js.xml
View file @
07d31edc
...
...
@@ -199,7 +199,6 @@
]);\n
})\n
.push(function (result) {\n
var content_list = [];\n
\n
sub_options = options.form_gadget || {};\n
sub_options.erp5_document = result[0].data;\n
...
...
@@ -210,15 +209,11 @@
return RSVP.all([\n
gadget.declareGadget("gadget_erp5_pt_" + sub_options.form_definition.pt + ".html", {\n
scope: "form_gadget"\n
}),\n
gadget.declareGadget("gadget_erp5_tab_list.html", {\n
scope: "erp5_tab"\n
})\n
]);\n
})\n
.push(function (gadget_list) {\n
var form_gadget = gadget_list[0],\n
tab_gadget = gadget_list[1],\n
new_content_action = sub_options.erp5_document._links.action_object_new_content_action,\n
plus_queue,\n
new_element;\n
...
...
@@ -240,8 +235,6 @@
}\n
\n
return RSVP.all([\n
tab_gadget.render(sub_options),\n
tab_gadget.getElement(),\n
form_gadget.render(sub_options),\n
form_gadget.getElement(),\n
gadget.props.breadcrumb_gadget.render(breadcrumb_options),\n
...
...
@@ -564,7 +557,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
937.
8167.39223.5089
2
</string>
</value>
<value>
<string>
937.
22192.46889.6480
2
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -582,7 +575,7 @@
</tuple>
<state>
<tuple>
<float>
140
8975361.84
</float>
<float>
140
9819356.02
</float>
<string>
GMT
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_html.xml
View file @
07d31edc
...
...
@@ -129,6 +129,11 @@
\n
</head>
\n
<body>
\n
\n
<div
data-gadget-url=
"gadget_erp5_tab_list.html"
\n
data-gadget-scope=
"erp5_tab"
\n
data-gadget-sandbox=
"public"
>
\n
</div>
\n
\n
<!-- XXX action, method, fieldset -->
\n
<form
class=
"save_form"
>
\n
...
...
@@ -283,7 +288,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
93
6.54726.55391.8362
</string>
</value>
<value>
<string>
93
7.22212.34746.7150
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -301,7 +306,7 @@
</tuple>
<state>
<tuple>
<float>
140
7836841.44
</float>
<float>
140
9817872.15
</float>
<string>
GMT
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.xml
View file @
07d31edc
...
...
@@ -152,10 +152,11 @@
.declareMethod(\'render\', function (options) {\n
var erp5_document = options.erp5_document,\n
action_list = erp5_document._links.action_workflow || [],\n
fragment = document.createDocumentFragment(),\n
form_gadget = this,\n
i
,\n
promise_list = []
;\n
\n
promise_list = []
,\n
i
;\n
\n
for (i = 0; i < action_list.length; i += 1) {\n
promise_list.push(this.whoWantToDisplayThisPage({\n
name: action_list[i].name\n
...
...
@@ -168,13 +169,15 @@
return new RSVP.Queue()\n
.push(function () {\n
return RSVP.all([\n
form_gadget.getDeclaredGadget("erp5_tab"),\n
form_gadget.getDeclaredGadget("erp5_form"),\n
RSVP.all(promise_list)\n
]);\n
})\n
.push(function (all_gadget) {\n
var form_options = options.erp5_form || {},\n
all_result = all_gadget[1],\n
tab_options = options.erp5_tag || {},\n
all_result = all_gadget[2],\n
actionlist = [],\n
class_list,\n
i;\n
...
...
@@ -182,6 +185,11 @@
form_options.erp5_document = options.erp5_document;\n
form_options.form_definition = options.form_definition;\n
form_options.view = options.view;\n
\n
tab_options.erp5_document = options.erp5_document;\n
tab_options.form_definition = options.form_definition;\n
tab_options.view = options.view;\n
tab_options.action_view = options.action_view;\n
\n
for (i = 0; i < all_result.length; i += 1) {\n
switch (i) {\n
...
...
@@ -201,12 +209,14 @@
link: all_result[i],\n
});\n
}\n
form_gadget.__element.appendChild(fragment);\n
form_gadget.__element.querySelector("div.ui-controlgroup-controls")\n
.innerHTML = workflow_template({actionlist: actionlist});\n
\n
\n
\n
return RSVP.all([\n
all_gadget[0].render(form_options),\n
all_gadget[0].render(tab_options),\n
all_gadget[1].render(form_options)\n
]);\n
});\n
\n
...
...
@@ -373,7 +383,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
93
6.54729.48588.29371
</string>
</value>
<value>
<string>
93
7.22215.35138.15906
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -391,7 +401,7 @@
</tuple>
<state>
<tuple>
<float>
140
7836873.5
2
</float>
<float>
140
9818069.1
2
</float>
<string>
GMT
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_tab_list_js.xml
View file @
07d31edc
...
...
@@ -147,7 +147,8 @@
// declared methods\n
/////////////////////////////////////////////////////////////////\n
.declareMethod(\'render\', function (options) {\n
var nav_element = this.props.element.querySelector(".grid-container"),\n
var tab_gadget = this, \n
nav_element = tab_gadget.props.element.querySelector(".grid-container"),\n
erp5_document = options.erp5_document,\n
view_list = erp5_document._links[options.action_view],\n
nav_html = \'<nav data-role="navbar">
<ul
class=
"grid-items"
>
\',\n
...
...
@@ -190,6 +191,7 @@
nav_html
+=
\'</ul
></nav>
\';\n
nav_element.innerHTML = nav_html;\n
\n
return tab_gadget;\n
});\n
\n
});\n
...
...
@@ -331,7 +333,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
93
6.54906.24658.1911
</string>
</value>
<value>
<string>
93
7.690.6828.44612
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -349,7 +351,7 @@
</tuple>
<state>
<tuple>
<float>
140
7848815.35
</float>
<float>
140
9818434.1
</float>
<string>
GMT
</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