Changeset 4156


Ignore:
Timestamp:
12/06/13 14:09:54 (10 years ago)
Author:
George.Georgovassilis@mpi.nl
Message:

#469: merged from 1.14

Location:
ComponentRegistry/trunk/ComponentBrowserGui
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • ComponentRegistry/trunk/ComponentBrowserGui

  • ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/browser/Browse.mxml

    r4141 r4156  
    2828                       
    2929                        import mx.controls.Alert;
     30                        import mx.events.IndexChangedEvent;
    3031                       
    3132                        public static const START_ITEM_LOADED:String = "startItemLoaded";
     
    242243                       
    243244                       
     245                       
     246                        protected function tabnav_changeHandler(event:IndexChangedEvent):void
     247                        {
     248                                Config.instance.activeFlavour = (event.newIndex==0?Config.FLAVOUR_PROFILES:Config.FLAVOUR_COMPONENTS);
     249                        }
    244250                       
    245251                ]]>
     
    283289                                                         borderStyle="outset"
    284290                                                         creationPolicy="all"
     291                                                         change="tabnav_changeHandler(event)"
    285292                                                         >
    286293                                <mx:VDividedBox label="Profiles"
     
    296303                                                                                                 height="70%"
    297304                                                                                                 browseMenu="{profilesMenu}"
    298                                                                                                  typeOfDescription = "profiles"
     305                                                                                                 typeOfDescription = "{Config.FLAVOUR_PROFILES}"
    299306                                                                                                 createNew="createNewProfile(event)"
    300307                                                                                                 />
     
    318325                                                                                                 height="70%"
    319326                                                                                                 browseMenu="{componentsMenu}"
    320                                                                                                  typeOfDescription= "components"
     327                                                                                                 typeOfDescription= "{Config.FLAVOUR_COMPONENTS}"
    321328                                                                                                 createNew="createNewComponent(event)"
    322329                                                                                                 />
  • ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/browser/BrowserOverviewList.mxml

    r4099 r4156  
    166166                       
    167167                        private function onGroupSelected(event:GroupSelectionEvent):void {
     168                                //we're responsible only for either components or profiles
     169                                if (typeOfDescription!=Config.instance.activeFlavour)
     170                                        return;
    168171                                //Some handler already moved the group for us
    169172                                if (event.groupWasMoved)
  • ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/common/ItemDescription.as

    r3660 r4156  
    4848                        create(itemDescription, Config.instance.componentInfoUrl, false, space);
    4949                }
     50               
     51                public function toString():String{
     52                        return (isProfile?"profile":"component")+" id:"+id+" name:"+name+" url:"+dataUrl;
     53                }
    5054
    5155        }
  • ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/services/Config.as

    r4131 r4156  
    3737                public static const VIEW_EDIT:String = "edit";
    3838                public static const VIEW_IMPORT:String = "import";
     39                public static const FLAVOUR_PROFILES = "profiles";
     40                public static const FLAVOUR_COMPONENTS = "components";
    3941                //Possible browser views to start with
    4042                public static const BROWSER_PANEL_VIEW:String = "view";
     
    7476                private var _selectedGroup:String = "";
    7577                private var _debug:Boolean = false;
     78                private var _activeFlavour = FLAVOUR_PROFILES;
    7679               
    7780                private var publicComponentsSrv:ComponentListService;
     
    8689                                throw new Error("Config can only be accessed through Config.instance");
    8790                        }
     91                }
     92               
     93                public function get activeFlavour():String{
     94                        return _activeFlavour;
     95                }
     96               
     97                public function set activeFlavour(value:String):void{
     98                        _activeFlavour = value;
    8899                }
    89100               
Note: See TracChangeset for help on using the changeset viewer.