Skip to content

Commit bdb1db6

Browse files
ludoBarelmguimard
authored andcommitted
part expandable feature
1 parent bfe94cc commit bdb1db6

File tree

6 files changed

+449
-5
lines changed

6 files changed

+449
-5
lines changed

app/js/common-objects/customizations/part-table-columns.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,16 @@ define(['common-objects/utils/date'], function (date) {
8080

8181
var assemblyIcon = model.isLastIterationAssembly() ? 'fa-cubes' : 'fa-cube';
8282

83-
return '<td class="part_number"><i class="fa ' + statusIcon + '"></i> <i class="fa ' + assemblyIcon + '"></i> <span class="part_number_value"> ' + model.getNumber() + '</span></td>';
83+
//build cell to return according to if the part is assembled with others part or not
84+
var withoutAsemblyParts = '<td class="part_number"><i class="fa ' + statusIcon + '"></i> <i class="fa ' + assemblyIcon + '"></i> <span class="part_number_value"> ' + model.getNumber() + '</span></td>';
85+
86+
var text = '<div><i class="fa ' + statusIcon + '"></i><i class="fa ' + assemblyIcon + '"></i><ul><li class="path_-1 lastExpandable"><div><div class="blockClickArea hitarea expandable-hitarea lastExpandable-hitarea expandable"></div><span class="part_number_value">' + model.getNumber() + '</span><ul class="list_child"></ul></li></ul></div></div>';
87+
88+
var navTag = '<nav class="treeview">' + text + '</nav>';
89+
90+
var assemblyPartBuild = '<td class="part_number">' + navTag + '</td>';
91+
92+
return assemblyIcon === 'fa-cubes' ? assemblyPartBuild : withoutAsemblyParts;
8493
},
8594
'pr.version': function (model) {
8695
return '<td><span>' + model.getVersion() + '</span></td>';
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#part_table {
2+
3+
> tbody {
4+
5+
> tr {
6+
> .part_number {
7+
8+
> .treeview {
9+
10+
background: none;
11+
12+
li {
13+
14+
> .product_title {
15+
16+
position: relative;
17+
top: -3px;
18+
}
19+
}
20+
21+
> div {
22+
23+
> ul {
24+
25+
display: inline-block;
26+
width: 100%;
27+
height: 100%;
28+
background: none;
29+
> .path_-1 {
30+
position: relative;
31+
top: 6px;
32+
> div {
33+
> .list_child {
34+
35+
background: none;
36+
}
37+
> .part_number_value {
38+
39+
position: relative;
40+
top: -5px;
41+
}
42+
> .blockClickArea {
43+
44+
position: relative;
45+
top: 0px;
46+
}
47+
}
48+
}
49+
}
50+
> .fa {
51+
52+
position: relative;
53+
top: 0px;
54+
}
55+
}
56+
}
57+
}
58+
}
59+
}
60+
}
61+

app/less/product-management/style.less

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@
1010
@import (inline) "../../bower_components/jQuery-QueryBuilder/dist/css/query-builder.default.css";
1111
@import (inline) "../../bower_components/selectize/dist/css/selectize.default.css";
1212
@import "query_builder";
13+
@import "part_list_item";
14+
@import "../common/treeview";

app/less/product-structure/style.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@import "../modules/style";
55
@import (inline) "../../bower_components/selectize/dist/css/selectize.default.css";
66
@import "app";
7-
@import "treeview";
7+
@import "../common/treeview";
88
@import "menu";
99
@import "product_nav_list";
1010
@import "content";

0 commit comments

Comments
 (0)