Skip to content

Commit

Permalink
Added connection options to popup forms
Browse files Browse the repository at this point in the history
  • Loading branch information
habuma committed Aug 16, 2011
1 parent 3f3ac4a commit e10947c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
@@ -0,0 +1,3 @@
<input type="hidden" name="scope" value="publish_stream,user_photos,offline_access" />
<p class="connectionOptions"><label for="postToWall"><input id="postToWall" type="checkbox" name="postToWall" /> Tell your friends about Spring Social Showcase on your Facebook wall</label></p>

Expand Up @@ -2,6 +2,7 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="sf" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="s" %>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>
<%@ page session="false" %>

<script>
Expand All @@ -16,8 +17,6 @@ if(window.opener) {
<c:forEach var="providerId" items="${providerIds}">
<c:set var="connections" value="${connectionMap[providerId]}" />
<s:message code="${providerId}.displayName" var="providerDisplayName" />



<div class="accountConnection">
<s:message code="${providerId}.icon" var="iconUrl"/>
Expand All @@ -30,7 +29,8 @@ if(window.opener) {
<div class="formInfo">
You are not yet connected to ${providerDisplayName}.
</div>
<button type="submit"><img src="<c:url value="${buttonUrl}" />"/></button>
<button class="connectButton" type="submit"><img src="<c:url value="${buttonUrl}" />"/></button>
<tiles:insertTemplate template="${providerId}Options.jsp" />
</form>
</c:if>

Expand All @@ -47,10 +47,10 @@ if(window.opener) {

<script>
$(document).ready(function() {
$(".connectForm").click(function(event){
$(".connectButton").click(function(event){
event.preventDefault();
window.open("", "connectWindow", "width=600,height=400");
var cTP = $(event.currentTarget);
var cTP = $(event.currentTarget).parent();
cTP[0].setAttribute("target", "connectWindow");
cTP[0].submit();
});
Expand Down
@@ -0,0 +1 @@
<p class="connectionOptions"><label for="postTweet"><input id="postTweet" type="checkbox" name="postTweet" /> Post a tweet about connecting with Spring Social Showcase</label></p>
Expand Up @@ -122,3 +122,7 @@ div.accountConnection h4 {
div.accountConnection h4 img {
vertical-align: middle;
}

.connectionOptions {
font-size: 10pt;
}

0 comments on commit e10947c

Please sign in to comment.