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('panes/panel'); 9 10 /** @class 11 Displays a non-modal, default positioned, drag&drop-able palette pane. 12 13 The simplest way to use the palette pane is to define it in an SC.Page like this: 14 15 myPalettePane: SC.PalettePane.create({ 16 layout: { width: 400, height: 200, right: 0, top: 0 }, 17 contentView: SC.View.extend({ 18 }) 19 }) 20 21 Then get it from your page and append like this: 22 23 MyApp.myPage.get('myPalettePane').append(); 24 25 This will cause your palette pane to instantiate lazily and display. 26 27 Palette pane is a simple way to provide non-modal messaging that won't 28 blocks the user's interaction with your application. Palette panes are 29 useful for showing important detail information with flexible position. 30 They provide a better user experience than modal panel. 31 32 @extends SC.PanelPane 33 @extends SC.DraggablePaneSupport 34 @since SproutCore 1.0 35 */ 36 SC.PalettePane = SC.PanelPane.extend(SC.DraggablePaneSupport, 37 /** @scope SC.PalettePane.prototype */ { 38 39 /** 40 @type Array 41 @default ['sc-palette'] 42 @see SC.View#classNames 43 */ 44 classNames: ['sc-palette'], 45 46 /** 47 Palettes are not modal by default 48 49 @type Boolean 50 @default NO 51 */ 52 isModal: NO, 53 54 /** 55 @type SC.View 56 @default SC.ModalPane 57 */ 58 59 modalPane: SC.ModalPane 60 }); 61