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
# faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
gem 'jquery-turbolinks'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', group: :doc

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
$(document).ready ->
$(document).on 'turbolinks:load', ->
# Manage event tags edition
$('#event_tags').each ->
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
$(document).ready ->
$(document).on 'turbolinks:load', ->
markerColors = ['blue', 'red', 'darkred', 'orange', 'green', 'darkgreen', 'purple', 'darkpuple', 'cadetblue']
idx = 0
$('#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 #event_reason_text').parent().slideUp()
$('body.moderations #event_reason').parent().slideUp()
$('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
$('#orga_tags').each ->
elt = $(this)

View File

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

View File

@ -1,4 +1,4 @@
$(document).ready ->
$(document).on 'turbolinks:load', ->
# Sparline generation along the data tables
$('table.list.dates tbody tr').each ->
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
tinyMCE.init
schema: 'html5',
@ -22,6 +22,6 @@ $(document).ready ->
preview, table, fullscreen, searchreplace, media, insertdatetime,
visualblocks, visualchars, wordcount, contextmenu, code'
$(document).on 'page:receive', ->
$(document).on 'turbolinks:before-cache', ->
# Delete existing tinymce editors, very important in the turbolinks context!
tinymce.remove()

View File

@ -14,7 +14,7 @@ class EventMailer < ApplicationMailer
def accept(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' =>
"<event-#{event.id}@#{ActionMailer::Base.default_url_options[:host]}>",
@ -25,7 +25,7 @@ class EventMailer < ApplicationMailer
def destroy(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' =>
"<event-#{event.id}@#{ActionMailer::Base.default_url_options[:host]}>",

View File

@ -13,7 +13,7 @@ class ModerationMailer < ApplicationMailer
def update(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' =>
"<mod-#{event.id}@#{ActionMailer::Base.default_url_options[:host]}>",
@ -23,7 +23,7 @@ class ModerationMailer < ApplicationMailer
def accept(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' =>
"<mod-#{event.id}@#{ActionMailer::Base.default_url_options[:host]}>",
@ -33,7 +33,7 @@ class ModerationMailer < ApplicationMailer
def destroy(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' =>
"<mod-#{event.id}@#{ActionMailer::Base.default_url_options[:host]}>",

View File

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

View File

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

View File

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

View File

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