CUTR-at-USF / usf-mobullity

USF Maps responsive web application
http://maps.usf.edu/
8 stars 7 forks source link

Sharing trips #113

Closed jailby closed 8 years ago

jailby commented 9 years ago

Currently there is a widget "add this" that allow user to share the url of the website.

Problem This widget is a bit outdated. The newer versions of "add this" look better. Also, the intended behavior was to share the trip information that a user planned.

Solution For right now the widget is going to be deleted.

However, the long term solution should be to add to the hamburger menu an option "share" that allow the user to share a trip he/she has planned via a tool/website of his/her choice.

Useful extra information It is already possible to share a trip via email thanks to the "Email" option in the "itinerary returned" pop up. The same behavior is expected from the sharing option.

Also, at the bottom of usf.edu the "Join the conversation" seem to be the standard of USF for this kind of widget.

Illustration: image

jailby commented 9 years ago

In order to delete this widget correctly the following block of code need to be deleted:

The first one is located in config.js (The comment above elated to thisblock should also be deleted)

showAddThis     : true,
siteURL         : 'http://mobullity.forest.usf.edu/index.html',
addThisTitle    : 'Check out the MoBullity Webapp!',
siteDescription : 'OpenTripPlanner for USF',
addThisPubId    : 'ra-525818cf0207df3a',

The second one is located in Webapp.js (Again the comment related above this block should also be deleted)

if(otp.config.showAddThis) {
    var addThisHtml = '<div id="addthis" class="addthis_toolbox addthis_default_style"\n';
    addThisHtml += 'addthis:url="'+otp.config.siteURL+'"\n';
    addThisHtml += 'addthis:title="'+otp.config.addThisTitle+'"\n';
    addThisHtml += 'addthis:description="'+otp.config.siteDescription+'">\n';
    addThisHtml += '<a class="addthis_button_facebook"></a>\n';
    addThisHtml += '<a class="addthis_button_twitter"></a>\n';
    addThisHtml += '<a class="addthis_button_preferred_1"></a>\n';
    addThisHtml += '<a class="addthis_button_compact"></a>\n';
    addThisHtml += '</div>';

    $(addThisHtml).appendTo('#branding');

    addthis_config = {
                 pubid: otp.config.addThisPubId,
                 data_track_clickback: true
            };
            $.getScript("http://s7.addthis.com/js/250/addthis_widget.js#pubid="+otp.config.addThisPubId);
}

@jmfield2 I believe that is all needed to get rid off this widget but if you think there is something missing let me know. I tested it with this blocks deleted and it is working properly.

jailby commented 9 years ago

Actually I think I might have missed the css definition of this widget:

Located in style.css

#addthis {
  display: none;
  position: absolute;
  right: 50px;
}
jailby commented 8 years ago

These two commit fixed this issue: https://github.com/jailby/usf-mobullity/commit/1122fcfff8270796ac2291dddb842441e641c6ea https://github.com/jailby/usf-mobullity/commit/5ad7cd1da2d23d6ff5fa7ef5cd259b7072b5d7c0