Merge lp:~mhall119/loco-team-portal/bzr-apps-upgrades into lp:loco-team-portal
- bzr-apps-upgrades
- Merge into 0.2
Proposed by
Michael Hall
Status: | Merged |
---|---|
Approved by: | Chris Johnston |
Approved revision: | 427 |
Merged at revision: | 426 |
Proposed branch: | lp:~mhall119/loco-team-portal/bzr-apps-upgrades |
Merge into: | lp:loco-team-portal |
Diff against target: |
361 lines (+55/-159) 8 files modified
loco_directory/media/css/twidenash.css (+6/-6) loco_directory/media/js/twidenash.js (+0/-140) loco_directory/settings.py (+20/-2) loco_directory/teams/management/commands/init-ld.py (+8/-5) loco_directory/templates/events/global_event_detail.html (+2/-0) loco_directory/templates/events/global_event_detail.inc.html (+1/-1) loco_directory/templates/index.html (+9/-1) loco_directory/templates/teams/team_detail.html (+9/-4) |
To merge this branch: | bzr merge lp:~mhall119/loco-team-portal/bzr-apps-upgrades |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Chris Johnston | Approve | ||
Review via email: mp+54010@code.launchpad.net |
Commit message
Description of the change
Use bzr_apps to get and manage the latest light-django-theme and twidenash
To post a comment you must log in.
- 425. By Michael Hall
-
bzr-apps version bump
- 426. By Michael Hall
-
Version bump for twidenash
- 427. By Michael Hall
-
Solves the case of the missing </script>
Revision history for this message
Ronnie (ronnie.vd.c) wrote : | # |
Revision history for this message
Chris Johnston (cjohnston) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'loco_directory/media/css/twidenash.css' | |||
2 | --- loco_directory/media/css/twidenash.css 2010-09-28 17:21:02 +0000 | |||
3 | +++ loco_directory/media/css/twidenash.css 2011-03-18 22:26:31 +0000 | |||
4 | @@ -7,30 +7,30 @@ | |||
5 | 7 | */ | 7 | */ |
6 | 8 | 8 | ||
7 | 9 | 9 | ||
9 | 10 | ul.twidenash li { | 10 | .twidenash li { |
10 | 11 | list-style-type: none; | 11 | list-style-type: none; |
11 | 12 | clear: both; | 12 | clear: both; |
12 | 13 | padding: 3px; | 13 | padding: 3px; |
14 | 14 | font-size: 100%; | 14 | font-size: 0.75em; |
15 | 15 | } | 15 | } |
16 | 16 | 16 | ||
18 | 17 | ul.twidenash li img { | 17 | .twidenash li img { |
19 | 18 | float: left; | 18 | float: left; |
20 | 19 | vertical-align: top; | 19 | vertical-align: top; |
21 | 20 | padding-right: 10px; | 20 | padding-right: 10px; |
22 | 21 | } | 21 | } |
23 | 22 | 22 | ||
25 | 23 | ul.twidenash li .comment { | 23 | .twidenash li .comment { |
26 | 24 | margin-left: 5px; | 24 | margin-left: 5px; |
27 | 25 | display: block; | 25 | display: block; |
28 | 26 | overflow: auto; | 26 | overflow: auto; |
29 | 27 | } | 27 | } |
30 | 28 | 28 | ||
32 | 29 | ul.twidenash li .nick { | 29 | .twidenash li .nick { |
33 | 30 | font-weight: bold; | 30 | font-weight: bold; |
34 | 31 | } | 31 | } |
35 | 32 | 32 | ||
37 | 33 | ul.twidenash li .time { | 33 | .twidenash li .time { |
38 | 34 | font-size: 0.75em; | 34 | font-size: 0.75em; |
39 | 35 | color: #555; | 35 | color: #555; |
40 | 36 | } | 36 | } |
41 | 37 | 37 | ||
42 | === removed file 'loco_directory/media/js/twidenash.js' | |||
43 | --- loco_directory/media/js/twidenash.js 2010-09-28 17:21:02 +0000 | |||
44 | +++ loco_directory/media/js/twidenash.js 1970-01-01 00:00:00 +0000 | |||
45 | @@ -1,140 +0,0 @@ | |||
46 | 1 | /* | ||
47 | 2 | * | ||
48 | 3 | * Copyright (c) 2010 Stuart Langridge | ||
49 | 4 | * | ||
50 | 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy | ||
51 | 6 | * of this software and associated documentation files (the "Software"), to deal | ||
52 | 7 | * in the Software without restriction, including without limitation the rights | ||
53 | 8 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
54 | 9 | * copies of the Software, and to permit persons to whom the Software is | ||
55 | 10 | * furnished to do so, subject to the following conditions: | ||
56 | 11 | * | ||
57 | 12 | * The above copyright notice and this permission notice shall be included in | ||
58 | 13 | * all copies or substantial portions of the Software. | ||
59 | 14 | * | ||
60 | 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
61 | 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
62 | 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
63 | 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
64 | 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
65 | 20 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
66 | 21 | * THE SOFTWARE. | ||
67 | 22 | * | ||
68 | 23 | * Website: http://code.google.com/p/twidenash/ | ||
69 | 24 | */ | ||
70 | 25 | |||
71 | 26 | /* | ||
72 | 27 | * With modification by Michael Hall for use in loco.ubuntu.com | ||
73 | 28 | */ | ||
74 | 29 | |||
75 | 30 | twidenash = { | ||
76 | 31 | init: function() { | ||
77 | 32 | if (!twidenash.hashtag) return; | ||
78 | 33 | // request hashtag search values for both twitter and identica | ||
79 | 34 | twidenash.callbacks = 0; | ||
80 | 35 | twidenash.items = []; | ||
81 | 36 | twidenash.add_script("http://locoteams.status.net/api/search.json?" + | ||
82 | 37 | "callback=twidenash.cb&rpp=10&q=%23" + twidenash.hashtag); | ||
83 | 38 | twidenash.add_script("http://identi.ca/api/search.json?" + | ||
84 | 39 | "callback=twidenash.cb&rpp=10&q=%23" + twidenash.hashtag); | ||
85 | 40 | twidenash.add_script("http://search.twitter.com/search.json?" + | ||
86 | 41 | "callback=twidenash.cb&rpp=10&q=%23" + twidenash.hashtag); | ||
87 | 42 | twidenash.printed = 0; | ||
88 | 43 | }, | ||
89 | 44 | add_script: function(url) { | ||
90 | 45 | var scr = document.createElement("script"); | ||
91 | 46 | scr.src = url; | ||
92 | 47 | document.getElementsByTagName("head")[0].appendChild(scr); | ||
93 | 48 | }, | ||
94 | 49 | cb: function(data) { | ||
95 | 50 | for (var i=0; i<data.results.length; i++) { | ||
96 | 51 | var dupe = false; | ||
97 | 52 | for (var j=0; j<twidenash.items.length; j++) { | ||
98 | 53 | // Strip characters that may be specific to networks | ||
99 | 54 | var comp1 = data.results[i].text.replace(/[♺\!\#\@]/g, ''); | ||
100 | 55 | var comp2 = twidenash.items[j].text.replace(/[♺\!\#\@]/g, ''); | ||
101 | 56 | var compdate = Date.parse(data.results[i].created_at); | ||
102 | 57 | var datediff = Math.abs(Date.parse(data.results[i].created_at) - twidenash.items[j].dt) | ||
103 | 58 | if (comp1 == comp2 && datediff < 120000) { | ||
104 | 59 | dupe = true; | ||
105 | 60 | break; | ||
106 | 61 | } | ||
107 | 62 | } | ||
108 | 63 | if (dupe) continue; | ||
109 | 64 | twidenash.items.push({ text: data.results[i].text, | ||
110 | 65 | img: data.results[i].profile_image_url, | ||
111 | 66 | dt: Date.parse(data.results[i].created_at), | ||
112 | 67 | user: data.results[i].from_user }) | ||
113 | 68 | } | ||
114 | 69 | twidenash.callbacks += 1; | ||
115 | 70 | if (twidenash.callbacks == 2) { | ||
116 | 71 | twidenash.items.sort(function(a,b) { return b.dt - a.dt }); | ||
117 | 72 | var ul = document.createElement("ul"); | ||
118 | 73 | ul.className = "twidenash"; | ||
119 | 74 | for (i=0; i<twidenash.items.length && twidenash.printed < 5; i++) { | ||
120 | 75 | var li = document.createElement("li"); | ||
121 | 76 | var img = document.createElement("img"); | ||
122 | 77 | img.src = twidenash.items[i].img; | ||
123 | 78 | img.width = 48; | ||
124 | 79 | var relative_to = (arguments.length > 1) ? arguments[1] : new Date(); | ||
125 | 80 | var delta = parseInt((relative_to.getTime() - twidenash.items[i].dt) / 1000); | ||
126 | 81 | var pluralize = function (singular, n) { | ||
127 | 82 | return '' + n + ' ' + singular + (n == 1 ? '' : 's'); | ||
128 | 83 | }; | ||
129 | 84 | if(delta < 60) { | ||
130 | 85 | date_msg = 'less than a minute ago '; | ||
131 | 86 | } else if(delta < (45*60)) { | ||
132 | 87 | date_msg = 'about ' + pluralize("minute", parseInt(delta / 60)) + ' ago '; | ||
133 | 88 | } else if(delta < (24*60*60)) { | ||
134 | 89 | date_msg = 'about ' + pluralize("hour", parseInt(delta / 3600)) + ' ago '; | ||
135 | 90 | } else { | ||
136 | 91 | date_msg = 'about ' + pluralize("day", parseInt(delta / 86400)) + ' ago '; | ||
137 | 92 | } | ||
138 | 93 | var span = document.createElement("span"); | ||
139 | 94 | span.className = 'comment'; | ||
140 | 95 | var nick = document.createElement("span"); | ||
141 | 96 | nick.className = 'nick'; | ||
142 | 97 | nick.appendChild(document.createTextNode(twidenash.items[i].user)); | ||
143 | 98 | var time = document.createElement("span"); | ||
144 | 99 | time.className = 'time'; | ||
145 | 100 | time.appendChild(document.createTextNode(" ( "+ date_msg +" ) ")); | ||
146 | 101 | |||
147 | 102 | var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi; | ||
148 | 103 | span.innerHTML = twidenash.items[i].text.replace(exp,"<a href='$1' target='_blank'>$1</a>"); | ||
149 | 104 | li.appendChild(img); | ||
150 | 105 | li.appendChild(nick); | ||
151 | 106 | li.appendChild(time); | ||
152 | 107 | li.appendChild(span); | ||
153 | 108 | ul.appendChild(li); | ||
154 | 109 | twidenash.printed++; | ||
155 | 110 | } | ||
156 | 111 | twidenash.scriptelement.parentNode.insertBefore(ul, twidenash.scriptelement); | ||
157 | 112 | } | ||
158 | 113 | }, | ||
159 | 114 | cache_scriptname: function() { | ||
160 | 115 | // called before page load so we can find our own name | ||
161 | 116 | var scr = document.getElementsByTagName("script"); | ||
162 | 117 | var url = scr[scr.length-1].getAttribute("src"); | ||
163 | 118 | if (!url) { | ||
164 | 119 | var twidenash_script = document.getElementById("twidenash_script"); | ||
165 | 120 | if (twidenash_script) url = twidenash_script.getAttribute("src"); | ||
166 | 121 | } | ||
167 | 122 | if (url && url.lastIndexOf('?') != -1) { | ||
168 | 123 | twidenash.hashtag = url.substr(url.lastIndexOf('?')+1); | ||
169 | 124 | if (twidenash_script) { | ||
170 | 125 | twidenash.scriptelement = twidenash_script; | ||
171 | 126 | } else { | ||
172 | 127 | twidenash.scriptelement = scr[scr.length-1]; | ||
173 | 128 | } | ||
174 | 129 | } | ||
175 | 130 | } | ||
176 | 131 | }; | ||
177 | 132 | (function(i) {var u =navigator.userAgent;var e=/*@cc_on!@*/false; var st = | ||
178 | 133 | setTimeout;if(/webkit/i.test(u)){st(function(){var dr=document.readyState; | ||
179 | 134 | if(dr=="loaded"||dr=="complete"){i()}else{st(arguments.callee,10);}},10);} | ||
180 | 135 | else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){ | ||
181 | 136 | document.addEventListener("DOMContentLoaded",i,false); } else if(e){ ( | ||
182 | 137 | function(){var t=document.createElement('doc:rdy');try{t.doScroll('left'); | ||
183 | 138 | i();t=null;}catch(e){st(arguments.callee,0);}})();}else{window.onload=i;}})(twidenash.init); | ||
184 | 139 | twidenash.cache_scriptname(); | ||
185 | 140 | |||
186 | 141 | 0 | ||
187 | === modified file 'loco_directory/settings.py' | |||
188 | --- loco_directory/settings.py 2010-12-07 21:42:01 +0000 | |||
189 | +++ loco_directory/settings.py 2011-03-18 22:26:31 +0000 | |||
190 | @@ -113,7 +113,7 @@ | |||
191 | 113 | ubuntu_website.TEMPLATE_DIR, | 113 | ubuntu_website.TEMPLATE_DIR, |
192 | 114 | ) | 114 | ) |
193 | 115 | 115 | ||
195 | 116 | INSTALLED_APPS = ( | 116 | INSTALLED_APPS = [ |
196 | 117 | 'django.contrib.auth', | 117 | 'django.contrib.auth', |
197 | 118 | 'django.contrib.contenttypes', | 118 | 'django.contrib.contenttypes', |
198 | 119 | 'django.contrib.sessions', | 119 | 'django.contrib.sessions', |
199 | @@ -126,7 +126,7 @@ | |||
200 | 126 | 'userprofiles', | 126 | 'userprofiles', |
201 | 127 | 'django_openid_auth', | 127 | 'django_openid_auth', |
202 | 128 | 'south', | 128 | 'south', |
204 | 129 | ) | 129 | ] |
205 | 130 | 130 | ||
206 | 131 | AUTHENTICATION_BACKENDS = ( | 131 | AUTHENTICATION_BACKENDS = ( |
207 | 132 | 'django_openid_auth.auth.OpenIDBackend', | 132 | 'django_openid_auth.auth.OpenIDBackend', |
208 | @@ -159,6 +159,24 @@ | |||
209 | 159 | 159 | ||
210 | 160 | FLICKR_API_KEY = '8c969a1e8a49629bb89b411930ab1cc8' | 160 | FLICKR_API_KEY = '8c969a1e8a49629bb89b411930ab1cc8' |
211 | 161 | 161 | ||
212 | 162 | # Manage apps from bzr branches | ||
213 | 163 | try: | ||
214 | 164 | import bzr_apps | ||
215 | 165 | INSTALLED_APPS.append('bzr_apps') | ||
216 | 166 | except: | ||
217 | 167 | pass | ||
218 | 168 | |||
219 | 169 | BZR_APPS = { | ||
220 | 170 | ## ubuntu-django-foundations app management | ||
221 | 171 | 'bzr_apps': ('bzr+ssh://bazaar.launchpad.net/%2Bbranch/ubuntu-django-foundations/bzr-apps/', '3'), | ||
222 | 172 | |||
223 | 173 | ## ubuntu-website supplied templates and styles | ||
224 | 174 | 'ubuntu_website': ('bzr+ssh://bazaar.launchpad.net/~ubuntu-community-webthemes/ubuntu-community-webthemes/light-django-theme', '32'), | ||
225 | 175 | |||
226 | 176 | ## twidenash supplied microblog embedding javascript | ||
227 | 177 | 'media/js/twidenash': ('bzr+ssh://bazaar.launchpad.net/~django-foundations-dev/twidenash/2.0/', '2'), | ||
228 | 178 | } | ||
229 | 179 | |||
230 | 162 | import logging | 180 | import logging |
231 | 163 | try: | 181 | try: |
232 | 164 | from local_settings import * | 182 | from local_settings import * |
233 | 165 | 183 | ||
234 | === modified file 'loco_directory/teams/management/commands/init-ld.py' | |||
235 | --- loco_directory/teams/management/commands/init-ld.py 2011-03-15 13:08:01 +0000 | |||
236 | +++ loco_directory/teams/management/commands/init-ld.py 2011-03-18 22:26:31 +0000 | |||
237 | @@ -44,11 +44,14 @@ | |||
238 | 44 | else: | 44 | else: |
239 | 45 | print " * Creating jquery symlinks: not necessary." | 45 | print " * Creating jquery symlinks: not necessary." |
240 | 46 | 46 | ||
243 | 47 | print " * Adding ubuntu_website media:", | 47 | print " * Adding Bzr Apps:", |
244 | 48 | if os.path.isdir(os.path.join(path, "ubuntu_website")): | 48 | if os.path.isdir(os.path.join(path, "bzr_apps", ".bzr")): |
245 | 49 | print "not necessary." | 49 | print "not necessary." |
246 | 50 | else: | 50 | else: |
250 | 51 | subprocess.call(["bzr", "branch", "-q", | 51 | subprocess.call(["bzr", "branch", "-q", "--use-existing-dir", |
251 | 52 | "lp:ubuntu-community-webthemes/light-django-theme", | 52 | "lp:ubuntu-django-foundations/bzr-apps", |
252 | 53 | "ubuntu_website"]) | 53 | "bzr_apps"]) |
253 | 54 | print "added." | 54 | print "added." |
254 | 55 | |||
255 | 56 | print " * Pulling Bzr Apps:", | ||
256 | 57 | subprocess.call(["./manage.py", "pullapps"]) | ||
257 | 55 | 58 | ||
258 | === modified file 'loco_directory/templates/events/global_event_detail.html' | |||
259 | --- loco_directory/templates/events/global_event_detail.html 2011-02-17 20:05:03 +0000 | |||
260 | +++ loco_directory/templates/events/global_event_detail.html 2011-03-18 22:26:31 +0000 | |||
261 | @@ -6,9 +6,11 @@ | |||
262 | 6 | <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&language={% trans 'en' %}®ion={% trans 'US' %}"></script> | 6 | <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&language={% trans 'en' %}®ion={% trans 'US' %}"></script> |
263 | 7 | <script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclusterer/1.0/src/markerclusterer_packed.js"></script> | 7 | <script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerclusterer/1.0/src/markerclusterer_packed.js"></script> |
264 | 8 | <script type="text/javascript" src="{{MEDIA_URL}}js/jquery-ubuntu-maps.js"></script> | 8 | <script type="text/javascript" src="{{MEDIA_URL}}js/jquery-ubuntu-maps.js"></script> |
265 | 9 | <script type="text/javascript" src="{{MEDIA_URL}}js/twidenash/jquery-twidenash.js"></script> | ||
266 | 9 | <script type="text/javascript"> | 10 | <script type="text/javascript"> |
267 | 10 | //<![CDATA[ | 11 | //<![CDATA[ |
268 | 11 | $(function(){ | 12 | $(function(){ |
269 | 13 | $('.twidenash').twidenash(); | ||
270 | 12 | $('#venue-map').showLocations({markers_url:'{% url global-event-locations global_event_id=global_event_object.id %}', | 14 | $('#venue-map').showLocations({markers_url:'{% url global-event-locations global_event_id=global_event_object.id %}', |
271 | 13 | marker_icon: '{{ MEDIA_URL }}/img/marker.png'}); | 15 | marker_icon: '{{ MEDIA_URL }}/img/marker.png'}); |
272 | 14 | }); | 16 | }); |
273 | 15 | 17 | ||
274 | === modified file 'loco_directory/templates/events/global_event_detail.inc.html' | |||
275 | --- loco_directory/templates/events/global_event_detail.inc.html 2011-02-17 20:05:03 +0000 | |||
276 | +++ loco_directory/templates/events/global_event_detail.inc.html 2011-03-18 22:26:31 +0000 | |||
277 | @@ -100,7 +100,7 @@ | |||
278 | 100 | {% if global_event_object.microbloghashtag %} | 100 | {% if global_event_object.microbloghashtag %} |
279 | 101 | <article class="minor-content alone"> | 101 | <article class="minor-content alone"> |
280 | 102 | <h2>{% trans "Microblogging" %} #{{global_event_object.microbloghashtag}}</h2> | 102 | <h2>{% trans "Microblogging" %} #{{global_event_object.microbloghashtag}}</h2> |
282 | 103 | <p><script src="{{MEDIA_URL}}js/twidenash.js?{{global_event_object.microbloghashtag}}"></script></p> | 103 | <div class="twidenash" id="{{ global_event_object.microbloghashtag }}"></div> |
283 | 104 | </article> | 104 | </article> |
284 | 105 | {% endif %} | 105 | {% endif %} |
285 | 106 | 106 | ||
286 | 107 | 107 | ||
287 | === modified file 'loco_directory/templates/index.html' | |||
288 | --- loco_directory/templates/index.html 2011-02-18 03:16:32 +0000 | |||
289 | +++ loco_directory/templates/index.html 2011-03-18 22:26:31 +0000 | |||
290 | @@ -9,6 +9,14 @@ | |||
291 | 9 | {% block extrahead %}{{block.super}} | 9 | {% block extrahead %}{{block.super}} |
292 | 10 | <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}/css/twidenash.css" /> | 10 | <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}/css/twidenash.css" /> |
293 | 11 | <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}/css/continents.css" /> | 11 | <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}/css/continents.css" /> |
294 | 12 | <script type="text/javascript" src="{{MEDIA_URL}}js/twidenash/jquery-twidenash.js"></script> | ||
295 | 13 | <script type="text/javascript"> | ||
296 | 14 | //<![CDATA[ | ||
297 | 15 | $(function() { | ||
298 | 16 | $('.twidenash').twidenash(); | ||
299 | 17 | }); | ||
300 | 18 | //]]> | ||
301 | 19 | </script> | ||
302 | 12 | {% endblock %} | 20 | {% endblock %} |
303 | 13 | 21 | ||
304 | 14 | {% block content %} | 22 | {% block content %} |
305 | @@ -79,7 +87,7 @@ | |||
306 | 79 | 87 | ||
307 | 80 | <article class="minor-content alone"> | 88 | <article class="minor-content alone"> |
308 | 81 | <h2>{% trans "Microblogging" %} #locoteams</h2> | 89 | <h2>{% trans "Microblogging" %} #locoteams</h2> |
310 | 82 | <p><script src="{{MEDIA_URL}}js/twidenash.js?locoteams"></script></p> | 90 | <div class="twidenash" id="locoteams"></div> |
311 | 83 | </article> | 91 | </article> |
312 | 84 | 92 | ||
313 | 85 | {% endblock %} | 93 | {% endblock %} |
314 | 86 | 94 | ||
315 | === modified file 'loco_directory/templates/teams/team_detail.html' | |||
316 | --- loco_directory/templates/teams/team_detail.html 2011-03-02 22:34:34 +0000 | |||
317 | +++ loco_directory/templates/teams/team_detail.html 2011-03-18 22:26:31 +0000 | |||
318 | @@ -14,16 +14,21 @@ | |||
319 | 14 | 14 | ||
320 | 15 | 15 | ||
321 | 16 | {% block extrahead %}{{ block.super }} | 16 | {% block extrahead %}{{ block.super }} |
322 | 17 | <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}/css/twidenash.css" /> | ||
323 | 18 | {% if team.flickr_id or team.picasa_id or team.pixie_id %} | 17 | {% if team.flickr_id or team.picasa_id or team.pixie_id %} |
324 | 19 | <script type="text/javascript" src="{{MEDIA_URL}}jquery/jquery.js"></script> | 18 | <script type="text/javascript" src="{{MEDIA_URL}}jquery/jquery.js"></script> |
325 | 20 | <script type="text/javascript" src="{{MEDIA_URL}}js/jquery.lightbox-0.5.min.js"></script> | 19 | <script type="text/javascript" src="{{MEDIA_URL}}js/jquery.lightbox-0.5.min.js"></script> |
326 | 21 | <link rel="stylesheet" href="{{MEDIA_URL}}css/jquery.lightbox-0.5.css" type="text/css" media="screen" /> | 20 | <link rel="stylesheet" href="{{MEDIA_URL}}css/jquery.lightbox-0.5.css" type="text/css" media="screen" /> |
327 | 22 | <script type="text/javascript" src="{{MEDIA_URL}}js/jquery-flickr.js"></script> | 21 | <script type="text/javascript" src="{{MEDIA_URL}}js/jquery-flickr.js"></script> |
328 | 22 | {% endif %} | ||
329 | 23 | |||
330 | 24 | <link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}/css/twidenash.css" /> | ||
331 | 25 | <script type="text/javascript" src="{{MEDIA_URL}}js/twidenash/jquery-twidenash.js"></script> | ||
332 | 23 | <script type="text/javascript"> | 26 | <script type="text/javascript"> |
333 | 24 | $(function() { | 27 | $(function() { |
334 | 25 | var perPage = '16'; | 28 | var perPage = '16'; |
336 | 26 | {% endif %} | 29 | $('.twidenash').twidenash(); |
337 | 30 | |||
338 | 31 | |||
339 | 27 | {% if team.flickr_id %} | 32 | {% if team.flickr_id %} |
340 | 28 | $('#flickr').flickr({ key: "{{ flickr_api_key }}", id: "{{ team.flickr_id }}", amount: perPage }); | 33 | $('#flickr').flickr({ key: "{{ flickr_api_key }}", id: "{{ team.flickr_id }}", amount: perPage }); |
341 | 29 | {% endif %} | 34 | {% endif %} |
342 | @@ -65,10 +70,10 @@ | |||
343 | 65 | $("a.lightbox").lightBox(); | 70 | $("a.lightbox").lightBox(); |
344 | 66 | }); | 71 | }); |
345 | 67 | {% endif %} | 72 | {% endif %} |
346 | 68 | {% if team.flickr_id or team.picasa_id or team.pixie_id %} | ||
347 | 69 | }); | 73 | }); |
348 | 70 | 74 | ||
349 | 71 | </script> | 75 | </script> |
350 | 76 | {% if team.flickr_id or team.picasa_id or team.pixie_id %} | ||
351 | 72 | <style type="text/css"> | 77 | <style type="text/css"> |
352 | 73 | div#flickr a.lightbox img { | 78 | div#flickr a.lightbox img { |
353 | 74 | border: 5px solid #b3aaa4; | 79 | border: 5px solid #b3aaa4; |
354 | @@ -208,7 +213,7 @@ | |||
355 | 208 | {% if team.microbloghashtag %} | 213 | {% if team.microbloghashtag %} |
356 | 209 | <article class="minor-content alone"> | 214 | <article class="minor-content alone"> |
357 | 210 | <h2>{% trans "Microblogging" %} #{{team.microbloghashtag}}</h2> | 215 | <h2>{% trans "Microblogging" %} #{{team.microbloghashtag}}</h2> |
359 | 211 | <p><script src="{{MEDIA_URL}}js/twidenash.js?{{team.microbloghashtag}}"></script></p> | 216 | <div class="twidenash" id="{{ team.microbloghashtag }}"></div> |
360 | 212 | </article> | 217 | </article> |
361 | 213 | {% endif %} | 218 | {% endif %} |
362 | 214 | 219 |
Change the twidenash script to rev3 (which contains a twitter fix) then ill approve