forked from byrnereese/jquery-mtgreet
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.html
82 lines (72 loc) · 2.72 KB
/
test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="mt.js" type="text/javascript"></script>
<script src="jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="jquery.mtauth.js" type="text/javascript"></script>
<script src="jquery.mtgreeting.js" type="text/javascript"></script>
<title>Movable Type jQuery Plugin Test</title>
<script type="text/javascript">
$(document).ready( function() {
$('#test1').greet();
$('#test2').greet({
loggedInMessage: 'Kaplah, %u! %p | %o',
loggedOutMessage: '%i or %r',
loginText: 'Login',
logoutText: 'Logout',
registerText: 'Register',
editProfileText: 'edit profile'
});
$('#action3').click( function(){ $(this).parent().greet() });
$('#test5').greet({ mode:'mtpro' });
$('.test6').greet();
$('#test7').onauthchange( function(e,u){ if (u.is_authenticated) $(this).show(); });
$('#test7').onauthchange( function(e,u){ if (!u.is_authenticated) $(this).hide(); });
$('#test8').onauthchange( function(e,u){ if (u.is_authenticated) $(this).hide(); });
$('#test8').onauthchange( function(e,u){ if (u.is_authenticated) $(this).show(); });
$('#test9').greet({ returnToURL: 'http://www.google.com/' });
});
</script>
</head>
<body>
<h1>Test of jquery.mtgreet.js</h1>
<p>This html file will not work unmodified. You will need to properly link to jquery and your mt.js file.</p>
<h2>Test 1</h2>
<p>Default behavior: on document ready, greet. </p>
<div id="test1">this is test #1</div>
<h2>Test 2</h2>
<p>Override messages. </p>
<div id="test2">this is test #2</div>
<h2>Test 3</h2>
<p>Greet on click.</p>
<div id="test3">this is test #3</div>
<p><a href="#" id="action3">greet</a></p>
<h2>Test 4</h2>
<p>This will substituted outside a document.ready</p>
<div id="test4">this is test #4</div>
<script type="text/javascript">
$('#test4').greet();
</script>
<h2>Test 5</h2>
<p>mode = mtpro</p>
<div id="test5">this is test #5</div>
<h2>Test 6</h2>
<p>Testing a class based selector</p>
<ul>
<li class="test6"></li>
<li class="test6"></li>
<li class="test6"></li>
</ul>
<h2>Test 7</h2>
<p>Show only when user is authed:</p>
<div id="test7">This should only appear when the user is logged IN.</div>
<h2>Test 8</h2>
<p>Show only when user is logged out:</p>
<div id="test8">This should only appear when the user is logged OUT.</div>
<h2>Test 9</h2>
<p>Return to URL set to Google for logout</p>
<div id="test9">Test #9</div>
</body>
</html>