Merge branch 'master' of github.com:systemed/potlatch2
[potlatch2.git] / net / systemeD / potlatch2 / StyleSelector.mxml
1 <?xml version="1.0" encoding="utf-8"?>
2 <s:BorderContainer
3         xmlns:fx="http://ns.adobe.com/mxml/2009"
4     xmlns:s="library://ns.adobe.com/flex/spark" >
5
6     <s:layout>
7       <s:VerticalLayout
8           paddingLeft="5" paddingRight="5"
9           paddingTop="5" paddingBottom="5"/>
10     </s:layout>
11
12         <s:List width="100%" height="100%" id="mapStyle"
13                 labelField="name"
14                 change="FlexGlobals.topLevelApplication.styleButton.close(); Stylesheets.instance().setStylesheet(mapStyle.selectedItem);"
15             dataProvider="{Stylesheets.instance().getCollection()}"
16             selectedItem="{Stylesheets.instance().selected}">
17       <s:layout>
18         <s:VerticalLayout requestedRowCount="{Stylesheets.instance().getCollection().length}" gap="0" horizontalAlign="contentJustify"/>
19       </s:layout>
20     </s:List>
21
22         <s:Button id="editButton" label="Edit..." click="FlexGlobals.topLevelApplication.styleButton.close(); new BackgroundDialog().init('Map style',mapStyle,Stylesheets.instance());" />
23
24         <fx:Script><![CDATA[
25                 import net.systemeD.halcyon.*;
26                 import net.systemeD.halcyon.connection.*;
27                 import net.systemeD.potlatch2.*;
28                 import net.systemeD.potlatch2.collections.Stylesheets;
29                 import net.systemeD.potlatch2.dialogs.*;
30                 import mx.core.*;
31     ]]></fx:Script>
32 </s:BorderContainer>
33