Bundle update, and upgrade to latest turbolinks

This commit is contained in:
echarp 2016-07-02 16:48:47 +02:00
parent 9c55f58254
commit 64aa18aacd
19 changed files with 39 additions and 55 deletions

View File

@ -112,7 +112,6 @@ group :development, :test, :assets do
# Turbolinks makes following links in your web application # Turbolinks makes following links in your web application
# faster. Read more: https://github.com/rails/turbolinks # faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks' gem 'turbolinks'
gem 'jquery-turbolinks'
# bundle exec rake doc:rails generates the API under doc/api. # bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', group: :doc gem 'sdoc', group: :doc

View File

@ -46,7 +46,7 @@ GEM
rails-html-sanitizer (~> 1.0, >= 1.0.2) rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview-encoded_mail_to (1.0.7) actionview-encoded_mail_to (1.0.7)
rails rails
activeadmin (1.0.0.pre2) activeadmin (1.0.0.pre3)
arbre (~> 1.0, >= 1.0.2) arbre (~> 1.0, >= 1.0.2)
bourbon bourbon
coffee-rails coffee-rails
@ -59,6 +59,7 @@ GEM
rails (>= 3.2, < 5.0) rails (>= 3.2, < 5.0)
ransack (~> 1.3) ransack (~> 1.3)
sass-rails sass-rails
sprockets (< 4)
activeadmin_pagedown (0.0.2) activeadmin_pagedown (0.0.2)
activeadmin (>= 0.5.0) activeadmin (>= 0.5.0)
activejob (4.2.6) activejob (4.2.6)
@ -90,11 +91,11 @@ GEM
buftok (0.2.0) buftok (0.2.0)
builder (3.2.2) builder (3.2.2)
byebug (9.0.5) byebug (9.0.5)
chunky_png (1.3.5) chunky_png (1.3.6)
coderay (1.1.1) coderay (1.1.1)
coffee-rails (4.1.1) coffee-rails (4.2.1)
coffee-script (>= 2.2.0) coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.1.x) railties (>= 4.0.0, < 5.2.x)
coffee-script (2.4.1) coffee-script (2.4.1)
coffee-script-source coffee-script-source
execjs execjs
@ -222,9 +223,6 @@ GEM
rails-dom-testing (~> 1.0) rails-dom-testing (~> 1.0)
railties (>= 4.2.0) railties (>= 4.2.0)
thor (>= 0.14, < 2.0) thor (>= 0.14, < 2.0)
jquery-turbolinks (2.1.0)
railties (>= 3.1.0)
turbolinks
jquery-ui-rails (5.0.5) jquery-ui-rails (5.0.5)
railties (>= 3.2.16) railties (>= 3.2.16)
json (1.8.3) json (1.8.3)
@ -267,7 +265,7 @@ GEM
nenv (~> 0.1) nenv (~> 0.1)
shellany (~> 0.0) shellany (~> 0.0)
orm_adapter (0.5.0) orm_adapter (0.5.0)
paper_trail (5.1.1) paper_trail (5.2.0)
activerecord (>= 3.0, < 6.0) activerecord (>= 3.0, < 6.0)
activesupport (>= 3.0, < 6.0) activesupport (>= 3.0, < 6.0)
request_store (~> 1.1) request_store (~> 1.1)
@ -333,8 +331,8 @@ GEM
request_store (1.3.1) request_store (1.3.1)
responders (2.2.0) responders (2.2.0)
railties (>= 4.2.0, < 5.1) railties (>= 4.2.0, < 5.1)
rubocop (0.40.0) rubocop (0.41.1)
parser (>= 2.3.1.0, < 3.0) parser (>= 2.3.1.1, < 3.0)
powerpack (~> 0.1) powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0) rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
@ -367,10 +365,10 @@ GEM
simplecov-html (0.10.0) simplecov-html (0.10.0)
slop (3.6.0) slop (3.6.0)
spring (1.7.1) spring (1.7.1)
sprockets (3.6.0) sprockets (3.6.2)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
rack (> 1, < 3) rack (> 1, < 3)
sprockets-rails (3.0.4) sprockets-rails (3.1.1)
actionpack (>= 4.0) actionpack (>= 4.0)
activesupport (>= 4.0) activesupport (>= 4.0)
sprockets (>= 3.0.0) sprockets (>= 3.0.0)
@ -388,8 +386,9 @@ GEM
railties (>= 3.1.1) railties (>= 3.1.1)
tinymce-rails-langs (4.20160310) tinymce-rails-langs (4.20160310)
tinymce-rails (~> 4.1, >= 4.1.10) tinymce-rails (~> 4.1, >= 4.1.10)
turbolinks (2.5.3) turbolinks (5.0.0)
coffee-rails turbolinks-source (~> 5)
turbolinks-source (5.0.0)
twitter (5.16.0) twitter (5.16.0)
addressable (~> 2.3) addressable (~> 2.3)
buftok (~> 0.2.0) buftok (~> 0.2.0)
@ -408,7 +407,7 @@ GEM
unf (0.1.4) unf (0.1.4)
unf_ext unf_ext
unf_ext (0.0.7.2) unf_ext (0.0.7.2)
unicode-display_width (1.0.5) unicode-display_width (1.1.0)
warden (1.2.6) warden (1.2.6)
rack (>= 1.0) rack (>= 1.0)
web-console (3.3.0) web-console (3.3.0)
@ -450,7 +449,6 @@ DEPENDENCIES
jbuilder jbuilder
jquery-rails (< 4.1) jquery-rails (< 4.1)
jquery-sparkline-rails! jquery-sparkline-rails!
jquery-turbolinks
leaflet-markercluster-rails leaflet-markercluster-rails
leaflet-rails leaflet-rails
meta-tags meta-tags

View File

@ -26,10 +26,8 @@ ActiveAdmin.register_page 'Dashboard' do
end end
panel 'Git' do panel 'Git' do
para %(Actuellement: link_to(`git log -n 1 --oneline`,
#{link_to(`git rev-parse --short HEAD`, '//git.framasoft.org/agenda-libre/agenda-libre-ruby')
'//git.framasoft.org/agenda-libre/agenda-libre-ruby')})
.html_safe
end end
end end
end end

View File

@ -13,7 +13,6 @@
#= require jquery #= require jquery
#= require jquery_ujs #= require jquery_ujs
#= require jquery.sparkline #= require jquery.sparkline
#= require jquery.turbolinks
#= require turbolinks #= require turbolinks
#= require tinymce-jquery #= require tinymce-jquery
#= require modernizr #= require modernizr
@ -34,18 +33,10 @@ $.webshims.setOptions 'forms-ext',
'classes': 'show-yearbtns hide-btnrow show-uparrow' 'classes': 'show-yearbtns hide-btnrow show-uparrow'
$.webshims.polyfill 'forms forms-ext' $.webshims.polyfill 'forms forms-ext'
Turbolinks.enableProgressBar() $(document).on 'turbolinks:load', ->
$(document).on 'page:fetch submit', ->
$('em#loading').fadeIn('slow')
$(document).on 'page:change ready', ->
$('em#loading').fadeOut('slow')
$(document).on 'page:load', ->
# Reload polyfill when turbolinks loads a new page # Reload polyfill when turbolinks loads a new page
$(this).updatePolyfill() $(this).updatePolyfill()
$(document).ready ->
# Hides the chrome broken image when image is absent # Hides the chrome broken image when image is absent
if !Modernizr.testAllProps('forceBrokenImageIcon') if !Modernizr.testAllProps('forceBrokenImageIcon')
$('img.favicon').one 'error', -> $('img.favicon').one 'error', ->

View File

@ -1,4 +1,4 @@
$(document).ready -> $(document).on 'turbolinks:load', ->
# Manage event tags edition # Manage event tags edition
$('#event_tags').each -> $('#event_tags').each ->
elt = $(this) elt = $(this)

View File

@ -1 +1 @@
$(document).ready -> $(document).on 'turbolinks:load', ->

View File

@ -1 +1 @@
$(document).ready -> $(document).on 'turbolinks:load', ->

View File

@ -1,5 +1,5 @@
# Setting up OpenStreeMap from a generic #map element # Setting up OpenStreeMap from a generic #map element
$(document).ready -> $(document).on 'turbolinks:load', ->
markerColors = ['blue', 'red', 'darkred', 'orange', 'green', 'darkgreen', 'purple', 'darkpuple', 'cadetblue'] markerColors = ['blue', 'red', 'darkred', 'orange', 'green', 'darkgreen', 'purple', 'darkpuple', 'cadetblue']
idx = 0 idx = 0
$('#map.list').each -> $('#map.list').each ->

View File

@ -1,5 +1,5 @@
$(document).ready -> $(document).on 'turbolinks:load', ->
$('body.moderations .field.closer input[type=radio]').click -> $('body.moderations .field.closer input[type=radio]').click ->
$('body.moderations #event_reason_text').parent().slideUp() $('body.moderations #event_reason').parent().slideUp()
$('body.moderations .field.opener input[type=radio]').click -> $('body.moderations .field.opener input[type=radio]').click ->
$('body.moderations #event_reason_text').parent().slideDown() $('body.moderations #event_reason').parent().slideDown()

View File

@ -1,4 +1,4 @@
$(document).ready -> $(document).on 'turbolinks:load', ->
# Manage orga tags edition # Manage orga tags edition
$('#orga_tags').each -> $('#orga_tags').each ->
elt = $(this) elt = $(this)

View File

@ -2,7 +2,7 @@
# To not setup pagination twice # To not setup pagination twice
pager = true pager = true
$(document).ready -> $(document).on 'turbolinks:load', ->
$('.pagination .next a') $('.pagination .next a')
.attr('data-remote', true) .attr('data-remote', true)
.click -> .click ->

View File

@ -1,4 +1,4 @@
$(document).ready -> $(document).on 'turbolinks:load', ->
# Sparline generation along the data tables # Sparline generation along the data tables
$('table.list.dates tbody tr').each -> $('table.list.dates tbody tr').each ->
vals = $(this).find('td.quantity').map -> vals = $(this).find('td.quantity').map ->

View File

@ -1,4 +1,4 @@
$(document).ready -> $(document).on 'turbolinks:load', ->
# Setup the graphical editor for event's description # Setup the graphical editor for event's description
tinyMCE.init tinyMCE.init
schema: 'html5', schema: 'html5',
@ -22,6 +22,6 @@ $(document).ready ->
preview, table, fullscreen, searchreplace, media, insertdatetime, preview, table, fullscreen, searchreplace, media, insertdatetime,
visualblocks, visualchars, wordcount, contextmenu, code' visualblocks, visualchars, wordcount, contextmenu, code'
$(document).on 'page:receive', -> $(document).on 'turbolinks:before-cache', ->
# Delete existing tinymce editors, very important in the turbolinks context! # Delete existing tinymce editors, very important in the turbolinks context!
tinymce.remove() tinymce.remove()

View File

@ -14,7 +14,7 @@ class EventMailer < ApplicationMailer
def accept(event) def accept(event)
@event = event @event = event
@current_user = User.find_by id: event.paper_trail_originator @current_user = User.find_by id: event.paper_trail.originator
mail 'In-Reply-To' => mail 'In-Reply-To' =>
"<event-#{event.id}@#{ActionMailer::Base.default_url_options[:host]}>", "<event-#{event.id}@#{ActionMailer::Base.default_url_options[:host]}>",
@ -25,7 +25,7 @@ class EventMailer < ApplicationMailer
def destroy(event) def destroy(event)
@event = event @event = event
@current_user = User.find_by id: event.paper_trail_originator @current_user = User.find_by id: event.paper_trail.originator
mail 'In-Reply-To' => mail 'In-Reply-To' =>
"<event-#{event.id}@#{ActionMailer::Base.default_url_options[:host]}>", "<event-#{event.id}@#{ActionMailer::Base.default_url_options[:host]}>",

View File

@ -13,7 +13,7 @@ class ModerationMailer < ApplicationMailer
def update(event) def update(event)
@event = event @event = event
@current_user = User.find_by id: event.paper_trail_originator @current_user = User.find_by id: event.paper_trail.originator
mail 'In-Reply-To' => mail 'In-Reply-To' =>
"<mod-#{event.id}@#{ActionMailer::Base.default_url_options[:host]}>", "<mod-#{event.id}@#{ActionMailer::Base.default_url_options[:host]}>",
@ -23,7 +23,7 @@ class ModerationMailer < ApplicationMailer
def accept(event) def accept(event)
@event = event @event = event
@current_user = User.find_by id: event.paper_trail_originator @current_user = User.find_by id: event.paper_trail.originator
mail 'In-Reply-To' => mail 'In-Reply-To' =>
"<mod-#{event.id}@#{ActionMailer::Base.default_url_options[:host]}>", "<mod-#{event.id}@#{ActionMailer::Base.default_url_options[:host]}>",
@ -33,7 +33,7 @@ class ModerationMailer < ApplicationMailer
def destroy(event) def destroy(event)
@event = event @event = event
@current_user = User.find_by id: event.paper_trail_originator @current_user = User.find_by id: event.paper_trail.originator
mail 'In-Reply-To' => mail 'In-Reply-To' =>
"<mod-#{event.id}@#{ActionMailer::Base.default_url_options[:host]}>", "<mod-#{event.id}@#{ActionMailer::Base.default_url_options[:host]}>",

View File

@ -24,7 +24,7 @@ class OrgaMailer < ApplicationMailer
# #
def update(orga) def update(orga)
@orga = orga @orga = orga
@current_user = User.find_by id: orga.paper_trail_originator @current_user = User.find_by id: orga.paper_trail.originator
mail 'Message-ID' => mail 'Message-ID' =>
"<orga-#{orga.id}@#{ActionMailer::Base.default_url_options[:host]}>", "<orga-#{orga.id}@#{ActionMailer::Base.default_url_options[:host]}>",
@ -40,7 +40,7 @@ class OrgaMailer < ApplicationMailer
# #
def accept(orga) def accept(orga)
@orga = orga @orga = orga
@current_user = User.find_by id: orga.paper_trail_originator @current_user = User.find_by id: orga.paper_trail.originator
mail 'In-Reply-To' => mail 'In-Reply-To' =>
"<orga-#{orga.id}@#{ActionMailer::Base.default_url_options[:host]}>", "<orga-#{orga.id}@#{ActionMailer::Base.default_url_options[:host]}>",
@ -56,7 +56,7 @@ class OrgaMailer < ApplicationMailer
# #
def destroy(orga, reason = '') def destroy(orga, reason = '')
@orga = orga @orga = orga
@current_user = User.find_by id: orga.paper_trail_originator @current_user = User.find_by id: orga.paper_trail.originator
@reason = reason @reason = reason
mail 'In-Reply-To' => mail 'In-Reply-To' =>

View File

@ -77,5 +77,3 @@
= link_to moderations_path do = link_to moderations_path do
%em.fa.fa-gavel %em.fa.fa-gavel
= t '.moderation' = t '.moderation'
%em.fa.fa-spin.fa-circle-o-notch#loading

View File

@ -4,7 +4,7 @@
new = render file: '/events/show' new = render file: '/events/show'
former = @event former = @event
@event = @event.previous_version if @event.previous_version @event = @event.paper_trail.previous_version || @event
prev = render file: '/events/show' prev = render file: '/events/show'
@event = former @event = former

View File

@ -4,7 +4,7 @@
new = render file: '/orgas/show' new = render file: '/orgas/show'
former = @orga former = @orga
@orga = @orga.previous_version @orga = @orga.paper_trail.previous_version
prev = render file: '/orgas/show' prev = render file: '/orgas/show'
@orga = former @orga = former