Last change
on this file since 2320 was
2320,
checked in by olhsha, 12 years ago
|
aking caption in context menu dynamic, refactoring rssButton
|
File size:
1.1 KB
|
Line | |
---|
1 | package clarin.cmdi.componentregistry.common.components |
---|
2 | { |
---|
3 | |
---|
4 | import clarin.cmdi.componentregistry.common.ItemDescription; |
---|
5 | import clarin.cmdi.componentregistry.services.Config; |
---|
6 | |
---|
7 | import flash.events.Event; |
---|
8 | import flash.events.ContextMenuEvent; |
---|
9 | import flash.ui.ContextMenuItem; |
---|
10 | import flash.system.System; |
---|
11 | import flash.net.URLRequest; |
---|
12 | import flash.net.navigateToURL; |
---|
13 | |
---|
14 | public class RssCommentsContextMenu extends RssContextMenu |
---|
15 | { |
---|
16 | private var _itemDescription:ItemDescription; |
---|
17 | |
---|
18 | public function RssCommentsContextMenu(itemDescription:ItemDescription) |
---|
19 | { super(); |
---|
20 | _itemDescription = itemDescription; |
---|
21 | } |
---|
22 | |
---|
23 | override protected function copyRssLink(event:ContextMenuEvent):void { |
---|
24 | System.setClipboard(Config.getRssUriComments(_itemDescription)); |
---|
25 | } |
---|
26 | |
---|
27 | override protected function showRssLink(event:ContextMenuEvent):void{ |
---|
28 | navigateToURL(new URLRequest(Config.getRssUriComments(_itemDescription)), "_blank"); |
---|
29 | } |
---|
30 | |
---|
31 | override protected function menuUpdateCaption(event:ContextMenuEvent):void { |
---|
32 | _showRssLinkMenuItem.caption = Config.getRssUriComments(_itemDescription); |
---|
33 | } |
---|
34 | |
---|
35 | } |
---|
36 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.