Author: jvelociter
Date: 2007-11-13 12:22:24 +0100 (Tue, 13 Nov 2007)
New Revision: 5842
Modified:
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/Config.java
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/ui/menu/FeedTreeWidget.java
xwiki-products/xwiki-watch/trunk/wiki/src/main/resources/WatchCode/Translations
Log:
XWATCH-76 add a confirm box on feed deletion.
Patch submitted by Anca Paula Luca
Modified:
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/Config.java
===================================================================
---
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/Config.java
2007-11-13 11:00:49 UTC (rev 5841)
+++
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/Config.java
2007-11-13 11:22:24 UTC (rev 5842)
@@ -138,11 +138,12 @@
public void refreshArticleNumber() {
// Load the article counts
- watch.getDataManager().getArticleCount(new AsyncCallback() {
+ watch.getDataManager().getArticleCount(new XWikiAsyncCallback(watch) {
public void onFailure(Throwable throwable) {
// Silent error
}
public void onSuccess(Object result) {
+ super.onSuccess(result);
// Update the article list with the current results
updateArticleNumbers((List) result);
watch.getUserInterface().refreshData("feedtree");
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-13 11:00:49 UTC (rev 5841)
+++
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/ui/menu/FeedTreeWidget.java
2007-11-13 11:22:24 UTC (rev 5842)
@@ -287,16 +287,23 @@
Hyperlink deleteHyperlink = new Hyperlink("delete", "");
deleteHyperlink.addClickListener(new ClickListener() {
public void onClick(Widget widget) {
- watch.getDataManager().removeFeed(feed, new
XWikiAsyncCallback(watch) {
- public void onFailure(Throwable caught) {
- super.onFailure(caught);
- }
- public void onSuccess(Object result) {
- super.onSuccess(result);
- // We need to refreshData the tree
- watch.refreshOnNewFeed();
- }
- });
+ String confirmString =
watch.getTranslation("removefeed.confirm",
+ new
String[] {feed.getName()});
+ boolean confirm =
com.google.gwt.user.client.Window.confirm(confirmString);
+ if (confirm) {
+ watch.getDataManager().removeFeed(feed, new
XWikiAsyncCallback(watch) {
+ public void onFailure(Throwable caught) {
+ super.onFailure(caught);
+ }
+ public void onSuccess(Object result) {
+ super.onSuccess(result);
+ // We need to refreshData the tree
+ watch.refreshOnNewFeed();
+ }
+ });
+ } else {
+ //nothing
+ }
}
});
((HyperlinkComposite)widget).add(new
HyperlinkComposite(deleteHyperlink));
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-13 11:00:49 UTC (rev 5841)
+++
xwiki-products/xwiki-watch/trunk/wiki/src/main/resources/WatchCode/Translations
2007-11-13 11:22:24 UTC (rev 5842)
@@ -8,13 +8,13 @@
<translation>0</translation>
<parent></parent>
<creator>XWiki.LudovicDubost</creator>
-<author>XWiki.LudovicDubost</author>
+<author>XWiki.Admin</author>
<customClass></customClass>
-<contentAuthor>XWiki.LudovicDubost</contentAuthor>
+<contentAuthor>XWiki.Admin</contentAuthor>
<creationDate>1181135859000</creationDate>
-<date>1182283545000</date>
-<contentUpdateDate>1182283545000</contentUpdateDate>
-<version>1.55</version>
+<date>1194360951000</date>
+<contentUpdateDate>1194360951000</contentUpdateDate>
+<version>1.3</version>
<title></title>
<template></template>
<defaultTemplate></defaultTemplate>
@@ -31,18 +31,18 @@
<nameField></nameField>
<validationScript></validationScript>
<tags>
+<cache>0</cache>
+<displayType>input</displayType>
+<multiSelect>1</multiSelect>
<name>tags</name>
+<number>1</number>
<prettyName>Tags</prettyName>
-<unmodifiable>0</unmodifiable>
<relationalStorage>1</relationalStorage>
-<displayType>input</displayType>
-<multiSelect>1</multiSelect>
-<size>30</size>
<separator> </separator>
-<cache>0</cache>
<separators> ,|</separators>
+<size>30</size>
+<unmodifiable>0</unmodifiable>
<values></values>
-<number>1</number>
<classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
</tags>
</class>
@@ -135,6 +135,8 @@
watch.addfeed.button.feedster.description=Create and add a Feed from Feedster
watch.addfeed.button.wikio.description=Create and add a Feed from Wikio
+watch.removefeed.confirm=Are you sure you want to delete feed "{0}"?
+
watch.addgroup.invitation=Please add a group below
watch.addgroup.group=Group Name
watch.addgroup.caption=Add a Group
_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications