Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
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
nexedi
dream
Commits
300f97d7
Commit
300f97d7
authored
Jul 02, 2013
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Calculate predecessorList for coreObjects before calling manpy
parent
f1521e96
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
dream/platform/static/src/dream.js
dream/platform/static/src/dream.js
+14
-1
No files found.
dream/platform/static/src/dream.js
View file @
300f97d7
...
...
@@ -225,7 +225,7 @@
});
function
formatForManpy
(
data
)
{
var
manpy_dict
=
{},
coreObject
=
[];
var
manpy_dict
=
{},
coreObject
=
[]
,
core_object_dict
=
{}
;
$
.
each
(
data
[
'
element
'
],
function
(
idx
,
element
)
{
var
clone_element
=
{};
/* clone the element and put content of 'data' at the top level. */
...
...
@@ -238,8 +238,21 @@
clone_element
[
k
]
=
v
;
}
});
clone_element
[
'
predecessorList
'
]
=
[];
coreObject
.
push
(
clone_element
);
/* keep a mapping for predecessorList */
core_object_dict
[
clone_element
[
'
id
'
]]
=
clone_element
;
});
/* calculate predecessorList from sucessorList.
* In the future we have to update ManPy to use sucessorList only
*/
$
.
each
(
core_object_dict
,
function
(
k
,
v
)
{
$
.
each
(
v
[
'
successorList
'
]
||
[],
function
(
i
,
successor
)
{
core_object_dict
[
successor
].
predecessorList
.
push
(
k
);
});
});
manpy_dict
[
'
coreObject
'
]
=
coreObject
;
manpy_dict
[
'
modelResource
'
]
=
[];
manpy_dict
[
'
general
'
]
=
data
[
'
general
'
];
...
...
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