Changeset 1913


Ignore:
Timestamp:
04/27/12 08:14:43 (12 years ago)
Author:
twagoo
Message:

Added 'search' button to ISOCat search window
Fixes #190

File:
1 edited

Legend:

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

    r856 r1913  
    1212        <mx:Script>
    1313                <![CDATA[
     14                        import clarin.cmdi.componentregistry.services.IsocatService;
     15                       
    1416                        import mx.controls.TextInput;
    15                         import clarin.cmdi.componentregistry.services.IsocatService;
    1617                        import mx.managers.PopUpManager;
    1718
     
    4849                        }
    4950
    50                         private function handleSearch(event:KeyboardEvent):void {
    51                                 if (event.keyCode == Keyboard.ENTER) {
    52                                         searchService.load(searchBox.text, isocatSearchType);
    53                                 }
     51                        private function handleSearch(event:Event):void {
     52                                if(event is MouseEvent || (event is KeyboardEvent && KeyboardEvent(event).keyCode == Keyboard.ENTER)){
     53                                        searchService.load(searchBox.text, isocatSearchType);                                   
     54                                }                               
    5455                        }
    5556                ]]>
     
    6263                                                          keyDown="handleSearch(event);"
    6364                                                          minWidth="300"/>
     65                        <mx:Button id="searchButton"
     66                                           label="Search"
     67                                           click="handleSearch(event);" />
    6468                        <mx:Label text="{dataGrid.dataProvider.length} results"/>
    6569                </mx:HBox>
Note: See TracChangeset for help on using the changeset viewer.