mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2025-04-20 07:11:33 +02:00
Start with a Rails app with authentication via Persona, Foundation CSS
This commit is contained in:
parent
9ac52066b4
commit
7cd9f207f5
72 changed files with 2586 additions and 0 deletions
34
app/assets/javascripts/application.js
Normal file
34
app/assets/javascripts/application.js
Normal file
|
@ -0,0 +1,34 @@
|
|||
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
||||
// listed below.
|
||||
//
|
||||
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
||||
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
||||
//
|
||||
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
||||
// compiled file.
|
||||
//
|
||||
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
||||
// about supported directives.
|
||||
//
|
||||
//= require jquery
|
||||
//= require jquery_ujs
|
||||
//= require foundation
|
||||
//= require turbolinks
|
||||
//= require_tree .
|
||||
|
||||
$(function(){ $(document).foundation(); });
|
||||
|
||||
$('[data-persona-login]').click(function(e) {
|
||||
e.preventDefault();
|
||||
navigator.id.get(function(assertion) {
|
||||
if (assertion) {
|
||||
if (assertion) {
|
||||
var form = $('#browser-id-form');
|
||||
form.find('input[name=assertion]').val(assertion);
|
||||
form.submit();
|
||||
} else {
|
||||
// TODO: Handle failure
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
3
app/assets/javascripts/sessions.js.coffee
Normal file
3
app/assets/javascripts/sessions.js.coffee
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Place all the behaviors and hooks related to the matching controller here.
|
||||
# All this logic will automatically be available in application.js.
|
||||
# You can use CoffeeScript in this file: http://coffeescript.org/
|
Loading…
Add table
Add a link
Reference in a new issue