Changeset 2309
- Timestamp:
- 10/15/12 15:26:06 (12 years ago)
- Location:
- ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/browser/Browse.mxml
r2279 r2309 193 193 194 194 195 195 196 <mx:Box paddingTop="5" paddingLeft="5" 196 197 top="-5" … … 216 217 <mx:VDividedBox label="Profiles" 217 218 width="100%"> 219 220 <mx:HBox> 221 <mx:Label text = "The uri for an RSS-reader: "/> 222 <mx:Text text="{Config.getRssUriDescriptions('profiles')}"/> 223 </mx:HBox> 224 225 218 226 <browser:BrowserOverviewList id="profilesOverview" 219 227 viewStack="{this.parent as RegistryViewStack}" … … 235 243 236 244 <mx:VDividedBox label="Components" 237 width="100%" 238 > 245 width="100%"> 246 <mx:HBox> 247 <mx:Label text = "The uri for an RSS-reader: "/> 248 <mx:Text text="{Config.getRssUriDescriptions('components')}"/> 249 </mx:HBox> 250 251 239 252 <browser:BrowserOverviewList id="componentsOverview" 240 253 viewStack="{this.parent as RegistryViewStack}" -
ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/browser/CommentsPanel.as
r2279 r2309 1 package clarin.cmdi.componentregistry.browser1 package clarin.cmdi.componentregistry.browser 2 2 { 3 3 import clarin.cmdi.componentregistry.common.Comment; … … 6 6 import clarin.cmdi.componentregistry.services.CommentListService; 7 7 import clarin.cmdi.componentregistry.services.CommentPostService; 8 import clarin.cmdi.componentregistry.services.Config; 8 9 import clarin.cmdi.componentregistry.services.DeleteService; 9 10 10 11 import flash.events.Event; 11 12 13 import mx.containers.HBox; 12 14 import mx.containers.VBox; 13 15 import mx.controls.HRule; 14 16 import mx.controls.Label; 17 import mx.controls.Text; 15 18 16 19 [Event(name="commentsLoaded",type="flash.events.Event")] … … 32 35 } 33 36 37 34 38 public function CommentsPanel() 35 39 { … … 44 48 } 45 49 50 private function makeRssBox():HBox{ 51 var rssBox:HBox = new HBox(); 52 53 var label:Label = new Label(); 54 label.text = "The uri for an RSS-reader: "; 55 rssBox.addChild(label); 56 57 var txt:Text = new Text(); 58 txt.text = Config.getRssUriComments(_itemDescription); 59 rssBox.addChild(txt); 60 61 return rssBox; 62 } 63 46 64 public function load():void{ 47 65 removeAllChildren(); 48 66 49 67 if(_itemDescription != null) { 68 69 var rssBox:HBox = makeRssBox(); 70 addChild(rssBox); 71 50 72 // A box for the comments (will be loaded in callback but should be shown first) 51 73 commentsBox = new VBox(); -
ComponentRegistry/branches/ComponentRegistry-1.13.0-olha/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/services/Config.as
r2279 r2309 195 195 return _instance; 196 196 } 197 197 198 199 public static function getRssUriDescriptions(typeOfDescription:String):String { 200 var baseUri:String = (new URI(Config.instance.serviceRootUrl)).toString(); 201 var result:String=baseUri+"/rest/registry/"+typeOfDescription+"/rss"; 202 if (Config.instance._userSpace) result=result+"?userspace=true"; 203 return result; 204 } 205 206 public static function getRssUriComments(item:ItemDescription):String { 207 var baseUri:String = (new URI(Config.instance.serviceRootUrl)).toString(); 208 var typeOfDescription:String; 209 if (item.isProfile) {typeOfDescription="profiles/";} 210 else typeOfDescription="components/"; 211 var result:String=baseUri+"/rest/registry/"+typeOfDescription+item.id+"/comments/rss"; 212 if (item.isInUserSpace) result=result+"?userspace=true"; 213 return result; 214 } 198 215 } 199 216 }
Note: See TracChangeset
for help on using the changeset viewer.