r6971 - in dumbhippo/trunk/server/src/com/dumbhippo: persistence web/servlets
- From: commits mugshot org
- To: online-desktop-list gnome org
- Subject: r6971 - in dumbhippo/trunk/server/src/com/dumbhippo: persistence web/servlets
- Date: Wed, 5 Dec 2007 14:44:25 -0600 (CST)
Author: marinaz
Date: 2007-12-05 14:44:25 -0600 (Wed, 05 Dec 2007)
New Revision: 6971
Modified:
dumbhippo/trunk/server/src/com/dumbhippo/persistence/ExternalAccountType.java
dumbhippo/trunk/server/src/com/dumbhippo/web/servlets/FacebookServlet.java
Log:
Add "help me find it" links for some external accounts.
Modified: dumbhippo/trunk/server/src/com/dumbhippo/persistence/ExternalAccountType.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/persistence/ExternalAccountType.java 2007-12-05 18:57:06 UTC (rev 6970)
+++ dumbhippo/trunk/server/src/com/dumbhippo/persistence/ExternalAccountType.java 2007-12-05 20:44:25 UTC (rev 6971)
@@ -540,6 +540,11 @@
public ExternalAccountCategory getCategory() {
return ExternalAccountCategory.MUSIC;
}
+
+ @Override
+ public String getHelpUrl() {
+ return "http://www.rhapsody.com/myrhapsody/rss.html";
+ }
},
LASTFM("Last.fm") { // 10
@Override
@@ -909,6 +914,11 @@
public ExternalAccountCategory getCategory() {
return ExternalAccountCategory.CONSUMER;
}
+
+ @Override
+ public String getHelpUrl() {
+ return "http://www.netflix.com/RSSFeeds";
+ }
},
GOOGLE_READER("Google Reader") { // 16
@Override
@@ -985,6 +995,11 @@
public ExternalAccountCategory getCategory() {
return ExternalAccountCategory.LINK_SHARING;
}
+
+ @Override
+ public String getHelpUrl() {
+ return "http://www.google.com/reader/view";
+ }
},
PICASA("Picasa") { // 17
@Override
@@ -1135,6 +1150,11 @@
public ExternalAccountCategory getCategory() {
return ExternalAccountCategory.CONSUMER;
}
+
+ @Override
+ public String getHelpUrl() {
+ return "http://www.amazon.com/gp/pdp/profile/";
+ }
};
private static final Logger logger = GlobalSetup.getLogger(ExternalAccountType.class);
@@ -1290,4 +1310,8 @@
public ExternalAccountCategory getCategoryOuter() {
return getCategory();
}
+
+ public String getHelpUrl() {
+ return "";
+ }
}
Modified: dumbhippo/trunk/server/src/com/dumbhippo/web/servlets/FacebookServlet.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/web/servlets/FacebookServlet.java 2007-12-05 18:57:06 UTC (rev 6970)
+++ dumbhippo/trunk/server/src/com/dumbhippo/web/servlets/FacebookServlet.java 2007-12-05 20:44:25 UTC (rev 6971)
@@ -58,6 +58,7 @@
Map.Entry<String, String[]> mapEntry = (Map.Entry<String, String[]>)o;
logger.debug("{} = {}", mapEntry.getKey(), mapEntry.getValue()[0]);
}
+ logRequest(request, "POST");
@SuppressWarnings("unchecked")
Map<String, CharSequence> facebookParams = FacebookSignatureUtil.extractFacebookParamsFromArray(request.getParameterMap());
@@ -115,12 +116,12 @@
"http://dogfood.mugshot.org/person?who=" + user.getId(), "target", "_blank");
xml.append(".");
ExternalAccountCategory currentCategory = null;
- xml.openElement("fb:editor", "action", "http://apps.facebook.com/mugshot-test");
+ xml.openElement("fb:editor", "action", "", "width", "300", "labelwidth", "120");
for (ExternalAccountView externalAccount : getSupportedAccounts(user)) {
if (currentCategory == null || !currentCategory.equals(externalAccount.getExternalAccountType().getCategory())) {
currentCategory = externalAccount.getExternalAccountType().getCategory();
xml.openElement("fb:editor-custom");
- xml.appendTextNode("h3", currentCategory.getCategoryName(), "style", "margin-left:-85px;" );
+ xml.appendTextNode("h3", currentCategory.getCategoryName(), "style", "margin-left:-185px;" );
xml.closeElement();
}
xml.openElement("fb:editor-custom", "label", externalAccount.getSiteName());
@@ -137,7 +138,15 @@
xml.appendTextNode("a", externalAccount.getSiteName(),
"href", externalAccount.getExternalAccountType().getSiteLink(),
"target", "_blank");
- xml.append(" " + externalAccount.getSiteUserInfoType() + ".");
+ xml.append(" " + externalAccount.getSiteUserInfoType());
+ if (externalAccount.getExternalAccountType().getHelpUrl().trim().length() > 0) {
+ xml.append(" (");
+ xml.appendTextNode("a", "help me find it",
+ "href", externalAccount.getExternalAccountType().getHelpUrl().trim(),
+ "target", "_blank");
+ xml.append(")");
+ }
+ xml.append(".");
} else {
xml.append("Enter your " + externalAccount.getSiteUserInfoType() + " ");
xml.appendTextNode("a", externalAccount.getSiteName(),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]