jekyll-attendease 0.4.0 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +21 -5
- data/lib/jekyll-attendease.rb +418 -127
- data/templates/_includes/attendease/presenters/index.html +25 -0
- data/templates/_includes/attendease/presenters/presenter.html +71 -0
- data/templates/_includes/attendease/schedule/day.html +65 -0
- data/templates/_includes/attendease/schedule/index.html +24 -0
- data/templates/_includes/attendease/schedule/session.html +93 -0
- data/templates/_includes/attendease/schedule/sessions.html +23 -0
- data/templates/_includes/attendease/venues/index.html +44 -0
- data/templates/_includes/attendease/venues/venue.html +51 -0
- data/templates/layout.html +5 -0
- metadata +11 -3
- data/assets/auth_check.js +0 -133
data/assets/auth_check.js
DELETED
@@ -1,133 +0,0 @@
|
|
1
|
-
var JekyllAttendease = {
|
2
|
-
|
3
|
-
attendease_logged_in: false,
|
4
|
-
|
5
|
-
microsoft: false,
|
6
|
-
|
7
|
-
addEvent: function(obj, eventType, targetFunction, useCapture)
|
8
|
-
{
|
9
|
-
if (obj.addEventListener)
|
10
|
-
{
|
11
|
-
obj.addEventListener(eventType, targetFunction, false);
|
12
|
-
}
|
13
|
-
else if (obj.attachEvent)
|
14
|
-
{
|
15
|
-
obj.attachEvent('on' + eventType, targetFunction);
|
16
|
-
}
|
17
|
-
else
|
18
|
-
{
|
19
|
-
obj['on' + eventType] = targetFunction;
|
20
|
-
}
|
21
|
-
},
|
22
|
-
|
23
|
-
onLoginCheck: function(callback)
|
24
|
-
{
|
25
|
-
if (document.createEvent)
|
26
|
-
{
|
27
|
-
this.addEvent(document, "attendease.loggedin", callback);
|
28
|
-
}
|
29
|
-
else if (document.attachEvent)
|
30
|
-
{
|
31
|
-
this.addEvent(document, "dataavailable", callback);
|
32
|
-
}
|
33
|
-
},
|
34
|
-
|
35
|
-
isLoggedIn: function()
|
36
|
-
{
|
37
|
-
return this.attendease_logged_in;
|
38
|
-
},
|
39
|
-
|
40
|
-
handleAuthState: function()
|
41
|
-
{
|
42
|
-
var xmlhttp = false;
|
43
|
-
|
44
|
-
if (window.XMLHttpRequest)
|
45
|
-
{
|
46
|
-
xmlhttp = new XMLHttpRequest();
|
47
|
-
}
|
48
|
-
else if (window.ActiveXObject)
|
49
|
-
{
|
50
|
-
try
|
51
|
-
{
|
52
|
-
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
|
53
|
-
}
|
54
|
-
catch (e)
|
55
|
-
{
|
56
|
-
try
|
57
|
-
{
|
58
|
-
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
|
59
|
-
}
|
60
|
-
catch (e)
|
61
|
-
{
|
62
|
-
xmlhttp = false;
|
63
|
-
}
|
64
|
-
}
|
65
|
-
}
|
66
|
-
|
67
|
-
if (xmlhttp)
|
68
|
-
{
|
69
|
-
xmlhttp.onreadystatechange = function()
|
70
|
-
{
|
71
|
-
if (xmlhttp.readyState == 4)
|
72
|
-
{
|
73
|
-
var accountObject = false;
|
74
|
-
|
75
|
-
if (xmlhttp.status == 200)
|
76
|
-
{
|
77
|
-
authActionElement = document.getElementById("attendease-auth-action");
|
78
|
-
if (authActionElement)
|
79
|
-
{
|
80
|
-
authActionElement.innerHTML = '<a class="attendease-auth-logout" href="/attendease/logout">Logout</a>';
|
81
|
-
}
|
82
|
-
|
83
|
-
accountObject = JSON.parse(xmlhttp.responseText);
|
84
|
-
|
85
|
-
authAccountElement = document.getElementById("attendease-auth-account");
|
86
|
-
if (authAccountElement)
|
87
|
-
{
|
88
|
-
authAccountElement.innerHTML = '<a class="attendease-auth-account" href="/attendease/account">' + accountObject.name + '</a>';
|
89
|
-
}
|
90
|
-
|
91
|
-
this.attendease_logged_in = true;
|
92
|
-
}
|
93
|
-
else
|
94
|
-
{
|
95
|
-
authActionElement = document.getElementById("attendease-auth-action");
|
96
|
-
if (authActionElement)
|
97
|
-
{
|
98
|
-
authActionElement.innerHTML = '<a class="attendease-auth-logout" href="/attendease/login">Login</a>';
|
99
|
-
}
|
100
|
-
}
|
101
|
-
|
102
|
-
data = { loggedin: this.attendease_logged_in, account: accountObject, loginURL: "/attendease/login", logoutURL: "/attendease/logout", accountURL: "/attendease/account" };
|
103
|
-
|
104
|
-
if (document.createEvent)
|
105
|
-
{
|
106
|
-
e = document.createEvent("HTMLEvents");
|
107
|
-
e.initEvent("attendease.loggedin", true, true);
|
108
|
-
e.data = data;
|
109
|
-
document.dispatchEvent(e);
|
110
|
-
}
|
111
|
-
else if (document.attachEvent)
|
112
|
-
{
|
113
|
-
e = document.createEventObject();
|
114
|
-
e.eventType = "attendease.loggedin";
|
115
|
-
e.memo = data;
|
116
|
-
document.fireEvent("ondataavailable", e);
|
117
|
-
}
|
118
|
-
}
|
119
|
-
}
|
120
|
-
xmlhttp.open("GET","/attendease/verify_credentials.json",true);
|
121
|
-
xmlhttp.send();
|
122
|
-
}
|
123
|
-
}
|
124
|
-
};
|
125
|
-
|
126
|
-
if (window.ActiveXObject)
|
127
|
-
{
|
128
|
-
JekyllAttendease.addEvent(window, 'load', JekyllAttendease.handleAuthState);
|
129
|
-
}
|
130
|
-
else
|
131
|
-
{
|
132
|
-
JekyllAttendease.addEvent(document, 'DOMContentLoaded', JekyllAttendease.handleAuthState);
|
133
|
-
}
|