Subversion Repositories SmartDukaan

Rev

Rev 1726 | Rev 1733 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1726 Rev 1729
Line 1... Line 1...
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
2
<html xmlns="http://www.w3.org/1999/xhtml">
3
<head>
3
<head>
4
	<title>Phones I Own | Saholic</title>
4
	<title>Phones I Own | Saholic</title>
5
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
5
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
6
	
-
 
7
	<!--link rel="stylesheet" href="/css/phonesiown.css" type="text/css" /-->
6
	<link rel="stylesheet" href="$action.getServletContextPath()/css/phonesiown.css" type="text/css" />
8
	<style>
-
 
9
div.productItem	{
-
 
10
	float:left;
-
 
11
	width: 250px;
-
 
12
	padding: 7px;
-
 
13
}
-
 
14
 
-
 
15
div.productImg	{
-
 
16
	float: left;
-
 
17
}
-
 
18
 
-
 
19
a	{
-
 
20
	color: #0066CC;
-
 
21
	outline: medium none;
-
 
22
	text-decoration: none;
-
 
23
}
-
 
24
 
-
 
25
.title	{
-
 
26
	font-weight: bold;
-
 
27
	line-height: 13px;
-
 
28
}
-
 
29
 
-
 
30
div.productItem div.productDesp	{
-
 
31
	font-size: 12px;
-
 
32
	line-height: 18px;
-
 
33
	margin-top: 5px;
-
 
34
}
-
 
35
 
-
 
36
.yellow-image {
-
 
37
    background: url("spriteme1.png") repeat-x scroll -10px -750px transparent;
-
 
38
    border: 1px solid #BFA864;
-
 
39
    color: #000000;
-
 
40
    cursor: pointer;
-
 
41
    float: left;
-
 
42
    font-size: 13px;
-
 
43
    font-weight: bold;
-
 
44
    height: 18px;
-
 
45
    padding: 4px 7px;
-
 
46
    text-align: center;
-
 
47
}
-
 
48
 
-
 
49
div.bigImgButton	{
-
 
50
	float: right;
-
 
51
}
-
 
52
 
-
 
53
.yellow-image input.button {
-
 
54
    background: none repeat scroll 0 0 transparent;
-
 
55
    border: medium none;
-
 
56
    cursor: pointer;
-
 
57
    font-size: 13px;
-
 
58
    font-weight: bold;
-
 
59
}
-
 
60
 
-
 
61
input, select, textarea {
-
 
62
    outline: medium none;
-
 
63
}
-
 
64
	</style>
-
 
65
</head>
7
</head>
-
 
8
 
66
<body>
9
<body>
67
	<img src="http://saholic.com/images/saholic-main.jpg" />
10
	<img src="http://saholic.com/images/saholic-main.jpg" />
68
	<hr />
11
	<hr />
69
	<div>
12
	<div>
70
		<form action="/fb/my-phones" method="post">
13
		<form action="/fb/my-phones" method="post">
Line 88... Line 31...
88
	</div>
31
	</div>
89
#end
32
#end
90
	<div id="fb-root"></div>
33
	<div id="fb-root"></div>
91
	<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script> 
34
	<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script> 
92
	<script type="text/javascript" src="http://code.jquery.com/jquery-1.5.2.min.js"></script> 
35
	<script type="text/javascript" src="http://code.jquery.com/jquery-1.5.2.min.js"></script> 
93
	<script type="text/javascript"> 
-
 
94
 
-
 
95
FB.init({
-
 
96
	appId  : '179519275432255',
-
 
97
	status : true, // check login status
-
 
98
	cookie : true, // enable cookies to allow the server to access the session
36
	<script type="text/javascript" src="$action.getServletContextPath()/js/phonesiown.js"></script>
99
	xfbml  : true  // parse XFBML
-
 
100
});
-
 
101
 
-
 
102
 
-
 
103
function publishStream(productName, productURL, productImgURL, productDesc)	{
-
 
104
FB.ui({
-
 
105
		method: 'feed',
-
 
106
		name: productName,
-
 
107
		link: productURL,
-
 
108
		picture: productImgURL,
-
 
109
		caption: 'Phones I Own | Saholic.com',
-
 
110
		description: productDesc,
-
 
111
		message: 'Check out the phone I own!'
-
 
112
	},
-
 
113
	function(response) {
-
 
114
		if (response && response.post_id) {
-
 
115
			// Post was published
-
 
116
		} else {
-
 
117
			// Post was not published
-
 
118
		}
-
 
119
	});
-
 
120
}
-
 
121
$(function(){
-
 
122
	$('input.publish-button').click(function()	{
-
 
123
		var id = $(this).attr('id').replace('post-badge-', '');
-
 
124
		var productName = $(this).html();
-
 
125
		var productUrl = $('#url-' + id).html();
-
 
126
		var imageUrl = $('#img-' + id).attr('src');
-
 
127
		var desc = "";
-
 
128
 
-
 
129
		$('#desc-' + id).children().each(function(i, item){
-
 
130
			desc += $(item).html() + ', ';
-
 
131
		});
-
 
132
		desc = jQuery.trim(desc);
-
 
133
 
-
 
134
		publishStream(productName, productUrl, imageUrl, desc);
-
 
135
	});
-
 
136
});
-
 
137
	</script>
-
 
138
</body>
37
</body>
139
</html>
38
</html>
140
39