14 changed files with 48 additions and 78 deletions
After Width: | Height: | Size: 47 KiB |
@ -1,11 +1,8 @@
|
||||
# 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/ |
||||
# |
||||
$(document).ready -> |
||||
$('form.region_selector select').change -> |
||||
this.form.submit() |
||||
|
||||
selector = $('main form.region_selector + h2') |
||||
year = selector.html().substr selector.html().search(/\d{4}</), 4 |
||||
selector.html selector.html().replace(/\d{4}</, '<a class="year_selector" href="?year='+year+'">'+year+'</a><') |
||||
$('main form.region_selector + h2').each -> |
||||
selector = $(this) |
||||
year = selector.html().substr selector.html().search(/\d{4}</), 4 |
||||
selector.html selector.html().replace(/\d{4}</, '<a class="year_selector" href="?year='+year+'">'+year+'</a><') |
||||
|
@ -0,0 +1,6 @@
|
||||
$(document).ready -> |
||||
$('#flash_messages .flash').removeClass('flash').each -> |
||||
jQuery.gritter.add |
||||
image: "/assets/#{$(this).attr('class')}.png", |
||||
title: $(this).children('h2').text(), |
||||
text: $(this).children('p').text() |
@ -1,69 +0,0 @@
|
||||
body { |
||||
background-color: #fff; |
||||
color: #333; |
||||
font-family: verdana, arial, helvetica, sans-serif; |
||||
font-size: 13px; |
||||
line-height: 18px; |
||||
} |
||||
|
||||
p, ol, ul, td { |
||||
font-family: verdana, arial, helvetica, sans-serif; |
||||
font-size: 13px; |
||||
line-height: 18px; |
||||
} |
||||
|
||||
pre { |
||||
background-color: #eee; |
||||
padding: 10px; |
||||
font-size: 11px; |
||||
} |
||||
|
||||
a { |
||||
color: #000; |
||||
&:visited { |
||||
color: #666; |
||||
} |
||||
&:hover { |
||||
color: #fff; |
||||
background-color: #000; |
||||
} |
||||
} |
||||
|
||||
div { |
||||
&.field, &.actions { |
||||
margin-bottom: 10px; |
||||
} |
||||
} |
||||
|
||||
#notice { |
||||
color: green; |
||||
} |
||||
|
||||
.field_with_errors { |
||||
padding: 2px; |
||||
background-color: red; |
||||
display: table; |
||||
} |
||||
|
||||
#error_explanation { |
||||
width: 450px; |
||||
border: 2px solid red; |
||||
padding: 7px; |
||||
padding-bottom: 0; |
||||
margin-bottom: 20px; |
||||
background-color: #f0f0f0; |
||||
h2 { |
||||
text-align: left; |
||||
font-weight: bold; |
||||
padding: 5px 5px 5px 15px; |
||||
font-size: 12px; |
||||
margin: -7px; |
||||
margin-bottom: 0px; |
||||
background-color: #c00; |
||||
color: #fff; |
||||
} |
||||
ul li { |
||||
font-size: 12px; |
||||
list-style: square; |
||||
} |
||||
} |
@ -1,3 +1,5 @@
|
||||
#flash_messages |
||||
- flash.each do |key, value| |
||||
.flash(class="#{key}")= value |
||||
.flash(class="#{key}") |
||||
%h2=t key, scope: [:gflash, :titles] |
||||
%p= value |
||||
|
@ -0,0 +1,12 @@
|
||||
en: |
||||
gflash: |
||||
# |
||||
# These are the translations for the different titles. |
||||
# |
||||
titles: |
||||
alert: "Your attention" |
||||
notice: "Notice" |
||||
success: "Success" |
||||
warning: "Warning" |
||||
error: "Error" |
||||
progress: "Progress" |
Loading…
Reference in new issue