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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Rafael Monnerat
erp5
Commits
5852a707
Commit
5852a707
authored
Feb 17, 2021
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: add display_erp5_dialog_with_history router command
parent
d6d2f47d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
7 deletions
+19
-7
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_router_js.js
...TemplateItem/web_page_module/rjs_gadget_erp5_router_js.js
+17
-5
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_router_js.xml
...emplateItem/web_page_module/rjs_gadget_erp5_router_js.xml
+2
-2
No files found.
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_router_js.js
View file @
5852a707
...
...
@@ -28,6 +28,8 @@
COMMAND_KEEP_HISTORY_AND_CANCEL_DIALOG_STATE
=
"
cancel_dialog_with_history
"
,
// Display an action on the jio document + the history
COMMAND_KEEP_HISTORY_AND_DISPLAY_ERP5_ACTION
=
"
display_erp5_action_with_history
"
,
// Display a dialog on the jio document + the history
COMMAND_KEEP_HISTORY_AND_DISPLAY_ERP5_DIALOG
=
"
display_erp5_dialog_with_history
"
,
// Store the jio key for the person document of the user
COMMAND_LOGIN
=
"
login
"
,
// Display a raw string URL
...
...
@@ -70,6 +72,7 @@
VALID_URL_COMMAND_DICT
[
COMMAND_KEEP_HISTORY_AND_DISPLAY_DIALOG_STATE
]
=
null
;
VALID_URL_COMMAND_DICT
[
COMMAND_KEEP_HISTORY_AND_CANCEL_DIALOG_STATE
]
=
null
;
VALID_URL_COMMAND_DICT
[
COMMAND_KEEP_HISTORY_AND_DISPLAY_ERP5_ACTION
]
=
null
;
VALID_URL_COMMAND_DICT
[
COMMAND_KEEP_HISTORY_AND_DISPLAY_ERP5_DIALOG
]
=
null
;
VALID_URL_COMMAND_DICT
[
COMMAND_DISPLAY_STORED_STATE
]
=
null
;
VALID_URL_COMMAND_DICT
[
COMMAND_CHANGE_STATE
]
=
null
;
VALID_URL_COMMAND_DICT
[
COMMAND_DISPLAY_ERP5_ACTION
]
=
null
;
...
...
@@ -394,7 +397,7 @@
);
}
function
execDisplayERP5ActionCommand
(
gadget
,
previous_options
,
next_options
,
keep_history
)
{
function
execDisplayERP5ActionCommand
(
gadget
,
previous_options
,
next_options
,
command
)
{
return
gadget
.
jio_getAttachment
(
next_options
.
jio_key
,
'
links
'
)
.
push
(
function
(
document_view
)
{
var
action
,
action_data
,
i
,
j
,
new_options
;
...
...
@@ -412,10 +415,16 @@
view
:
action_data
.
href
};
copyStickyParameterDict
(
previous_options
,
new_options
);
if
(
keep_history
)
{
if
(
command
===
0
)
{
return
execDisplayCommand
(
gadget
,
new_options
);
}
if
(
command
===
1
)
{
return
execPushHistoryCommand
(
gadget
,
previous_options
,
new_options
);
}
return
execDisplayCommand
(
gadget
,
new_options
);
if
(
command
===
2
)
{
return
execKeepHistoryAndDisplayCommand
(
gadget
,
previous_options
,
new_options
,
true
);
}
throw
new
Error
(
'
execDisplayERP5ActionCommand. Not supported command
'
+
command
);
}
}
}
...
...
@@ -909,7 +918,10 @@
return
execKeepHistoryAndCancelDialogCommand
(
gadget
,
previous_options
);
}
if
(
command_options
.
path
===
COMMAND_KEEP_HISTORY_AND_DISPLAY_ERP5_ACTION
)
{
return
execDisplayERP5ActionCommand
(
gadget
,
previous_options
,
next_options
,
true
);
return
execDisplayERP5ActionCommand
(
gadget
,
previous_options
,
next_options
,
1
);
}
if
(
command_options
.
path
===
COMMAND_KEEP_HISTORY_AND_DISPLAY_ERP5_DIALOG
)
{
return
execDisplayERP5ActionCommand
(
gadget
,
previous_options
,
next_options
,
2
);
}
if
(
command_options
.
path
===
COMMAND_DISPLAY_STORED_STATE
)
{
return
execDisplayStoredStateCommand
(
gadget
,
next_options
,
drop_options
);
...
...
@@ -921,7 +933,7 @@
return
execChangeCommand
(
previous_options
,
next_options
,
drop_options
);
}
if
(
command_options
.
path
===
COMMAND_DISPLAY_ERP5_ACTION
)
{
return
execDisplayERP5ActionCommand
(
gadget
,
previous_options
,
next_options
);
return
execDisplayERP5ActionCommand
(
gadget
,
previous_options
,
next_options
,
0
);
}
if
(
command_options
.
path
===
COMMAND_STORE_AND_CHANGE_STATE
)
{
return
execStoreAndChangeCommand
(
gadget
,
previous_options
,
next_options
,
drop_options
);
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_router_js.xml
View file @
5852a707
...
...
@@ -236,7 +236,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
89.58905.49586.6236
1
</string>
</value>
<value>
<string>
9
90.5085.9603.773
1
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -254,7 +254,7 @@
</tuple>
<state>
<tuple>
<float>
1613
145957.49
</float>
<float>
1613
566000.18
</float>
<string>
UTC
</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