Changeset 5803 for ComponentRegistry
- Timestamp:
- 11/12/14 14:16:50 (10 years ago)
- Location:
- ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/browser/Browse.mxml
r5699 r5803 37 37 38 38 [Bindable] 39 private var componentsSrv:ComponentListService = Config.instance.getC omponentsSrv();40 [Bindable] 41 private var profilesSrv:ProfileListService = Config.instance.get ProfilesSrv();39 private var componentsSrv:ComponentListService = Config.instance.getCurrentComponentsSrv(); 40 [Bindable] 41 private var profilesSrv:ProfileListService = Config.instance.getCurrentProfilesSrv(); 42 42 43 43 [Bindable] … … 82 82 83 83 private function toggleRegistrySpace(event:Event):void { 84 componentsSrv = Config.instance.getC omponentsSrv();85 profilesSrv = Config.instance.get ProfilesSrv();84 componentsSrv = Config.instance.getCurrentComponentsSrv(); 85 profilesSrv = Config.instance.getCurrentProfilesSrv(); 86 86 refresh(); 87 87 registrySpaceComboBox.setSelectedIndex(); -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/common/components/ExpandingComponentLabel.as
r5699 r5803 41 41 this.editable = editable; 42 42 this.componentId = componentId; 43 this.item = Config.instance.getComponentsSrv().findDescription(componentId); 43 this.item = Config.instance.getCurrentComponentsSrv().findDescription(componentId); 44 // item not from current space? try public... 45 if (this.item==null) { 46 this.item = Config.instance.getPublicComponentsSrv().findDescription(componentId); 47 } 44 48 styleName = StyleConstants.EXPANDING_COMPONENT; 45 49 if (item && item.isPrivate) { -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/ComponentSummary.mxml
r5699 r5803 29 29 > 30 30 <mx:Label text="ComponentId: " fontWeight="bold"/> 31 <mx:Label text="{Config.instance.getC omponentsSrv().findDescription(component.componentId).name}" />31 <mx:Label text="{Config.instance.getCurrentComponentsSrv().findDescription(component.componentId).name}" /> 32 32 </mx:HBox> 33 33 -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/EditorAS.as
r5729 r5803 30 30 31 31 [Bindable] 32 private var componentsSrv:ComponentListService = Config.instance.getC omponentsSrv();33 34 [Bindable] 35 private var profilesSrv:ProfileListService = Config.instance.get ProfilesSrv();32 private var componentsSrv:ComponentListService = Config.instance.getCurrentComponentsSrv(); 33 34 [Bindable] 35 private var profilesSrv:ProfileListService = Config.instance.getCurrentProfilesSrv(); 36 36 37 37 [Bindable] … … 70 70 71 71 private function toggleRegistrySpace(event:Event):void { 72 componentsSrv = Config.instance.getC omponentsSrv();73 profilesSrv = Config.instance.get ProfilesSrv();72 componentsSrv = Config.instance.getCurrentComponentsSrv(); 73 profilesSrv = Config.instance.getCurrentProfilesSrv(); 74 74 } 75 75 -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/services/BrowserService.as
r5699 r5803 46 46 } 47 47 48 public function findDescription(id:String):ItemDescription { 48 /** 49 * finds a component inside the currently loaded space 50 */ 51 public function findDescription(id:String):ItemDescription { 52 //look in the current space 49 53 for each (var item:ItemDescription in itemDescriptions) { 50 54 if (item.id == id) { … … 52 56 } 53 57 } 58 //item not in current space 59 //TODO: request description from server 54 60 return null; 55 61 } -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/services/Config.as
r5699 r5803 79 79 80 80 private var componentsSrv:ComponentListService; 81 private var publicComponentsSrv:ComponentListService; 81 82 private var profilesSrv:ProfileListService; 83 private var publicProfilesSrv:ProfileListService; 82 84 private var listUserGroupsMembershipService:ListUserGroupsMembershipService; 83 85 private var listGroupsOfItemService:ListGroupsOfItemService; … … 131 133 }; 132 134 133 registrySpace = new RegistrySpace(space_, groupId_);134 135 135 var debug_:int = applicationParameters.debug; 136 136 if(debug_) { 137 137 _debug = Boolean(debug_); 138 138 } 139 139 140 140 listUserGroupsMembershipService = new ListUserGroupsMembershipService(); 141 listGroupsOfItemService = new ListGroupsOfItemService(); 142 141 listGroupsOfItemService = new ListGroupsOfItemService(); 142 143 publicProfilesSrv = new ProfileListService(new RegistrySpace(SPACE_PUBLISHED, "")); 144 publicComponentsSrv = new ComponentListService(new RegistrySpace(SPACE_PUBLISHED, "")) 145 146 registrySpace = new RegistrySpace(space_, groupId_); 143 147 } 144 148 … … 146 150 return listUserGroupsMembershipService; 147 151 } 148 149 public function getProfilesSrv():ProfileListService{ 150 return profilesSrv; 151 } 152 153 public function getComponentsSrv():ComponentListService{ 154 return componentsSrv; 152 153 public function getCurrentProfilesSrv():ProfileListService{ 154 return profilesSrv; 155 } 156 157 public function getPublicProfilesSrv():ProfileListService{ 158 return publicProfilesSrv; 159 } 160 161 public function getCurrentComponentsSrv():ComponentListService{ 162 return componentsSrv; 163 } 164 165 public function getPublicComponentsSrv():ComponentListService{ 166 return publicComponentsSrv; 155 167 } 156 168 … … 230 242 public function set registrySpace(registrySpace:RegistrySpace):void { 231 243 _registrySpace = registrySpace; 232 profilesSrv = new ProfileListService(registrySpace); 233 componentsSrv = new ComponentListService(registrySpace); 244 245 if(registrySpace.space == SPACE_PUBLISHED) { 246 profilesSrv = publicProfilesSrv; 247 componentsSrv = publicComponentsSrv; 248 } else { 249 profilesSrv = new ProfileListService(registrySpace); 250 componentsSrv = new ComponentListService(registrySpace); 251 } 234 252 235 253 // everything is ready to open new componentBrowser instance
Note: See TracChangeset
for help on using the changeset viewer.