Changeset 1934


Ignore:
Timestamp:
05/14/12 08:30:16 (12 years ago)
Author:
twagoo
Message:

Fixes #191

  • Added tab navigator to ValueSchemaPopUp?, simple/cv/pattern are now in separate tabs
  • Set friendly column header string to CV edit table
Location:
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/ValueSchemeEnumerationGrid.mxml

    r865 r1934  
    118118                                 useRollOver="false">
    119119                <mx:columns>
    120                         <mx:DataGridColumn dataField="item"/>
    121                         <mx:DataGridColumn dataField="appInfo"/>
    122                         <mx:DataGridColumn dataField="conceptLink"/>
     120                        <mx:DataGridColumn dataField="item" headerText="Value"/>
     121                        <mx:DataGridColumn dataField="appInfo" headerText="Description"/>
     122                        <mx:DataGridColumn dataField="conceptLink" headerText="Concept link"/>
    123123                </mx:columns>
    124124        </mx:DataGrid>
  • ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/ValueSchemePopUp.mxml

    r1719 r1934  
    99        <mx:Script>
    1010                <![CDATA[
     11                        import clarin.cmdi.componentregistry.common.ComponentMD;
    1112                        import clarin.cmdi.componentregistry.services.IsocatService;
    12                         import clarin.cmdi.componentregistry.common.ComponentMD;
     13                       
     14                        import mx.collections.ArrayCollection;
    1315                        import mx.collections.XMLListCollection;
    1416                        import mx.controls.TextInput;
     17                        import mx.core.Container;
    1518                        import mx.managers.PopUpManager;
    16                         import mx.collections.ArrayCollection;
    1719
    1820                        //Stores the result
     
    7476                                PopUpManager.addPopUp(getIsocatPopup(), this, false);
    7577                        }
     78                       
     79                        private function getInitialTab():Container {
     80                                if(valueSchemeInput != null){
     81                                        if(valueSchemeInput.valueSchemeSimple) {
     82                                                return typeTab;
     83                                        }
     84                                        if(valueSchemeInput.valueSchemeEnumeration) {
     85                                                return cvTab;
     86                                        }
     87                                        if(valueSchemeInput.valueSchemePattern) {
     88                                                return patternTab;
     89                                        }
     90                                }
     91                                return typeTab;
     92                        }
    7693                ]]>
    7794        </mx:Script>
    7895
    79 
    80         <mx:Label text="Select type:"/>
    81         <mx:HBox width="100%">
    82                 <mx:ComboBox id="simpleValueSchemeBox"
    83                                          prompt="{valueSchemeInput.valueSchemeSimple}"
    84                                          dataProvider="{simpleValueSchemeDataProvider}">
    85                 </mx:ComboBox>
    86                 <mx:Spacer width="100%"/>
    87                 <mx:Button label="Use Type"
    88                                    click="setType()"/>
    89         </mx:HBox>
    90 
    91         <mx:Label text="Or enter pattern:"/>
    92         <mx:HBox width="100%">
    93                 <mx:TextInput id="patternInput"
    94                                           text="{valueSchemeInput.valueSchemePattern}">
    95                         <!-- PD TODO how can I validate this -->
    96                 </mx:TextInput>
    97                 <mx:Spacer width="100%"/>
    98                 <mx:Button label="Use Pattern"
    99                                    click="setPattern()"/>
    100         </mx:HBox>
    101 
    102         <!-- PD  TODO how should we implement open vocabularies?? -->
    103         <mx:Label text="Or create controlled vocabularies:"/>
    104         <mx:HBox width="100%">
    105                 <editor:ValueSchemeEnumerationGrid id="enumerationGrid"
    106                                                                                    creationComplete="enumerationGrid.initEnumeration(valueSchemeInput.valueSchemeEnumeration)"/>
    107                 <mx:VBox>
    108                         <mx:Button label="Use Controlled Vocabulary"
    109                                            click="setControlledVocabulary()"/>
    110                         <mx:Button label="Search in isocat..."
    111                                            click="handleIsocatButtonClick(event)"
    112                                            enabled="{enumerationGrid.conceptLinkEdit}"/>
     96        <mx:TabNavigator id="tabnav"
     97                                         width="100%"
     98                                         height="100%"
     99                                         color="0x323232"
     100                                         y="59"
     101                                         borderStyle="outset"
     102                                         resizeToContent="true"
     103                                         minWidth="400"
     104                                         minHeight="200"
     105                                         selectedChild="{getInitialTab()}"
     106                                         >
     107       
     108                <mx:VBox id="typeTab" label="Type"
     109                                                width="100%"
     110                                                paddingLeft="5" paddingRight="5">       
     111                        <mx:Label text="Select type:"/>
     112                        <mx:HBox width="100%">
     113                                <mx:ComboBox id="simpleValueSchemeBox"
     114                                                         prompt="{valueSchemeInput.valueSchemeSimple}"
     115                                                         dataProvider="{simpleValueSchemeDataProvider}">
     116                                </mx:ComboBox>
     117                                <mx:Spacer width="100%"/>
     118                                <mx:Button label="Use Type"
     119                                                   click="setType()"/>
     120                        </mx:HBox>
    113121                </mx:VBox>
    114         </mx:HBox>
     122       
     123                <mx:VBox id="cvTab" label="Controlled vocabulary"
     124                                                width="100%"
     125                                                paddingLeft="5" paddingRight="5">
     126                <!-- PD  TODO how should we implement open vocabularies?? -->
     127                <mx:Label text="Create controlled vocabularies:"/>
     128                        <mx:HBox width="100%">
     129                                <editor:ValueSchemeEnumerationGrid id="enumerationGrid"
     130                                                                                                   creationComplete="enumerationGrid.initEnumeration(valueSchemeInput.valueSchemeEnumeration)"/>
     131                                <mx:VBox>
     132                                        <mx:Button label="Use Controlled Vocabulary"
     133                                                           click="setControlledVocabulary()"/>
     134                                        <mx:Button label="Search in isocat..."
     135                                                           click="handleIsocatButtonClick(event)"
     136                                                           enabled="{enumerationGrid.conceptLinkEdit}"/>
     137                                </mx:VBox>
     138                        </mx:HBox>
     139                </mx:VBox>
     140               
     141                <mx:VBox id="patternTab" label="Pattern"
     142                                 width="100%"
     143                                 paddingLeft="5" paddingRight="5">
     144                        <mx:Label text="Enter pattern:"/>
     145                        <mx:HBox width="100%">
     146                                <mx:TextInput id="patternInput"
     147                                                          text="{valueSchemeInput.valueSchemePattern}">
     148                                        <!-- PD TODO how can I validate this -->
     149                                </mx:TextInput>
     150                                <mx:Spacer width="100%"/>
     151                                <mx:Button label="Use Pattern"
     152                                                   click="setPattern()"/>
     153                        </mx:HBox>
     154                </mx:VBox>
     155               
     156        </mx:TabNavigator>
    115157
    116158        <mx:HBox width="100%">
Note: See TracChangeset for help on using the changeset viewer.