Skip to content

Commit a8d1e29

Browse files
Valerii Malkovmked-luxoft
authored andcommitted
Adding of minimize size for other popups
1 parent b617155 commit a8d1e29

File tree

4 files changed

+69
-13
lines changed

4 files changed

+69
-13
lines changed

app/view/sdl/PopUp.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,15 @@ SDL.PopUp = Em.ContainerView.extend(
4242
'backButton'
4343
],
4444
classNameBindings: [
45-
'this.active:active_state:inactive_state'
45+
'this.active:active_state:inactive_state',
46+
'minimalSize'
4647
],
4748
popUpId: 0,
4849
/**
4950
* Callback function to return result of made action by user
5051
*/
5152
callback: null,
53+
minimalSize: false,
5254
content: 'Title',
5355
active: false,
5456
timer: null,

css/general.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ div {
195195
opacity: 1;
196196
display: block;
197197
z-index: 10000;
198-
left: 480px;
198+
left: 8px;
199199
width: 300px;
200200
height: 217px;
201201
top: 56px;

css/sdl.css

Lines changed: 52 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,11 +1136,23 @@
11361136
}
11371137

11381138
.PopUp {
1139-
left: 200px;
1140-
width: 400px;
1141-
height: 245px;
1139+
left: 480px;
1140+
width: 300px;
1141+
height: 215px;
11421142
z-index: 2;
1143-
top: 110px;
1143+
top: 57px;
1144+
-webkit-transition: opacity 1s ease-in-out;
1145+
background-color: black;
1146+
border: #A6A6A6 solid 2px;
1147+
border-radius: 6px;
1148+
}
1149+
1150+
.PopUp.minimal-size {
1151+
left: 8px;
1152+
width: 300px;
1153+
height: 150px;
1154+
z-index: 2;
1155+
top: 278px;
11441156
-webkit-transition: opacity 1s ease-in-out;
11451157
background-color: black;
11461158
border: #A6A6A6 solid 2px;
@@ -1150,19 +1162,41 @@
11501162
.PopUp .text {
11511163
top: 41px;
11521164
left: 5px;
1153-
width: 390px;
1165+
width: 295px;
11541166
height: 120px;
11551167
line-height: 20px;
11561168
position: absolute;
11571169
overflow: hidden;
11581170
text-align: center;
11591171
text-overflow: ellipsis;
1172+
overflow: auto;
1173+
}
1174+
1175+
.PopUp.minimal-size .text {
1176+
top: 15px;
1177+
left: 12px;
1178+
width: 280px;
1179+
height: 70px;
1180+
line-height: 20px;
1181+
position: absolute;
1182+
overflow: hidden;
1183+
text-align: center;
1184+
text-overflow: ellipsis;
1185+
overflow: auto;
1186+
}
1187+
1188+
.PopUp.minimal-size .OkButton {
1189+
top: 93px;
1190+
left: 5px;
1191+
width: 140px;
1192+
border: 1px solid #393939;
1193+
text-align: center;
11601194
}
11611195

11621196
.PopUp .OkButton {
1163-
top: 190px;
1197+
top: 160px;
11641198
left: 5px;
1165-
width: 190px;
1199+
width: 140px;
11661200
border: 1px solid #393939;
11671201
text-align: center;
11681202
}
@@ -1174,9 +1208,17 @@
11741208
}
11751209

11761210
.PopUp .CancelButton {
1177-
top: 190px;
1178-
left: 205px;
1179-
width: 190px;
1211+
top: 160px;
1212+
left: 150px;
1213+
width: 140px;
1214+
border: 1px solid #393939;
1215+
text-align: center;
1216+
}
1217+
1218+
.PopUp.minimal-size .CancelButton {
1219+
top: 93px;
1220+
left: 150px;
1221+
width: 140px;
11801222
border: 1px solid #393939;
11811223
text-align: center;
11821224
}

ffw/BasicCommunicationRPC.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ FFW.BasicCommunication = FFW.RPCObserver
138138
.subscribeToNotification(this.onSDLConsentNeededNotification);
139139
this.onResumeAudioSourceSubscribeRequestID = this
140140
.subscribeToNotification(this.onResumeAudioSourceNotification);
141+
this.onServiceUpdateNotificationSubscribeRequestID = this.client
142+
.subscribeToNotification(this.onServiceUpdateNotification);
143+
this
141144
setTimeout(function() {
142145
FFW.BasicCommunication.OnSystemTimeReady();
143146
}, 500);
@@ -171,6 +174,8 @@ FFW.BasicCommunication = FFW.RPCObserver
171174
.unsubscribeFromNotification(this.onSDLConsentNeededNotification);
172175
this.onResumeAudioSourceUnsubscribeRequestID = this.client
173176
.unsubscribeFromNotification(this.onResumeAudioSourceNotification);
177+
this.onServiceUpdateNotificationUnsubscribeRequestID = this.client
178+
.unsubscribeFromNotification(this.onServiceUpdateNotification);
174179
},
175180
/**
176181
* Client disconnected.
@@ -299,11 +304,18 @@ FFW.BasicCommunication = FFW.RPCObserver
299304
onRPCNotification: function(notification) {
300305
Em.Logger.log('FFW.BasicCommunicationRPC.onRPCNotification');
301306
this._super();
307+
if (notification.method == this.onServiceUpdateNotification) {
308+
SDL.ServiceUpdatePopUp.activate(notification.params.serviceType,
309+
notification.params.serviceEvent,
310+
notification.params.reason);
311+
}
302312
if (notification.method == this.onFileRemovedNotification) {
303313
SDL.SDLModel.onFileRemoved(notification.params);
304314
}
305315
if (notification.method == this.onStatusUpdateNotification) {
306-
SDL.PopUp.create().appendTo('body').popupActivate(
316+
var popUp = SDL.PopUp.create().appendTo('body');
317+
popUp.set('minimalSize',SDL.ServiceUpdatePopUp.active);
318+
popUp.popupActivate(
307319
'onStatusUpdate Notification: ' + notification.params.status
308320
);
309321
var messageCode = '';

0 commit comments

Comments
 (0)