Skip to content

Commit 0071f30

Browse files
Just a better design
1 parent 6458f87 commit 0071f30

File tree

4 files changed

+58
-15
lines changed

4 files changed

+58
-15
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "cache-visual-editor",
33
"printableName": "Cache Visual Editor",
4-
"version": "0.2.4",
4+
"version": "0.2.5",
55
"description": "Visual class editor for InterSystems Caché",
66
"main": "index.js",
77
"keywords": [

source/client/js/classEditor/card.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,19 @@ function getPropertyBlock (prop) {
1010
let item = block(`item`),
1111
icon = block(`icon ${ prop["Private"] ? "private" : "public" }`),
1212
text = block(`label`, `span`),
13-
type = prop["Type"] || prop["ReturnType"] || prop["MimeType"] || "";
13+
pName = block(`name`, `span`),
14+
type = prop["Type"] || prop["ReturnType"] || prop["MimeType"] || "",
15+
pTypeText = type ? block("", "span") : null,
16+
pType = type ? block(`type`, `span`) : null;
1417
item.appendChild(icon);
15-
text.textContent = `${ prop["Name"] }${ type ? ": " + type : "" }`;
18+
pName.textContent = prop["Name"];
19+
text.appendChild(pName);
20+
if (type) {
21+
pTypeText.textContent = ": ";
22+
text.appendChild(pTypeText);
23+
pType.textContent = type;
24+
text.appendChild(pType);
25+
}
1626
item.appendChild(text);
1727
return item;
1828
}
@@ -29,7 +39,7 @@ function getBlock (key, data) {
2939
break;
3040
}
3141
for (let prop in data[key]) {
32-
section.appendChild(getPropertyBlock(data[key][prop]));
42+
body.appendChild(getPropertyBlock(data[key][prop]));
3343
}
3444
return section;
3545

source/client/scss/classBuilder/card.scss

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ $headerIconWidth: 32px;
66
.card {
77

88
position: relative;
9-
@include transition(all .3s ease);
9+
@include transition($defaultTransition);
1010

1111
&.package {
1212

13-
background: #f4efff;
13+
background: #fff;
1414
cursor: pointer;
1515

1616
&:hover {
17-
background: #e4ccff;
17+
background: $colorP1;
1818
left: -2px;
1919
top: -2px;
2020
padding: $defaultPadding + 2px;
@@ -23,6 +23,7 @@ $headerIconWidth: 32px;
2323
> .head {
2424
> .cardIcon {
2525
border: 1px solid black;
26+
background: $colorP1;
2627
}
2728
}
2829

@@ -54,49 +55,49 @@ $headerIconWidth: 32px;
5455
}
5556

5657
&.registered {
57-
background: #08f;
58+
background: #7DC3FF;
5859
&:before {
5960
content: "R"
6061
}
6162
}
6263

6364
&.persistent {
64-
background: #f90;
65+
background: #FFB85F;
6566
&:before {
6667
content: "P"
6768
}
6869
}
6970

7071
&.serial {
71-
background: #df0;
72+
background: #EFEC2E;
7273
&:before {
7374
content: "S"
7475
}
7576
}
7677

7778
&.view {
78-
background: #e6f;
79+
background: #ED99FF;
7980
&:before {
8081
content: "V"
8182
}
8283
}
8384

8485
&.datatype {
85-
background: #7cf;
86+
background: #96E4E2;
8687
&:before {
8788
content: "T"
8889
}
8990
}
9091

9192
&.stream {
92-
background: #0f8;
93+
background: #74E8B2;
9394
&:before {
9495
content: "s"
9596
}
9697
}
9798

9899
&.donotuse {
99-
background: #f00;
100+
background: $colorP2;
100101
&:before {
101102
content: "X"
102103
}
@@ -132,6 +133,34 @@ $headerIconWidth: 32px;
132133

133134
> .item {
134135

136+
overflow: hidden;
137+
white-space: pre;
138+
text-overflow: ellipsis;
139+
cursor: pointer;
140+
@include transition($defaultTransition);
141+
142+
&:hover {
143+
144+
padding-left: 4px;
145+
background: $colorP1;
146+
border-radius: 3px;
147+
148+
.name {
149+
text-decoration: underline;
150+
}
151+
152+
}
153+
154+
.type {
155+
156+
@include transition($defaultTransition);
157+
158+
&:hover {
159+
color: $colorP2;
160+
}
161+
162+
}
163+
135164
}
136165

137166
}

source/client/scss/const.scss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@ $huge: 64px;
55

66
$defaultMargin: 5px;
77
$defaultPadding: 6px;
8-
$defaultShadow: 0 1px 3px rgba(0, 0, 0, .4);
8+
$defaultShadow: 0 1px 3px rgba(0, 0, 0, .4);
9+
$defaultTransition: all .3s ease;
10+
11+
$colorP1: #FFF5C3;
12+
$colorP2: #FF5656;

0 commit comments

Comments
 (0)