2 * Copyright (c) 2013, Ford Motor Company All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 * · Redistributions of source code must retain the above copyright notice,
7 * this list of conditions and the following disclaimer.
8 * · Redistributions in binary form must reproduce the above copyright notice,
9 * this list of conditions and the following disclaimer in the documentation
10 * and/or other materials provided with the distribution.
11 * · Neither the name of the Ford Motor Company nor the names of its
12 * contributors may be used to endorse or promote products derived from this
13 * software without specific prior written permission.
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 * POSSIBILITY OF SUCH DAMAGE.
28 * @name SDL.InfoNonMedia
29 * @desc NonMedia application visual representation
31 * @filesource app/view/info/nonMedia.js
35 SDL.InfoNonMedia = Em.ContainerView.create( {
37 elementId: 'info_nonMedia',
39 controller: SDL.SDLAppController,
48 'SDL.States.info.nonMedia.active:active_state:inactive_state'
51 content: Em.ContainerView.extend( {
69 deactivate: function() {
70 SDL.States.goToStates( 'info.apps' );
73 deviceName: SDL.Label.extend( {
80 contentBinding: 'SDL.SDLAppController.model.deviceName'
83 image: Em.View.extend( {
90 template: Ember.Handlebars.compile( '<img width="150px" {{bindAttr src="SDL.SDLAppController.model.appInfo.mainImage"}}>' )
93 fields: Em.ContainerView.extend( {
108 field1: SDL.Label.extend( {
109 contentBinding: 'controller.model.appInfo.field1'
112 field2: SDL.Label.extend( {
113 contentBinding: 'controller.model.appInfo.field2'
116 field3: SDL.Label.extend( {
117 contentBinding: 'controller.model.appInfo.field3'
120 field4: SDL.Label.extend( {
121 contentBinding: 'controller.model.appInfo.field4'
126 innerMenu: SDL.MenuList.extend( {
128 refreshItems: function() {
129 if( SDL.SDLAppController.model.appId == SDL.NonMediaController.currentAppId ){
130 this.addItems( SDL.SDLAppController.model.softButtons, SDL.SDLAppController.model.appId );
132 }.observes( 'SDL.SDLAppController.model.softButtons.@each' ),
134 groupName: "NonMediaView",
136 content: Em.ContainerView.extend( {
145 'parentView.contentPositon:style'
153 optionsButton: SDL.Button.extend( {
156 templateName: 'arrow',
158 action: 'openCommandsList',
159 target: 'SDL.SDLAppController'
164 presets: Em.ContainerView.extend( {
177 if( SDL.SDLAppController.model ){
178 return !Boolean( SDL.SDLAppController.model.get( 'appInfo.customPresets' ).length );
181 }.property( 'SDL.SDLAppController.model.appInfo.customPresets.@each' ),
193 perset1: SDL.SDLPresetButton.extend( {
194 textBinding: 'SDL.SDLAppController.model.appInfo.customPresets.0',
195 presetName: 'PRESET_1'
197 perset2: SDL.SDLPresetButton.extend( {
198 textBinding: 'SDL.SDLAppController.model.appInfo.customPresets.1',
199 presetName: 'PRESET_2'
201 perset3: SDL.SDLPresetButton.extend( {
202 textBinding: 'SDL.SDLAppController.model.appInfo.customPresets.2',
203 presetName: 'PRESET_3'
205 perset4: SDL.SDLPresetButton.extend( {
206 textBinding: 'SDL.SDLAppController.model.appInfo.customPresets.3',
207 presetName: 'PRESET_4'
209 perset5: SDL.SDLPresetButton.extend( {
210 textBinding: 'SDL.SDLAppController.model.appInfo.customPresets.4',
211 presetName: 'PRESET_5'
213 perset6: SDL.SDLPresetButton.extend( {
214 textBinding: 'SDL.SDLAppController.model.appInfo.customPresets.5',
215 presetName: 'PRESET_6'