Commit a3199c2c66fc523d47f440604f62109a383d322f
1 parent
ac88efe1
Exists in
users_profile_page
Adds topandleft layout
Signed-off-by: Tallys Martins <tallysmartins@gmail.com>
Showing
2 changed files
with
18 additions
and
0 deletions
Show diff stats
src/app/layout/boxes/display-boxes.filter.ts
@@ -11,6 +11,8 @@ export class DisplayBoxes { | @@ -11,6 +11,8 @@ export class DisplayBoxes { | ||
11 | 11 | ||
12 | if (layout === "rightbar") { | 12 | if (layout === "rightbar") { |
13 | valid_boxes = this.visible_on_right_bar(); | 13 | valid_boxes = this.visible_on_right_bar(); |
14 | + }else if(layout === "topleft") { | ||
15 | + valid_boxes = this.visible_on_top_right_bar(); | ||
14 | }else { | 16 | }else { |
15 | valid_boxes = this.visible_on_default(); | 17 | valid_boxes = this.visible_on_default(); |
16 | } | 18 | } |
@@ -31,5 +33,9 @@ export class DisplayBoxes { | @@ -31,5 +33,9 @@ export class DisplayBoxes { | ||
31 | return [1, 3]; | 33 | return [1, 3]; |
32 | } | 34 | } |
33 | 35 | ||
36 | + private visible_on_top_right_bar() { | ||
37 | + return [1, 2, 3]; | ||
38 | + } | ||
39 | + | ||
34 | } | 40 | } |
35 | 41 |
src/app/layout/boxes/set-box-layout.filter.ts
@@ -6,6 +6,8 @@ export class SetBoxLayout { | @@ -6,6 +6,8 @@ export class SetBoxLayout { | ||
6 | transform(pos: number, layout: string) { | 6 | transform(pos: number, layout: string) { |
7 | if (layout === "rightbar") { | 7 | if (layout === "rightbar") { |
8 | return this.right_bar(pos); | 8 | return this.right_bar(pos); |
9 | + }else if(layout === "topleft") { | ||
10 | + return this.top_right_bar(pos); | ||
9 | }else { | 11 | }else { |
10 | return this.default(pos); | 12 | return this.default(pos); |
11 | } | 13 | } |
@@ -29,4 +31,14 @@ export class SetBoxLayout { | @@ -29,4 +31,14 @@ export class SetBoxLayout { | ||
29 | } | 31 | } |
30 | } | 32 | } |
31 | 33 | ||
34 | + private top_right_bar(position: number) { | ||
35 | + if (position === 1) { | ||
36 | + return "col-sm-12 col-md-8"; | ||
37 | + }else if(position == 2) { | ||
38 | + return "col-sm-12 col-md-4"; | ||
39 | + }else { | ||
40 | + return "col-sm-12 col-md-12"; | ||
41 | + } | ||
42 | + } | ||
43 | + | ||
32 | } | 44 | } |