Skip to content

Commit

Permalink
Merge pull request #419 from aarranz/fix/mashupTemplateParse
Browse files Browse the repository at this point in the history
Fix some problems parsing mashup descriptions
  • Loading branch information
aarranz authored Jun 7, 2019
2 parents 4a195cb + 4f74fe5 commit b90a00e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions src/wirecloud/platform/workspace/mashupTemplateParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,16 +233,17 @@ def fillWorkspaceUsingTemplate(workspace, template):
iwidget_data = {
"widget": widget.uri,
"title": resource.get('title'),
"left": int(position.get('x')),
"top": int(position.get('y')),
"left": float(position.get('x')),
"top": float(position.get('y')),
"icon_left": 0,
"icon_top": 0,
"zIndex": int(position.get('z')),
"width": int(rendering.get('width')),
"height": int(rendering.get('height')),
"width": float(rendering.get('width')),
"height": float(rendering.get('height')),
"layout": int(rendering.get('layout')),
"minimized": rendering['minimized'],
"fulldragboard": rendering['fulldragboard'],
"titlevisible": rendering['titlevisible'],
}

iwidget = SaveIWidget(iwidget_data, user, tab, commit=False)
Expand Down
2 changes: 1 addition & 1 deletion src/wirecloud/platform/workspace/test-data/wt1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</resource>
<resource id="2" name="Test" title="Test (2)" vendor="Wirecloud" version="1.0">
<position x="0" y="0" z="0"/>
<rendering height="24" width="6" layout="0" minimized="false" fulldragboard="false"/>
<rendering height="24.5" width="6.1" layout="0.2" minimized="false" fulldragboard="false" titlevisible="false"/>
<preferencevalue name="text" value="value2"/>
<preferencevalue name="list" value="value1"/>
</resource>
Expand Down

0 comments on commit b90a00e

Please sign in to comment.