Author: jvelociter
Date: 2007-11-27 18:49:26 +0100 (Tue, 27 Nov 2007)
New Revision: 6101

Modified:
   
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/ui/menu/FeedTreeWidget.java
   
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/ui/menu/HyperlinkComposite.java
   
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/public/Watch.css
   
xwiki-products/xwiki-watch/trunk/wiki/src/main/resources/WatchCode/Translations
Log:
XWATCH-35  few structure changes and adds a couple of style rules so that the 
actions attached to feeds in feed trees look better.
Patch submitted by Anca Paula Luca



Modified: 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/ui/menu/FeedTreeWidget.java
===================================================================
--- 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/ui/menu/FeedTreeWidget.java
   2007-11-27 16:35:00 UTC (rev 6100)
+++ 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/ui/menu/FeedTreeWidget.java
   2007-11-27 17:49:26 UTC (rev 6101)
@@ -257,7 +257,7 @@
             if (selected) {
                 widget = new HyperlinkComposite(link);
                 //create the inner item
-                Hyperlink editHyperlink = new Hyperlink("edit", "");
+                Hyperlink editHyperlink = new 
Hyperlink(watch.getTranslation("feedtree.edit"), "");
                 editHyperlink.addClickListener(new ClickListener() {
                     public void onClick (Widget widget) {
                         FeedDialog feedDialog = new StandardFeedDialog(watch, 
"standardfeed", Dialog.BUTTON_CANCEL | Dialog.BUTTON_NEXT, feed);
@@ -283,8 +283,9 @@
                         feedDialog.show();                    
                     }
                 });
-                ((HyperlinkComposite)widget).add(new 
HyperlinkComposite(editHyperlink));
-                Hyperlink deleteHyperlink = new Hyperlink("delete", "");
+                HyperlinkComposite editHyperlinkComposite = new 
HyperlinkComposite(editHyperlink);
+                
+                Hyperlink deleteHyperlink = new 
Hyperlink(watch.getTranslation("feedtree.delete"), "");
                 deleteHyperlink.addClickListener(new ClickListener() {
                    public void onClick(Widget widget) {
                        String confirmString = 
watch.getTranslation("removefeed.confirm", 
@@ -306,7 +307,17 @@
                        }
                    } 
                 });
-                ((HyperlinkComposite)widget).add(new 
HyperlinkComposite(deleteHyperlink));
+                HyperlinkComposite deleteHyperlinkComposite = new 
HyperlinkComposite(deleteHyperlink);
+                //set styles
+                
editHyperlinkComposite.setStyleName(watch.getStyleName("feedtree", 
"feedaction") 
+                    + " " + watch.getStyleName("feedtree", "editfeed"));
+                
deleteHyperlinkComposite.setStyleName(watch.getStyleName("feedtree", 
"feedaction") 
+                    + " " + watch.getStyleName("feedtree", "deletefeed"));
+                
+                //add the two actions to the hyperlink composite, in reverse 
order since they will
+                //be floated to the right
+                ((HyperlinkComposite)widget).add(deleteHyperlinkComposite);
+                ((HyperlinkComposite)widget).add(editHyperlinkComposite);
             }
             return widget;
         }

Modified: 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/ui/menu/HyperlinkComposite.java
===================================================================
--- 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/ui/menu/HyperlinkComposite.java
       2007-11-27 16:35:00 UTC (rev 6100)
+++ 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/ui/menu/HyperlinkComposite.java
       2007-11-27 17:49:26 UTC (rev 6101)
@@ -2,7 +2,6 @@
 
 import com.google.gwt.user.client.ui.Composite;
 import com.google.gwt.user.client.ui.FlowPanel;
-import com.google.gwt.user.client.ui.HorizontalPanel;
 import com.google.gwt.user.client.ui.Hyperlink;
 import com.google.gwt.user.client.ui.Panel;
 
@@ -15,7 +14,7 @@
         this.mainWidget = mainWidget;
         this.hyperlinksPanel = new FlowPanel();
         
-        Panel compositePanel = new HorizontalPanel();
+        Panel compositePanel = new FlowPanel();
         compositePanel.add(this.mainWidget);
         compositePanel.add(this.hyperlinksPanel);
         //every composite has to call initWidget in their constructors

Modified: 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/public/Watch.css
===================================================================
--- 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/public/Watch.css
     2007-11-27 16:35:00 UTC (rev 6100)
+++ 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/public/Watch.css
     2007-11-27 17:49:26 UTC (rev 6101)
@@ -216,6 +216,20 @@
        white-space: normal;
 }
 
+.watch-feedtree-feedaction {
+       float: right;
+       padding-left: 0.5em;
+       padding-right: 0.5em;
+}
+
+div.watch-feedtree-editfeed {
+       background-color: #FFAA00;
+}
+
+div.watch-feedtree-deletefeed {
+       background-color: #FF0000;
+}
+
 #Watch div.watch-main div.watch-feedtree div.watch-feedtree-groups div span 
div table tbody tr td  {
        white-space: normal;
 }

Modified: 
xwiki-products/xwiki-watch/trunk/wiki/src/main/resources/WatchCode/Translations
===================================================================
--- 
xwiki-products/xwiki-watch/trunk/wiki/src/main/resources/WatchCode/Translations 
    2007-11-27 16:35:00 UTC (rev 6100)
+++ 
xwiki-products/xwiki-watch/trunk/wiki/src/main/resources/WatchCode/Translations 
    2007-11-27 17:49:26 UTC (rev 6101)
@@ -12,9 +12,9 @@
 <customClass></customClass>
 <contentAuthor>XWiki.Admin</contentAuthor>
 <creationDate>1181135859000</creationDate>
-<date>1194360951000</date>
-<contentUpdateDate>1194360951000</contentUpdateDate>
-<version>1.3</version>
+<date>1196182611000</date>
+<contentUpdateDate>1196182611000</contentUpdateDate>
+<version>1.2</version>
 <title></title>
 <template></template>
 <defaultTemplate></defaultTemplate>
@@ -71,6 +71,8 @@
 watch.spacecreated=Space created
 watch.title=Welcome to XWiki Watch
 watch.feedtree.title=Feeds
+watch.feedtree.edit=edit
+watch.feedtree.delete=delete
 
 watch.actionbar.title=Related actions:
 watch.actionbar.pressreview=Press Review

_______________________________________________
notifications mailing list
notifications@xwiki.org
http://lists.xwiki.org/mailman/listinfo/notifications

Reply via email to