Index: trunk/mockups/athena/athena.js |
— | — | @@ -129,12 +129,45 @@ |
130 | 130 | init: function() { |
131 | 131 | embed.init(); |
132 | 132 | |
| 133 | + /* |
133 | 134 | $('.button-main').click(function() { |
134 | 135 | // temp hack |
135 | 136 | // toggle the floating state |
136 | 137 | $('.bar').toggleClass('bar-float'); |
137 | 138 | }); |
| 139 | + */ |
138 | 140 | |
| 141 | + $('.button-main').click(function() { |
| 142 | + app.loadPage('Main Page'); |
| 143 | + }); |
| 144 | + $('.button-you').click(function() { |
| 145 | + app.loadPage('User:Jorm (WMF)'); |
| 146 | + }); |
| 147 | + |
| 148 | + var linkMap = { |
| 149 | + main: 'Main Page', |
| 150 | + you: 'User:Jorm (WMF)', |
| 151 | + notifications: 'User talk:Jorm (WMF)', |
| 152 | + contributions: 'Special:Contributions', |
| 153 | + preferences: 'Special:Preferences', |
| 154 | + help: 'Help:Contents', |
| 155 | + contents: 'Portal:Contents', |
| 156 | + featured: 'Portal:Featured content', |
| 157 | + current: 'Portal:Current events', |
| 158 | + community: 'Wikipedia:Community portal', |
| 159 | + upload: 'Special:Upload' |
| 160 | + }; |
| 161 | + $('a').click(function(event) { |
| 162 | + var $a = $(this), |
| 163 | + href = $a.attr('href'); |
| 164 | + if (href.substr(0, 1) == '#') { |
| 165 | + var target = href.substr(1); |
| 166 | + if (target in linkMap) { |
| 167 | + app.loadPage(linkMap[target]); |
| 168 | + event.preventDefault(); |
| 169 | + } |
| 170 | + } |
| 171 | + }); |
139 | 172 | app.loadPage('While My Guitar Gently Weeps'); |
140 | 173 | }, |
141 | 174 | |