Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening up Master -> Develop PR to merge when we get to a stable point to switch branches. #19

Open
wants to merge 124 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
dac8046
Merge pull request #1 from doylejd/develop
Jul 8, 2015
f934a50
Delete LICENSE
Jul 8, 2015
152d646
Delete README.md
Jul 8, 2015
54c0348
Added libraries for addthis JS and CSS. Added permissions for advance…
doylejd Jul 8, 2015
8a4d768
Merge branch 'master' of https://github.com/doylejd/addthis
doylejd Jul 8, 2015
7e67383
Ported AddThisScriptManager and updated JS to work with D8. Attached …
doylejd Jul 9, 2015
bb0921d
Added stubs for basic formatters. Upgraded some additional helper fun…
doylejd Aug 5, 2015
353553a
Implemented twig templates for addthis_wrapper and addthis_element di…
doylejd Aug 11, 2015
6201293
Added missing classes from the AddThisBasicButton setup.
doylejd Aug 11, 2015
8369741
Merge pull request #2 from doylejd/master
Aug 11, 2015
9777ae5
Abstracted out blocks and field formatters into their own modules. Ad…
doylejd Aug 12, 2015
5f980c6
Removed commented code
doylejd Aug 12, 2015
4d5cbfe
Added information about included modules into README file
doylejd Aug 12, 2015
0349bc9
Added information about included modules into README file
doylejd Aug 12, 2015
c60aba2
Made modules in README an ordered list
doylejd Aug 12, 2015
bb4a4bb
Merge pull request #12 from doylejd/master
nerdstein Aug 12, 2015
03083a7
Merge branch 'UPSTREAM-master'
Aug 12, 2015
976ac27
Removed deprecated addthis_displays module
doylejd Aug 12, 2015
39ab87d
added administer advanced addthis settings permission and updated add…
Aug 12, 2015
17fae77
Creating local task file for tabbed navigation of config menus, also …
Aug 13, 2015
0418a67
Revert "Creating local task file for tabbed navigation of config menu…
Aug 13, 2015
1cc145e
Creating local task file for tabbed navigation of config menus, also …
Aug 13, 2015
c6abb24
Merge pull request #13 from pninny2001/master
nerdstein Aug 13, 2015
9c0e01f
Merge pull request #14 from pninny2001/issue-5-settings-ui-links
nerdstein Aug 13, 2015
b3d5745
Merge branch 'UPSTREAM-master'
Aug 13, 2015
4d97a86
Merge remote-tracking branch 'upstream/master'
doylejd Aug 13, 2015
175cb1b
Resolved issue with icons display on admin page
doylejd Aug 13, 2015
46862dd
Merge branch 'DOYLE-master'
Aug 13, 2015
d388ee6
Merge pull request #15 from doylejd/master
Aug 13, 2015
3489a29
Fix rendering of AddThisToolbox. #17
Aug 13, 2015
bd85f19
Merge pull request #18 from jenter/master
Aug 13, 2015
07bcafa
Merge branch 'UPSTREAM-master'
Aug 13, 2015
d363971
inline block for admin icons
Aug 13, 2015
397d4fb
Abstracted out the BasicTooboxForm so that it can be reused.
doylejd Aug 13, 2015
2271827
line up icon on admin
Aug 13, 2015
f051915
Updated form to allow for correct validation of services defined in t…
doylejd Aug 13, 2015
c695463
fix naming
Aug 13, 2015
5b857a0
Abstracted out block to use BasicToolbox and BasicButton settings. Im…
doylejd Aug 13, 2015
6a78878
Merge pull request #21 from jenter/master
Aug 13, 2015
044eeff
Added comments per notes on PR.
doylejd Aug 13, 2015
221e17a
Reformatted code per drupal standards
doylejd Aug 13, 2015
6acdc07
Merge pull request #22 from doylejd/master
Aug 13, 2015
2199d86
Merge branch 'UPSTREAM-master'
Aug 13, 2015
85f38b1
AddThis Hover Menu Broken #9
Aug 13, 2015
0e1ec4f
fix order of styles
Aug 14, 2015
fadaaab
updating markup renderable vars
Aug 14, 2015
7eaba71
lang update
Aug 14, 2015
1ae8d8f
changing fieldsets to details, per new d8 form api
Aug 14, 2015
f0df41e
Merge pull request #28 from pninny2001/issue-4-settings-form-issues
nerdstein Aug 14, 2015
f0a618e
Merge branch 'UPSTREAM-master'
Aug 17, 2015
ba167ea
Changed README.txt to README.md
doylejd Aug 17, 2015
1754750
Merge pull request #26 from jenter/master
Aug 17, 2015
47dee20
Merge pull request #30 from doylejd/master
Aug 17, 2015
1732505
Merge branch 'UPSTREAM-master'
Aug 17, 2015
08da971
- Refactored services to use the services.yml pattern.
damontgomery Aug 17, 2015
99b7c32
overhaul the Javascript
damontgomery Aug 17, 2015
94f4dd8
Merge pull request #31 from damontgomery/feature/services-refactor
Aug 18, 2015
d718e05
Updated AddThisBasicToolbox to render proper markup.
doylejd Aug 18, 2015
11bde85
Updated attributes per findings from Dan. Fixed nesting of elements s…
doylejd Aug 18, 2015
3ed848e
Removed deprecated code
doylejd Aug 18, 2015
24a10dc
Fixed syntax and removed deprecated code
doylejd Aug 18, 2015
5473d17
Merge pull request #33 from doylejd/master
Aug 19, 2015
85e093f
Removed AddThisWidgetJsURL as it was not being used in the port. We s…
doylejd Aug 19, 2015
d8d1ebc
Removed reference to deprecated class
doylejd Aug 19, 2015
c9e9336
Merge pull request #36 from doylejd/master
nerdstein Aug 19, 2015
967dc67
Added new traits for shared partial config forms for AddThisBasicButt…
doylejd Aug 19, 2015
5d5416b
Updated logic for defaults. Moved validation function for services (b…
doylejd Aug 19, 2015
643f60e
Resolved syntax to correctly call validation function. Needed to do c…
doylejd Aug 19, 2015
ddbf2ac
Merge pull request #37 from doylejd/master
nerdstein Aug 20, 2015
59810c5
Removed logic to have field_formatters control block display. Hard co…
doylejd Aug 20, 2015
edf4b63
Merge pull request #38 from doylejd/master
Aug 20, 2015
b1cd436
Merge branch 'master' into develop
Aug 20, 2015
c02ecf8
Merge branch 'UPSTREAM-master' into develop
Aug 20, 2015
4bf2d2a
updated Render Elements to setup the variables. deleted wrapper and e…
Aug 21, 2015
b357b07
Clean up AddThisElement & AddThisWrapper pre-render/twig templates
Aug 21, 2015
9864f87
saving dynamic path updates
Aug 21, 2015
b4cf33b
removed bunch of commented code
Aug 21, 2015
ce4e80b
removed more commented code
Aug 21, 2015
2e3040e
removed $config variable
Aug 21, 2015
526737c
Merge pull request #40 from ChuChuNaKu/cleanAddThisElementAddThisWrapper
Aug 21, 2015
6833c31
Merge branch 'UPSTREAM-master' into develop
Aug 21, 2015
232fa3b
fixed missing class not showing on button
Aug 21, 2015
77a3fe6
fix for field formatters.
Aug 21, 2015
74e5648
fixed field formatters
Aug 21, 2015
8bd7907
Merge pull request #41 from ChuChuNaKu/addThis-16-clean-add-this-elem…
Aug 21, 2015
3919e5d
saving Addthis JS settings / config progress
Aug 21, 2015
13bf2a5
Merge branch 'UPSTREAM-master' into develop
Aug 21, 2015
53334a2
cleaning up old code
Aug 24, 2015
f4f72dc
Merge pull request #42 from jenter/develop
Aug 24, 2015
73caa56
Merge branch 'UPSTREAM-master' into develop
Aug 25, 2015
74773b6
Updated AddThisScriptManager to dynamically build the widget_js URL b…
doylejd Aug 25, 2015
defce7d
Merge pull request #43 from doylejd/master
Aug 25, 2015
a589827
Merge branch 'UPSTREAM-master' into develop
Aug 25, 2015
80a94df
Resolved Google Analytics integration syntax. Still need to test and …
doylejd Aug 25, 2015
0fff924
Set proper addthis settings in the JS file.
doylejd Aug 25, 2015
1c1f66d
Merge pull request #44 from doylejd/master
Aug 25, 2015
762233b
Merge branch 'UPSTREAM-master' into develop
Aug 25, 2015
b04fb76
Always load addthis on domready. Remove the config and logic to look …
doylejd Aug 25, 2015
fe87fc9
always load domready into url
doylejd Aug 25, 2015
124c273
Started implementation for orientation and counters. Jason will finish
doylejd Aug 25, 2015
be957e5
Merge pull request #45 from doylejd/master
Aug 25, 2015
2b88097
Merge branch 'UPSTREAM-master' into develop
Aug 25, 2015
31f1313
update style config ports
Aug 25, 2015
45465e4
class updates on twig vars
Aug 25, 2015
4987322
Merge pull request #48 from jenter/develop
Aug 25, 2015
fa496a7
Merge branch 'UPSTREAM-master' into develop
Aug 26, 2015
3731e7d
first draft of removing constants and old functions
Aug 26, 2015
ca8db7b
move cleanup based on old elements
Aug 26, 2015
562091e
adding required const
Aug 26, 2015
61d7013
quick adjustments
Aug 26, 2015
3192e14
moving constants
Aug 26, 2015
d63da97
Merge pull request #50 from jenter/jenter-addthis-class
Aug 27, 2015
ad325f5
Cleaned up code. Fixed some bugs found during testing. Implemented un…
doylejd Aug 27, 2015
70951f9
Added comments to permissions test
doylejd Aug 27, 2015
6a5bd59
Resolved merge conflicts and fixed warnings from formAPI.
doylejd Aug 27, 2015
0112132
Made permissions more specific for tests
doylejd Sep 2, 2015
57dc472
Stubbed out some functions. Fixed JS typo
doylejd Sep 3, 2015
21a2ee0
Merge pull request #51 from doylejd/master
nerdstein Sep 4, 2015
76c92cb
Stubbed out test functions and made some modifications to the class s…
doylejd Sep 8, 2015
30256aa
Merge pull request #52 from doylejd/feature/testing-setup
Sep 8, 2015
d724373
Issue 25: remove the addthis class
Oct 9, 2015
c371a8a
Revert "Issue 25: remove the addthis class"
Oct 9, 2015
37628ed
Issue 25: remove the addthis class
Oct 9, 2015
60304d1
Merge pull request #53 from pjonckiere/issues/25
May 24, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
340 changes: 0 additions & 340 deletions LICENSE

This file was deleted.

64 changes: 62 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,62 @@
# addthis
Port AddThis to D8

-- SUMMARY --

Add This module provides Drupal integration to addthis.com link sharing service.
Integration has been implemented as a field.

Description from addthis.com:
The AddThis button spreads your content across the Web by making it easier for
your visitors to bookmark and share it with other people, again... and again...
and again. This simple yet powerful button is very easy to install and provides
valuable Analytics about the bookmarking and sharing activity of your users.
AddThis helps your visitors create a buzz for your site and increase its
popularity and ranking.

AddThis is already on hundreds of thousands of websites including SAP,
TIME Magazine, Oracle, Freewebs, Entertainment Weekly, Topix, Lonely Planet,
MapQuest, MySpace, PGA Tour, Tower Records, Squidoo, Zappos, Funny or Die, FOX,
ABC, CBS, Glamour, PostSecret, WebMD, American Idol, and ReadWriteWeb,
just to name a few. Each month our button is displayed 20 billion times.

-- REQUIREMENTS --

Field, Block

-- INSTALLATION --

Normal Drupal module installation, see http://drupal.org/node/70151 for further
information.

For link sharing statistics registration at http://addthis.com/ is required, but
the module will work even without registration.

-- INCLUDED MODULES --
1. **addthis** - Provides the base API to integrate with AddThis. Also creates RenderElements,
base Twig templates and global admin settings for AddThis. Does not provide any
rendering functionality on its own.
2. **addthis_block** - Provides a configurable block for displaying AddThis.
3. **addthis_fields** - Provides two field formatters for AddThis to allow for rendering on
entities.

-- CONFIGURATION --

Use the admin configuration page to configure settings and see http://drupal.org/node/1309922
for a walkthrough on how to configure the rest.

-- DEVELOPMENT --

Please see the addthis.api.php for implementation options of different displays
and altering configuration on rendering.

-- CONTACT --

Current D8 contributors
* John Doyle (doylejd) - https://www.drupal.org/u/doylejd

Current D7 maintainers:
* Vesa Palmu (wesku) - http://drupal.org/user/75070
* Jani Palsamäki (janip) - http://drupal.org/user/1356218
* Matthias Glastra (matglas86) - http://drupal.org/user/573464

Major contributions by:
Lesmana Lim (lesmana) - http://drupal.org/user/84263
51 changes: 0 additions & 51 deletions README.txt

This file was deleted.

15 changes: 15 additions & 0 deletions addthis.libraries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
addthis.admin:
version: VERSION
css:
theme:
http://cache.addthiscdn.com/icons/v1/sprites/services.css: {}
css/addthis.admin.css: {}

addthis.widget:
version: VERSION
js:
js/addthis.js: {}
dependencies:
- core/jquery
- core/drupal
- core/drupalSettings
11 changes: 9 additions & 2 deletions addthis.links.menu.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
addthis.settings:
title: AddThis
title: AddThis - Basic Settings
description: 'Manage your site''s AddThis settings.'
parent: system.admin_config_ui
route_name: addthis.settings
route_name: addthis.settings
weight: 1
addthis.settings.advanced:
title: AddThis - Advanced Settings
description: 'Manage your site''s advanced AddThis settings.'
parent: system.admin_config_ui
route_name: addthis.settings.advanced
weight: 2
8 changes: 8 additions & 0 deletions addthis.links.task.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
addthis.settings:
title: 'Basic'
route_name: addthis.settings
base_route: addthis.settings
addthis.settings.advanced:
title: 'Advanced'
route_name: addthis.settings.advanced
base_route: addthis.settings
15 changes: 15 additions & 0 deletions addthis.module
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
<?php

/**
* Implements hook_theme().
*/
function addthis_theme() {
return [
'addthis_basic_button' => [
'render element' => 'element',
],
'addthis_basic_toolbox' => [
'render element' => 'element',
],
];
}


6 changes: 6 additions & 0 deletions addthis.permissions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
administer addthis settings:
title: 'Administer AddThis Settings'
description: 'Perform configuration tasks for AddThis.'
administer advanced addthis settings:
title: 'Administer Advanced AddThis Settings'
description: 'Perform advanced configuration tasks for AddThis.'
9 changes: 8 additions & 1 deletion addthis.routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,11 @@ addthis.settings:
_form: '\Drupal\addthis\Form\AddThisSettingsForm'
_title: 'AddThis'
requirements:
_permission: 'administer site configuration'
_permission: 'administer addthis settings'
addthis.settings.advanced:
path: '/admin/config/user-interface/addthis/advanced'
defaults:
_form: '\Drupal\addthis\Form\AddThisSettingsAdvancedForm'
_title: 'AddThis Advanced Settings'
requirements:
_permission: 'administer advanced addthis settings'
5 changes: 5 additions & 0 deletions addthis.services.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
services:
# This service creates a more complex access check.
addthis.script_manager:
class: Drupal\addthis\AddThisScriptManager
arguments: ['@language_manager', '@config.factory']
10 changes: 10 additions & 0 deletions config/install/addthis.settings.advanced.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# TODO: remove prefix from these variables. Combine with addthis.settings.yml?
addthis_bookmark_url: 'http://www.addthis.com/bookmark.php?v=300'
addthis_services_css_url: 'http://cache.addthiscdn.com/icons/v1/sprites/services.css'
addthis_services_json_url: 'http://cache.addthiscdn.com/services/v1/sharing.en.json'
addthis_widget_js_url: 'http://s7.addthis.com/js/300/addthis_widget.js'
addthis_custom_configuration_code_enabled: FALSE
addthis_custom_configuration_code: 'var addthis_config = {}'
addthis_widget_load_domready: TRUE
addthis_widget_load_async: FALSE
addthis_widget_include: 2
1 change: 1 addition & 0 deletions config/install/addthis.settings.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#TODO: remove prefix from variables?
compact_menu:
menu_style:
addthis_co_brand: ''
Expand Down
105 changes: 86 additions & 19 deletions config/schema/addthis.schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@ addthis.settings:
type: mapping
label: 'Style'
mapping:
addthis_co_brand:
type: string
label: 'Branding text'
addthis_ui_header_color:
type: string
label: 'Header text color'
addthis_ui_header_background_color:
type: string
label: 'Header background color'
addthis_click_to_open_compact_menu_enabled:
type: boolean
label: 'Open compact menu on click'
addthis_open_windows_enabled:
type: boolean
label: 'Use pop-up windows'
addthis_ui_delay:
type: string
label: 'Menu open delay'
addthis_co_brand:
type: string
label: 'Branding text'
addthis_ui_header_color:
type: string
label: 'Header text color'
addthis_ui_header_background_color:
type: string
label: 'Header background color'
addthis_click_to_open_compact_menu_enabled:
type: integer
label: 'Open compact menu on click'
addthis_open_windows_enabled:
type: integer
label: 'Use pop-up windows'
addthis_ui_delay:
type: string
label: 'Menu open delay'
enabled_services:
type: mapping
label: 'Compact menu enabled services'
Expand Down Expand Up @@ -65,7 +65,7 @@ addthis.settings:
label: 'Services Excluded'
analytics:
type: mapping
label: 'Analytics & Tracking'
label: 'Analytics and Tracking'
mapping:
addthis_profile_id:
type: string
Expand All @@ -92,4 +92,71 @@ addthis.settings:
addthis_twitter_template:
type: string
label: 'Template text'
addthis.settings.advanced:
type: mapping
label: 'AddThis Advanced Settings'
mapping:
addthis_bookmark_url:
type: string
label: 'Bookmark URL'
addthis_services_css_url:
type: string
label: 'Services CSS URL'
addthis_services_json_url:
type: string
label: 'Services JSON URL'
addthis_widget_js_url:
type: string
label: 'Widget JS URL'
addthis_custom_configuration_code_enabled:
type: boolean
label: 'Use custom AddThis configuration code'
addthis_custom_configuration_code:
type: string
label: 'AddThis custom configuration code'
addthis_widget_load_domready:
type: boolean
label: 'Load the AddThis resources after the DOM is ready'
addthis_widget_load_async:
type: boolean
label: 'Initialize asynchronously through addthis.init()'
addthis_widget_include:
type: integer
label: 'Load widget js.'
block.settings.addthis_block:
type: block_settings
label: 'AddThis Block Configuration'
mapping:
display_type:
type: string
label: 'Display Type'
basic_button:
type: mapping
label: 'Basic Button Block Settings'
mapping:
button_size:
type: string
label: 'Button Size'
extra_css:
type: string
label: 'Extra CSS'
basic_toolbox:
type: mapping
label: 'Basic Toolbox Block Settings'
mapping:
share_services:
type: string
label: 'Share Services'
buttons_size:
type: string
label: 'Button Size'
counter_orientation:
type: string
label: 'Counter Orientation'
extra_css:
type: string
label: 'Extra CSS'




25 changes: 25 additions & 0 deletions css/addthis.admin.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.addthis_service_icon {
display: inline-block;
padding-left: 20px;
}

#edit-addthis-enabled-services .form-item, #edit-addthis-excluded-services .form-item {
float: left;
width: 20%;
}

#edit-addthis-enabled-services .form-item .description {
clear: both;
}

#edit-addthis-excluded-services label.option,
#edit-addthis-enabled-services label.option,
#edit-addthis-excluded-services .addthis_service_icon,
#edit-addthis-enabled-services .addthis_service_icon {
display: inline-block;
}

#edit-addthis-excluded-services .addthis_service_icon,
#edit-addthis-enabled-services .addthis_service_icon {
margin-bottom: -1.5px;
}
Loading