Lazy load Google and Persona login stuff
[?]
Apr 28, 2016, 3:13 PM
JATZRMWWP6ENJRULJ2PFW6NT35C4N3WVWACAFFNI5DKF2H6AY7FACDependencies
- [2]
BW6TYQJSUse local copy of the Persona sign in button - [3]
3QWDDLBRAdd support for logging in via a Google account - [4]
VVRM3EGCLink to both the Persona and legacy sign in - [5]
OEPUOUNBUsing twitter bootstrap for more consistent looks for Hydra - [6]
GS4SFHCPtemplates: Use uri_for to reference static paths. - [7]
TLJC6BJ3Add a menu item for deleting jobsets - [8]
36ZTCZ4FAdd basic Persona support - [9]
JFW656FTAdd a flag to enable Persona support - [10]
DV43UILUDon't float the search bar to the right in collapsed mode - [11]
4JPNFWRB* Use jquery for the logfile manipulation. - [12]
QL55ECJ6- adapted ui for hydra, more in line with nixos.org website - [*]
J5UVLXOK* Start of a basic Catalyst web interface.
Change contents
- edit in src/root/auth.tt at line 2
[% IF c.user.type == 'google' %]<script src="https://apis.google.com/js/platform.js" async="1" defer="1"></script>[% END %][% IF c.user.type == 'persona' %]<script src="https://login.persona.org/include.js"></script>[% END %] - edit in src/root/auth.tt at line 74
});$("#sign-in-menu").on("click", function() {[% IF c.config.enable_google_login %]$.getScript("https://apis.google.com/js/platform.js");[% END %][% IF c.config.enable_persona %]$.getScript("https://login.persona.org/include.js");[% END %] - replacement in src/root/auth.tt at line 99
};};$("#google-signin").click(function() {$(".g-signin2:first-child > div").click();}); - replacement in src/root/auth.tt at line 107
[% END %][% IF c.config.enable_persona %]<script src="https://login.persona.org/include.js"></script>[% IF c.config.enable_persona %]<script>$("#persona-signin").click(function() { - replacement in src/root/auth.tt at line 111
<script>navigator.id.watch({onlogin: function(assertion) {requestJSON({url: "[% c.uri_for('/persona-login') %]",data: "assertion=" + assertion,type: 'POST',success: function(data) { window.location.reload(); },postError: function() { navigator.id.logout(); }navigator.id.watch({onlogin: function(assertion) {requestJSON({url: "[% c.uri_for('/persona-login') %]",data: "assertion=" + assertion,type: 'POST',success: function(data) { window.location.reload(); },postError: function() { navigator.id.logout(); }});} - replacement in src/root/auth.tt at line 122
}});navigator.id.request({ siteName: 'Hydra' });});</script>[% END %] - edit in src/root/auth.tt at line 128
$("#persona-signin").click(function() {navigator.id.request({ siteName: 'Hydra' });});</script> - edit in src/root/layout.tt at line 46
<script src="https://apis.google.com/js/platform.js" async="1" defer="1"></script> - replacement in src/root/topbar.tt at line 2
<li class="dropdown"><li class="dropdown" [% IF id; HTML.attributes(id => id); END %] > - replacement in src/root/topbar.tt at line 133
[% WRAPPER makeSubMenu title="Sign in" %][% WRAPPER makeSubMenu title="Sign in" id="sign-in-menu" %] - replacement in src/root/topbar.tt at line 135
<li><a><div class="g-signin2" data-onsuccess="onGoogleSignIn" data-theme="dark"></div></a></li><div style="display: none" class="g-signin2" data-onsuccess="onGoogleSignIn" data-theme="dark"></div></a><li><a href="#" id="google-signin">Sign in with Google</a></li> - replacement in src/root/topbar.tt at line 140[3.7346]→[4.692:748](∅→∅),[4.692]→[4.692:748](∅→∅),[4.748]→[2.3723:3835](∅→∅),[2.3835]→[4.867:896](∅→∅),[4.867]→[4.867:896](∅→∅)
<li><a href="#" id="persona-signin"><img src="[% c.uri_for("/static/images/persona_sign_in_blue.png") %]" alt="Sign in with Persona" /></a></li><li><a href="#" id="persona-signin">Sign in with Persona</a></li>