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
Hamza
erp5
Commits
2d61b58f
Commit
2d61b58f
authored
Aug 04, 2014
by
Sven Franck
Committed by
Sebastien Robin
Aug 08, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated action menu to pre-enhanced JQM controlgroup
parent
0fd97d16
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
7 deletions
+74
-7
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
+13
-0
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
+60
-6
bt5/erp5_web_renderjs_ui/bt/revision
bt5/erp5_web_renderjs_ui/bt/revision
+1
-1
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_html.xml
View file @
2d61b58f
...
@@ -115,10 +115,17 @@
...
@@ -115,10 +115,17 @@
<!-- renderjs -->
\n
<!-- renderjs -->
\n
<script
src=
"RSVP.js"
type=
"text/javascript"
></script>
\n
<script
src=
"RSVP.js"
type=
"text/javascript"
></script>
\n
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
\n
<script
src=
"renderjs.js"
type=
"text/javascript"
></script>
\n
<script
src=
"handlebars.js"
type=
"text/javascript"
></script>
\n
\n
\n
<!-- custom script -->
\n
<!-- custom script -->
\n
<script
src=
"gadget_global.js"
type=
"text/javascript"
></script>
\n
<script
src=
"gadget_global.js"
type=
"text/javascript"
></script>
\n
<script
src=
"gadget_erp5_pt_form_view.js"
type=
"text/javascript"
></script>
\n
<script
src=
"gadget_erp5_pt_form_view.js"
type=
"text/javascript"
></script>
\n
\n
<script
id=
"workflow-template"
type=
"text/x-handlebars-template"
>
\n
{{#each actionlist}}\n
<a
class=
"{{class}}"
href=
"{{link}}"
>
{{title}}
</a>
\n
{{/each}}\n
</script>
\n
\n
\n
</head>
\n
</head>
\n
<body>
\n
<body>
\n
...
@@ -130,6 +137,12 @@
...
@@ -130,6 +137,12 @@
<form
class=
"save_form"
>
\n
<form
class=
"save_form"
>
\n
<button
type=
"submit"
class=
"ui-btn ui-btn-b ui-btn-inline\n
<button
type=
"submit"
class=
"ui-btn ui-btn-b ui-btn-inline\n
ui-icon-edit ui-btn-icon-right"
>
Save
</button>
\n
ui-icon-edit ui-btn-icon-right"
>
Save
</button>
\n
\n
<div
class=
"action_list ui-controlgroup ui-controlgroup-horizontal ui-corner-all"
>
\n
<div
class=
"ui-controlgroup-controls"
>
\n
</div>
\n
</div>
\n
\n
<div
data-gadget-url=
"gadget_erp5_form.html"
\n
<div
data-gadget-url=
"gadget_erp5_form.html"
\n
data-gadget-scope=
"erp5_form"
\n
data-gadget-scope=
"erp5_form"
\n
data-gadget-sandbox=
"public"
>
\n
data-gadget-sandbox=
"public"
>
\n
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_view_js.xml
View file @
2d61b58f
...
@@ -99,7 +99,9 @@
...
@@ -99,7 +99,9 @@
</item>
</item>
<item>
<item>
<key>
<string>
text_content
</string>
</key>
<key>
<string>
text_content
</string>
</key>
<value>
<string>
/*global rJS, RSVP, jQuery, Handlebars,\n
<value>
<string
encoding=
"cdata"
>
<![CDATA[
/*global rJS, RSVP, jQuery, Handlebars,\n
promiseEventListener, console */\n
promiseEventListener, console */\n
/*jslint nomen: true */\n
/*jslint nomen: true */\n
/*global window, rJS, RSVP, StatelessJS, alert, FormData, document, console */\n
/*global window, rJS, RSVP, StatelessJS, alert, FormData, document, console */\n
...
@@ -111,7 +113,12 @@
...
@@ -111,7 +113,12 @@
// Handlebars\n
// Handlebars\n
/////////////////////////////////////////////////////////////////\n
/////////////////////////////////////////////////////////////////\n
// Precompile the templates while loading the first gadget instance\n
// Precompile the templates while loading the first gadget instance\n
var gadget_klass = rJS(window);\n
var gadget_klass = rJS(window),\n
workflow_template = Handlebars.compile(\n
gadget_klass.__template_element\n
.getElementById("workflow-template")\n
.innerHTML\n
);\n
\n
\n
gadget_klass\n
gadget_klass\n
/////////////////////////////////////////////////////////////////\n
/////////////////////////////////////////////////////////////////\n
...
@@ -121,6 +128,13 @@
...
@@ -121,6 +128,13 @@
.ready(function (g) {\n
.ready(function (g) {\n
g.props = {};\n
g.props = {};\n
})\n
})\n
/////////////////////////////////////////////////////////////////\n
// ready\n
/////////////////////////////////////////////////////////////////\n
// Init local properties\n
.ready(function (g) {\n
g.props = {};\n
})\n
\n
\n
// Assign the element to a variable\n
// Assign the element to a variable\n
.ready(function (g) {\n
.ready(function (g) {\n
...
@@ -131,12 +145,22 @@
...
@@ -131,12 +145,22 @@
})\n
})\n
\n
\n
.declareAcquiredMethod("aq_put", "jio_put")\n
.declareAcquiredMethod("aq_put", "jio_put")\n
.declareAcquiredMethod("whoWantToDisplayThisPage", "whoWantToDisplayThisPage")\n
/////////////////////////////////////////////////////////////////\n
/////////////////////////////////////////////////////////////////\n
// declared methods\n
// declared methods\n
/////////////////////////////////////////////////////////////////\n
/////////////////////////////////////////////////////////////////\n
.declareMethod(\'render\', function (options) {\n
.declareMethod(\'render\', function (options) {\n
var erp5_document = options.erp5_document,\n
var erp5_document = options.erp5_document,\n
form_gadget = this;\n
action_list = erp5_document._links.action_workflow || [],\n
form_gadget = this,\n
i,\n
promise_list = [];\n
\n
for (i = 0; i < action_list.length; i += 1) {\n
promise_list.push(this.whoWantToDisplayThisPage({\n
name: action_list[i].name\n
}));\n
}\n
\n
\n
form_gadget.props.id = erp5_document._id;\n
form_gadget.props.id = erp5_document._id;\n
form_gadget.props.view = options.view;\n
form_gadget.props.view = options.view;\n
...
@@ -145,19 +169,47 @@
...
@@ -145,19 +169,47 @@
.push(function () {\n
.push(function () {\n
return RSVP.all([\n
return RSVP.all([\n
form_gadget.getDeclaredGadget("erp5_form"),\n
form_gadget.getDeclaredGadget("erp5_form"),\n
form_gadget.getDeclaredGadget("erp5_tab")\n
form_gadget.getDeclaredGadget("erp5_tab"),\n
RSVP.all(promise_list)\n
]);\n
]);\n
})\n
})\n
.push(function (all_gadget) {\n
.push(function (all_gadget) {\n
var form_options = options.erp5_form || {},\n
var form_options = options.erp5_form || {},\n
tab_options = options.erp5_tag || {};\n
tab_options = options.erp5_tag || {},\n
all_result = all_gadget[2],\n
actionlist = [],\n
class_list,\n
i;\n
\n
\n
form_options.erp5_document = options.erp5_document;\n
form_options.erp5_document = options.erp5_document;\n
form_options.form_definition = options.form_definition;\n
form_options.form_definition = options.form_definition;\n
form_options.view = options.view;\n
form_options.view = options.view;\n
\n
tab_options.erp5_document = options.erp5_document;\n
tab_options.erp5_document = options.erp5_document;\n
tab_options.form_definition = options.form_definition;\n
tab_options.form_definition = options.form_definition;\n
tab_options.view = options.view;\n
tab_options.view = options.view;\n
\n
for (i = 0; i < all_result.length; i += 1) {\n
switch (i) {\n
case 0:\n
class_list = "ui-btn ui-first-child";\n
break;\n
case (all_result.length - 1):\n
class_list = "ui-btn ui-last-child";\n
break;\n
default:\n
class_list = "ui-btn";\n
break;\n
}\n
actionlist.push({\n
class: class_list,\n
title: action_list[i].title,\n
link: all_result[i],\n
});\n
}\n
form_gadget.__element.querySelector("div.ui-controlgroup-controls")\n
.innerHTML = workflow_template({actionlist: actionlist});\n
\n
\n
\n
return RSVP.all([\n
return RSVP.all([\n
all_gadget[1].render(form_options),\n
all_gadget[1].render(form_options),\n
...
@@ -191,7 +243,9 @@
...
@@ -191,7 +243,9 @@
);\n
);\n
});\n
});\n
\n
\n
}(window, rJS, RSVP));
</string>
</value>
}(window, rJS, RSVP));
]]>
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
title
</string>
</key>
<key>
<string>
title
</string>
</key>
...
...
bt5/erp5_web_renderjs_ui/bt/revision
View file @
2d61b58f
26
27
\ No newline at end of file
\ No newline at end of file
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