[IMP] social_media, website_*: remove google+ mention
Google+ was shut down for business use and consumers. closes odoo/odoo#36271 See: https://plus.google.com/ Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit is contained in:
committed by
Martin Trigaux
parent
f96d6a9911
commit
083c5bddb7
@@ -3,7 +3,6 @@
|
||||
<record id="base.main_company" model="res.company">
|
||||
<field name="social_twitter">https://twitter.com/Odoo</field>
|
||||
<field name="social_facebook">https://www.facebook.com/Odoo</field>
|
||||
<field name="social_googleplus">https://plus.google.com/+Odooapps</field>
|
||||
<field name="social_linkedin">https://www.linkedin.com/company/odoo</field>
|
||||
<field name="social_youtube">https://www.youtube.com/user/OpenERPonline</field>
|
||||
<field name="social_github">https://github.com/odoo</field>
|
||||
|
||||
@@ -12,5 +12,4 @@ class Company(models.Model):
|
||||
social_github = fields.Char('GitHub Account')
|
||||
social_linkedin = fields.Char('LinkedIn Account')
|
||||
social_youtube = fields.Char('Youtube Account')
|
||||
social_googleplus = fields.Char('Google+ Account')
|
||||
social_instagram = fields.Char('Instagram Account')
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
<field name="social_github"/>
|
||||
<field name="social_linkedin"/>
|
||||
<field name="social_youtube"/>
|
||||
<field name="social_googleplus"/>
|
||||
<field name="social_instagram"/>
|
||||
</group>
|
||||
</xpath>
|
||||
|
||||
@@ -44,13 +44,12 @@ class ResConfigSettings(models.TransientModel):
|
||||
social_github = fields.Char(related='website_id.social_github', readonly=False)
|
||||
social_linkedin = fields.Char(related='website_id.social_linkedin', readonly=False)
|
||||
social_youtube = fields.Char(related='website_id.social_youtube', readonly=False)
|
||||
social_googleplus = fields.Char(related='website_id.social_googleplus', readonly=False)
|
||||
social_instagram = fields.Char(related='website_id.social_instagram', readonly=False)
|
||||
|
||||
@api.depends('website_id', 'social_twitter', 'social_facebook', 'social_github', 'social_linkedin', 'social_youtube', 'social_googleplus', 'social_instagram')
|
||||
@api.depends('website_id', 'social_twitter', 'social_facebook', 'social_github', 'social_linkedin', 'social_youtube', 'social_instagram')
|
||||
def has_social_network(self):
|
||||
self.has_social_network = self.social_twitter or self.social_facebook or self.social_github \
|
||||
or self.social_linkedin or self.social_youtube or self.social_googleplus or self.social_instagram
|
||||
or self.social_linkedin or self.social_youtube or self.social_instagram
|
||||
|
||||
def inverse_has_social_network(self):
|
||||
if not self.has_social_network:
|
||||
@@ -59,7 +58,6 @@ class ResConfigSettings(models.TransientModel):
|
||||
self.social_github = ''
|
||||
self.social_linkedin = ''
|
||||
self.social_youtube = ''
|
||||
self.social_googleplus = ''
|
||||
self.social_instagram = ''
|
||||
|
||||
has_social_network = fields.Boolean("Configure Social Network", compute=has_social_network, inverse=inverse_has_social_network)
|
||||
|
||||
@@ -72,9 +72,6 @@ class Website(models.Model):
|
||||
def _default_social_youtube(self):
|
||||
return self.env.ref('base.main_company').social_youtube
|
||||
|
||||
def _default_social_googleplus(self):
|
||||
return self.env.ref('base.main_company').social_googleplus
|
||||
|
||||
def _default_social_instagram(self):
|
||||
return self.env.ref('base.main_company').social_instagram
|
||||
|
||||
@@ -92,7 +89,6 @@ class Website(models.Model):
|
||||
social_github = fields.Char('GitHub Account', default=_default_social_github)
|
||||
social_linkedin = fields.Char('LinkedIn Account', default=_default_social_linkedin)
|
||||
social_youtube = fields.Char('Youtube Account', default=_default_social_youtube)
|
||||
social_googleplus = fields.Char('Google+ Account', default=_default_social_googleplus)
|
||||
social_instagram = fields.Char('Instagram Account', default=_default_social_instagram)
|
||||
social_default_image = fields.Binary(string="Default Social Share Image", help="If set, replaces the company logo as the default social share image.")
|
||||
|
||||
|
||||
Executable → Regular
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 612 B |
@@ -997,7 +997,6 @@ registry.socialShare = publicWidget.Widget.extend({
|
||||
this.$('.oe_social_facebook').click($.proxy(this._renderSocial, this, 'facebook'));
|
||||
this.$('.oe_social_twitter').click($.proxy(this._renderSocial, this, 'twitter'));
|
||||
this.$('.oe_social_linkedin').click($.proxy(this._renderSocial, this, 'linkedin'));
|
||||
this.$('.oe_social_google-plus').click($.proxy(this._renderSocial, this, 'google-plus'));
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
@@ -1033,7 +1032,6 @@ registry.socialShare = publicWidget.Widget.extend({
|
||||
'facebook': 'https://www.facebook.com/sharer/sharer.php?u=' + url,
|
||||
'twitter': 'https://twitter.com/intent/tweet?original_referer=' + url + '&text=' + encodeURIComponent(title + hashtags + ' - ') + url,
|
||||
'linkedin': 'https://www.linkedin.com/shareArticle?mini=true&url=' + url + '&title=' + encodeURIComponent(title),
|
||||
'google-plus': 'https://plus.google.com/share?url=' + url,
|
||||
};
|
||||
if (!_.contains(_.keys(socialNetworks), social)) {
|
||||
return;
|
||||
@@ -1055,7 +1053,7 @@ registry.socialShare = publicWidget.Widget.extend({
|
||||
*/
|
||||
_onMouseEnter: function () {
|
||||
var social = this.$el.data('social');
|
||||
this.socialList = social ? social.split(',') : ['facebook', 'twitter', 'linkedin', 'google-plus'];
|
||||
this.socialList = social ? social.split(',') : ['facebook', 'twitter', 'linkedin'];
|
||||
this.hashtags = this.$el.data('hashtags') || '';
|
||||
|
||||
this._render();
|
||||
|
||||
@@ -265,10 +265,6 @@
|
||||
<label for="social_youtube" string="YouTube" class="col-md-3 o_light_label"/>
|
||||
<field name="social_youtube"/>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label for="social_googleplus" string="Google Plus" class="col-md-3 o_light_label"/>
|
||||
<field name="social_googleplus"/>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label for="social_instagram" string="Instagram" class="col-md-3 o_light_label"/>
|
||||
<field name="social_instagram"/>
|
||||
|
||||
@@ -303,9 +303,6 @@
|
||||
<a href="http://www.linkedin.com/shareArticle?mini=true&url={url}&title={title}&" t-attf-class="s_share_linkedin #{_link_classes}" target="_blank">
|
||||
<i t-attf-class="fa fa-1x fa-linkedin #{not _link_classes and 'rounded shadow-sm'}"/>
|
||||
</a>
|
||||
<a href="https://plus.google.com/share?url={url}" t-attf-class="s_share_google #{_link_classes}" target="_blank">
|
||||
<i t-attf-class="fa fa-1x fa-google-plus #{not _link_classes and 'rounded shadow-sm'}"/>
|
||||
</a>
|
||||
<a href="mailto:?body={url}&subject={title}" t-attf-class="s_share_email #{_link_classes}">
|
||||
<i t-attf-class="fa fa-1x fa-envelope #{not _link_classes and 'rounded shadow-sm'}"/>
|
||||
</a>
|
||||
|
||||
@@ -378,7 +378,6 @@
|
||||
<a t-if="website.social_twitter" t-att-href="website.social_twitter" class="btn btn-sm btn-link"><i class="fa fa-2x fa-twitter"/></a>
|
||||
<a t-if="website.social_linkedin" t-att-href="website.social_linkedin" class="btn btn-sm btn-link"><i class="fa fa-2x fa-linkedin"/></a>
|
||||
<a t-if="website.social_youtube" t-att-href="website.social_youtube" class="btn btn-sm btn-link"><i class="fa fa-2x fa-youtube-play"/></a>
|
||||
<a t-if="website.social_googleplus" t-att-href="website.social_googleplus" class="btn btn-sm btn-link" rel="publisher"><i class="fa fa-2x fa-google-plus-square"/></a>
|
||||
<a t-if="website.social_github" t-att-href="website.social_github" class="btn btn-sm btn-link"><i class="fa fa-2x fa-github"/></a>
|
||||
<a t-if="website.social_instagram" t-att-href="website.social_instagram" class="btn btn-sm btn-link"><i class="fa fa-2x fa-instagram"/></a>
|
||||
</p>
|
||||
|
||||
@@ -75,8 +75,6 @@ publicWidget.registry.websiteBlog = publicWidget.Widget.extend({
|
||||
url = 'https://www.facebook.com/sharer/sharer.php?u=' + articleURL;
|
||||
} else if ($element.hasClass('o_linkedin_complete')) {
|
||||
url = 'https://www.linkedin.com/shareArticle?mini=true&url=' + articleURL + '&title=' + blogTitleComplete;
|
||||
} else {
|
||||
url = 'https://plus.google.com/share?url=' + articleURL;
|
||||
}
|
||||
} else {
|
||||
var blogPost = $element.parents('[name="blog_post"]');
|
||||
@@ -89,8 +87,6 @@ publicWidget.registry.websiteBlog = publicWidget.Widget.extend({
|
||||
url = 'https://www.facebook.com/sharer/sharer.php?u=' + articleURL;
|
||||
} else if ($element.hasClass('o_linkedin')) {
|
||||
url = 'https://www.linkedin.com/shareArticle?mini=true&url=' + articleURL + '&title=' + blogPostTitle;
|
||||
} else if ($element.hasClass('o_google')) {
|
||||
url = 'https://plus.google.com/share?url=' + articleURL;
|
||||
}
|
||||
}
|
||||
window.open(url, '', 'menubar=no, width=500, height=400');
|
||||
|
||||
@@ -122,7 +122,6 @@ Options:
|
||||
<a t-if="website.social_twitter" t-att-href="website.social_twitter" t-att-class="classes"><i class="fa fa-twitter text-twitter" aria-label="Twitter" title="Twitter"/></a>
|
||||
<a t-if="website.social_linkedin" t-att-href="website.social_linkedin" t-att-class="classes"><i class="fa fa-linkedin text-linkedin" aria-label="LinkedIn" title="LinkedIn"/></a>
|
||||
<a t-if="website.social_youtube" t-att-href="website.social_youtube" t-att-class="classes"><i class="fa fa-youtube-play text-youtube" aria-label="Youtube" title="Youtube"/></a>
|
||||
<a t-if="website.social_googleplus" t-att-href="website.social_googleplus" t-att-class="classes"><i class="fa fa-google-plus-square text-google-plus" aria-label="Google Plus" title="Google Plus"/></a>
|
||||
<a t-if="website.social_github" t-att-href="website.social_github" t-att-class="classes"><i class="fa fa-github text-github" aria-label="Github" title="Github"/></a>
|
||||
<a t-if="website.social_instagram" t-att-href="website.social_instagram" t-att-class="classes"><i class="fa fa-instagram text-instagram" aria-label="Instagram" title="Instagram"/></a>
|
||||
<a t-if="blog" t-att-href="'/blog/%s/feed' % (blog.id)" t-att-class="classes"><i class="fa fa-rss-square" aria-label="RSS" title="RSS"/></a>
|
||||
@@ -214,7 +213,6 @@ Display a sidebar beside the post content.
|
||||
<a href="#" aria-label="Facebook" title="Share on Facebook" t-attf-class="o_facebook #{classes}"><i class="fa fa-facebook-square text-facebook"/></a>
|
||||
<a href="#" aria-label="Twitter" title="Share on Twitter" t-attf-class="o_twitter #{classes}"><i class="fa fa-twitter text-twitter" aria-label="Twitter" title="Twitter"/></a>
|
||||
<a href="#" aria-label="LinkedIn" title="Share on LinkedIn" t-attf-class="o_linkedin #{classes}"><i class="fa fa-linkedin text-linkedin" aria-label="LinkedIn" title="LinkedIn"/></a>
|
||||
<a href="#" aria-label="Google Plus" title="Share on Google Plus" t-attf-class="o_google #{classes}"><i class="fa fa-google-plus-square text-google-plus" aria-label="Google Plus" title="Google Plus"/></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -90,11 +90,6 @@
|
||||
<span class="fa fa-facebook"></span>
|
||||
</a>
|
||||
</t>
|
||||
<t t-if="website.social_googleplus">
|
||||
<a t-att-href="website.social_googleplus" style="margin-left:10px" aria-label="Google Plus" title="Google Plus">
|
||||
<span class="fa fa-google-plus"></span>
|
||||
</a>
|
||||
</t>
|
||||
<t t-if="website.social_linkedin">
|
||||
<a t-att-href="website.social_linkedin" style="margin-left:10px" aria-label="LinkedIn" title="LinkedIn">
|
||||
<span class="fa fa-linkedin"></span>
|
||||
|
||||
Reference in New Issue
Block a user