Skip to content

Commit 8536890

Browse files
committed
ADAP-155: updated LauncherBusDemo
1 parent 7e7659e commit 8536890

File tree

5 files changed

+195
-102
lines changed

5 files changed

+195
-102
lines changed

release/busdemo.html

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,23 @@
2626
OpenFinLayouts.snapAndDock.undockWindow();
2727
}
2828

29+
function createChildWindow() {
30+
const winOption = {
31+
name:'child', // needs to be unique within its app
32+
defaultWidth: 420,
33+
defaultHeight: 420,
34+
url: 'http://localhost:8888/layout.html',
35+
frame: true,
36+
autoShow: true,
37+
saveWindowState: false
38+
};
39+
fin.Window.create(winOption);
40+
}
41+
42+
2943
</script>
3044
</head>
31-
<body style="background-color: rgb(158, 240, 222);">
45+
<body>
3246
<script>
3347

3448
</script>
@@ -39,6 +53,9 @@
3953
<div>
4054
<Button id="undock" disabled onclick="undockMe()"> Undock </Button>
4155
</div>
56+
<div>
57+
<Button id="createChild" onclick="createChildWindow()"> Create Child Window </Button>
58+
</div>
4259

4360
</body>
4461
</html>

release/layout.html

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,8 @@
2121
}
2222
</script>
2323
</head>
24-
<body style="background-color: rgb(158, 240, 222);">
25-
<script>
26-
const randomColor = () => {
27-
return '#' + ((1 << 24) * Math.random() | 0).toString(16);
28-
};
24+
<body>
2925

30-
document.addEventListener('DOMContentLoaded', () => {
31-
document.body.style.backgroundColor = randomColor();
32-
});
33-
</script>
34-
3526
<p>Openfin Layouts Library is included via script tag in this window. Accessible with global var OpenfinLayouts</p>
3627
<div>
3728
<Button id="undock" disabled onclick="undockMe()"> Undock </Button>

release/layoutclient1.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"defaultWidth": 420,
88
"defaultHeight": 420,
99
"url": "http://localhost:8888/busdemo.html",
10-
"resizable": false,
10+
"resizable": true,
1111
"autoShow": true,
1212
"saveWindowState": false,
1313
"contextMenu": true
@@ -17,7 +17,7 @@
1717
"name": "layouts",
1818
"config": {
1919
"features": {
20-
"tab": false,
20+
"tab": true,
2121
"dock": true
2222
}
2323
}

release/layoutclient2.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"defaultWidth": 420,
88
"defaultHeight": 420,
99
"url": "http://localhost:8888/busdemo.html",
10-
"resizable": false,
10+
"resizable": true,
1111
"autoShow": true,
1212
"saveWindowState": false,
1313
"contextMenu": true
@@ -17,7 +17,7 @@
1717
"name": "layouts",
1818
"config": {
1919
"features": {
20-
"tab": false,
20+
"tab": true,
2121
"dock": true
2222
}
2323
}

0 commit comments

Comments
 (0)