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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tristan Cavelier
erp5
Commits
9974e56d
Commit
9974e56d
authored
Feb 12, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[erp5_web_renderjs_ui] Router: add store_and_display command
parent
deb1f750
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
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
+15
-4
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 @
9974e56d
...
@@ -32,6 +32,8 @@
...
@@ -32,6 +32,8 @@
COMMAND_CHANGE_STATE
=
"
change
"
,
COMMAND_CHANGE_STATE
=
"
change
"
,
// Like change, but also store the current jio document display state
// Like change, but also store the current jio document display state
COMMAND_STORE_AND_CHANGE_STATE
=
"
store_and_change
"
,
COMMAND_STORE_AND_CHANGE_STATE
=
"
store_and_change
"
,
// Like display, but also store the current jio document display state
COMMAND_STORE_AND_DISPLAY_STATE
=
"
store_and_display
"
,
// Display one entry index from a selection
// Display one entry index from a selection
COMMAND_INDEX_STATE
=
"
index
"
,
COMMAND_INDEX_STATE
=
"
index
"
,
// Display previous entry index from a selection
// Display previous entry index from a selection
...
@@ -52,6 +54,7 @@
...
@@ -52,6 +54,7 @@
VALID_URL_COMMAND_DICT
[
COMMAND_DISPLAY_STORED_STATE
]
=
null
;
VALID_URL_COMMAND_DICT
[
COMMAND_DISPLAY_STORED_STATE
]
=
null
;
VALID_URL_COMMAND_DICT
[
COMMAND_CHANGE_STATE
]
=
null
;
VALID_URL_COMMAND_DICT
[
COMMAND_CHANGE_STATE
]
=
null
;
VALID_URL_COMMAND_DICT
[
COMMAND_STORE_AND_CHANGE_STATE
]
=
null
;
VALID_URL_COMMAND_DICT
[
COMMAND_STORE_AND_CHANGE_STATE
]
=
null
;
VALID_URL_COMMAND_DICT
[
COMMAND_STORE_AND_DISPLAY_STATE
]
=
null
;
VALID_URL_COMMAND_DICT
[
COMMAND_INDEX_STATE
]
=
null
;
VALID_URL_COMMAND_DICT
[
COMMAND_INDEX_STATE
]
=
null
;
VALID_URL_COMMAND_DICT
[
COMMAND_SELECTION_PREVIOUS
]
=
null
;
VALID_URL_COMMAND_DICT
[
COMMAND_SELECTION_PREVIOUS
]
=
null
;
VALID_URL_COMMAND_DICT
[
COMMAND_SELECTION_NEXT
]
=
null
;
VALID_URL_COMMAND_DICT
[
COMMAND_SELECTION_NEXT
]
=
null
;
...
@@ -336,12 +339,10 @@
...
@@ -336,12 +339,10 @@
);
);
}
}
function
execStoreAndChangeCommand
(
gadget
,
previous_options
,
next_options
,
drop_options
)
{
function
execStoreAndDisplayCommand
(
gadget
,
options
)
{
var
options
,
var
jio_key
,
jio_key
,
queue
,
queue
,
display_url
;
display_url
;
options
=
calculateChangeOptions
(
previous_options
,
next_options
,
drop_options
);
jio_key
=
options
.
jio_key
;
jio_key
=
options
.
jio_key
;
delete
options
.
jio_key
;
delete
options
.
jio_key
;
...
@@ -360,6 +361,13 @@
...
@@ -360,6 +361,13 @@
});
});
}
}
function
execStoreAndChangeCommand
(
gadget
,
previous_options
,
next_options
,
drop_options
)
{
return
execStoreAndDisplayCommand
(
gadget
,
calculateChangeOptions
(
previous_options
,
next_options
,
drop_options
)
);
}
function
execIndexCommand
(
gadget
,
previous_options
,
next_options
)
{
function
execIndexCommand
(
gadget
,
previous_options
,
next_options
)
{
var
jio_key
=
next_options
.
jio_key
,
var
jio_key
=
next_options
.
jio_key
,
selection_options
=
{};
selection_options
=
{};
...
@@ -753,6 +761,9 @@
...
@@ -753,6 +761,9 @@
if
(
command_options
.
path
===
COMMAND_STORE_AND_CHANGE_STATE
)
{
if
(
command_options
.
path
===
COMMAND_STORE_AND_CHANGE_STATE
)
{
return
execStoreAndChangeCommand
(
gadget
,
previous_options
,
next_options
,
drop_options
);
return
execStoreAndChangeCommand
(
gadget
,
previous_options
,
next_options
,
drop_options
);
}
}
if
(
command_options
.
path
===
COMMAND_STORE_AND_DISPLAY_STATE
)
{
return
execStoreAndDisplayCommand
(
gadget
,
next_options
);
}
if
(
command_options
.
path
===
COMMAND_SELECTION_NEXT
)
{
if
(
command_options
.
path
===
COMMAND_SELECTION_NEXT
)
{
return
execSelectionNextCommand
(
gadget
,
previous_options
);
return
execSelectionNextCommand
(
gadget
,
previous_options
);
}
}
...
...
bt5/erp5_web_renderjs_ui/PathTemplateItem/web_page_module/rjs_gadget_erp5_router_js.xml
View file @
9974e56d
...
@@ -232,7 +232,7 @@
...
@@ -232,7 +232,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
96
4.44610.27477.10598
</string>
</value>
<value>
<string>
96
5.29255.31672.17100
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -250,7 +250,7 @@
...
@@ -250,7 +250,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
151
5687403.54
</float>
<float>
151
8440166.69
</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