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
Frederic Thoma
erp5
Commits
7aafa7d0
Commit
7aafa7d0
authored
Oct 08, 2014
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a panel gadget.
Activate it on the frontpage and list view.
parent
a6ff03df
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
819 additions
and
29 deletions
+819
-29
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_appcache.xml
...TemplateItem/web_page_module/rjs_gadget_erp5_appcache.xml
+5
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_js.xml
...hTemplateItem/web_page_module/rjs_gadget_erp5_form_js.xml
+4
-4
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_html.xml
...plateItem/web_page_module/rjs_gadget_erp5_header_html.xml
+3
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_js.xml
...emplateItem/web_page_module/rjs_gadget_erp5_header_js.xml
+39
-10
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_html.xml
...PathTemplateItem/web_page_module/rjs_gadget_erp5_html.xml
+6
-4
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_js.xml
...i/PathTemplateItem/web_page_module/rjs_gadget_erp5_js.xml
+11
-3
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_html.xml
...mplateItem/web_page_module/rjs_gadget_erp5_panel_html.xml
+368
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_js.xml
...TemplateItem/web_page_module/rjs_gadget_erp5_panel_js.xml
+380
-0
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.xml
...eItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.xml
+3
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_appcache.xml
View file @
7aafa7d0
...
...
@@ -102,7 +102,7 @@
<value>
<string
encoding=
"cdata"
>
<![CDATA[
CACHE MANIFEST\n
# generated on
Thu, 02 Oct 2014 12:06:38
+0000\n
# generated on
Mon, 06 Oct 2014 15:03:33
+0000\n
# XXX + fonts\n
# images/ajax-loader.gif\n
CACHE:\n
...
...
@@ -165,6 +165,8 @@ gadget_erp5_page_login.html\n
gadget_erp5_page_login.js\n
gadget_erp5_page_tab.html\n
gadget_erp5_page_tab.js\n
gadget_erp5_panel.html\n
gadget_erp5_panel.js\n
gadget_erp5_pt_form_dialog.html\n
gadget_erp5_pt_form_dialog.js\n
gadget_erp5_pt_form_list.html\n
...
...
@@ -322,7 +324,7 @@ NETWORK:\n
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
93
7.64214.42636.62720
</string>
</value>
<value>
<string>
93
8.4615.36506.28108
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -340,7 +342,7 @@ NETWORK:\n
</tuple>
<state>
<tuple>
<float>
1412
254043.5
</float>
<float>
1412
758909.58
</float>
<string>
GMT
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_form_js.xml
View file @
7aafa7d0
...
...
@@ -221,8 +221,8 @@
field_url = \'gadget_erp5_field_list.html\';\n
} else if (renderered_field.type === \'StringField\') {\n
field_url = \'gadget_erp5_field_string.html\';\n
} else if (renderered_field.type === \'RelationStringField\') {\n
field_url = \'gadget_erp5_field_relation_string.html\';\n
//
} else if (renderered_field.type === \'RelationStringField\') {\n
//
field_url = \'gadget_erp5_field_relation_string.html\';\n
} else if (renderered_field.type === \'TextAreaField\') {\n
field_url = \'gadget_erp5_field_textarea.html\';\n
} else if (renderered_field.type === \'FloatField\') {\n
...
...
@@ -479,7 +479,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
937.64
263.33357.15633
</string>
</value>
<value>
<string>
937.64
346.57999.39918
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -497,7 +497,7 @@
</tuple>
<state>
<tuple>
<float>
1412
254860.94
</float>
<float>
1412
339249.91
</float>
<string>
GMT
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_html.xml
View file @
7aafa7d0
...
...
@@ -128,7 +128,7 @@
<a
role=
"button"
href=
"{{url}}"
class=
"responsive ui-btn ui-icon-{{icon}} ui-btn-icon-left ui-first-child ui-last-child {{class}}"
>
{{title}}
</a>
\n
</script>
\n
<script
id=
"header-button-template"
type=
"text/x-handlebars-template"
>
\n
<form><button
type=
\'submit\'
class=
\'responsive
ui-btn
ui-icon-{{icon}}
ui-btn-icon-left
ui-first-child
ui-last-child
{{class}}\'
>
{{title}}
</button></form>
\n
<form><button
name=
\'{{name}}\'
type=
\'submit\'
class=
\'responsive
ui-btn
ui-icon-{{icon}}
ui-btn-icon-left
ui-first-child
ui-last-child
{{class}}\'
>
{{title}}
</button></form>
\n
</script>
\n
\n
<script
id=
"sub-header-template"
type=
"text/x-handlebars-template"
>
\n
...
...
@@ -310,7 +310,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
93
7.65430.11917.20872
</string>
</value>
<value>
<string>
93
8.4401.55907.17169
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -328,7 +328,7 @@
</tuple>
<state>
<tuple>
<float>
1412
326537.12
</float>
<float>
1412
595274.24
</float>
<string>
GMT
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_header_js.xml
View file @
7aafa7d0
...
...
@@ -172,6 +172,7 @@
.declareAcquiredMethod("whoWantToDisplayThis", "whoWantToDisplayThis")\n
.declareAcquiredMethod("jio_get", "jio_get")\n
.declareAcquiredMethod("triggerSubmit", "triggerSubmit")\n
.declareAcquiredMethod("triggerPanel", "triggerPanel")\n
/////////////////////////////////////////////////////////////////\n
// declared methods\n
/////////////////////////////////////////////////////////////////\n
...
...
@@ -226,12 +227,15 @@
[\'cancel_url\', \'Cancel\', \'times\'],\n
[\'back_url\', \'Back\', \'arrow-left\']\n
],\n
possible_left_button_list = [\n
[\'panel_action\', \'Menu\', \'bars\', \'panel\']\n
],\n
possible_right_link_list = [\n
[\'edit_url\', \'Edit\', \'edit\']\n
],\n
possible_right_button_list = [\n
[\'save_action\', \'Save\', \'check\'],\n
[\'submit_action\', \'Proceed\', \'share\']\n
[\'save_action\', \'Save\', \'check\'
, \'submit\'
],\n
[\'submit_action\', \'Proceed\', \'share\'
, \'submit\'
]\n
],\n
possible_sub_header_list = [\n
[\'tab_url\', \'Tabs\', \'eye\'],\n
...
...
@@ -247,7 +251,14 @@
i,\n
klass,\n
count = 0,\n
//left_link = {\n
// title: "Menu",\n
// icon: "bars",\n
// url: "#leftpanel",\n
// class: "ui-disabled"\n
// },\n
left_link,\n
left_button,\n
right_link,\n
right_button,\n
default_right_icon = "",\n
...
...
@@ -281,10 +292,20 @@
url:
options[possible_left_link_list[i][0]],\n
class:
klass\n
};\n
count
+=
1;\n
}\n
}\n
if
(
left_link =
==
undefined)
{\n
for
(
i =
0;
i
<
possible_left_button_list.length;
i
+=
1)
{\n
if
(options.hasOwnProperty(possible_left_button_list[i][0]))
{\n
left_button =
{\n
title:
possible_left_button_list[i][1],\n
icon:
possible_left_button_list[i][2],\n
name:
possible_left_button_list[i][3]\n
};\n
}\n
}\n
if
(left_button
!==
undefined)
{\n
gadget.props.left_link.innerHTML =
header_button_template(left_button);\n
}
else
if
(
left_link =
==
undefined)
{\n
gadget.props.left_link.innerHTML =
""
;\n
}
else
{\n
gadget.props.left_link.innerHTML =
header_link_template(left_link);\n
...
...
@@ -319,14 +340,14 @@
url:
options[possible_right_link_list[i][0]],\n
class:
klass\n
};\n
count
+=
1;\n
}\n
}\n
for
(
i =
0;
i
<
possible_right_button_list.length;
i
+=
1)
{\n
if
(options.hasOwnProperty(possible_right_button_list[i][0]))
{\n
right_button =
{\n
title:
possible_right_button_list[i][1],\n
icon:
default_right_icon
||
possible_right_button_list[i][2]\n
icon:
default_right_icon
||
possible_right_button_list[i][2],\n
name:
possible_right_button_list[i][3]\n
};\n
if
(gadget.stats.error)
{\n
right_button.class =
"ui-disabled"
;\n
...
...
@@ -375,8 +396,16 @@
.declareService(function
()
{\n
var
form_gadget =
this;\n
\n
function
formSubmit()
{\n
return
form_gadget.triggerSubmit();\n
function
formSubmit(evt)
{\n
var
button =
evt.target[0],\n
name =
button.getAttribute("name");\n
if
(
name =
==
"panel")
{\n
return
form_gadget.triggerPanel();\n
}\n
if
(
name =
==
"submit")
{\n
return
form_gadget.triggerSubmit();\n
}\n
throw
new
Error("Unsupported
button
"
+
name);\n
}\n
\n
//
Listen
to
form
submit\n
...
...
@@ -525,7 +554,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
938.
142.63057.34594
</string>
</value>
<value>
<string>
938.
4424.15337.59562
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -543,7 +572,7 @@
</tuple>
<state>
<tuple>
<float>
1412
343494.43
</float>
<float>
1412
596556.28
</float>
<string>
GMT
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_html.xml
View file @
7aafa7d0
...
...
@@ -134,12 +134,14 @@
\n
</head>
\n
<body>
\n
\n
<div
data-role=
"panel"
id=
"leftpanel"
data-display=
"overlay"
></div>
\n
\n
<div
data-gadget-url=
"gadget_erp5_header.html"
\n
data-gadget-scope=
"header"
\n
data-gadget-sandbox=
"public"
></div>
\n
\n
<div
data-gadget-url=
"gadget_erp5_panel.html"
\n
data-gadget-scope=
"panel"
\n
data-gadget-sandbox=
"public"
></div>
\n
\n
<article
class=
"ui-content"
></article>
\n
\n
...
...
@@ -284,7 +286,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
93
7.64343.1806.54016
</string>
</value>
<value>
<string>
93
8.4433.7668.55722
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -302,7 +304,7 @@
</tuple>
<state>
<tuple>
<float>
1412
343671.79
</float>
<float>
1412
596999.08
</float>
<string>
GMT
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_js.xml
View file @
7aafa7d0
...
...
@@ -340,6 +340,12 @@
return page_gadget.triggerSubmit();\n
});\n
})\n
.allowPublicAcquisition(\'triggerPanel\', function () {\n
return this.getDeclaredGadget("panel")\n
.push(function (panel_gadget) {\n
return panel_gadget.toggle();\n
});\n
})\n
/////////////////////////////////////////////////////////////////\n
// declared methods\n
/////////////////////////////////////////////////////////////////\n
...
...
@@ -367,7 +373,9 @@
.push(function () {\n
\n
// By default, init the header options to be empty (ERP5 title by default + sidebar)\n
gadget.props.header_argument_list = [{}];\n
gadget.props.header_argument_list = [{\n
panel_action: true\n
}];\n
\n
options.action_view = gadget.props.action_view;\n
gadget.state_parameter_dict = {\n
...
...
@@ -575,7 +583,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
938.
5954.37249.58333
</string>
</value>
<value>
<string>
938.
7130.7783.39850
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -593,7 +601,7 @@
</tuple>
<state>
<tuple>
<float>
1412758
687.11
</float>
<float>
1412758
828.97
</float>
<string>
GMT
</string>
</tuple>
</state>
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_html.xml
0 → 100644
View file @
7aafa7d0
This diff is collapsed.
Click to expand it.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_panel_js.xml
0 → 100644
View file @
7aafa7d0
This diff is collapsed.
Click to expand it.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_pt_form_list_js.xml
View file @
7aafa7d0
...
...
@@ -151,6 +151,7 @@
all_gadget[0].render(search_options),\n
all_gadget[1].render(form_options),\n
gadget.renderPageHeader({\n
panel_action: true,\n
jump_url: "",\n
cut_url: "",\n
actions_url: all_gadget[4],\n
...
...
@@ -300,7 +301,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
937.6
4343.1806.54016
</string>
</value>
<value>
<string>
937.6
5471.52542.37171
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -318,7 +319,7 @@
</tuple>
<state>
<tuple>
<float>
1412
327028.09
</float>
<float>
1412
596633.53
</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