Skip to content

Commit 6003418

Browse files
authored
Merge pull request DHTMLX#10 from DHTMLX/fix/DHX-1538
Fix/dhx 1538
2 parents c84cb78 + 8d34859 commit 6003418

File tree

151 files changed

+1284
-1517
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

151 files changed

+1284
-1517
lines changed

public/static/dataview.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,73 +2,73 @@
22
{
33
"title": "Izzy",
44
"short": "This is our most beloved kingfisher bird Izzy.",
5-
"full": "This is our most beloved kingfisher bird Izzy, who adores eating fish and even hunts on its own. Izzy and Ben have the most intimate relationship. Izzy often sits on the head of Ben during a walk",
5+
"value": "This is our most beloved kingfisher bird Izzy, who adores eating fish and even hunts on its own. Izzy and Ben have the most intimate relationship. Izzy often sits on the head of Ben during a walk",
66
"img": "images/02.jpg"
77
},
88
{
99
"title": "Momo",
1010
"short": "Momo is a 25-year-old elephant with a big heart.",
11-
"full": "Momo is a 25-year-old elephant with a big heart. Momo came from another zoo in New Zealand but soon got accustomed to the new surroundings. Despite being grown-up, Momo still loves messing around.",
11+
"value": "Momo is a 25-year-old elephant with a big heart. Momo came from another zoo in New Zealand but soon got accustomed to the new surroundings. Despite being grown-up, Momo still loves messing around.",
1212
"img": "images/03.jpg"
1313
},
1414
{
1515
"title": "Kevin",
1616
"short": "And here is Kevin, our old-timer who saw how everything started here.",
17-
"full": "And here is Kevin, our old-timer who saw how everything started here. Kevin loves attention and being taken pictures of, especially while chewing delicious leaves.",
17+
"value": "And here is Kevin, our old-timer who saw how everything started here. Kevin loves attention and being taken pictures of, especially while chewing delicious leaves.",
1818
"img": "images/04.jpg"
1919
},
2020
{
2121
"title": "Lucy",
2222
"short": "Lucy is a beautiful Siamese cat.",
23-
"full": "Lucy is a beautiful Siamese cat. She considers herself the Queen of the zoo and competes with Ben for the territory. However, you can often find her sleeping on Ben’s back.",
23+
"value": "Lucy is a beautiful Siamese cat. She considers herself the Queen of the zoo and competes with Ben for the territory. However, you can often find her sleeping on Ben’s back.",
2424
"img": "images/05.jpg"
2525
},
2626
{
2727
"title": "Christy",
2828
"short": "Christy is the most extravert bird you’ve ever seen.",
29-
"full": "Christy is the most extravert bird you’ve ever seen. She never stops murmuring, mumbling, and chattering. Sometimes she’s allowed to fly all over the zoo to spend all her energy and communicate with others.",
29+
"value": "Christy is the most extravert bird you’ve ever seen. She never stops murmuring, mumbling, and chattering. Sometimes she’s allowed to fly all over the zoo to spend all her energy and communicate with others.",
3030
"img": "images/06.jpg"
3131
},
3232
{
3333
"title": "Philip",
3434
"short": "Philip is a Chinese panda, temporarily living with us.",
35-
"full": "Philip is a Chinese panda, temporarily living with us. In a couple of months he’ll be transported to another zoo in Australia, where there is a big panda family waiting for him.",
35+
"value": "Philip is a Chinese panda, temporarily living with us. In a couple of months he’ll be transported to another zoo in Australia, where there is a big panda family waiting for him.",
3636
"img": "images/07.jpg"
3737
},
3838
{
3939
"title": "Clark",
4040
"short": "Clark is one of the dogs of our zookeeper.",
41-
"full": "Clark is one of the dogs of our zookeeper. He loves running around and having fun with everyone.",
41+
"value": "Clark is one of the dogs of our zookeeper. He loves running around and having fun with everyone.",
4242
"img": "images/08.jpg"
4343
},
4444
{
4545
"title": "Ed",
4646
"short": "Ed has the sharpest eye and always knows what’s happening around.",
47-
"full": "Ed has the sharpest eye and always knows what’s happening around. He is a good friend of Christy, when he’s in a positive frame of mind.",
47+
"value": "Ed has the sharpest eye and always knows what’s happening around. He is a good friend of Christy, when he’s in a positive frame of mind.",
4848
"img": "images/09.jpg"
4949
},
5050
{
5151
"title": "Max",
5252
"short": "Max is a tiger with a very calm and wise character.",
53-
"full": "Max is a tiger with a very calm and wise character. I guess he’s pondering over some universal wisdom secrets. However, he adores rabbits, chicken, and, surprisingly, carrots!",
53+
"value": "Max is a tiger with a very calm and wise character. I guess he’s pondering over some universal wisdom secrets. However, he adores rabbits, chicken, and, surprisingly, carrots!",
5454
"img": "images/10.jpg"
5555
},
5656
{
5757
"title": "Michelle",
5858
"short": "This is our couch potato raccoon Michelle.",
59-
"full": "This is our couch potato raccoon Michelle. She prefers to stay in her cozy bed all day long and comes out only at night to have a stroll around the Zoo.",
59+
"value": "This is our couch potato raccoon Michelle. She prefers to stay in her cozy bed all day long and comes out only at night to have a stroll around the Zoo.",
6060
"img": "images/11.jpg"
6161
},
6262
{
6363
"title": "Shelly",
6464
"short": "Shelly is the dog of my parents who lives with us when they’re travelling.",
65-
"full": "Shelly is the dog of my parents who lives with us when they’re travelling. She’s a bit scared of some of the zoo’s inhabitants, but has an intimate relationship with Steven.",
65+
"value": "Shelly is the dog of my parents who lives with us when they’re travelling. She’s a bit scared of some of the zoo’s inhabitants, but has an intimate relationship with Steven.",
6666
"img": "images/12.jpg"
6767
},
6868
{
6969
"title": "Steven",
7070
"short": "Steven is a 6-year old fox, whom we found in the forest with a broken leg.",
71-
"full": "Steven is a 6-year old fox, whom we found in the forest with a broken leg. Luckily, Steven soon recovered his strength, but we became so attached to him that decided to leave him with other animals.",
71+
"value": "Steven is a 6-year old fox, whom we found in the forest with a broken leg. Luckily, Steven soon recovered his strength, but we became so attached to him that decided to leave him with other animals.",
7272
"img": "images/13.jpg"
7373
}
7474
]

src/About.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export default class About extends Component {
44
componentDidMount() {
55
this.props.handleToolbarNavItems([]);
66
}
7-
87
render() {
98
return (
109
<div style={{textAlign: "center"}}>

src/App.css

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.logo-button {
22
text-align: center;
33
}
4-
54
.logo-button button {
65
cursor: pointer;
76
background: transparent;
@@ -10,17 +9,14 @@
109
width: 100%;
1110
padding: 24px;
1211
}
13-
1412
.logo-button img {
1513
width: 100%;
1614
height: auto;
1715
}
18-
1916
.button:disabled {
2017
pointer-events: none;
2118
opacity: 0.6;
2219
}
23-
2420
.trial-button button, .button {
2521
flex: 0 0 auto;
2622
-webkit-box-sizing: border-box;
@@ -45,41 +41,35 @@
4541
text-decoration: none;
4642
transition: background 0.2s ease-in-out;
4743
}
48-
4944
.trial-button button:hover, .button:hover {
5045
background: #027abc;
5146
}
52-
5347
.trial-button button:focus, .button:focus {
5448
outline: none;
5549
}
56-
5750
.button.button--bordered {
5851
background: #fff;
5952
color: #027abc;
6053
border: 2px solid #027abc;
6154
}
62-
6355
.hgroup {
6456
text-align: center;
6557
display: flex;
6658
justify-content: center;
6759
flex-direction: column;
68-
padding: 24px 24px;
60+
padding: 24px;
6961
background-color: #fff;
7062
color: rgba(0, 0, 0, .7);
7163
transition: background-color 0.2s ease;
72-
min-height: 90vh;
64+
min-height: calc(100vh - 60px);
7365
}
74-
7566
.hgroup a {
7667
cursor: pointer;
7768
text-decoration: none;
7869
display: block;
7970
color: #0288D1;
8071
margin-bottom: 12px;
8172
}
82-
8373
.hgroup .anchor {
8474
display: none;
8575
width: 22px;
@@ -92,32 +82,26 @@
9282
transition: opacity 0.2s ease-in;
9383
transform: translateY(-50%);
9484
}
95-
9685
.hgroup p {
9786
margin: 0;
9887
margin-bottom: 24px;
9988
}
100-
10189
.hgroup h3:not([class*="dhx_"]) {
10290
margin-top: 0;
10391
padding: 0 30px;
10492
position: relative;
10593
display: inline-block;
10694
}
107-
10895
.hgroup h3:hover .anchor {
10996
opacity: 1;
11097
}
111-
11298
.dhx_navbar-title.dhx_navbar-title--toolbar {
11399
font-size: 18px;
114100
margin-right: 12px !important;
115101
}
116-
117102
.active {
118103
background-color: rgba(0, 0, 0, .07);
119104
}
120-
121105
.dock-button button {
122106
cursor: pointer;
123107
border: none;
@@ -127,19 +111,15 @@
127111
color: #0288D1;
128112
background-color: #fff;
129113
}
130-
131114
.dock-button button:focus {
132115
outline: none;
133116
}
134-
135117
.data-form-buttons button {
136118
margin: 20px;
137119
}
138-
139120
.button:not(:last-child) {
140121
margin-right: 20px;
141122
}
142-
143123
main {
144124
width: 100%;
145125
height: calc(100vh - 57px);
@@ -148,7 +128,6 @@ main {
148128
flex-direction: column;
149129
scroll-snap-type: y mandatory;
150130
}
151-
152131
main > section {
153132
scroll-snap-align: start;
154133
}

src/App.js

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import React, {PureComponent} from "react";
2-
import {Route, HashRouter, Switch} from "react-router-dom";
1+
import React, { PureComponent } from "react";
2+
import { Route, HashRouter, Switch } from "react-router-dom";
33
import smoothscroll from "smoothscroll-polyfill";
44
import "./App.css";
55
import "dhx-suite/codebase/suite.min.css";
@@ -25,9 +25,7 @@ import FormPage from "./form/FormPage";
2525
import TabbarPage from "./tabbar/TabbarPage";
2626
import ComboboxPage from "./combobox/ComboboxPage";
2727
import TreePage from "./tree/TreePage";
28-
// import TreegridPage from './treegrid/TreegridPage';
2928
import ChartPage from "./chart/ChartPage";
30-
// import LayoutPage from './layout/LayoutPage';
3129
import WindowPage from "./window/WindowPage";
3230
import MessagePage from "./message/MessagePage";
3331
import PopupPage from "./popup/PopupPage";
@@ -43,7 +41,6 @@ class App extends PureComponent {
4341
activeExampleId: ""
4442
};
4543
}
46-
4744
componentDidUpdate() {
4845
let activeHrefPart = window.location.href.split("/").pop();
4946
let activeHrefPartCapitalize = activeHrefPart.charAt(0).toUpperCase() + activeHrefPart.slice(1);
@@ -53,7 +50,6 @@ class App extends PureComponent {
5350
});
5451
}
5552
}
56-
5753
setActiveWidget(activeWidget) {
5854
this.setState({
5955
activeWidget: activeWidget.charAt(0).toUpperCase() + activeWidget.slice(1)
@@ -64,15 +60,13 @@ class App extends PureComponent {
6460
inline: "center"
6561
});
6662
}
67-
6863
setToolBarNavItems(array) {
6964
if (!isEqual(array, this.state.toolbarNav)) {
7065
this.setState({
7166
toolbarNav: array
7267
});
7368
}
7469
}
75-
7670
setActiveExapmle(id) {
7771
let elHash = "#" + id;
7872
const el = this.el.querySelector(elHash);
@@ -83,15 +77,14 @@ class App extends PureComponent {
8377
inline: "center"
8478
});
8579
}
86-
8780
render() {
8881
return (
8982
<HashRouter hashType={"slash"}>
9083
<div className='app-screen'
9184
style={{minHeight: "100vh", maxHeight: "100vh", display: "flex", overflow: "hidden"}}>
9285
<Sidebar activeWidget={this.state.activeWidget}
9386
handleActiveWidgetChange={(activeWidget) => this.setActiveWidget(activeWidget)}/>
94-
<div className="app-screen__inner" style={{flexBasis: "auto", flexGrow: 1}}>
87+
<div className="app-screen__inner" style={{width: "calc(100% - 200px)"}}>
9588
<Toolbar
9689
// ref={(el) => this.toolbar = el}
9790
activeWidget={this.state.activeWidget}
@@ -100,7 +93,6 @@ class App extends PureComponent {
10093
toolbarNav={this.state.toolbarNav}/>
10194
<div className='app-content'
10295
ref={(el) => this.el = el}>
103-
10496
<Switch>
10597
<Route path={`/calendar`} component={() => (
10698
<CalendarPage
@@ -255,7 +247,6 @@ class App extends PureComponent {
255247
)}
256248
/>
257249
</Switch>
258-
259250
</div>
260251
</div>
261252
</div>
@@ -264,5 +255,4 @@ class App extends PureComponent {
264255
}
265256
}
266257

267-
export default App;
268-
258+
export default App;

src/Dataview.js

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import React, {PureComponent} from "react";
2-
import {DataView as DataviewDHX} from "dhx-suite";
3-
import {withRouter} from "react-router-dom";
1+
import React, { PureComponent } from "react";
2+
import { DataView as DataviewDHX } from "dhx-suite";
3+
import { withRouter } from "react-router-dom";
44

55
import "./dataview.css";
66

@@ -14,7 +14,7 @@ class Dataview extends PureComponent {
1414
<h3 class="app-card__header">${item.value}</h3>
1515
<img class="app-card__image" src=${process.env.PUBLIC_URL}/static/images/icons/${item.id.split("-")[0]}.svg alt="${item.id.split("-")[0]}"/>
1616
</div>
17-
`,
17+
`,
1818
gap: 20,
1919
data: [
2020
{
@@ -92,10 +92,6 @@ class Dataview extends PureComponent {
9292
{
9393
value: "Popup",
9494
id: "popup-link"
95-
},
96-
{
97-
value: "Pivot",
98-
id: "pivot-link"
9995
}
10096
]
10197
});
@@ -105,16 +101,12 @@ class Dataview extends PureComponent {
105101
this.props.handleActiveWidgetChange(widgetName);
106102
});
107103
}
108-
109104
componentWillUnmount() {
110-
this.dataview.destructor();
105+
this.dataview && this.dataview.destructor();
111106
}
112-
113107
render() {
114108
return (
115-
<div style={{maxWidth: "800px", margin: "auto", flex: "1 0 auto"}} ref={el => this.el = el}>
116-
117-
</div>
109+
<div style={{maxWidth: "800px", margin: "auto", flex: "1 0 auto"}} ref={el => this.el = el}></div>
118110
);
119111
}
120112
}

0 commit comments

Comments
 (0)