Skip to content

Commit

Permalink
remove twitter button
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcom committed Oct 17, 2019
1 parent 77150d6 commit 4b9c308
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 31 deletions.
1 change: 0 additions & 1 deletion src/main/java/ru/org/linux/site/DefaultProfile.java
Expand Up @@ -74,7 +74,6 @@ private static ImmutableMap<String, Object> createDefaultProfile() {
builder.put(AVATAR_PROPERTY, "empty");
builder.put(HIDE_ADSENSE_PROPERTY, true);
builder.put(MAIN_GALLERY_PROPERTY, false);
builder.put(SHOW_SOCIAL_PROPERTY, true);
builder.put(TRACKER_MODE, DEFAULT_TRACKER_MODE.getValue());
builder.put(OLD_TRACKER, false);

Expand Down
14 changes: 1 addition & 13 deletions src/main/java/ru/org/linux/user/Profile.java
@@ -1,5 +1,5 @@
/*
* Copyright 1998-2018 Linux.org.ru
* Copyright 1998-2019 Linux.org.ru
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand Down Expand Up @@ -39,7 +39,6 @@ public class Profile {
public static final String AVATAR_PROPERTY = "avatar";
public static final String SHOW_ANONYMOUS_PROPERTY = "showanonymous";
public static final String BOXES_MAIN2_PROPERTY = "main2";
public static final String SHOW_SOCIAL_PROPERTY = "showSocial";
public static final String TRACKER_MODE = "trackerMode";
public static final String OLD_TRACKER = "oldTracker";

Expand All @@ -53,7 +52,6 @@ public class Profile {
private boolean showGalleryOnMain;
private String avatarMode;
private boolean showAnonymous;
private boolean showSocial;
private boolean oldTracker;
private TrackerFilterEnum trackerMode;

Expand All @@ -70,7 +68,6 @@ public Profile(ProfileHashtable p, List<String> boxes) {
showGalleryOnMain = p.getBoolean(MAIN_GALLERY_PROPERTY);
avatarMode = p.getString(AVATAR_PROPERTY);
showAnonymous = p.getBoolean(SHOW_ANONYMOUS_PROPERTY);
showSocial = p.getBoolean(SHOW_SOCIAL_PROPERTY);
trackerMode = TrackerFilterEnum.getByValue(p.getString(TRACKER_MODE)).or(DefaultProfile.DEFAULT_TRACKER_MODE);
oldTracker = p.getBoolean(OLD_TRACKER);

Expand All @@ -90,7 +87,6 @@ public Map<String, String> getSettings() {
p.setBoolean(MAIN_GALLERY_PROPERTY, showGalleryOnMain);
p.setString(AVATAR_PROPERTY, avatarMode);
p.setBoolean(SHOW_ANONYMOUS_PROPERTY, showAnonymous);
p.setBoolean(SHOW_SOCIAL_PROPERTY, showSocial);
p.setString(TRACKER_MODE, trackerMode.getValue());
p.setBoolean(OLD_TRACKER, oldTracker);

Expand Down Expand Up @@ -233,14 +229,6 @@ public void setBoxlets(List<String> list) {
boxes = new ArrayList<>(list);
}

public boolean isShowSocial() {
return showSocial;
}

public void setShowSocial(boolean showSocial) {
this.showSocial = showSocial;
}

public static Profile createDefault() {
return new Profile(new ProfileHashtable(DefaultProfile.getDefaultProfile(), new HashMap<>()), null);
}
Expand Down
Expand Up @@ -104,7 +104,6 @@ class EditProfileController(
tmpl.getProf.setFormatMode(formatMode)
tmpl.getProf.setStyle(request.getParameter("style"))
userDao.setStyle(tmpl.getCurrentUser, request.getParameter("style"))
tmpl.getProf.setShowSocial("on" == request.getParameter("showSocial"))
tmpl.getProf.setOldTracker("on" == request.getParameter("oldTracker"))
tmpl.getProf.setTrackerMode(TrackerFilterEnum.getByValue(request.getParameter("trackerMode")).or(DefaultProfile.DEFAULT_TRACKER_MODE))

Expand Down
11 changes: 0 additions & 11 deletions src/main/webapp/WEB-INF/tags/message.tag
Expand Up @@ -29,9 +29,6 @@
~ limitations under the License.
--%>
<%--@elvariable id="template" type="ru.org.linux.site.Template"--%>
<%
Template tmpl = Template.getTemplate(request);
%>
<article class=msg id="topic-${message.id}">
<c:if test="${showMenu}">
<c:if test="${message.deleted}">
Expand Down Expand Up @@ -195,14 +192,6 @@

<c:if test="${!message.deleted && showMenu}">
<div class=reply>
<c:if test="${template.prof.showSocial}">
<div class="social-buttons">
<a target="_blank" style="text-decoration: none"
href="https://twitter.com/intent/tweet?text=<%= URLEncoder.encode(message.getTitle()) %>&amp;url=<%= URLEncoder.encode(tmpl.getSecureMainUrlNoSlash()+message.getLink()) %>&amp;hashtags=<%= URLEncoder.encode("лор") %>">
<img src="/img/twitter.png" width=16 height=16 alt="Share on Twitter" title="Share on Twitter">
</a>
</div>
</c:if>
<ul id="topicMenu">
<c:if test="${not message.expired}">
<c:if test="${messageMenu.commentsAllowed}">
Expand Down
5 changes: 0 additions & 5 deletions src/main/webapp/sass/_common.scss
Expand Up @@ -600,11 +600,6 @@ table.poll-result img {
float: left;
}

.social-buttons {
float: right;
margin-right: 1em;
}

/* HTML5 for FF3 & etc */
article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }

Expand Down

1 comment on commit 4b9c308

@kloun
Copy link
Contributor

@kloun kloun commented on 4b9c308 Oct 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

помню драму...

и да, настройки теперь не открываются.

Please sign in to comment.