Allow deployment control over showing the help dialog on startup. Defaults to off.
[potlatch2.git] / net / systemeD / potlatch2 / help / HelpDialog.mxml
1 <?xml version="1.0" encoding="utf-8"?>
2 <mx:TitleWindow
3         xmlns:mx="http://www.adobe.com/2006/mxml" 
4         layout="vertical" showCloseButton="true"
5         horizontalAlign="center" title="Help"
6         width="350" height="250" verticalGap="0">
7   <mx:Script><![CDATA[
8     import mx.managers.PopUpManager;
9     import mx.events.CloseEvent;
10     import mx.core.Application;
11     
12     public function init():void {
13         PopUpManager.addPopUp(this, Application(Application.application), true);
14         PopUpManager.centerPopUp(this);
15         this.addEventListener(CloseEvent.CLOSE, helpDialog_close);
16
17         // store whether the user has seen the help dialog before
18         var obj:SharedObject = SharedObject.getLocal("user_state");
19         obj.setProperty("help_shown","true");
20     }
21     
22     private function helpDialog_close(evt:CloseEvent):void {
23         PopUpManager.removePopUp(this);
24     }
25
26               ]]>
27   </mx:Script>
28   <mx:Text>
29     <mx:htmlText>
30                 <![CDATA[
31 For Potlatch 2 help, see the <u><a href="http://wiki.openstreetmap.org/wiki/Potlatch_2" target="_blank">OpenStreetMap wiki</a></u>.
32                 ]]>
33     </mx:htmlText>
34   </mx:Text>
35   <mx:ControlBar>
36     <mx:Spacer width="100%"/>
37     <mx:Button label="Ok" click="PopUpManager.removePopUp(this);"/>
38   </mx:ControlBar>
39
40 </mx:TitleWindow>