patternleaf/atlas — pull request #25 by ghing (2013-09-18 19:00:16+00:00)
Title: Refactor of embed and share button code

This is a refactor of the code that drives the popups shown when the user clicks on the embed and share buttons on the detail pages of stories, organizations, projects and user profiles.

These changes allow for one template for the share popup content and one for the embed popup content instead of one for each model. There's also a cleanup of view class, template and CSS class names. In general, the term widget was removed from names to avoid confusion with the "widget" feature that allows the embedding of information about Floodlight stories on other sites.

In partiular look at c978d7a, which is the biggest change to the JavaScript code (``jquery.storybaseshare.js``) for this feature. c978d7a adds lightweight page views that provide a real link targets for the buttons (and a fallback in the unlikely absence of JavaScript). This in turn minimizes the hard-coding of URL paths needed in the JavaScript code and eliminates the need to pass the object ID as a data attribute.