This repository was archived by the owner on Oct 11, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +44
-3
lines changed Expand file tree Collapse file tree 4 files changed +44
-3
lines changed Original file line number Diff line number Diff line change 122
122
margin-right : 1em ;
123
123
}
124
124
}
125
+
126
+ /* Drawer Layout Button */
127
+
128
+ .Drawer-layoutButton {
129
+ display : none;
130
+
131
+ @nest .layout-has-changed & {
132
+ display : inline-block;
133
+ }
134
+ }
Original file line number Diff line number Diff line change 11
11
} ,
12
12
"bindings" : {
13
13
"dashboardWidgets" : { "<-" : "@owner.currentUser.attributes.dashboardContext.widgets" } ,
14
- "sideBoardWidgets" : { "<-" : "@owner.currentUser.attributes.sideBoardContext.widgets" }
14
+ "sideBoardWidgets" : { "<-" : "@owner.currentUser.attributes.sideBoardContext.widgets" } ,
15
+ "classList.has('layout-has-changed')" : { "<-" : "@owner.hasDashboardLayoutChanged" }
15
16
}
16
17
} ,
17
18
"horizontalScroll" : {
52
53
"element" : { "#" : "closeButton" } ,
53
54
"value" : "Done Editing"
54
55
}
56
+ } ,
57
+ "restoreDefaultButton" : {
58
+ "prototype" : "blue-shark/ui/button.reel" ,
59
+ "properties" : {
60
+ "element" : { "#" : "restoreDefaultButton" } ,
61
+ "value" : "Restore default layout"
62
+ }
63
+ } ,
64
+ "saveAsDefaultButton" : {
65
+ "prototype" : "blue-shark/ui/button.reel" ,
66
+ "properties" : {
67
+ "element" : { "#" : "saveAsDefaultButton" } ,
68
+ "value" : "Save as default layout"
69
+ }
55
70
}
56
71
}
57
72
</ script >
60
75
< div data-montage-id ="owner " class ="Drawer ">
61
76
< header >
62
77
< h1 class ="Drawer-title "> Drag to add widgets</ h1 >
63
- < button data-montage-id ="closeButton " class ="Button--create "> </ button >
78
+ < div >
79
+ < button data-montage-id ="restoreDefaultButton " class ="Drawer-layoutButton "> </ button >
80
+ < button data-montage-id ="saveAsDefaultButton " class ="Drawer-layoutButton "> </ button >
81
+ < button data-montage-id ="closeButton " class ="Button--primary "> </ button >
82
+ </ div >
64
83
</ header >
65
84
< div class ="DrawerContent ">
66
85
< div class ="Drawer-overlay ">
Original file line number Diff line number Diff line change @@ -158,6 +158,18 @@ exports.Drawer = AbstractDropZoneComponent.specialize(/** @lends Drawer# */ {
158
158
this . sideBoardWidgets . splice ( index , 1 ) ;
159
159
}
160
160
}
161
+ } ,
162
+
163
+ handleRestoreDefaultButton : {
164
+ value : function ( ) {
165
+ console . log ( "restore default" ) ;
166
+ }
167
+ } ,
168
+
169
+ handleSaveAsDefaultButton : {
170
+ value : function ( ) {
171
+ console . log ( "save as default" ) ;
172
+ }
161
173
}
162
174
163
175
} ) ;
You can’t perform that action at this time.
0 commit comments