Author: lucaa
Date: 2008-02-01 12:09:04 +0100 (Fri, 01 Feb 2008)
New Revision: 7256

Added:
   
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/ui/menu/DatePickerWidget.java
Modified:
   
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/Constants.java
   
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/FilterStatus.java
   
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/Watch.java
   
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/data/DataManager.java
   
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/ui/menu/FilterBarWidget.java
   
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/public/Watch.css
   xwiki-products/xwiki-watch/trunk/wiki/pom.xml
   
xwiki-products/xwiki-watch/trunk/wiki/src/main/resources/WatchCode/PressReview
   xwiki-products/xwiki-watch/trunk/wiki/src/main/resources/WatchCode/TagCloud
   
xwiki-products/xwiki-watch/trunk/wiki/src/main/resources/WatchCode/Translations
   
xwiki-products/xwiki-watch/trunk/wiki/src/main/resources/WatchCode/Translations.fr
Log:
XWATCH-74: added date filtering and calendar widgets for selecting the dates.


Modified: 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/Constants.java
===================================================================
--- 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/Constants.java
        2008-02-01 10:39:27 UTC (rev 7255)
+++ 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/Constants.java
        2008-02-01 11:09:04 UTC (rev 7256)
@@ -84,4 +84,6 @@
     public static final String PROPERTY_KEYWORD_GROUP = "group";
     public static final String CLASS_AGGREGATOR_GROUP = 
"XWiki.AggregatorGroupClass";
     public static final String PROPERTY_GROUP_NAME = "name";
+    
+    public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm";
 }

Modified: 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/FilterStatus.java
===================================================================
--- 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/FilterStatus.java
     2008-02-01 10:39:27 UTC (rev 7255)
+++ 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/FilterStatus.java
     2008-02-01 11:09:04 UTC (rev 7256)
@@ -1,10 +1,13 @@
 package com.xpn.xwiki.watch.client;
 
+import java.util.Date;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Map;
 import java.util.HashMap;
 
+import org.gwtwidgets.client.util.SimpleDateFormat;
+
 import com.google.gwt.http.client.URL;
 
 public class FilterStatus {
@@ -14,9 +17,10 @@
     private int read;
     private List tags = new ArrayList();
     private String keyword;
-    private String date;
     private Feed feed;
     private String group;
+    private Date dateStart;
+    private Date dateEnd;
     private int start;
     private int total;
     private String query;
@@ -36,9 +40,10 @@
         read = 0;
         tags = new ArrayList();
         keyword = null;
-        date = null;
         feed = null;
         group = null;
+        dateStart = null;
+        dateEnd = null;
         start = 0;
     }
 
@@ -98,12 +103,20 @@
                 status += " - ";
             status += watch.getTranslation("readoff");
         }
-        if (date!=null) {
-            if (!status.equals(""))
+        if (dateStart != null) {
+            if (!status.equals("")) {
                 status += " - ";
-            status += watch.getTranslation("limitfrom");
-            status += date;
+            }
+            status += watch.getTranslation("filter.dates.startDate");
+            status += dateStart; 
         }
+        if (dateEnd != null) {
+            if (!status.equals("")) {
+                status += " - ";
+            }
+            status += watch.getTranslation("filter.dates.endDate");
+            status += dateEnd; 
+        }
         return status;
     }
 
@@ -163,14 +176,6 @@
         this.keyword = keyword;
     }
 
-    public String getDate() {
-        return date;
-    }
-
-    public void setDate(String date) {
-        this.date = date;
-    }
-
     public Feed getFeed() {
         return feed;
     }
@@ -208,8 +213,17 @@
             map.put("tags", getTags());
         if (getKeyword() !=null)
             map.put("keyword",getKeyword());
-        if (getDate() !=null)
-            map.put("date",getDate());
+        if (getDateStart() != null) {
+            //format date first
+            SimpleDateFormat format = new 
SimpleDateFormat(Constants.DEFAULT_DATE_FORMAT);
+            String fDate = format.format(getDateStart());
+            map.put("dateStart", fDate);
+        }
+        if (getDateEnd() != null) {
+            SimpleDateFormat format = new 
SimpleDateFormat(Constants.DEFAULT_DATE_FORMAT);
+            String fDate = format.format(getDateEnd());
+            map.put("dateEnd", fDate);
+        }
         return map;
     }
 
@@ -230,9 +244,38 @@
         }
         if (getKeyword() !=null)
             qs.append("&keyword=" + getKeyword());
-        if (getDate() !=null)
-            qs.append("&date=" + getDate());
+        if (getDateStart() != null) {
+            //format the date first
+            SimpleDateFormat format = new 
SimpleDateFormat(Constants.DEFAULT_DATE_FORMAT);
+            String fDate = format.format(getDateStart());
+            qs.append("&dateStart=" + URL.encodeComponent(fDate));
+        }
+        if (getDateEnd() != null) {
+            SimpleDateFormat format = new 
SimpleDateFormat(Constants.DEFAULT_DATE_FORMAT);
+            String fDate = format.format(getDateEnd());
+            qs.append("&dateEnd=" + URL.encodeComponent(fDate));
+        }
         return qs.toString();
     }
 
+    public Date getDateEnd()
+    {
+        return dateEnd;
+    }
+
+    public void setDateEnd(Date dateEnd)
+    {
+        this.dateEnd = dateEnd;
+    }
+
+    public Date getDateStart()
+    {
+        return dateStart;
+    }
+
+    public void setDateStart(Date dateStart)
+    {
+        this.dateStart = dateStart;
+    }
+
 }

Modified: 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/Watch.java
===================================================================
--- 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/Watch.java
    2008-02-01 10:39:27 UTC (rev 7255)
+++ 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/Watch.java
    2008-02-01 11:09:04 UTC (rev 7256)
@@ -18,8 +18,6 @@
 
 import java.util.Date;
 import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -409,6 +407,8 @@
         fstatus.setStart(0);
         fstatus.setTags(new ArrayList());
         fstatus.setTrashed(-1);
+        fstatus.setDateStart(null);
+        fstatus.setDateEnd(null);
         refreshArticleList();
         userInterface.resetSelections();        
     }
@@ -591,6 +591,20 @@
         refreshArticleList();
     }
 
+    public void refreshOnDateStartChange(Date newDate) {
+        FilterStatus fstatus = getFilterStatus();
+        fstatus.setDateStart(newDate);
+        fstatus.setStart(0);
+        refreshArticleList();
+    }
+
+    public void refreshOnDateEndChange(Date newDate) {
+        FilterStatus fstatus = getFilterStatus();
+        fstatus.setDateEnd(newDate);
+        fstatus.setStart(0);
+        refreshArticleList();
+    }
+
     public String[] getPressReviewPages() {
         return getParam("pressreviewpages",Constants.DEFAULT_CODE_SPACE + "." 
+ Constants.PAGE_PRESSREVIEW).split(",");
     }

Modified: 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/data/DataManager.java
===================================================================
--- 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/data/DataManager.java
 2008-02-01 10:39:27 UTC (rev 7255)
+++ 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/data/DataManager.java
 2008-02-01 11:09:04 UTC (rev 7256)
@@ -360,18 +360,27 @@
                 + "and obj.id = groupProp.id and groupProp.name='" + 
filterStatus.getGroup().replaceAll("'", "''") + "')";            
         }
 
-        if (filterStatus.getDate() !=null) {
-            wheresql += " and feedentry.date >= '" + filterStatus.getDate() + 
"' ";
+        if (filterStatus.getDateStart() !=null) {
+            //format date
+            SimpleDateFormat format = new 
SimpleDateFormat(Constants.DEFAULT_DATE_FORMAT);
+            String sdate = format.format(filterStatus.getDateStart());
+            wheresql += " and feedentry.date >= '" + sdate + "' ";
         } else {
             if ("1".equals(watch.getParam("withdatelimit"))) {
                 Date date = new Date();
                 date = new Date(date.getTime() - 3 * 24 * 60 * 60 * 1000);
-                SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd 
HH:mm");
+                SimpleDateFormat format = new 
SimpleDateFormat(Constants.DEFAULT_DATE_FORMAT);
                 String sdate = format.format(date);
                 wheresql += " and feedentry.date >= '" + sdate + "' ";
             }
         }
 
+        if (filterStatus.getDateEnd() != null) {
+            SimpleDateFormat format = new 
SimpleDateFormat(Constants.DEFAULT_DATE_FORMAT);
+            String sdate = format.format(filterStatus.getDateEnd());
+            wheresql += " and feedentry.date < '" + sdate + "'";
+        }
+
         if (filterStatus.getRead() ==1) {
             wheresql += " and feedentry.read=1";
         } else if (filterStatus.getRead() ==-1) {

Added: 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/ui/menu/DatePickerWidget.java
===================================================================
--- 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/ui/menu/DatePickerWidget.java
                         (rev 0)
+++ 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/ui/menu/DatePickerWidget.java
 2008-02-01 11:09:04 UTC (rev 7256)
@@ -0,0 +1,224 @@
+package com.xpn.xwiki.watch.client.ui.menu;
+
+import org.gwtwidgets.client.ui.cal.CalendarDate;
+import org.gwtwidgets.client.ui.cal.CalendarListener;
+import org.gwtwidgets.client.ui.cal.CalendarMonth;
+import org.gwtwidgets.client.ui.cal.CalendarPanel;
+import org.gwtwidgets.client.util.SimpleDateFormat;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.Label;
+import com.xpn.xwiki.watch.client.Watch;
+import com.xpn.xwiki.watch.client.ui.WatchWidget;
+
+/**
+ * Date picker widget, used for selecting a date from a calendar.
+ * <br />
+ * To execute a specific action when a date is selected using this picker, add 
your own 
+ * [EMAIL PROTECTED] CalendarListener} using [EMAIL PROTECTED] 
DatePickerWidget#addCalendarListener(CalendarListener)} and 
+ * implement the [EMAIL PROTECTED] CalendarListener#onDateClick(CalendarDate)} 
handler. 
+ *  
+ */
+public class DatePickerWidget extends WatchWidget implements CalendarListener
+{
+    protected CalendarPanel calendarPanel = new CalendarPanel();
+    protected Label dateLabel = new Label();
+    protected String dateFormat = "dd/MM/yyyy";
+    protected String panelTitle = "";
+    protected Label monthLabel = new Label();
+    protected Label yearLabel = new Label();
+    
+    public DatePickerWidget()
+    {
+        super();
+    }
+    
+    public DatePickerWidget(Watch app, String title) {
+        super(app);
+        this.panelTitle = title;
+        setPanel(new FlowPanel());
+        this.init();
+        initWidget(panel);
+    }
+    
+    public DatePickerWidget(Watch app) {
+        this(app, "");
+    }
+    
+    /**
+     * [EMAIL PROTECTED]
+     * @see WatchWidget#init()
+     */
+    public void init()
+    {
+        super.init();
+        //some nice localisation for the calendar panel
+        String monthsLocalisations = 
watch.getTranslation("filter.dates.months");
+        //split by commas
+        String[] monthsNames = monthsLocalisations.split(",");
+        if (monthsNames.length == 12) {
+            //use these new ones
+            String[] monthsNamesTrimmed = new String[12];
+            for (int i = 0; i < monthsNames.length; i++) {
+                monthsNamesTrimmed[i] = monthsNames[i].trim();
+            }
+            this.calendarPanel.setMonthNames(monthsNamesTrimmed);
+        }
+        String daysLocalisations = watch.getTranslation("filter.dates.days");
+        String[] daysNames = daysLocalisations.split(",");
+        if (daysNames.length == 7) {
+            //use these new ones
+            String[] daysNamesTrimmed = new String[7];
+            for (int i = 0; i < daysNames.length; i++) {
+                daysNamesTrimmed[i] = daysNames[i].trim();
+            }
+            this.calendarPanel.setWeekDayNames(daysNamesTrimmed);
+        }
+        //set first day of the week
+        String firstDayOfWeek = 
watch.getTranslation("filter.dates.firstDayOfWeek");
+        //cast the value to the int
+        int offset = 0;
+        try {
+            offset = Integer.parseInt(firstDayOfWeek.trim());
+        } catch (NumberFormatException e) {
+            //no problem, will use the default 0
+        }
+        if (offset >= 0 && offset < 7) {
+            this.calendarPanel.setFirstDayOffset(offset);
+        }        
+        FlowPanel p = new FlowPanel();
+        Label startLabel = new Label(this.panelTitle);
+        startLabel.addStyleName(watch.getStyleName("filter", 
"date-title-label"));
+        p.add(startLabel);
+        this.dateLabel.addStyleName(watch.getStyleName("filter", 
"date-label"));
+        p.add(this.dateLabel);
+        panel.add(p);
+        Button nextMButton = new Button(">");
+        nextMButton.setTitle(watch.getTranslation("filter.dates.months.next"));
+        nextMButton.addStyleName(watch.getStyleName("filter", 
"date-month-button"));
+        Button prevMButton = new Button("<");
+        
prevMButton.setTitle(watch.getTranslation("filter.dates.months.previous"));
+        prevMButton.addStyleName(watch.getStyleName("filter", 
"date-month-button"));
+        panel.add(prevMButton);
+        monthLabel.setText(this.calendarPanel.getCurrentMonthName());
+        monthLabel.addStyleName(watch.getStyleName("filter", 
"date-month-label"));
+        panel.add(monthLabel);
+        panel.add(nextMButton);
+        Button nextYButton = new Button(">");
+        nextYButton.setTitle(watch.getTranslation("filter.dates.years.next"));
+        nextYButton.addStyleName(watch.getStyleName("filter", 
"date-year-button"));
+        Button prevYButton = new Button("<");
+        
prevYButton.setTitle(watch.getTranslation("filter.dates.years.previous"));      
  
+        prevYButton.addStyleName(watch.getStyleName("filter", 
"date-year-button"));
+        panel.add(prevYButton); 
+        yearLabel.setText(this.calendarPanel.getCurrentYear());
+        yearLabel.addStyleName(watch.getStyleName("filter", 
"date-year-label"));
+        panel.add(yearLabel);
+        panel.add(nextYButton);
+
+        this.calendarPanel.addPrevMonthActivator(prevMButton);
+        this.calendarPanel.addNextMonthActivator(nextMButton);
+        this.calendarPanel.addPrevYearActivator(prevYButton);
+        this.calendarPanel.addNextYearActivator(nextYButton);
+        this.calendarPanel.addCalendarListener(this);
+        //some calendar styling
+        this.calendarPanel.setBorderWidth(0);
+        this.calendarPanel.setCellPadding(2);
+        panel.add(calendarPanel);
+        this.calendarPanel.redraw();
+    }
+    
+    /**
+     * Adds a calendar listener to the embedded calendar widget. Use this to 
attach whatever
+     * functionality is needed when the calendar data changes. 
+     * 
+     * @param listener
+     */
+    public void addCalendarListener(CalendarListener listener) {
+        this.calendarPanel.addCalendarListener(listener);
+    }
+    
+    /**
+     * [EMAIL PROTECTED]
+     * @see WatchWidget#getName()
+     */
+    public String getName()
+    {
+        return "datepicker";
+    }
+   
+    /**
+     * [EMAIL PROTECTED]
+     * @see WatchWidget#resetSelections(String)
+     */
+    public void resetSelections()
+    {
+        //set the label to none
+        this.dateLabel.setText("");
+        //should also set calendar selection to none
+    }
+    
+    /**
+     * Gets the date format used for date label formatting.
+     * 
+     * @return                          date format
+     */
+    public String getDateFormat()
+    {
+        return dateFormat;
+    }
+
+    /**
+     * Sets the date format for the date label, as specified by [EMAIL 
PROTECTED] SimpleDateFormat}
+     * @see SimpleDateFormat
+     * 
+     * @param dateFormat                    the new date format
+     */
+    public void setDateFormat(String dateFormat)
+    {
+        this.dateFormat = dateFormat;
+    }
+    
+    /**
+     * Listener for the embedded [EMAIL PROTECTED] CalendarPanel} for changing 
the date label.
+     */
+    public void onDateClick(CalendarDate date)
+    {
+        //set the date label to the selected date
+        SimpleDateFormat format = new SimpleDateFormat(this.dateFormat);
+        String fDate = format.format(date.getDate());
+        this.dateLabel.setText(fDate);
+    }
+
+    /**
+     * [EMAIL PROTECTED]
+     * @see CalendarListener#onEventDateClick(CalendarDate)
+     */
+    public boolean onEventDateClick(CalendarDate date)
+    {
+        return false;
+    }
+
+    /**
+     * Listener for the embedded [EMAIL PROTECTED] CalendarPanel} for changing 
the month label and year label.
+     */
+    public void onMonthChange(CalendarMonth month)
+    {
+        //update the month label and the year label, if needed
+        this.monthLabel.setText(this.calendarPanel.getCurrentMonthName());
+        if 
(!this.calendarPanel.getCurrentYear().trim().equals(this.yearLabel.getText().trim()))
 {
+            //update
+            this.yearLabel.setText(this.calendarPanel.getCurrentYear());
+        }
+    }
+
+    public String getPanelTitle()
+    {
+        return panelTitle;
+    }
+
+    public void setPanelTitle(String panelTitle)
+    {
+        this.panelTitle = panelTitle;
+    }    
+}

Modified: 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/ui/menu/FilterBarWidget.java
===================================================================
--- 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/ui/menu/FilterBarWidget.java
  2008-02-01 10:39:27 UTC (rev 7255)
+++ 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/ui/menu/FilterBarWidget.java
  2008-02-01 11:09:04 UTC (rev 7256)
@@ -1,5 +1,6 @@
 package com.xpn.xwiki.watch.client.ui.menu;
 
+import org.gwtwidgets.client.ui.cal.CalendarDate;
 import com.xpn.xwiki.watch.client.Watch;
 import com.xpn.xwiki.watch.client.ui.WatchWidget;
 import com.google.gwt.user.client.ui.*;
@@ -49,6 +50,7 @@
         panel.add(getFilterPanel());
         panel.add(getKeywordsPanel());
         panel.add(getTagCloudPanel());
+        panel.add(getDatesPanel());
     }
 
     public void refreshData() {
@@ -61,6 +63,7 @@
         panel.add(getFilterPanel());
         panel.add(getKeywordsPanel());
         panel.add(getTagCloudPanel());
+        panel.add(getDatesPanel());
     }
 
     private Widget getTagCloudPanel() {
@@ -163,6 +166,39 @@
         p.add(titleHTML);
         return p;
     }
+    
+    private Widget getDatesPanel() {
+        FlowPanel p = new FlowPanel();
+        FlowPanel titlePanel = new FlowPanel();
+        titlePanel.setStyleName(watch.getStyleName("filter", "dates-title"));
+        HTML titleHTML = new HTML(watch.getTranslation("filter.dates.title"));
+        titleHTML.setStyleName(watch.getStyleName("filter", 
"title-dates-text"));
+        titlePanel.add(titleHTML);
+        p.add(titlePanel);
+        String startLabel = watch.getTranslation("filter.dates.startDate");
+        DatePickerWidget startDateWidget = new DatePickerWidget(watch, 
startLabel) {
+            public void onDateClick(CalendarDate date) {
+                super.onDateClick(date);
+                watch.refreshOnDateStartChange(date.getDate());
+            }
+            public String getName() {
+                return "datestartwidget";
+            }
+        };
+        String endLabel = watch.getTranslation("filter.dates.endDate");
+        DatePickerWidget endDateWidget = new DatePickerWidget(watch, endLabel) 
{
+            public void onDateClick(CalendarDate date) {
+                super.onDateClick(date);
+                watch.refreshOnDateEndChange(date.getDate());
+            }
+            public String getName() {
+                return "dateendwidget";
+            }
+        };
+        p.add(startDateWidget);
+        p.add(endDateWidget);
+        return p;
+    }
 
     public void resizeWindow() {
         // Watch.setMaxHeight(panel);

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
     2008-02-01 10:39:27 UTC (rev 7255)
+++ 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/public/Watch.css
     2008-02-01 11:09:04 UTC (rev 7256)
@@ -457,7 +457,7 @@
        padding: 1.5em 0;
 }
 
-div.watch-filter-seeonly-title, div.watch-filter-keywords-title, 
div.watch-filter-tagcloud-title {
+div.watch-filter-seeonly-title, div.watch-filter-keywords-title, 
div.watch-filter-tagcloud-title, div.watch-filter-dates-title {
        padding: 3px 0 0 10px;
        font-weight: bold;
        border-bottom: 1px solid #000;
@@ -809,5 +809,21 @@
 color: orange;
        text-decoration: underline;
 }
+/*
+filter styles
+*/
+button.watch-filter-date-month-button, button.watch-filter-date-year-button {
+       padding: 0px;
+}
 
+button.watch-filter-date-month-button:hover, 
button.watch-filter-date-year-button:hover {
+       padding: 0px;
+}
 
+div.watch-filter-date-year-label, div.watch-filter-date-month-label, 
div.watch-filter-date-title-label, div.watch-filter-date-label {
+       display: inline;
+}
+
+table.calendar-panel, button.watch-filter-date-month-button, 
button.watch-filter-date-year-button {
+       background-color: #E0B0FF; /* mauve, baby! */
+}

Modified: xwiki-products/xwiki-watch/trunk/wiki/pom.xml
===================================================================
--- xwiki-products/xwiki-watch/trunk/wiki/pom.xml       2008-02-01 10:39:27 UTC 
(rev 7255)
+++ xwiki-products/xwiki-watch/trunk/wiki/pom.xml       2008-02-01 11:09:04 UTC 
(rev 7256)
@@ -42,6 +42,7 @@
     </dependency>
   </dependencies>
   <build>
+  <!--
     <resources>
       <resource>
         <directory>${basedir}/src/main/resources</directory>
@@ -50,5 +51,6 @@
         </excludes>
       </resource>
     </resources>
+  -->
   </build>
 </project>

Modified: 
xwiki-products/xwiki-watch/trunk/wiki/src/main/resources/WatchCode/PressReview
===================================================================
--- 
xwiki-products/xwiki-watch/trunk/wiki/src/main/resources/WatchCode/PressReview  
    2008-02-01 10:39:27 UTC (rev 7255)
+++ 
xwiki-products/xwiki-watch/trunk/wiki/src/main/resources/WatchCode/PressReview  
    2008-02-01 11:09:04 UTC (rev 7256)
@@ -73,9 +73,15 @@
    wheresql += " and (feedentry.read is null or feedentry.read=0)";
 }
 
-if (request.date!=null) {
-  wheresql += " and feedentry.date &gt;= '" + request.date + "' ";
-}
+
+if (request.dateStart) {
+  wheresql += " and feedentry.date &gt;= '" + request.dateStart + "' ";
+}
+
+if (request.dateEnd) {
+  wheresql += " and feedentry.date &lt; '" + request.dateEnd + "' ";
+}
+
 
 println "{pre}"
 

Modified: 
xwiki-products/xwiki-watch/trunk/wiki/src/main/resources/WatchCode/TagCloud
===================================================================
--- xwiki-products/xwiki-watch/trunk/wiki/src/main/resources/WatchCode/TagCloud 
2008-02-01 10:39:27 UTC (rev 7255)
+++ xwiki-products/xwiki-watch/trunk/wiki/src/main/resources/WatchCode/TagCloud 
2008-02-01 11:09:04 UTC (rev 7256)
@@ -106,9 +106,14 @@
    wheresql += " and (feedentry.read is null or feedentry.read=0)";
 }
 
-if (request.date!=null) {
-  wheresql += " and feedentry.date &gt;= '" + request.date + "' ";
-}
+
+if (request.dateStart) {
+  wheresql += " and feedentry.date &gt;= '" + request.dateStart + "' ";
+}
+
+if (request.dateEnd) {
+  wheresql += " and feedentry.date &lt; '" + request.dateEnd + "' ";
+}
 
 sql += wheresql + " and doc.web='" + request.space + "' order by 
feedentry.date desc, doc.creationDate desc";
 

Modified: 
xwiki-products/xwiki-watch/trunk/wiki/src/main/resources/WatchCode/Translations
===================================================================
--- 
xwiki-products/xwiki-watch/trunk/wiki/src/main/resources/WatchCode/Translations 
    2008-02-01 10:39:27 UTC (rev 7255)
+++ 
xwiki-products/xwiki-watch/trunk/wiki/src/main/resources/WatchCode/Translations 
    2008-02-01 11:09:04 UTC (rev 7256)
@@ -324,5 +324,18 @@
 watch.wiki.group.noGroup=This document does not contain a group
 
 watch.wiki.reader=XWiki Watch Reader
-watch.wiki.reader.goto=Go to the {0}</content>
+watch.wiki.reader.goto=Go to the {0}
+
+watch.filter.dates.title = Date filters
+watch.filter.dates.startDate = From date: 
+watch.filter.dates.endDate = To date: 
+watch.filter.dates.months.next = Next month
+watch.filter.dates.months.previous = Previous month
+watch.filter.dates.years.next = Next year
+watch.filter.dates.years.previous = Previous year
+watch.filter.dates.months = January, February, March, April, May, June, July, 
August, September, October, November, December
+watch.filter.dates.days = S, M, T, W, T, F, S
+watch.filter.dates.firstDayOfWeek = 0
+
+</content>
 </xwikidoc>

Modified: 
xwiki-products/xwiki-watch/trunk/wiki/src/main/resources/WatchCode/Translations.fr
===================================================================
--- 
xwiki-products/xwiki-watch/trunk/wiki/src/main/resources/WatchCode/Translations.fr
  2008-02-01 10:39:27 UTC (rev 7255)
+++ 
xwiki-products/xwiki-watch/trunk/wiki/src/main/resources/WatchCode/Translations.fr
  2008-02-01 11:09:04 UTC (rev 7256)
@@ -323,5 +323,18 @@
 watch.wiki.group.noGroup=Ce document ne contient pas de group
 
 watch.wiki.reader=Lecteur de flux
-watch.wiki.reader.goto=Acc�der au {0}</content>
+watch.wiki.reader.goto=Acc�der au {0}
+
+watch.filter.dates.title = Filtrer sur les dates
+watch.filter.dates.startDate = Date de d�but:
+watch.filter.dates.endDate = Date de fin: 
+watch.filter.dates.months.next = Mois suivant
+watch.filter.dates.months.previous = Mois pr�c�dent 
+watch.filter.dates.years.next = Ann�e suivante
+watch.filter.dates.years.previous = Ann�e pr�c�dent
+watch.filter.dates.months = Janvier, F�vrier, Mars, Avril, Mai, Juin, Juillet, 
A�ut, Septembre, Octobre, Novembre, Decembre
+watch.filter.dates.days = D, L, M, M, J, V, S
+watch.filter.dates.firstDayOfWeek = 1
+
+</content>
 </xwikidoc>

_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications

Reply via email to