1 // ========================================================================== 2 // Project: SC - designPage 3 // Copyright: ©2010 Mike Ball 4 // ========================================================================== 5 /*globals SC */ 6 sc_require('views/designer_drop_target'); 7 sc_require('views/page_item_view'); 8 SC.designPage = SC.Page.create({ 9 // .......................................................... 10 // Views used inside iframe... 11 // 12 designMainPane: SC.MainPane.design({ 13 classNames: ['workspace'], 14 childViews: ['rotated', 'container', 'viewList'], 15 16 container: SC.DesignerDropTarget.design({ 17 layout: {top: 20, left: 20, right: 20, bottom: 83}, 18 classNames: ['design'], 19 contentViewBinding: SC.Binding.transform(function(value, binding){ 20 return value && value.kindOf && value.kindOf(SC.View) ? value : null; 21 }).from('SC.designController.view') 22 }), 23 24 rotated: SC.View.design({ 25 layout: {top: 20, left: 20, right: 20, bottom: 83}, 26 classNames: ['rotated-page'] 27 }), 28 29 viewList: SC.ScrollView.design({ 30 layout: {left:0, right: 0, bottom: 0, height: 63}, 31 classNames: ['dock'], 32 hasBorder: NO, 33 hasVerticalScroller: NO, 34 contentView: SC.GridView.design({ 35 contentIconKey: 'type', 36 exampleView: SC.pageItemView, 37 rowHeight: 63, 38 columnWidth: 100, 39 hasContentIcon: YES, 40 //contentBinding: 'SC.designsController', 41 delegate: SC.designsController, 42 selectionBinding: 'SC.designsController.selection', 43 contentValueKey: 'name', 44 isDropTarget: YES, 45 canEditContent: YES, 46 canReorderContent: YES, 47 canDeleteContent: YES, 48 actOnSelect: YES, 49 targetIsInIFrame: YES, 50 target: 'SC.designController', 51 action: 'viewSelected' 52 }) 53 }) 54 }) 55 }); 56