1 // ========================================================================== 2 // Project: SproutCore - JavaScript Application Framework 3 // Copyright: ©2006-2011 Strobe Inc. and contributors. 4 // Portions ©2008-2011 Apple Inc. All rights reserved. 5 // License: Licensed under MIT license (see license.js) 6 // ========================================================================== 7 8 sc_require('views/list'); 9 sc_require('views/source_list_group'); 10 11 /** @class 12 13 Displays a source list like the source list in iTunes. SourceList views 14 are very similar to ListView's but come preconfigured with the correct 15 appearance and default behaviors of a source list. 16 17 @extends SC.ListView 18 @since SproutCore 1.0 19 */ 20 SC.SourceListView = SC.ListView.extend( 21 /** @scope SC.SourceListView.prototype */ { 22 23 theme: 'source-list', 24 25 /** 26 @type Array 27 @default ['sc-source-list'] 28 @see SC.View#classNames 29 */ 30 classNames: ['sc-source-list'], 31 32 /** 33 Default row height for source list items is larger. 34 35 @type Number 36 @default 32 37 @see SC.ListView#rowHeight 38 */ 39 rowHeight: 32, 40 41 /** 42 By default source lists should not select on mouse down since you will 43 often want to drag an item instead of selecting it. 44 45 @type Boolean 46 @default NO 47 @see SC.ListView#selectOnMouseDown 48 */ 49 selectOnMouseDown: NO, 50 51 /** 52 By default, SourceListView's trigger any action you set whenever the user 53 clicks on an item. This gives the SourceList a "menu" like behavior. 54 55 @type Boolean 56 @default YES 57 @see SC.ListView#actOnSelect 58 */ 59 actOnSelect: YES 60 61 }); 62