blob: bcf39f055e81b3e6c5a9b1f6e0a6045560996949 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" title="Pop Ups">
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace f "spark.skins.mobile.*";
/* icons: http://glyphish.com */
.buyButton
{
chromeColor: #009900;
color: #FFFFFF;
textShadowColor: #000000;
/*icon: Embed(source="../assets/glyphish/172-pricetag.png");*/
}
.printButton
{
/*icon: Embed(source="../assets/glyphish/185-printer.png");*/
}
.editButton
{
/*icon: Embed(source="../assets/glyphish/187-pencil.png");*/
}
</fx:Style>
<fx:Script>
<![CDATA[
import mx.core.FlexGlobals;
import mx.events.ResizeEvent;
protected function openAlert(event:MouseEvent):void
{
alert.open(this, false);
updateAlertPosition();
stage.addEventListener(ResizeEvent.RESIZE, updateAlertPosition);
}
protected function updateAlertPosition(event:Event=null):void
{
if (alert.isOpen)
{
alert.width = systemManager.screen.width;
alert.height = systemManager.screen.height;
}
}
]]>
</fx:Script>
<fx:Declarations>
<s:SkinnablePopUpContainer id="alert" backgroundAlpha="0.5" backgroundColor="0x000000">
<s:Panel title="Alert" horizontalCenter="0" verticalCenter="0" width="90%">
<s:HGroup width="100%" bottom="0">
<s:Button label="Close" click="alert.close()" width="50%"/>
<s:Button label="OK" click="alert.close()" width="50%" styleName="dialogDefaultButton"/>
</s:HGroup>
</s:Panel>
</s:SkinnablePopUpContainer>
</fx:Declarations>
<s:Scroller width="100%" height="100%">
<s:Group width="100%" height="100%">
<s:layout>
<s:VerticalLayout paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10"/>
</s:layout>
<s:Button width="100%" label="ViewMenu" click="FlexGlobals.topLevelApplication.viewMenuOpen = true;"/>
<s:Button width="100%" label="PopUp Panel" click="openAlert(event)"/>
</s:Group>
</s:Scroller>
<s:viewMenuItems>
<s:ViewMenuItem label="Buy" styleName="buyButton"/>
<s:ViewMenuItem label="Print" styleName="printButton"/>
<s:ViewMenuItem label="Edit" styleName="editButton"/>
</s:viewMenuItems>
</s:View>