Changeset 2095
- Timestamp:
- 08/15/12 13:08:27 (12 years ago)
- Location:
- ComponentRegistry/branches/ComponentRegistry-1.12.0/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/branches/ComponentRegistry-1.12.0/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/browser/Browse.mxml
r2093 r2095 7 7 height="100%" 8 8 label="Component Browser" 9 implements="clarin.cmdi.componentregistry.common.components.RegistryView" 9 implements="clarin.cmdi.componentregistry.common.components.RegistryView" xmlns:components="clarin.cmdi.componentregistry.common.components.*" 10 10 > 11 11 <mx:Metadata> … … 162 162 } 163 163 164 private static const USERSPACE_LABEL:String = "Work space";165 private static const PUBLICSPACE_LABEL:String = "Public space";166 [Bindable]167 public var spaces:ArrayCollection = new ArrayCollection([{label: PUBLICSPACE_LABEL, data: 1}, {label: USERSPACE_LABEL, data: 2}]);168 169 164 private function setUserSpace(event:Event = null):void { 170 165 if (Config.instance.userSpace) { … … 173 168 userSpaceCB.selectedIndex = 0; 174 169 } 175 }176 177 private function userSpaceCloseHandler(event:Event):void {178 if (Credentials.instance.isLoggedIn()) {179 Config.instance.userSpace = ComboBox(event.target).selectedItem.data == 2;180 } else if (userSpaceCB.selectedIndex != 0) {181 userSpaceCB.selectedIndex = 0;182 new Login().show(this, Config.VIEW_BROWSE, Config.SPACE_USER, null);183 }184 185 170 } 186 171 ]]> … … 205 190 206 191 <mx:Box paddingTop="5" paddingLeft="5"> 207 <mx:ComboBox id="userSpaceCB" 208 dataProvider="{spaces}" 209 width="110" 210 close="userSpaceCloseHandler(event);" 211 /> 192 <components:SpaceSwitch id="userSpaceCB" /> 212 193 </mx:Box> 213 194 214 195 <mx:TabNavigator id="tabnav" 215 196 width="100%" -
ComponentRegistry/branches/ComponentRegistry-1.12.0/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/browser/BrowserOverviewList.mxml
r2094 r2095 34 34 [Bindable] 35 35 public var viewStack:RegistryViewStack; 36 37 [Bindable] 38 public var buttonsEnabled:Boolean = true; 39 40 [Bindable] 41 public var spaceSwitchEnabled:Boolean = false; 36 42 37 43 public function set browserDataProvider(dataProvider:ArrayCollection):void { … … 104 110 paddingRight="5" 105 111 width="100%"> 106 112 113 <mx:Box paddingTop="5" paddingLeft="5" 114 visible="{spaceSwitchEnabled}" 115 includeInLayout="{spaceSwitchEnabled}"> 116 <comp:SpaceSwitch id="userSpaceCB" /> 117 </mx:Box> 118 107 119 <mx:HBox horizontalAlign="left" 108 120 verticalAlign="middle" 109 width="70%"> 121 width="70%" 122 visible="{buttonsEnabled}" 123 > 110 124 111 125 <mx:Button label="Create new" -
ComponentRegistry/branches/ComponentRegistry-1.12.0/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/Editor.mxml
r2093 r2095 48 48 <browser:BrowserOverviewList id="componentsPaletteOverview" 49 49 width="100%" height="90%" 50 buttonsEnabled="false" 51 spaceSwitchEnabled="true" 50 52 browserDataProvider="{componentsSrv.itemDescriptions}" 51 53 browserColumns="{browserColumns.getComponentColumns()}"
Note: See TracChangeset
for help on using the changeset viewer.