File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ var _ = require ( '../../../lib/alloy/underscore' ) . _ ;
2+
3+ exports . parse = function ( node , state ) {
4+ _ . extend ( state , {
5+ proxyPropertyDefinition : {
6+ parents : [
7+ 'Ti.UI.iPad.Popover'
8+ ]
9+ }
10+ } ) ;
11+ return require ( './Alloy.Abstract._ProxyProperty' ) . parse ( node , state ) ;
12+ } ;
Original file line number Diff line number Diff line change @@ -151,6 +151,7 @@ exports.IMPLICIT_NAMESPACES = {
151151 ButtonName : NS_ALLOY_ABSTRACT ,
152152 BarItemTypes : NS_ALLOY_ABSTRACT ,
153153 BarItemType : NS_ALLOY_ABSTRACT ,
154+ ContentView : NS_ALLOY_ABSTRACT ,
154155 CoverFlowImageTypes : NS_ALLOY_ABSTRACT ,
155156 CoverFlowImageType : NS_ALLOY_ABSTRACT ,
156157 FlexSpace : NS_ALLOY_ABSTRACT ,
Original file line number Diff line number Diff line change 11function openPopover ( ) {
22 if ( Ti . Platform . osname === 'ipad' ) {
33 var popover = Alloy . createController ( 'popover' ) . getView ( ) ;
4- popover . show ( { view :$ . button } ) ;
4+ popover . show ( { view :$ . button1 } ) ;
5+ } else {
6+ alert ( 'Popover only supported on iPad' ) ;
7+ }
8+ }
9+
10+ function openPopoverWithContentView ( ) {
11+ if ( Ti . Platform . osname === 'ipad' ) {
12+ var popover = Alloy . createController ( 'popover_with_content_view' ) . getView ( ) ;
13+ popover . show ( { view :$ . button2 } ) ;
514 } else {
615 alert ( 'Popover only supported on iPad' ) ;
716 }
Original file line number Diff line number Diff line change 1+
2+
3+ function open_window ( e ) {
4+ var win = Ti . UI . createWindow ( {
5+ backgroundColor : "blue"
6+ } ) ;
7+ $ . navWindow . openWindow ( win , { animated : true } ) ;
8+ }
Original file line number Diff line number Diff line change 11<Alloy >
2- <Window >
3- <Button id =" button" onClick =" openPopover" >popover</Button >
2+ <Window layout =" vertical" >
3+ <Button id =" button1" onClick =" openPopover" top =" 20" >popover</Button >
4+ <Button id =" button2" onClick =" openPopoverWithContentView" >popover with content view</Button >
45 </Window >
56</Alloy >
Original file line number Diff line number Diff line change 1+ <Alloy >
2+ <Popover title =" popover" height =" 300" width =" 250" >
3+ <ContentView >
4+ <NavigationWindow id =" navWindow" >
5+ <Window >
6+ <RightNavButton >
7+ <Button title =" Open Window" onClick =" open_window" />
8+ </RightNavButton >
9+ <Label >This is a window in a popover</Label >
10+ </Window >
11+ </NavigationWindow >
12+ </ContentView >
13+ </Popover >
14+ </Alloy >
You can’t perform that action at this time.
0 commit comments