@@ -52,8 +52,9 @@ SDL.SystemRequest = Em.ContainerView.create(
5252 'jsonOffsetCheckBox' ,
5353 'jsonLengthCheckBox' ,
5454 'jsonTimeoutCheckBox' ,
55- 'systemRequestViewTitleCheckBox ' ,
55+ 'urlsCheckBox ' ,
5656 'appIDSelectTitleCheckBox' ,
57+ 'subTypeCheckBox' ,
5758 'urlsLabel' ,
5859 'systemRequestLabel' ,
5960 'urlsInput' ,
@@ -79,6 +80,12 @@ SDL.SystemRequest = Em.ContainerView.create(
7980 */
8081 active : false ,
8182 offsetEnabled : true ,
83+ lengthEnabled : true ,
84+ timeoutEnabled : true ,
85+ urlsInputEnabled : true ,
86+ appIDSelectEnabled : true ,
87+ requestSubTypeInputEnabled : true ,
88+
8289 /**
8390 * Title of systemRequest group of parameters
8491 */
@@ -98,7 +105,10 @@ SDL.SystemRequest = Em.ContainerView.create(
98105 classNames : 'systemRequestViewSelect' ,
99106 contentBinding : 'SDL.SDLModel.data.systemRequestState' ,
100107 optionValuePath : 'content.id' ,
101- optionLabelPath : 'content.name'
108+ optionLabelPath : 'content.name' ,
109+ classNameBindings : [
110+ 'SDL.SystemRequest.systemRequestViewSelectEnabled::inactiveTextField'
111+ ] ,
102112 }
103113 ) ,
104114 /**
@@ -119,9 +129,9 @@ SDL.SystemRequest = Em.ContainerView.create(
119129 elementId : 'jsonOffsetInput' ,
120130 classNames : 'jsonOffsetInput' ,
121131 classNameBindings : [
122- 'SDL.SystemRequest.offsetEnabled::disabled '
132+ 'SDL.SystemRequest.offsetEnabled::inactiveTextField '
123133 ] ,
124- // disabledBinding: 'SDL.SystemRequest.offsetEnabled'
134+ value : '1000' ,
125135 }
126136 ) ,
127137
@@ -141,7 +151,11 @@ SDL.SystemRequest = Em.ContainerView.create(
141151 jsonLengthInput : Ember . TextField . extend (
142152 {
143153 elementId : 'jsonLengthInput' ,
144- classNames : 'jsonLengthInput'
154+ classNames : 'jsonLengthInput' ,
155+ classNameBindings : [
156+ 'SDL.SystemRequest.lengthEnabled::inactiveTextField'
157+ ] ,
158+ value :'1500' ,
145159 }
146160 ) ,
147161
@@ -161,10 +175,17 @@ SDL.SystemRequest = Em.ContainerView.create(
161175 jsonTimeoutInput : Ember . TextField . extend (
162176 {
163177 elementId : 'jsonTimeoutInput' ,
164- classNames : 'jsonTimeoutInput'
178+ classNames : 'jsonTimeoutInput' ,
179+ classNameBindings : [
180+ 'SDL.SystemRequest.timeoutEnabled::inactiveTextField'
181+ ] ,
182+ value :'2000' ,
165183 }
166184 ) ,
167-
185+
186+ /**
187+ * CheckBox for Offset parameter in OnSystemRequest
188+ */
168189 jsonOffsetCheckBox : Em . Checkbox . extend ( {
169190
170191 elementId : 'jsonOffsetCheckBox' ,
@@ -181,48 +202,108 @@ SDL.SystemRequest = Em.ContainerView.create(
181202 }
182203 }
183204 ) ,
205+
206+ /**
207+ * CheckBox for Length parameter in OnSystemRequest
208+ */
184209 jsonLengthCheckBox : Em . Checkbox . extend ( {
185210
186211 elementId : 'jsonLengthCheckBox' ,
187212
188213 classNames : 'jsonLengthCheckBox' ,
189214
190- // checkedBinding: 'jsonLengthCheckBox'
215+ checked : function ( ) {
216+ return SDL . SystemRequest . lengthEnabled ;
217+ } . property ( 'SDL.SystemRequest.offsetEnabled' ) ,
218+
219+ click : function ( evt ) {
220+ var isCheked = SDL . SystemRequest . get ( 'lengthEnabled' ) ;
221+ SDL . SystemRequest . set ( 'lengthEnabled' , ! isCheked ) ;
222+ }
191223
192224 }
193225 ) ,
226+
227+ /**
228+ * CheckBox for Timeout parameter in OnSystemRequest
229+ */
194230 jsonTimeoutCheckBox : Em . Checkbox . extend ( {
195231
196232 elementId : 'jsonTimeoutCheckBox' ,
197233
198234 classNames : 'jsonTimeoutCheckBox' ,
199235
200- // checkedBinding: 'SDL.SDLModel.data.driverDistractionState'
236+ checked : function ( ) {
237+ return SDL . SystemRequest . timeoutEnabled ;
238+ } . property ( 'SDL.SystemRequest.timeoutEnabled' ) ,
201239
240+ click : function ( evt ) {
241+ var isCheked = SDL . SystemRequest . get ( 'timeoutEnabled' ) ;
242+ SDL . SystemRequest . set ( 'timeoutEnabled' , ! isCheked ) ;
243+ }
202244 }
203245 ) ,
204246
205- systemRequestViewTitleCheckBox : Em . Checkbox . extend ( {
247+ /**
248+ * CheckBox for URL parameter in OnSystemRequest
249+ */
250+ urlsCheckBox : Em . Checkbox . extend ( {
206251
207- elementId : 'systemRequestViewTitleCheckBox ' ,
252+ elementId : 'urlsCheckBox ' ,
208253
209- classNames : 'systemRequestViewTitleCheckBox ' ,
254+ classNames : 'urlsCheckBox ' ,
210255
211- // checkedBinding: 'SDL.SDLModel.data.driverDistractionState'
256+ checked : function ( ) {
257+ return SDL . SystemRequest . urlsInputEnabled ;
258+ } . property ( 'SDL.SystemRequest.urlsInputEnabled' ) ,
212259
260+ click : function ( evt ) {
261+ var isCheked = SDL . SystemRequest . get ( 'urlsInputEnabled' ) ;
262+ SDL . SystemRequest . set ( 'urlsInputEnabled' , ! isCheked ) ;
263+ }
213264 }
214265 ) ,
215266
267+ /**
268+ * CheckBox for SubType parameter in OnSystemRequest
269+ */
270+ subTypeCheckBox : Em . Checkbox . extend ( {
271+
272+ elementId : 'subTypeCheckBox' ,
273+
274+ classNames : 'subTypeCheckBox' ,
275+
276+ checked : function ( ) {
277+ return SDL . SystemRequest . requestSubTypeInputEnabled ;
278+ } . property ( 'SDL.SystemRequest.requestSubTypeInputEnabled' ) ,
279+
280+ click : function ( evt ) {
281+ var isCheked = SDL . SystemRequest . get ( 'requestSubTypeInputEnabled' ) ;
282+ SDL . SystemRequest . set ( 'requestSubTypeInputEnabled' , ! isCheked ) ;
283+ }
284+ }
285+ ) ,
286+
287+ /**
288+ * CheckBox for appID parameter in OnSystemRequest
289+ */
216290 appIDSelectTitleCheckBox : Em . Checkbox . extend ( {
217291
218292 elementId : 'appIDSelectTitleCheckBox' ,
219293
220294 classNames : 'appIDSelectTitleCheckBox' ,
221295
222- // checkedBinding: 'SDL.SDLModel.data.driverDistractionState'
296+ checked : function ( ) {
297+ return SDL . SystemRequest . appIDSelectEnabled ;
298+ } . property ( 'SDL.SystemRequest.appIDSelectEnabled' ) ,
223299
300+ click : function ( evt ) {
301+ var isCheked = SDL . SystemRequest . get ( 'appIDSelectEnabled' ) ;
302+ SDL . SystemRequest . set ( 'appIDSelectEnabled' , ! isCheked ) ;
303+ }
224304 }
225305 ) ,
306+
226307 /**
227308 * Label for URLs Input
228309 */
@@ -240,7 +321,7 @@ SDL.SystemRequest = Em.ContainerView.create(
240321 {
241322 elementId : 'systemRequestLabel' ,
242323 classNames : 'systemRequestLabel' ,
243- content : 'requestSubType '
324+ content : 'subType '
244325 }
245326 ) ,
246327 /**
@@ -250,17 +331,26 @@ SDL.SystemRequest = Em.ContainerView.create(
250331 {
251332 elementId : 'urlsInput' ,
252333 classNames : 'urlsInput' ,
253- value : document . location . pathname . replace (
254- 'index.html' , 'IVSU/PROPRIETARY_REQUEST'
255- )
334+ classNameBindings : [
335+ 'SDL.SystemRequest.urlsInputEnabled::inactiveTextField'
336+ ] ,
337+ value : document . location . pathname . replace (
338+ 'index.html' , 'IVSU/PROPRIETARY_REQUEST'
339+ )
256340 }
257341 ) ,
258342
343+ /**
344+ * Input for request subType value changes
345+ */
259346 requestSubTypeInput : Ember . TextField . extend (
260347 {
261348 elementId : 'requestSubTypeInput' ,
262349 classNames : 'requestSubTypeInput' ,
263- value : 'OEM specific request'
350+ classNameBindings : [
351+ 'SDL.SystemRequest.requestSubTypeInputEnabled::inactiveTextField'
352+ ] ,
353+ value : 'OEM specific request' ,
264354 }
265355 ) ,
266356 /**
@@ -290,7 +380,10 @@ SDL.SystemRequest = Em.ContainerView.create(
290380 list . addObject ( '' ) ;
291381 return list ;
292382 } . property ( 'SDL.SDLModel.data.registeredApps.@each' ) ,
293- valueBinding : 'SDL.SDLVehicleInfoModel.prndlSelectState'
383+ valueBinding : 'SDL.SDLVehicleInfoModel.prndlSelectState' ,
384+ classNameBindings : [
385+ 'SDL.SystemRequest.appIDSelectEnabled::inactiveTextField'
386+ ] ,
294387 }
295388 ) ,
296389 /**
@@ -323,12 +416,34 @@ SDL.SystemRequest = Em.ContainerView.create(
323416 classNames : 'button sendButton' ,
324417 text : 'Send OnSystemRequest' ,
325418 action : function ( element ) {
419+ var offset = SDL . SystemRequest . offsetEnabled ?
420+ parseInt ( element . _parentView . jsonOffsetInput . value ) :
421+ null ;
422+ var length = SDL . SystemRequest . lengthEnabled ?
423+ parseInt ( element . _parentView . jsonLengthInput . value ) :
424+ null ;
425+ var timeout = SDL . SystemRequest . timeoutEnabled ?
426+ parseInt ( element . _parentView . jsonTimeoutInput . value ) :
427+ null ;
428+ var appID = SDL . SystemRequest . appIDSelectEnabled ?
429+ element . _parentView . appIDSelect . selection :
430+ null ;
431+ var urls = SDL . SystemRequest . urlsInputEnabled ?
432+ element . _parentView . urlsInput . value :
433+ null ;
434+ var subType = SDL . SystemRequest . requestSubTypeInputEnabled ?
435+ element . _parentView . requestSubTypeInput . value :
436+ null ;
437+
326438 FFW . BasicCommunication . OnSystemRequest (
327439 element . _parentView . systemRequestViewSelect . selection . name ,
328440 element . _parentView . fileNameInput . value ,
329- element . _parentView . urlsInput . value ,
330- element . _parentView . appIDSelect . selection ,
331- element . _parentView . requestSubTypeInput . value
441+ urls ,
442+ appID ,
443+ subType ,
444+ offset ,
445+ length ,
446+ timeout
332447 ) ;
333448 } ,
334449 onDown : false
0 commit comments