diff --git a/pom.xml b/pom.xml
index ae99ef29..2ef66a2f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -376,7 +376,7 @@
app
- display-property-grouping,duplicate-properties,adjoining-classes,compatible-vendor-prefixes,vendor-prefix
+ display-property-grouping,duplicate-properties,compatible-vendor-prefixes,vendor-prefix
diff --git a/src/main/java/com/commafeed/backend/model/UserSettings.java b/src/main/java/com/commafeed/backend/model/UserSettings.java
index 8ff52e86..da3c83b7 100644
--- a/src/main/java/com/commafeed/backend/model/UserSettings.java
+++ b/src/main/java/com/commafeed/backend/model/UserSettings.java
@@ -36,6 +36,8 @@ public class UserSettings extends AbstractModel {
private boolean showRead;
+ private boolean socialButtons;
+
@Lob
@Column(length = Integer.MAX_VALUE)
private String customCss;
@@ -80,4 +82,12 @@ public class UserSettings extends AbstractModel {
this.showRead = showRead;
}
+ public boolean isSocialButtons() {
+ return socialButtons;
+ }
+
+ public void setSocialButtons(boolean socialButtons) {
+ this.socialButtons = socialButtons;
+ }
+
}
diff --git a/src/main/java/com/commafeed/frontend/model/Settings.java b/src/main/java/com/commafeed/frontend/model/Settings.java
index bcd1d736..228a1888 100644
--- a/src/main/java/com/commafeed/frontend/model/Settings.java
+++ b/src/main/java/com/commafeed/frontend/model/Settings.java
@@ -24,6 +24,9 @@ public class Settings implements Serializable {
@ApiProperty(value = "user wants category and feeds with no unread entries shown", required = true)
private boolean showRead;
+ @ApiProperty(value = "user wants social buttons (facebook, twitter, ...) shown", required = true)
+ private boolean socialButtons;
+
@ApiProperty(value = "user's custom css for the website")
private String customCss;
@@ -59,4 +62,12 @@ public class Settings implements Serializable {
this.showRead = showRead;
}
+ public boolean isSocialButtons() {
+ return socialButtons;
+ }
+
+ public void setSocialButtons(boolean socialButtons) {
+ this.socialButtons = socialButtons;
+ }
+
}
diff --git a/src/main/java/com/commafeed/frontend/rest/resources/UserREST.java b/src/main/java/com/commafeed/frontend/rest/resources/UserREST.java
index f0edd694..bec640ae 100644
--- a/src/main/java/com/commafeed/frontend/rest/resources/UserREST.java
+++ b/src/main/java/com/commafeed/frontend/rest/resources/UserREST.java
@@ -37,11 +37,13 @@ public class UserREST extends AbstractResourceREST {
s.setReadingMode(settings.getReadingMode().name());
s.setReadingOrder(settings.getReadingOrder().name());
s.setShowRead(settings.isShowRead());
+ s.setSocialButtons(settings.isSocialButtons());
s.setCustomCss(settings.getCustomCss());
} else {
s.setReadingMode(ReadingMode.unread.name());
s.setReadingOrder(ReadingOrder.desc.name());
s.setShowRead(true);
+ s.setSocialButtons(true);
}
return s;
}
diff --git a/src/main/webapp/css/app.css b/src/main/webapp/css/app.css
index d0baee54..4b97ae3d 100644
--- a/src/main/webapp/css/app.css
+++ b/src/main/webapp/css/app.css
@@ -237,6 +237,19 @@
border-top: 1px solid #ebebeb;
}
+#feed-accordion .entry-buttons .checkbox.inline {
+ padding-top: 0px;
+}
+
+#feed-accordion .share-buttons a {
+ color: #333333;
+ padding-left: 5px;
+}
+
+#feed-accordion .share-buttons a:hover {
+ text-decoration: none;
+}
+
#feed-accordion .entry-buttons label {
margin-bottom: 0px;
font-size: 12px;
diff --git a/src/main/webapp/js/directives.js b/src/main/webapp/js/directives.js
index 6cd269b3..66f14c0b 100644
--- a/src/main/webapp/js/directives.js
+++ b/src/main/webapp/js/directives.js
@@ -1,5 +1,16 @@
var module = angular.module('commafeed.directives', []);
+module.directive('popup', function() {
+ return {
+ link : function(scope, elm, attrs) {
+ elm.bind('click', function(event) {
+ window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');
+ event.preventDefault();
+ });
+ }
+ };
+});
+
module.directive('favicon', function() {
return {
restrict : 'E',
diff --git a/src/main/webapp/js/filters.js b/src/main/webapp/js/filters.js
index 9abfe2d4..bc2c4597 100644
--- a/src/main/webapp/js/filters.js
+++ b/src/main/webapp/js/filters.js
@@ -7,9 +7,13 @@ module.filter('entryDate', function() {
var formatted;
if (d.date() === now.date() && Math.abs(d.diff(now)) < 86400000) {
formatted = d.fromNow();
- } else {
- formatted = d.format('YYYY-MM-DD HH:mm');
- }
- return formatted;
+ } else {
+ formatted = d.format('YYYY-MM-DD HH:mm');
+ }
+ return formatted;
};
+});
+
+module.filter('escape', function() {
+ return encodeURIComponent;
});
\ No newline at end of file
diff --git a/src/main/webapp/templates/feeds.view.html b/src/main/webapp/templates/feeds.view.html
index c145b495..510e16ad 100644
--- a/src/main/webapp/templates/feeds.view.html
+++ b/src/main/webapp/templates/feeds.view.html
@@ -34,10 +34,25 @@
diff --git a/src/main/webapp/templates/settings.html b/src/main/webapp/templates/settings.html
index 4e257850..012b3f08 100644
--- a/src/main/webapp/templates/settings.html
+++ b/src/main/webapp/templates/settings.html
@@ -26,6 +26,13 @@
Show feeds and categories with no unread entries
+
+
+
+ Show social sharing buttons
+
+