Update turbolinks
This commit is contained in:
parent
03aa7358b3
commit
08442e64a3
28 changed files with 61 additions and 68 deletions
2
Gemfile
2
Gemfile
|
@ -16,7 +16,7 @@ gem 'therubyracer', platforms: :ruby
|
||||||
# Use jquery as the JavaScript library
|
# Use jquery as the JavaScript library
|
||||||
gem 'jquery-rails'
|
gem 'jquery-rails'
|
||||||
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
|
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
|
||||||
gem 'turbolinks', '~> 2.5'
|
gem 'turbolinks', '~> 5.0'
|
||||||
# bundle exec rake doc:rails generates the API under doc/api.
|
# bundle exec rake doc:rails generates the API under doc/api.
|
||||||
gem 'sdoc', '~> 0.4.0', group: :doc
|
gem 'sdoc', '~> 0.4.0', group: :doc
|
||||||
|
|
||||||
|
|
23
Gemfile.lock
23
Gemfile.lock
|
@ -95,7 +95,7 @@ GEM
|
||||||
bootstrap-wysihtml5-rails (0.3.3.8)
|
bootstrap-wysihtml5-rails (0.3.3.8)
|
||||||
railties (>= 3.0)
|
railties (>= 3.0)
|
||||||
browser (2.3.0)
|
browser (2.3.0)
|
||||||
builder (3.2.2)
|
builder (3.2.3)
|
||||||
byebug (9.0.6)
|
byebug (9.0.6)
|
||||||
capybara (2.11.0)
|
capybara (2.11.0)
|
||||||
addressable
|
addressable
|
||||||
|
@ -120,8 +120,8 @@ GEM
|
||||||
coffee-script (2.4.1)
|
coffee-script (2.4.1)
|
||||||
coffee-script-source
|
coffee-script-source
|
||||||
execjs
|
execjs
|
||||||
coffee-script-source (1.11.1)
|
coffee-script-source (1.12.2)
|
||||||
concurrent-ruby (1.0.2)
|
concurrent-ruby (1.0.5)
|
||||||
connection_pool (2.2.1)
|
connection_pool (2.2.1)
|
||||||
crack (0.4.3)
|
crack (0.4.3)
|
||||||
safe_yaml (~> 1.0.0)
|
safe_yaml (~> 1.0.0)
|
||||||
|
@ -331,7 +331,7 @@ GEM
|
||||||
domain_name (~> 0.5)
|
domain_name (~> 0.5)
|
||||||
http_parser.rb (0.6.0)
|
http_parser.rb (0.6.0)
|
||||||
httpclient (2.8.3)
|
httpclient (2.8.3)
|
||||||
i18n (0.7.0)
|
i18n (0.8.1)
|
||||||
inflecto (0.0.2)
|
inflecto (0.0.2)
|
||||||
ipaddress (0.8.3)
|
ipaddress (0.8.3)
|
||||||
jquery-rails (4.2.1)
|
jquery-rails (4.2.1)
|
||||||
|
@ -452,9 +452,9 @@ GEM
|
||||||
actionpack (~> 5.x)
|
actionpack (~> 5.x)
|
||||||
actionview (~> 5.x)
|
actionview (~> 5.x)
|
||||||
activesupport (~> 5.x)
|
activesupport (~> 5.x)
|
||||||
rails-dom-testing (2.0.1)
|
rails-dom-testing (2.0.2)
|
||||||
activesupport (>= 4.2.0, < 6.0)
|
activesupport (>= 4.2.0, < 6.0)
|
||||||
nokogiri (~> 1.6.0)
|
nokogiri (~> 1.6)
|
||||||
rails-html-sanitizer (1.0.3)
|
rails-html-sanitizer (1.0.3)
|
||||||
loofah (~> 2.0)
|
loofah (~> 2.0)
|
||||||
railties (5.0.0.1)
|
railties (5.0.0.1)
|
||||||
|
@ -585,13 +585,14 @@ GEM
|
||||||
libv8 (~> 3.16.14.0)
|
libv8 (~> 3.16.14.0)
|
||||||
ref
|
ref
|
||||||
thor (0.19.4)
|
thor (0.19.4)
|
||||||
thread_safe (0.3.5)
|
thread_safe (0.3.6)
|
||||||
tilt (2.0.5)
|
tilt (2.0.5)
|
||||||
timecop (0.8.1)
|
timecop (0.8.1)
|
||||||
trollop (2.1.2)
|
trollop (2.1.2)
|
||||||
turbolinks (2.5.3)
|
turbolinks (5.0.1)
|
||||||
coffee-rails
|
turbolinks-source (~> 5)
|
||||||
tzinfo (1.2.2)
|
turbolinks-source (5.0.0)
|
||||||
|
tzinfo (1.2.3)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
uglifier (3.0.4)
|
uglifier (3.0.4)
|
||||||
execjs (>= 0.3.0, < 3)
|
execjs (>= 0.3.0, < 3)
|
||||||
|
@ -707,7 +708,7 @@ DEPENDENCIES
|
||||||
sqlite3
|
sqlite3
|
||||||
therubyracer
|
therubyracer
|
||||||
timecop
|
timecop
|
||||||
turbolinks (~> 2.5)
|
turbolinks (~> 5.0)
|
||||||
uglifier (>= 1.3.0)
|
uglifier (>= 1.3.0)
|
||||||
unicode_utils
|
unicode_utils
|
||||||
unicorn
|
unicorn
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', init_action_btn_rules);
|
$(document).on('turbolinks:load', init_action_btn_rules);
|
||||||
$(document).ready(init_action_btn_rules);
|
|
||||||
|
|
||||||
function init_action_btn_rules() {
|
function init_action_btn_rules() {
|
||||||
$('.btn-send').click(function () {
|
$('.btn-send').click(function () {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', init_admin);
|
$(document).on('turbolinks:load', init_admin);
|
||||||
$(document).ready(init_admin);
|
|
||||||
|
|
||||||
function init_admin(){
|
function init_admin(){
|
||||||
destroy_action();
|
destroy_action();
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', init_path_modal);
|
$(document).on('turbolinks:load', init_path_modal);
|
||||||
$(document).ready(init_path_modal);
|
|
||||||
|
|
||||||
function init_path_modal() {
|
function init_path_modal() {
|
||||||
path_modal_action();
|
path_modal_action();
|
||||||
|
@ -95,4 +94,4 @@ function transfer_errors_message(show) {
|
||||||
else {
|
else {
|
||||||
$("#not_found_admin").slideUp(100)
|
$("#not_found_admin").slideUp(100)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,8 +33,7 @@
|
||||||
//= require typeahead.bundle
|
//= require typeahead.bundle
|
||||||
//= require select2
|
//= require select2
|
||||||
|
|
||||||
$(document).on('page:load', application_init);
|
$(document).on('turbolinks:load', application_init);
|
||||||
$(document).ready(application_init);
|
|
||||||
|
|
||||||
|
|
||||||
function application_init(){
|
function application_init(){
|
||||||
|
@ -55,4 +54,3 @@ function scroll_to() {
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', buttons_archived);
|
$(document).on('turbolinks:load', buttons_archived);
|
||||||
$(document).ready(buttons_archived);
|
|
||||||
|
|
||||||
function buttons_archived(){
|
function buttons_archived(){
|
||||||
$("button#archive").on('click', function(){
|
$("button#archive").on('click', function(){
|
||||||
|
@ -11,4 +10,4 @@ function buttons_archived(){
|
||||||
$("button#archive").show();
|
$("button#archive").show();
|
||||||
$("#confirm").hide();
|
$("#confirm").hide();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).ready(wysihtml5_active);
|
$(document).on('turbolinks:load', wysihtml5_active);
|
||||||
$(document).on('page:load', wysihtml5_active);
|
|
||||||
|
|
||||||
function wysihtml5_active (){
|
function wysihtml5_active (){
|
||||||
$('.wysihtml5').each(function(i, elem) {
|
$('.wysihtml5').each(function(i, elem) {
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
$(document).on('page:load', buttons_anchor);
|
$(document).on('turbolinks:load', buttons_anchor);
|
||||||
$(document).ready(buttons_anchor);
|
|
||||||
|
|
||||||
function buttons_anchor(){
|
function buttons_anchor(){
|
||||||
$("#cgu_menu_block").on('click', 'a', function(){
|
$("#cgu_menu_block").on('click', 'a', function(){
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
$('html,body').animate({scrollTop:$(this.hash).offset().top-80}, 500);
|
$('html,body').animate({scrollTop:$(this.hash).offset().top-80}, 500);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', init_default_data_block);
|
$(document).on('turbolinks:load', init_default_data_block);
|
||||||
$(document).ready(init_default_data_block);
|
|
||||||
|
|
||||||
function init_default_data_block() {
|
function init_default_data_block() {
|
||||||
$('.default_data_block #dossier .body').toggle();
|
$('.default_data_block #dossier .body').toggle();
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', action_type_de_champs);
|
$(document).on('turbolinks:load', action_type_de_champs);
|
||||||
$(document).ready(action_type_de_champs);
|
|
||||||
|
|
||||||
|
|
||||||
function action_type_de_champs() {
|
function action_type_de_champs() {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', init_modal_commentaire);
|
$(document).on('turbolinks:load', init_modal_commentaire);
|
||||||
$(document).ready(init_modal_commentaire);
|
|
||||||
|
|
||||||
function init_modal_commentaire() {
|
function init_modal_commentaire() {
|
||||||
var modal = $("#modalCommentairesDossierParChamp");
|
var modal = $("#modalCommentairesDossierParChamp");
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
$(document).on('page:load', the_terms);
|
$(document).on('turbolinks:load', the_terms);
|
||||||
$(document).ready(the_terms);
|
$(document).on('turbolinks:load', pannel_switch);
|
||||||
$(document).on('page:load', pannel_switch);
|
|
||||||
$(document).ready(pannel_switch);
|
|
||||||
|
|
||||||
function pannel_switch() {
|
function pannel_switch() {
|
||||||
$('#switch-notifications').click(function () {
|
$('#switch-notifications').click(function () {
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
$(document).on('page:load', filters_init);
|
$(document).on('turbolinks:load', filters_init);
|
||||||
$(document).ready(filters_init);
|
|
||||||
|
|
||||||
function filters_init() {
|
function filters_init() {
|
||||||
$('html').click(function(event) {
|
$('html').click(function(event) {
|
||||||
var visible_filter = $('.filter_framed:visible')
|
var visible_filter = $('.filter_framed:visible')
|
||||||
if(visible_filter.length) {
|
if(visible_filter.length) {
|
||||||
if (!$(event.target).closest('.filter_framed').is(":visible")) {
|
if (!$(event.target).closest('.filter_framed').is(":visible")) {
|
||||||
visible_filter.hide();
|
visible_filter.hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".filter").on('click', function (event) {
|
$(".filter").on('click', function (event) {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', link_init);
|
$(document).on('turbolinks:load', link_init);
|
||||||
$(document).ready(link_init);
|
|
||||||
|
|
||||||
function link_init() {
|
function link_init() {
|
||||||
$('#dossiers_list tr').on('click', function () {
|
$('#dossiers_list tr').on('click', function () {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
$(document).on('page:load', franceconnect_kit);
|
$(document).on('turbolinks:load', franceconnect_kit);
|
||||||
$(document).ready(franceconnect_kit);
|
|
||||||
|
|
||||||
function franceconnect_kit() {
|
function franceconnect_kit() {
|
||||||
franceConnectKit.init()
|
franceConnectKit.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', modal_action);
|
$(document).on('turbolinks:load', modal_action);
|
||||||
$(document).ready(modal_action);
|
|
||||||
|
|
||||||
function modal_action() {
|
function modal_action() {
|
||||||
$('#PJmodal').on('show.bs.modal', function (event) {
|
$('#PJmodal').on('show.bs.modal', function (event) {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', pref_list_dossier_actions);
|
$(document).on('turbolinks:load', pref_list_dossier_actions);
|
||||||
$(document).ready(pref_list_dossier_actions);
|
|
||||||
|
|
||||||
function pref_list_dossier_actions() {
|
function pref_list_dossier_actions() {
|
||||||
pref_list_dossier_open_action();
|
pref_list_dossier_open_action();
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', button_edit_procedure_init);
|
$(document).on('turbolinks:load', button_edit_procedure_init);
|
||||||
$(document).ready(button_edit_procedure_init);
|
|
||||||
|
|
||||||
function button_edit_procedure_init(){
|
function button_edit_procedure_init(){
|
||||||
buttons_api_carto();
|
buttons_api_carto();
|
||||||
|
@ -35,4 +34,4 @@ function button_individual () {
|
||||||
|
|
||||||
if ($('#procedure_for_individual').is(':checked'))
|
if ($('#procedure_for_individual').is(':checked'))
|
||||||
$("#individual_with_siret").show();
|
$("#individual_with_siret").show();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', init_search_anim);
|
$(document).on('turbolinks:load', init_search_anim);
|
||||||
$(document).ready(init_search_anim);
|
|
||||||
|
|
||||||
function init_search_anim(){
|
function init_search_anim(){
|
||||||
$("#search_area").on('click', search_fadeIn);
|
$("#search_area").on('click', search_fadeIn);
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
$(document).on('page:load', activeSelect2);
|
$(document).on('turbolinks:load', activeSelect2);
|
||||||
$(document).ready(activeSelect2);
|
|
||||||
|
|
||||||
function activeSelect2() {
|
function activeSelect2() {
|
||||||
$('select.select2').select2({ theme: "bootstrap", width: '100%' });
|
$('select.select2').select2({ theme: "bootstrap", width: '100%' });
|
||||||
|
|
5
app/assets/stylesheets/_turbolinks.scss
Normal file
5
app/assets/stylesheets/_turbolinks.scss
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
@import "variables";
|
||||||
|
|
||||||
|
.turbolinks-progress-bar {
|
||||||
|
background-color: $light-blue;
|
||||||
|
}
|
|
@ -1 +1,5 @@
|
||||||
$font-size-base: 16px;
|
// colors
|
||||||
|
$light-blue: #F2F6FA;
|
||||||
|
|
||||||
|
// Bootstrap variables
|
||||||
|
$font-size-base: 16px;
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
@import "bootstrap";
|
@import "bootstrap";
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: #F2F6FA;
|
background-color: $light-blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
html, body {
|
html, body {
|
||||||
|
@ -63,7 +63,7 @@ form {
|
||||||
}
|
}
|
||||||
|
|
||||||
#footer {
|
#footer {
|
||||||
background-color: #F2F6FA;
|
background-color: $light-blue;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
a, p {
|
a, p {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
@import "variables";
|
||||||
|
|
||||||
.default_data_block {
|
.default_data_block {
|
||||||
font-family: Arial;
|
font-family: Arial;
|
||||||
|
|
||||||
|
@ -53,7 +55,7 @@
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
}
|
}
|
||||||
.action:hover {
|
.action:hover {
|
||||||
color: #F2F6FA;
|
color: $light-blue;
|
||||||
}
|
}
|
||||||
.count {
|
.count {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
@import "variables";
|
||||||
|
|
||||||
#header {
|
#header {
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
@ -185,7 +187,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.button-navbar-action:hover {
|
.button-navbar-action:hover {
|
||||||
color: #F2F6FA;
|
color: $light-blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button_navbar:hover, .button-navbar-action:hover {
|
.button_navbar:hover, .button-navbar-action:hover {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
@import "variables";
|
||||||
|
|
||||||
#users_index, #admins_index{
|
#users_index, #admins_index{
|
||||||
margin-left: 2rem;
|
margin-left: 2rem;
|
||||||
margin-right: 2rem;
|
margin-right: 2rem;
|
||||||
|
@ -48,7 +50,7 @@
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
.action:hover {
|
.action:hover {
|
||||||
color: #F2F6FA;
|
color: $light-blue;
|
||||||
}
|
}
|
||||||
.padding-left-30 {
|
.padding-left-30 {
|
||||||
padding-left: 30px;
|
padding-left: 30px;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
%script{type: 'text/javascript'}
|
%script{type: 'text/javascript'}
|
||||||
="var dossier_id =#{dossier.id}"
|
="var dossier_id =#{dossier.id}"
|
||||||
$(document).on('page:load', initCarto);
|
$(document).on('turbolinks:load', initCarto);
|
||||||
$(document).ready(initCarto);
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue