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

Social sharing feature #398

Merged
merged 91 commits into from
Jul 18, 2017
Merged
Changes from 1 commit
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
e023c32
Output share icons to link ui dialog window
ZachTRice May 25, 2017
05ebcfc
Removed unnecessary file, updated syntax
ZachTRice May 25, 2017
cccedac
Began converting react component based code to something usable
ZachTRice May 25, 2017
5bc4417
Styled buttons, added URL parameters.
ZachTRice May 25, 2017
7e75285
Updated mail parameters, removed link from Twitter
ZachTRice May 25, 2017
38381fc
Fixed issue with mailto parameters
ZachTRice May 25, 2017
b44e94a
Link shorten on share, formatted text, schema.org tags added
ZachTRice May 26, 2017
032e603
Updated messages, cleaned up parameters, added new preview image
ZachTRice May 26, 2017
5de79c0
Formatted URL parameters to be easier to read
ZachTRice Jun 1, 2017
4902ad0
Code formatting
ZachTRice Jun 1, 2017
16b8752
Changed meta tags, updated links for UAT testing, new preview image
ZachTRice Jun 2, 2017
0abe1d7
Updated branch for testing
ZachTRice Jun 2, 2017
37b8b31
Added facebook AppID
ZachTRice Jun 2, 2017
d782444
Added new preview image, added fb AppID, updated redirect_uri
ZachTRice Jun 2, 2017
c8bafc3
Testing images
ZachTRice Jun 2, 2017
fd2a3bb
Test jpg image quality
ZachTRice Jun 2, 2017
5aca1d8
Regenerated preview image with Photoshop
ZachTRice Jun 5, 2017
2a2a638
Added check: If can shorten link then set short link for tw & email
ZachTRice Jun 5, 2017
d30b1d5
Updated images, code cleanup
ZachTRice Jun 5, 2017
5d9db49
Added png preview image
ZachTRice Jun 5, 2017
814041b
Changed meta tag to use preview.png
ZachTRice Jun 5, 2017
b54081d
Added todo to replace google plus with reddit
ZachTRice Jun 5, 2017
a819cb4
Added reddit button, removed warnings if share btn can't shorten link
ZachTRice Jun 7, 2017
0811011
Styled reddit button, removed google plus button
ZachTRice Jun 7, 2017
4f5f7ae
Removed unneeded preview images
ZachTRice Jun 8, 2017
f0b707f
Updated files inconjunction with wv components changes
ZachTRice Jun 16, 2017
0950b02
Splitting out old ui functionality; added in react widget file
ZachTRice Jun 19, 2017
c5a5c56
Keep share button output the same, only render react modal on click
ZachTRice Jun 19, 2017
09a6c99
New share-modal location. Cleaned up widgetFactory & unused functions
ZachTRice Jun 19, 2017
dde60e5
Moved updateLink function to components
ZachTRice Jun 19, 2017
83faa27
Output share icons to link ui dialog window
ZachTRice May 25, 2017
cf3c0a5
Removed unnecessary file, updated syntax
ZachTRice May 25, 2017
0b2afe1
Began converting react component based code to something usable
ZachTRice May 25, 2017
60ece97
Styled buttons, added URL parameters.
ZachTRice May 25, 2017
8dc43ee
Updated mail parameters, removed link from Twitter
ZachTRice May 25, 2017
c6d1d16
Fixed issue with mailto parameters
ZachTRice May 25, 2017
1b4fef3
Link shorten on share, formatted text, schema.org tags added
ZachTRice May 26, 2017
202150a
Updated messages, cleaned up parameters, added new preview image
ZachTRice May 26, 2017
50e9d36
Formatted URL parameters to be easier to read
ZachTRice Jun 1, 2017
871247e
Code formatting
ZachTRice Jun 1, 2017
6e0c38f
Changed meta tags, updated links for UAT testing, new preview image
ZachTRice Jun 2, 2017
f46fb64
Updated branch for testing
ZachTRice Jun 2, 2017
5be18e0
Added facebook AppID
ZachTRice Jun 2, 2017
df3b912
Added new preview image, added fb AppID, updated redirect_uri
ZachTRice Jun 2, 2017
c29caf5
Testing images
ZachTRice Jun 2, 2017
b4c00d7
Test jpg image quality
ZachTRice Jun 2, 2017
e4891fd
Regenerated preview image with Photoshop
ZachTRice Jun 5, 2017
7dd910d
Added check: If can shorten link then set short link for tw & email
ZachTRice Jun 5, 2017
d019067
Updated images, code cleanup
ZachTRice Jun 5, 2017
6044870
Added png preview image
ZachTRice Jun 5, 2017
bce53f2
Changed meta tag to use preview.png
ZachTRice Jun 5, 2017
c5c36a6
Added todo to replace google plus with reddit
ZachTRice Jun 5, 2017
fdb1f5a
Added reddit button, removed warnings if share btn can't shorten link
ZachTRice Jun 7, 2017
409d4da
Styled reddit button, removed google plus button
ZachTRice Jun 7, 2017
efdce91
Removed unneeded preview images
ZachTRice Jun 8, 2017
9f13f2d
Updated files inconjunction with wv components changes
ZachTRice Jun 16, 2017
a2a7272
Splitting out old ui functionality; added in react widget file
ZachTRice Jun 19, 2017
8150428
Keep share button output the same, only render react modal on click
ZachTRice Jun 19, 2017
45d20ad
New share-modal location. Cleaned up widgetFactory & unused functions
ZachTRice Jun 19, 2017
e55b2d5
Moved updateLink function to components
ZachTRice Jun 19, 2017
1def505
Removed unneeded wv.link.ui and refernces.
ZachTRice Jun 19, 2017
fa12626
Removed wv.link.ui and references
ZachTRice Jun 19, 2017
6a1c0f3
Reverted naming back to ui to not conflict with main.js's ui.link
ZachTRice Jun 19, 2017
d02733e
Added Share to React.createFactory
ZachTRice Jun 20, 2017
18840e3
Code cleanup. Combined chained addClass's
ZachTRice Jun 21, 2017
2b33adb
Moved output of shorten / share btns to wv-components share.
ZachTRice Jun 22, 2017
a39dd46
Fixed email link double encoding
ZachTRice Jun 23, 2017
82a1110
Removed models from WidgetFactory. Changed 'configs' to 'urlShortening'
ZachTRice Jun 23, 2017
ab2acaf
Changed react Share import to Link to match update to wvc naming
ZachTRice Jun 26, 2017
37166a1
Moved url replacement on click to worldview-components
ZachTRice Jun 26, 2017
e6b3b2c
Removed unneeded variables
ZachTRice Jun 26, 2017
cecccd8
Moved shorten link on change function into worldview-components
ZachTRice Jun 27, 2017
0db71ac
Restore icon-link on click until doubleclick issues are sorted with wvc
ZachTRice Jun 27, 2017
8a8eba4
Brought model functionality back into WV; passing socialLinks to WVC
ZachTRice Jun 27, 2017
0fd20bb
Added functions to simplify passing parameters to social links
ZachTRice Jun 27, 2017
7d253cb
Removed jQuery's param functionality do to uri encoding issues
ZachTRice Jun 27, 2017
cc52c27
Code cleanup. Removed console.log, unneeded TODO's, etc.
ZachTRice Jun 27, 2017
5e5a849
Added urlShortener config param to pass into WVC shortener render.
ZachTRice Jun 27, 2017
2ae2ee2
Added console warn if shorten promise fails when sharing link
ZachTRice Jun 28, 2017
3ec22e5
Created setLink cb method; runs on dialog init to set react states
ZachTRice Jun 28, 2017
cecb0cf
Updated variable definitions
ZachTRice Jun 28, 2017
ae139fc
Added click function in WV from react onClick to update link states
ZachTRice Jun 28, 2017
962967a
Reset link in input upon setting link states.
ZachTRice Jun 29, 2017
0298a0e
Merge branch 'master' into share-feature
ZachTRice Jun 29, 2017
5ead514
Added flexbox fallback to support ios and older browsers
ZachTRice Jun 30, 2017
554346e
Updated start tour's share icon
ZachTRice Jul 7, 2017
60813b6
Merge branch 'master' of https://github.com/nasa-gibs/worldview into …
ZachTRice Jul 13, 2017
31e066b
Moved URL Shortener component back into WV
ZachTRice Jul 14, 2017
1e14cb9
Moved on dialogcreate function to be called first
ZachTRice Jul 14, 2017
aa2ba58
Moved on dialogcreate to be called first when opening dialog
ZachTRice Jul 14, 2017
86d16ce
Bumped worldview-components version to 1.3.0
ZachTRice Jul 18, 2017
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
Prev Previous commit
Next Next commit
Moved URL Shortener component back into WV
- Moved URL Shortener component back into WV until dialog boxes are
converted to react.
  • Loading branch information
ZachTRice committed Jul 14, 2017
commit 31e066b9323edf289100043d1daccc8254aaa29f
11 changes: 10 additions & 1 deletion web/js/link/wv.link.ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,15 @@ wv.link.ui = wv.link.ui || function(models, config) {

self.show = function() {
var $dialog = wv.ui.getDialog();
var item = "<div id='wv-link' >" +
"<input type='text' value='' name='permalink_content' id='permalink_content' readonly/>";
if ( config.features.urlShortening ) {
item += "<span autofocus></span><div id='wv-link-shorten'>" +
"<input type='checkbox' value='' id='wv-link-shorten-check' />" +
"<label id='wv-link-shorten-label' for='wv-link-shorten-check'>Shorten this link</label>" +
"</div>";
}
item += "</div>";
var dialogWidth = '300';
if ( wv.util.browser.small ) {
dialogWidth = '242';
Expand Down Expand Up @@ -158,6 +167,7 @@ wv.link.ui = wv.link.ui || function(models, config) {

$('#permalink_content').val(models.link.get());
$dialog.dialog("open");
$dialog.on( "dialogcreate", $dialog.prepend(item) );
setTimeout(updateLink, 500);

$("#wv-link-shorten-check").on("change", function() {
Expand Down Expand Up @@ -207,7 +217,6 @@ wv.link.ui = wv.link.ui || function(models, config) {

self.initWidget = function() {
return widgetFactory({
urlShortener: config.features.urlShortening,
clickFunction: self.clickFunction
});
};
Expand Down