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
Amer
erp5
Commits
71259344
Commit
71259344
authored
Apr 29, 2019
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_officejs: actions can be a dialog form
parent
9e73268a
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
28 additions
and
16 deletions
+28
-16
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_common_utils_js.js
...teItem/web_page_module/gadget_officejs_common_utils_js.js
+3
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_common_utils_js.xml
...eItem/web_page_module/gadget_officejs_common_utils_js.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_controller_js.js
...e_module/gadget_officejs_controller_page_controller_js.js
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_controller_js.xml
..._module/gadget_officejs_controller_page_controller_js.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_discussion_tool_appcache.xml
..._page_module/gadget_officejs_discussion_tool_appcache.xml
+4
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_form_view_js.js
...plateItem/web_page_module/gadget_officejs_form_view_js.js
+8
-1
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_form_view_js.xml
...lateItem/web_page_module/gadget_officejs_form_view_js.xml
+2
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_handle_action_js.js
.../web_page_module/gadget_officejs_page_handle_action_js.js
+3
-2
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_handle_action_js.xml
...web_page_module/gadget_officejs_page_handle_action_js.xml
+2
-2
No files found.
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_common_utils_js.js
View file @
71259344
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
var
gadget
=
this
,
var
gadget
=
this
,
parent
=
"
portal_types/
"
+
portal_type
,
parent
=
"
portal_types/
"
+
portal_type
,
query
=
'
portal_type: "Action Information" AND reference: "
'
+
action_reference
+
'
" AND parent_relative_url: "
'
+
parent
+
'
"
'
,
query
=
'
portal_type: "Action Information" AND reference: "
'
+
action_reference
+
'
" AND parent_relative_url: "
'
+
parent
+
'
"
'
,
action_type
;
action_type
,
action_title
;
return
gadget
.
jio_allDocs
({
query
:
query
})
return
gadget
.
jio_allDocs
({
query
:
query
})
.
push
(
function
(
data
)
{
.
push
(
function
(
data
)
{
if
(
data
.
data
.
rows
.
length
===
0
)
{
if
(
data
.
data
.
rows
.
length
===
0
)
{
...
@@ -56,11 +56,13 @@
...
@@ -56,11 +56,13 @@
return
gadget
.
jio_get
(
data
.
data
.
rows
[
0
].
id
);
return
gadget
.
jio_get
(
data
.
data
.
rows
[
0
].
id
);
})
})
.
push
(
function
(
action_result
)
{
.
push
(
function
(
action_result
)
{
action_title
=
action_result
.
title
;
action_type
=
action_result
.
action_type
;
action_type
=
action_result
.
action_type
;
return
gadget
.
jio_get
(
action_result
.
action
);
return
gadget
.
jio_get
(
action_result
.
action
);
})
})
.
push
(
function
(
form_result
)
{
.
push
(
function
(
form_result
)
{
form_result
.
form_definition
.
action_type
=
action_type
;
form_result
.
form_definition
.
action_type
=
action_type
;
form_result
.
form_definition
.
title
=
action_title
;
return
form_result
.
form_definition
;
return
form_result
.
form_definition
;
});
});
});
});
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_common_utils_js.xml
View file @
71259344
...
@@ -269,7 +269,7 @@
...
@@ -269,7 +269,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
975.
17658.62401.59067
</string>
</value>
<value>
<string>
975.
23763.60402.39680
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -287,7 +287,7 @@
...
@@ -287,7 +287,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1556
202022.57
</float>
<float>
1556
568356.85
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_controller_js.js
View file @
71259344
...
@@ -50,12 +50,12 @@
...
@@ -50,12 +50,12 @@
doc
:
jio_document
,
doc
:
jio_document
,
child_gadget_url
:
child_gadget_url
,
child_gadget_url
:
child_gadget_url
,
form_definition
:
form_definition
,
form_definition
:
form_definition
,
form_type
:
'
page
'
,
editable
:
false
,
editable
:
false
,
view
:
options
.
view
,
view
:
options
.
view
,
//HARDCODED: following fields should be indicated by the configuration
//HARDCODED: following fields should be indicated by the configuration
has_more_views
:
false
,
has_more_views
:
false
,
has_more_actions
:
options
.
view
===
"
view
"
,
has_more_actions
:
options
.
view
===
"
view
"
is_form_list
:
false
});
});
});
});
})
})
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_controller_page_controller_js.xml
View file @
71259344
...
@@ -225,7 +225,7 @@
...
@@ -225,7 +225,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
975.
17968.931.9949
</string>
</value>
<value>
<string>
975.
23887.3080.29184
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -243,7 +243,7 @@
...
@@ -243,7 +243,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1556
220490.79
</float>
<float>
1556
575627.18
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_discussion_tool_appcache.xml
View file @
71259344
...
@@ -219,6 +219,8 @@ officejs_logo_text_editor.png\n
...
@@ -219,6 +219,8 @@ officejs_logo_text_editor.png\n
gadget_officejs_discussion_tool_router.html\n
gadget_officejs_discussion_tool_router.html\n
gadget_erp5_pt_form_view_editable.html\n
gadget_erp5_pt_form_view_editable.html\n
gadget_erp5_pt_form_view_editable.js\n
gadget_erp5_pt_form_view_editable.js\n
gadget_erp5_pt_form_dialog.html\n
gadget_erp5_pt_form_dialog.js\n
gadget_erp5_page_action_offline.html\n
gadget_erp5_page_action_offline.html\n
gadget_erp5_page_action_offline.js\n
gadget_erp5_page_action_offline.js\n
gadget_erp5_page_ojs_controller.html\n
gadget_erp5_page_ojs_controller.html\n
...
@@ -744,7 +746,7 @@ NETWORK:\n
...
@@ -744,7 +746,7 @@ NETWORK:\n
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
975.
16181.55679.14097
</string>
</value>
<value>
<string>
975.
23755.19438.47564
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -762,7 +764,7 @@ NETWORK:\n
...
@@ -762,7 +764,7 @@ NETWORK:\n
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1556
114650.11
</float>
<float>
1556
573144.76
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_form_view_js.js
View file @
71259344
...
@@ -148,7 +148,7 @@
...
@@ -148,7 +148,7 @@
})
})
.
push
(
function
(
result_list
)
{
.
push
(
function
(
result_list
)
{
var
url_list
=
result_list
[
0
],
header_dict
;
var
url_list
=
result_list
[
0
],
header_dict
;
if
(
gadget
.
state
.
is_form_list
)
{
if
(
gadget
.
state
.
form_type
===
'
list
'
)
{
header_dict
=
{
header_dict
=
{
panel_action
:
true
,
panel_action
:
true
,
jump_url
:
""
,
jump_url
:
""
,
...
@@ -157,6 +157,12 @@
...
@@ -157,6 +157,12 @@
filter_action
:
true
,
filter_action
:
true
,
page_title
:
result_list
[
2
]
page_title
:
result_list
[
2
]
};
};
}
else
if
(
gadget
.
state
.
form_type
===
'
dialog
'
)
{
header_dict
=
{
page_title
:
gadget
.
state
.
doc
.
title
,
//TODO: find correct url
cancel_url
:
url_list
[
6
]
};
}
else
{
}
else
{
header_dict
=
{
header_dict
=
{
selection_url
:
url_list
[
2
],
selection_url
:
url_list
[
2
],
...
@@ -174,6 +180,7 @@
...
@@ -174,6 +180,7 @@
if
(
gadget
.
state
.
has_more_actions
)
{
if
(
gadget
.
state
.
has_more_actions
)
{
header_dict
.
actions_url
=
url_list
[
1
];
header_dict
.
actions_url
=
url_list
[
1
];
}
}
//TODO: fix index (must be last index, not a number)
if
(
url_list
[
7
])
{
if
(
url_list
[
7
])
{
header_dict
.
add_url
=
url_list
[
7
];
header_dict
.
add_url
=
url_list
[
7
];
}
}
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_form_view_js.xml
View file @
71259344
...
@@ -269,7 +269,7 @@
...
@@ -269,7 +269,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
975.
16239.52422.35396
</string>
</value>
<value>
<string>
975.
23841.30794.8294
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -287,7 +287,7 @@
...
@@ -287,7 +287,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
1556
116804.34
</float>
<float>
1556
572935.87
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_handle_action_js.js
View file @
71259344
...
@@ -57,7 +57,8 @@
...
@@ -57,7 +57,8 @@
gadget
.
element
.
appendChild
(
fragment
);
gadget
.
element
.
appendChild
(
fragment
);
return
gadget
.
declareGadget
(
action_gadget_url
,
{
return
gadget
.
declareGadget
(
action_gadget_url
,
{
scope
:
"
action_field
"
,
scope
:
"
action_field
"
,
element
:
fragment
element
:
fragment
/*,
sandbox: 'iframe'*/
})
})
.
push
(
function
(
action_gadget
)
{
.
push
(
function
(
action_gadget
)
{
return
action_gadget
.
render
(
options
,
action_reference
,
form_definition
);
return
action_gadget
.
render
(
options
,
action_reference
,
form_definition
);
...
@@ -65,7 +66,7 @@
...
@@ -65,7 +66,7 @@
}
}
}
}
// avoid crash if form doesn't have gadget_field_action_js_script or object_jio_js_script action
// avoid crash if form doesn't have gadget_field_action_js_script or object_jio_js_script action
// render form without submit (and warn/inform user?)
//
TODO:
render form without submit (and warn/inform user?)
});
});
})
})
...
...
bt5/erp5_officejs/PathTemplateItem/web_page_module/gadget_officejs_page_handle_action_js.xml
View file @
71259344
...
@@ -269,7 +269,7 @@
...
@@ -269,7 +269,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
975.23
581.9849.38673
</string>
</value>
<value>
<string>
975.23
867.41521.38092
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -287,7 +287,7 @@
...
@@ -287,7 +287,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15565
59118.24
</float>
<float>
15565
75547.56
</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