commit
e47e6e5c46
263 changed files with 761 additions and 800 deletions
|
@ -1,22 +1,22 @@
|
|||
function address_type_init() {
|
||||
display = 'label';
|
||||
display = 'label';
|
||||
|
||||
var bloodhound = new Bloodhound({
|
||||
datumTokenizer: Bloodhound.tokenizers.obj.whitespace(display),
|
||||
queryTokenizer: Bloodhound.tokenizers.whitespace,
|
||||
var bloodhound = new Bloodhound({
|
||||
datumTokenizer: Bloodhound.tokenizers.obj.whitespace(display),
|
||||
queryTokenizer: Bloodhound.tokenizers.whitespace,
|
||||
|
||||
remote: {
|
||||
url: '/ban/search?request=%QUERY',
|
||||
wildcard: '%QUERY'
|
||||
}
|
||||
});
|
||||
bloodhound.initialize();
|
||||
remote: {
|
||||
url: '/ban/search?request=%QUERY',
|
||||
wildcard: '%QUERY'
|
||||
}
|
||||
});
|
||||
bloodhound.initialize();
|
||||
|
||||
$("input[type='address']").typeahead({
|
||||
minLength: 1
|
||||
}, {
|
||||
display: display,
|
||||
source: bloodhound,
|
||||
limit: 5
|
||||
});
|
||||
}
|
||||
$("input[type='address']").typeahead({
|
||||
minLength: 1
|
||||
}, {
|
||||
display: display,
|
||||
source: bloodhound,
|
||||
limit: 5
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,46 +1,46 @@
|
|||
$(document).on('turbolinks:load', init_admin);
|
||||
|
||||
function init_admin(){
|
||||
destroy_action();
|
||||
on_change_type_de_champ_select();
|
||||
destroy_action();
|
||||
on_change_type_de_champ_select();
|
||||
}
|
||||
|
||||
function destroy_action(){
|
||||
$(".delete").on('click', function(){
|
||||
$(this).hide();
|
||||
$(this).closest('td').find(".confirm").show();
|
||||
});
|
||||
$(".delete").on('click', function(){
|
||||
$(this).hide();
|
||||
$(this).closest('td').find(".confirm").show();
|
||||
});
|
||||
|
||||
$(".cancel").on('click', function(){
|
||||
$(this).closest('td').find(".delete").show();
|
||||
$(this).closest('td').find(".confirm").hide();
|
||||
});
|
||||
$(".cancel").on('click', function(){
|
||||
$(this).closest('td').find(".delete").show();
|
||||
$(this).closest('td').find(".confirm").hide();
|
||||
});
|
||||
|
||||
$("#liste_gestionnaire #libelle").on('click', function(){
|
||||
setTimeout(destroy_action, 500);
|
||||
});
|
||||
$("#liste_gestionnaire #libelle").on('click', function(){
|
||||
setTimeout(destroy_action, 500);
|
||||
});
|
||||
}
|
||||
|
||||
function on_change_type_de_champ_select (){
|
||||
$("select.form-control.type_champ").on('change', function(e){
|
||||
$("select.form-control.type_champ").on('change', function(e){
|
||||
|
||||
parent = $(this).parent().parent();
|
||||
parent = $(this).parent().parent();
|
||||
|
||||
parent.removeClass('header_section');
|
||||
parent.children(".drop_down_list").removeClass('show_inline');
|
||||
$('.mandatory', parent).show();
|
||||
parent.removeClass('header_section');
|
||||
parent.children(".drop_down_list").removeClass('show_inline');
|
||||
$('.mandatory', parent).show();
|
||||
|
||||
switch(this.value){
|
||||
case 'header_section':
|
||||
parent.addClass('header_section');
|
||||
break;
|
||||
case 'drop_down_list':
|
||||
case 'multiple_drop_down_list':
|
||||
parent.children(".drop_down_list").addClass('show_inline');
|
||||
break;
|
||||
case 'explication':
|
||||
$('.mandatory', parent).hide();
|
||||
break;
|
||||
}
|
||||
});
|
||||
switch(this.value){
|
||||
case 'header_section':
|
||||
parent.addClass('header_section');
|
||||
break;
|
||||
case 'drop_down_list':
|
||||
case 'multiple_drop_down_list':
|
||||
parent.children(".drop_down_list").addClass('show_inline');
|
||||
break;
|
||||
case 'explication':
|
||||
$('.mandatory', parent).hide();
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,97 +1,97 @@
|
|||
$(document).on('turbolinks:load', init_path_modal);
|
||||
|
||||
function init_path_modal() {
|
||||
path_modal_action();
|
||||
path_validation_action();
|
||||
path_type_init();
|
||||
path_validation($("input[id='procedure_path']"));
|
||||
path_modal_action();
|
||||
path_validation_action();
|
||||
path_type_init();
|
||||
path_validation($("input[id='procedure_path']"));
|
||||
}
|
||||
|
||||
function path_modal_action() {
|
||||
$('#publishModal').on('show.bs.modal', function (event) {
|
||||
$("#publishModal .modal-body .table .tr_content").hide();
|
||||
$('#publishModal').on('show.bs.modal', function (event) {
|
||||
$("#publishModal .modal-body .table .tr_content").hide();
|
||||
|
||||
var button = $(event.relatedTarget) // Button that triggered the modal
|
||||
var modal_title = button.data('modal_title'); // Extract info from data-* attributes
|
||||
var modal_index = button.data('modal_index'); // Extract info from data-* attributes
|
||||
var button = $(event.relatedTarget) // Button that triggered the modal
|
||||
var modal_title = button.data('modal_title'); // Extract info from data-* attributes
|
||||
var modal_index = button.data('modal_index'); // Extract info from data-* attributes
|
||||
|
||||
var modal = $(this)
|
||||
modal.find('#publishModal_title').html(modal_title);
|
||||
$("#publishModal .modal-body .table #"+modal_index).show();
|
||||
})
|
||||
var modal = $(this)
|
||||
modal.find('#publishModal_title').html(modal_title);
|
||||
$("#publishModal .modal-body .table #"+modal_index).show();
|
||||
})
|
||||
}
|
||||
|
||||
function path_validation_action() {
|
||||
$("input[id='procedure_path']").keyup(function (key) {
|
||||
if (key.keyCode != 13)
|
||||
path_validation(this);
|
||||
});
|
||||
$("input[id='procedure_path']").keyup(function (key) {
|
||||
if (key.keyCode != 13)
|
||||
path_validation(this);
|
||||
});
|
||||
}
|
||||
|
||||
function togglePathMessage(valid, mine) {
|
||||
$('#path_messages .message').hide();
|
||||
$('#path_messages .message').hide();
|
||||
|
||||
if (valid === true && mine === true) {
|
||||
$('#path_is_mine').show();
|
||||
} else if (valid === true && mine === false) {
|
||||
$('#path_is_not_mine').show();
|
||||
} else if (valid === false && mine === null) {
|
||||
$('#path_is_invalid').show();
|
||||
}
|
||||
if (valid === true && mine === true) {
|
||||
$('#path_is_mine').show();
|
||||
} else if (valid === true && mine === false) {
|
||||
$('#path_is_not_mine').show();
|
||||
} else if (valid === false && mine === null) {
|
||||
$('#path_is_invalid').show();
|
||||
}
|
||||
|
||||
if ((valid && mine === null) || mine === true)
|
||||
$('#publishModal #publish').removeAttr('disabled')
|
||||
else
|
||||
$('#publishModal #publish').attr('disabled', 'disabled')
|
||||
if ((valid && mine === null) || mine === true)
|
||||
$('#publishModal #publish').removeAttr('disabled')
|
||||
else
|
||||
$('#publishModal #publish').attr('disabled', 'disabled')
|
||||
}
|
||||
|
||||
function path_validation(el) {
|
||||
var valid = validatePath($(el).val());
|
||||
toggleErrorClass(el, valid);
|
||||
togglePathMessage(valid, null);
|
||||
var valid = validatePath($(el).val());
|
||||
toggleErrorClass(el, valid);
|
||||
togglePathMessage(valid, null);
|
||||
}
|
||||
|
||||
function validatePath(path) {
|
||||
var re = /^[a-z0-9_]{3,30}$/;
|
||||
return re.test(path);
|
||||
var re = /^[a-z0-9_]{3,30}$/;
|
||||
return re.test(path);
|
||||
}
|
||||
|
||||
function path_type_init() {
|
||||
display = 'label';
|
||||
display = 'label';
|
||||
|
||||
var bloodhound = new Bloodhound({
|
||||
datumTokenizer: Bloodhound.tokenizers.obj.whitespace(display),
|
||||
queryTokenizer: Bloodhound.tokenizers.whitespace,
|
||||
var bloodhound = new Bloodhound({
|
||||
datumTokenizer: Bloodhound.tokenizers.obj.whitespace(display),
|
||||
queryTokenizer: Bloodhound.tokenizers.whitespace,
|
||||
|
||||
remote: {
|
||||
url: '/admin/procedures/path_list?request=%QUERY',
|
||||
wildcard: '%QUERY'
|
||||
}
|
||||
});
|
||||
bloodhound.initialize();
|
||||
remote: {
|
||||
url: '/admin/procedures/path_list?request=%QUERY',
|
||||
wildcard: '%QUERY'
|
||||
}
|
||||
});
|
||||
bloodhound.initialize();
|
||||
|
||||
$("#procedure_path").typeahead({
|
||||
minLength: 1
|
||||
}, {
|
||||
display: display,
|
||||
source: bloodhound,
|
||||
templates: {
|
||||
empty: 'Ce lien est disponible !',
|
||||
suggestion: Handlebars.compile("<div class='path_mine_{{mine}}'>{{label}}</div>")
|
||||
},
|
||||
limit: 5
|
||||
});
|
||||
$("#procedure_path").typeahead({
|
||||
minLength: 1
|
||||
}, {
|
||||
display: display,
|
||||
source: bloodhound,
|
||||
templates: {
|
||||
empty: 'Ce lien est disponible !',
|
||||
suggestion: Handlebars.compile("<div class='path_mine_{{mine}}'>{{label}}</div>")
|
||||
},
|
||||
limit: 5
|
||||
});
|
||||
|
||||
$('#procedure_path').bind('typeahead:select', function(ev, suggestion) {
|
||||
togglePathMessage(true, suggestion['mine']);
|
||||
});
|
||||
$('#procedure_path').bind('typeahead:select', function(ev, suggestion) {
|
||||
togglePathMessage(true, suggestion['mine']);
|
||||
});
|
||||
}
|
||||
|
||||
function transfer_errors_message(show) {
|
||||
if(show){
|
||||
$("#not_found_admin").slideDown(100)
|
||||
}
|
||||
else {
|
||||
$("#not_found_admin").slideUp(100)
|
||||
}
|
||||
if(show){
|
||||
$("#not_found_admin").slideDown(100)
|
||||
}
|
||||
else {
|
||||
$("#not_found_admin").slideUp(100)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,20 +37,20 @@ $(document).on('turbolinks:load', application_init);
|
|||
|
||||
|
||||
function application_init(){
|
||||
tooltip_init();
|
||||
scroll_to();
|
||||
tooltip_init();
|
||||
scroll_to();
|
||||
}
|
||||
|
||||
function tooltip_init() {
|
||||
$('.action_button[data-toggle="tooltip"]').tooltip({delay: { "show": 100, "hide": 100 }});
|
||||
$('[data-toggle="tooltip"]').tooltip({delay: { "show": 800, "hide": 100 }});
|
||||
$('.action_button[data-toggle="tooltip"]').tooltip({delay: { "show": 100, "hide": 100 }});
|
||||
$('[data-toggle="tooltip"]').tooltip({delay: { "show": 800, "hide": 100 }});
|
||||
}
|
||||
|
||||
function scroll_to() {
|
||||
$('.js-scrollTo').on('click', function () { // Au clic sur un élément
|
||||
var page = $(this).attr('cible'); // Page cible
|
||||
var speed = 600; // Durée de l'animation (en ms)
|
||||
$('html, body').animate({scrollTop: $(page).offset().top - 200}, speed); // Go
|
||||
return false;
|
||||
});
|
||||
$('.js-scrollTo').on('click', function () { // Au clic sur un élément
|
||||
var page = $(this).attr('cible'); // Page cible
|
||||
var speed = 600; // Durée de l'animation (en ms)
|
||||
$('html, body').animate({scrollTop: $(page).offset().top - 200}, speed); // Go
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
$(document).on('turbolinks:load', buttons_archived);
|
||||
|
||||
function buttons_archived(){
|
||||
$("button#archive").on('click', function(){
|
||||
$("button#archive").hide();
|
||||
$("#confirm").show();
|
||||
});
|
||||
$("button#archive").on('click', function(){
|
||||
$("button#archive").hide();
|
||||
$("#confirm").show();
|
||||
});
|
||||
|
||||
$("#confirm #cancel").on('click', function(){
|
||||
$("button#archive").show();
|
||||
$("#confirm").hide();
|
||||
});
|
||||
$("#confirm #cancel").on('click', function(){
|
||||
$("button#archive").show();
|
||||
$("#confirm").hide();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
$(document).on('turbolinks:load', wysihtml5_active);
|
||||
|
||||
function wysihtml5_active (){
|
||||
$('.wysihtml5').each(function(i, elem) {
|
||||
$(elem).wysihtml5({ toolbar:{ "fa": true, "link": false, "color": false }, "locale": "fr-FR" });
|
||||
});
|
||||
$('.wysihtml5').each(function(i, elem) {
|
||||
$(elem).wysihtml5({ toolbar:{ "fa": true, "link": false, "color": false }, "locale": "fr-FR" });
|
||||
});
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
//= require_tree ./channels
|
||||
|
||||
//(function() {
|
||||
// this.App || (this.App = {});
|
||||
// this.App || (this.App = {});
|
||||
//
|
||||
// App.cable = ActionCable.createConsumer();
|
||||
// App.cable = ActionCable.createConsumer();
|
||||
//
|
||||
//}).call(this);
|
||||
|
|
|
@ -1,60 +1,60 @@
|
|||
function cadastre_active() {
|
||||
return $("#map.cadastre").length > 0
|
||||
return $("#map.cadastre").length > 0
|
||||
}
|
||||
|
||||
function get_cadastre(coordinates) {
|
||||
if (!cadastre_active())
|
||||
return;
|
||||
if (!cadastre_active())
|
||||
return;
|
||||
|
||||
var cadastre;
|
||||
var cadastre;
|
||||
|
||||
$.ajax({
|
||||
method: 'post',
|
||||
url: '/users/dossiers/' + dossier_id + '/carte/cadastre',
|
||||
data: {coordinates: JSON.stringify(coordinates)},
|
||||
dataType: 'json',
|
||||
async: false
|
||||
}).done(function (data) {
|
||||
cadastre = data
|
||||
});
|
||||
$.ajax({
|
||||
method: 'post',
|
||||
url: '/users/dossiers/' + dossier_id + '/carte/cadastre',
|
||||
data: {coordinates: JSON.stringify(coordinates)},
|
||||
dataType: 'json',
|
||||
async: false
|
||||
}).done(function (data) {
|
||||
cadastre = data
|
||||
});
|
||||
|
||||
return cadastre['cadastres'];
|
||||
return cadastre['cadastres'];
|
||||
}
|
||||
|
||||
function display_cadastre(cadastre_array) {
|
||||
if (!cadastre_active())
|
||||
return;
|
||||
if (!cadastre_active())
|
||||
return;
|
||||
|
||||
$("#cadastre.list ul").html('');
|
||||
new_cadastreLayer();
|
||||
$("#cadastre.list ul").html('');
|
||||
new_cadastreLayer();
|
||||
|
||||
if (cadastre_array.length == 1 && cadastre_array[0]['zoom_error'])
|
||||
$("#cadastre.list ul").html('<li><b>Merci de dessiner une surface plus petite afin de récupérer les parcelles cadastrales.</b></li>');
|
||||
if (cadastre_array.length == 1 && cadastre_array[0]['zoom_error'])
|
||||
$("#cadastre.list ul").html('<li><b>Merci de dessiner une surface plus petite afin de récupérer les parcelles cadastrales.</b></li>');
|
||||
|
||||
else if (cadastre_array.length > 0) {
|
||||
cadastre_array.forEach(function (cadastre) {
|
||||
$("#cadastre.list ul").append('<li> Parcelle n°' + cadastre.numero + ' - Feuille ' + cadastre.code_arr + ' ' + cadastre.section + ' ' + cadastre.feuille+ '</li>');
|
||||
else if (cadastre_array.length > 0) {
|
||||
cadastre_array.forEach(function (cadastre) {
|
||||
$("#cadastre.list ul").append('<li> Parcelle n°' + cadastre.numero + ' - Feuille ' + cadastre.code_arr + ' ' + cadastre.section + ' ' + cadastre.feuille+ '</li>');
|
||||
|
||||
cadastreItems.addData(cadastre.geometry);
|
||||
});
|
||||
cadastreItems.addData(cadastre.geometry);
|
||||
});
|
||||
|
||||
cadastreItems.setStyle({
|
||||
fillColor: '#8a6d3b',
|
||||
weight: 2,
|
||||
opacity: 0.3,
|
||||
color: 'white',
|
||||
dashArray: '3',
|
||||
fillOpacity: 0.7
|
||||
})
|
||||
}
|
||||
else
|
||||
$("#cadastre.list ul").html('<li>AUCUN</li>');
|
||||
cadastreItems.setStyle({
|
||||
fillColor: '#8a6d3b',
|
||||
weight: 2,
|
||||
opacity: 0.3,
|
||||
color: 'white',
|
||||
dashArray: '3',
|
||||
fillOpacity: 0.7
|
||||
})
|
||||
}
|
||||
else
|
||||
$("#cadastre.list ul").html('<li>AUCUN</li>');
|
||||
}
|
||||
|
||||
function new_cadastreLayer() {
|
||||
if (typeof cadastreItems != 'undefined')
|
||||
map.removeLayer(cadastreItems);
|
||||
if (typeof cadastreItems != 'undefined')
|
||||
map.removeLayer(cadastreItems);
|
||||
|
||||
cadastreItems = new L.GeoJSON();
|
||||
cadastreItems.addTo(map);
|
||||
}
|
||||
cadastreItems = new L.GeoJSON();
|
||||
cadastreItems.addTo(map);
|
||||
}
|
||||
|
|
|
@ -2,162 +2,162 @@ var LON = '2.428462';
|
|||
var LAT = '46.538192';
|
||||
|
||||
function initCarto() {
|
||||
OSM = L.tileLayer("http://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png", {
|
||||
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||
OSM = L.tileLayer("http://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png", {
|
||||
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||
});
|
||||
|
||||
position = get_position() || default_gestionnaire_position();
|
||||
|
||||
map = L.map("map", {
|
||||
center: new L.LatLng(position.lat, position.lon),
|
||||
zoom: position.zoom,
|
||||
layers: [OSM],
|
||||
scrollWheelZoom: false
|
||||
});
|
||||
|
||||
icon = L.icon({
|
||||
iconUrl: '/assets/marker-icon.png',
|
||||
//shadowUrl: 'leaf-shadow.png',
|
||||
|
||||
iconSize: [34.48, 40], // size of the icon
|
||||
//shadowSize: [50, 64], // size of the shadow
|
||||
iconAnchor: [20, 20] // point of the icon which will correspond to marker's location
|
||||
//shadowAnchor: [4, 62], // the same for the shadow
|
||||
//popupAnchor: [-3, -76] // point from which the popup should open relative to the iconAnchor
|
||||
});
|
||||
|
||||
if (qp_active())
|
||||
display_qp(JSON.parse($("#quartier_prioritaires").val()));
|
||||
|
||||
if (cadastre_active())
|
||||
display_cadastre(JSON.parse($("#cadastres").val()));
|
||||
|
||||
freeDraw = new L.FreeDraw();
|
||||
freeDraw.options.setSmoothFactor(4);
|
||||
freeDraw.options.simplifyPolygon = false;
|
||||
|
||||
map.addLayer(freeDraw);
|
||||
|
||||
if ($("#json_latlngs").val() != '' && $("#json_latlngs").val() != '[]') {
|
||||
map.setZoom(18);
|
||||
|
||||
$.each($.parseJSON($("#json_latlngs").val()), function (i, val) {
|
||||
freeDraw.createPolygon(val);
|
||||
});
|
||||
|
||||
position = get_position() || default_gestionnaire_position();
|
||||
map.fitBounds(freeDraw.polygons[0].getBounds());
|
||||
}
|
||||
else if (position.lat == LAT && position.lon == LON)
|
||||
map.setView(new L.LatLng(position.lat, position.lon), position.zoom);
|
||||
|
||||
map = L.map("map", {
|
||||
center: new L.LatLng(position.lat, position.lon),
|
||||
zoom: position.zoom,
|
||||
layers: [OSM],
|
||||
scrollWheelZoom: false
|
||||
});
|
||||
|
||||
icon = L.icon({
|
||||
iconUrl: '/assets/marker-icon.png',
|
||||
//shadowUrl: 'leaf-shadow.png',
|
||||
|
||||
iconSize: [34.48, 40], // size of the icon
|
||||
//shadowSize: [50, 64], // size of the shadow
|
||||
iconAnchor: [20, 20] // point of the icon which will correspond to marker's location
|
||||
//shadowAnchor: [4, 62], // the same for the shadow
|
||||
//popupAnchor: [-3, -76] // point from which the popup should open relative to the iconAnchor
|
||||
});
|
||||
|
||||
if (qp_active())
|
||||
display_qp(JSON.parse($("#quartier_prioritaires").val()));
|
||||
|
||||
if (cadastre_active())
|
||||
display_cadastre(JSON.parse($("#cadastres").val()));
|
||||
|
||||
freeDraw = new L.FreeDraw();
|
||||
freeDraw.options.setSmoothFactor(4);
|
||||
freeDraw.options.simplifyPolygon = false;
|
||||
|
||||
map.addLayer(freeDraw);
|
||||
|
||||
if ($("#json_latlngs").val() != '' && $("#json_latlngs").val() != '[]') {
|
||||
map.setZoom(18);
|
||||
|
||||
$.each($.parseJSON($("#json_latlngs").val()), function (i, val) {
|
||||
freeDraw.createPolygon(val);
|
||||
});
|
||||
|
||||
map.fitBounds(freeDraw.polygons[0].getBounds());
|
||||
}
|
||||
else if (position.lat == LAT && position.lon == LON)
|
||||
map.setView(new L.LatLng(position.lat, position.lon), position.zoom);
|
||||
|
||||
add_event_freeDraw();
|
||||
add_event_search_address();
|
||||
add_event_freeDraw();
|
||||
add_event_search_address();
|
||||
}
|
||||
|
||||
function default_gestionnaire_position() {
|
||||
return {lon: LON, lat: LAT, zoom: 5}
|
||||
return {lon: LON, lat: LAT, zoom: 5}
|
||||
}
|
||||
|
||||
function get_external_data(latLngs) {
|
||||
if (qp_active())
|
||||
display_qp(get_qp(latLngs));
|
||||
if (qp_active())
|
||||
display_qp(get_qp(latLngs));
|
||||
|
||||
if (cadastre_active()) {
|
||||
polygons = {"type": "FeatureCollection", "features": []};
|
||||
if (cadastre_active()) {
|
||||
polygons = {"type": "FeatureCollection", "features": []};
|
||||
|
||||
for (i = 0; i < latLngs.length; i++)
|
||||
polygons.features.push(feature_polygon_latLngs(latLngs[i]))
|
||||
for (i = 0; i < latLngs.length; i++)
|
||||
polygons.features.push(feature_polygon_latLngs(latLngs[i]))
|
||||
|
||||
cadastre_list = [{zoom_error: true}];
|
||||
cadastre_list = [{zoom_error: true}];
|
||||
|
||||
if (turf_area(polygons) < 300000)
|
||||
cadastre_list = get_cadastre(latLngs);
|
||||
if (turf_area(polygons) < 300000)
|
||||
cadastre_list = get_cadastre(latLngs);
|
||||
|
||||
display_cadastre(cadastre_list);
|
||||
}
|
||||
display_cadastre(cadastre_list);
|
||||
}
|
||||
}
|
||||
|
||||
function feature_polygon_latLngs(coordinates) {
|
||||
return ({
|
||||
"type": "Feature",
|
||||
"properties": {},
|
||||
"geometry": {
|
||||
"type": "Polygon",
|
||||
"coordinates": [
|
||||
JSON.parse(L.FreeDraw.Utilities.getJsonPolygons([coordinates]))['latLngs']
|
||||
]
|
||||
}
|
||||
})
|
||||
return ({
|
||||
"type": "Feature",
|
||||
"properties": {},
|
||||
"geometry": {
|
||||
"type": "Polygon",
|
||||
"coordinates": [
|
||||
JSON.parse(L.FreeDraw.Utilities.getJsonPolygons([coordinates]))['latLngs']
|
||||
]
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function add_event_freeDraw() {
|
||||
freeDraw.on('markers', function (e) {
|
||||
$("#json_latlngs").val(JSON.stringify(e.latLngs));
|
||||
freeDraw.on('markers', function (e) {
|
||||
$("#json_latlngs").val(JSON.stringify(e.latLngs));
|
||||
|
||||
add_event_edit();
|
||||
add_event_edit();
|
||||
|
||||
get_external_data(e.latLngs);
|
||||
});
|
||||
get_external_data(e.latLngs);
|
||||
});
|
||||
|
||||
$("#map").on('click', function(){
|
||||
freeDraw.setMode(L.FreeDraw.MODES.VIEW);
|
||||
});
|
||||
$("#map").on('click', function(){
|
||||
freeDraw.setMode(L.FreeDraw.MODES.VIEW);
|
||||
});
|
||||
|
||||
$("#new").on('click', function (e) {
|
||||
freeDraw.setMode(L.FreeDraw.MODES.CREATE);
|
||||
});
|
||||
$("#new").on('click', function (e) {
|
||||
freeDraw.setMode(L.FreeDraw.MODES.CREATE);
|
||||
});
|
||||
|
||||
$("#delete").on('click', function (e) {
|
||||
freeDraw.setMode(L.FreeDraw.MODES.DELETE);
|
||||
});
|
||||
$("#delete").on('click', function (e) {
|
||||
freeDraw.setMode(L.FreeDraw.MODES.DELETE);
|
||||
});
|
||||
}
|
||||
|
||||
function add_event_edit (){
|
||||
$(".leaflet-container g path").on('click', function (e) {
|
||||
setTimeout(function(){freeDraw.setMode(L.FreeDraw.MODES.EDIT | L.FreeDraw.MODES.DELETE)}, 50);
|
||||
});
|
||||
$(".leaflet-container g path").on('click', function (e) {
|
||||
setTimeout(function(){freeDraw.setMode(L.FreeDraw.MODES.EDIT | L.FreeDraw.MODES.DELETE)}, 50);
|
||||
});
|
||||
}
|
||||
|
||||
function get_position() {
|
||||
var position;
|
||||
var position;
|
||||
|
||||
$.ajax({
|
||||
url: '/users/dossiers/' + dossier_id + '/carte/position',
|
||||
dataType: 'json',
|
||||
async: false
|
||||
}).done(function (data) {
|
||||
position = data
|
||||
});
|
||||
$.ajax({
|
||||
url: '/users/dossiers/' + dossier_id + '/carte/position',
|
||||
dataType: 'json',
|
||||
async: false
|
||||
}).done(function (data) {
|
||||
position = data
|
||||
});
|
||||
|
||||
return position;
|
||||
return position;
|
||||
}
|
||||
|
||||
function get_address_point(request) {
|
||||
$.ajax({
|
||||
url: '/ban/address_point?request=' + request,
|
||||
dataType: 'json',
|
||||
async: true
|
||||
}).done(function (data) {
|
||||
if (data.lat != null) {
|
||||
map.setView(new L.LatLng(data.lat, data.lon), data.zoom);
|
||||
//L.marker([data.lat, data.lon], {icon: icon}).addTo(map);
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url: '/ban/address_point?request=' + request,
|
||||
dataType: 'json',
|
||||
async: true
|
||||
}).done(function (data) {
|
||||
if (data.lat != null) {
|
||||
map.setView(new L.LatLng(data.lat, data.lon), data.zoom);
|
||||
//L.marker([data.lat, data.lon], {icon: icon}).addTo(map);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function jsObject_to_array(qp_list) {
|
||||
return Object.keys(qp_list).map(function (v) {
|
||||
return qp_list[v];
|
||||
});
|
||||
return Object.keys(qp_list).map(function (v) {
|
||||
return qp_list[v];
|
||||
});
|
||||
}
|
||||
|
||||
function add_event_search_address() {
|
||||
$("#search_by_address input[type='address']").bind('typeahead:select', function (ev, seggestion) {
|
||||
get_address_point(seggestion['label']);
|
||||
});
|
||||
$("#search_by_address input[type='address']").bind('typeahead:select', function (ev, seggestion) {
|
||||
get_address_point(seggestion['label']);
|
||||
});
|
||||
|
||||
$("#search_by_address input[type='address']").keypress(function (e) {
|
||||
if (e.keyCode == 13)
|
||||
get_address_point($(this).val());
|
||||
});
|
||||
$("#search_by_address input[type='address']").keypress(function (e) {
|
||||
if (e.keyCode == 13)
|
||||
get_address_point($(this).val());
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,60 +1,60 @@
|
|||
function qp_active() {
|
||||
return $("#map.qp").length > 0
|
||||
return $("#map.qp").length > 0
|
||||
}
|
||||
|
||||
function get_qp(coordinates) {
|
||||
if (!qp_active())
|
||||
return;
|
||||
if (!qp_active())
|
||||
return;
|
||||
|
||||
var qp;
|
||||
var qp;
|
||||
|
||||
$.ajax({
|
||||
method: 'post',
|
||||
url: '/users/dossiers/' + dossier_id + '/carte/qp',
|
||||
data: {coordinates: JSON.stringify(coordinates)},
|
||||
dataType: 'json',
|
||||
async: false
|
||||
}).done(function (data) {
|
||||
qp = data
|
||||
});
|
||||
$.ajax({
|
||||
method: 'post',
|
||||
url: '/users/dossiers/' + dossier_id + '/carte/qp',
|
||||
data: {coordinates: JSON.stringify(coordinates)},
|
||||
dataType: 'json',
|
||||
async: false
|
||||
}).done(function (data) {
|
||||
qp = data
|
||||
});
|
||||
|
||||
return qp['quartier_prioritaires'];
|
||||
return qp['quartier_prioritaires'];
|
||||
}
|
||||
|
||||
function display_qp(qp_list) {
|
||||
if (!qp_active())
|
||||
return;
|
||||
if (!qp_active())
|
||||
return;
|
||||
|
||||
qp_array = jsObject_to_array(qp_list);
|
||||
qp_array = jsObject_to_array(qp_list);
|
||||
|
||||
$("#qp.list ul").html('');
|
||||
$("#qp.list ul").html('');
|
||||
|
||||
new_qpLayer();
|
||||
new_qpLayer();
|
||||
|
||||
if (qp_array.length > 0) {
|
||||
qp_array.forEach(function (qp) {
|
||||
$("#qp.list ul").append('<li>' + qp.commune + ' : ' + qp.nom + '</li>');
|
||||
if (qp_array.length > 0) {
|
||||
qp_array.forEach(function (qp) {
|
||||
$("#qp.list ul").append('<li>' + qp.commune + ' : ' + qp.nom + '</li>');
|
||||
|
||||
qpItems.addData(qp.geometry);
|
||||
});
|
||||
qpItems.addData(qp.geometry);
|
||||
});
|
||||
|
||||
qpItems.setStyle({
|
||||
fillColor: '#31708f',
|
||||
weight: 2,
|
||||
opacity: 0.3,
|
||||
color: 'white',
|
||||
dashArray: '3',
|
||||
fillOpacity: 0.7
|
||||
})
|
||||
}
|
||||
else
|
||||
$("#qp.list ul").html('<li>AUCUN</li>');
|
||||
qpItems.setStyle({
|
||||
fillColor: '#31708f',
|
||||
weight: 2,
|
||||
opacity: 0.3,
|
||||
color: 'white',
|
||||
dashArray: '3',
|
||||
fillOpacity: 0.7
|
||||
})
|
||||
}
|
||||
else
|
||||
$("#qp.list ul").html('<li>AUCUN</li>');
|
||||
}
|
||||
|
||||
function new_qpLayer() {
|
||||
if (typeof qpItems != 'undefined')
|
||||
map.removeLayer(qpItems);
|
||||
if (typeof qpItems != 'undefined')
|
||||
map.removeLayer(qpItems);
|
||||
|
||||
qpItems = new L.GeoJSON();
|
||||
qpItems.addTo(map);
|
||||
}
|
||||
qpItems = new L.GeoJSON();
|
||||
qpItems.addTo(map);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
$(document).on('turbolinks:load', buttons_anchor);
|
||||
|
||||
function buttons_anchor(){
|
||||
$("#cgu_menu_block").on('click', 'a', function(){
|
||||
event.preventDefault();
|
||||
$('html,body').animate({scrollTop:$(this.hash).offset().top-80}, 500);
|
||||
});
|
||||
$("#cgu_menu_block").on('click', 'a', function(){
|
||||
event.preventDefault();
|
||||
$('html,body').animate({scrollTop:$(this.hash).offset().top-80}, 500);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
//App.messages = App.cable.subscriptions.create('NotificationsChannel', {
|
||||
// received: function (data) {
|
||||
// if (window.location.href.indexOf('backoffice') !== -1) {
|
||||
// $("#notification_alert").html(data['message']);
|
||||
// received: function (data) {
|
||||
// if (window.location.href.indexOf('backoffice') !== -1) {
|
||||
// $("#notification_alert").html(data['message']);
|
||||
//
|
||||
// slideIn_notification_alert();
|
||||
// }
|
||||
// slideIn_notification_alert();
|
||||
// }
|
||||
// }
|
||||
//});
|
||||
|
||||
function slideIn_notification_alert (){
|
||||
$("#notification_alert").animate({
|
||||
right: '20px'
|
||||
}, 250);
|
||||
$("#notification_alert").animate({
|
||||
right: '20px'
|
||||
}, 250);
|
||||
|
||||
setTimeout(slideOut_notification_alert, 3500);
|
||||
setTimeout(slideOut_notification_alert, 3500);
|
||||
}
|
||||
|
||||
function slideOut_notification_alert (){
|
||||
$("#notification_alert").animate({
|
||||
right: '-250px'
|
||||
}, 200);
|
||||
}
|
||||
$("#notification_alert").animate({
|
||||
right: '-250px'
|
||||
}, 200);
|
||||
}
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
$(document).on('turbolinks:load', init_default_data_block);
|
||||
|
||||
function init_default_data_block() {
|
||||
$('.default_data_block #dossier .body').toggle();
|
||||
$('.default_data_block #dossier .carret-right').toggle();
|
||||
$('.default_data_block #dossier .carret-down').toggle();
|
||||
$('.default_data_block #dossier .body').toggle();
|
||||
$('.default_data_block #dossier .carret-right').toggle();
|
||||
$('.default_data_block #dossier .carret-down').toggle();
|
||||
|
||||
$('.default_data_block .title').click(function () {
|
||||
toggle_default_data_bloc(this, 400);
|
||||
});
|
||||
$('.default_data_block .title').click(function () {
|
||||
toggle_default_data_bloc(this, 400);
|
||||
});
|
||||
|
||||
$('.new-action').click(function () {
|
||||
var messages_block = $(this).parents().closest('.default_data_block').find('.title')
|
||||
toggle_default_data_bloc(messages_block, 400);
|
||||
});
|
||||
$('.new-action').click(function () {
|
||||
var messages_block = $(this).parents().closest('.default_data_block').find('.title')
|
||||
toggle_default_data_bloc(messages_block, 400);
|
||||
});
|
||||
|
||||
$('.default_data_block.default_visible').each(function() {
|
||||
toggle_default_data_bloc($(this).find('.title'), 0);
|
||||
});
|
||||
$('.default_data_block.default_visible').each(function() {
|
||||
toggle_default_data_bloc($(this).find('.title'), 0);
|
||||
});
|
||||
|
||||
function toggle_default_data_bloc(element, duration) {
|
||||
var block = $(element).parents('.show-block');
|
||||
if (block.attr('id') == 'messages') {
|
||||
block.children('.last-commentaire').toggle();
|
||||
$(".commentaires").animate({ scrollTop: $(this).height() }, "slow");
|
||||
}
|
||||
|
||||
block.children('.body').slideToggle(duration);
|
||||
|
||||
block.find('.carret-right').toggle();
|
||||
block.find('.carret-down').toggle();
|
||||
function toggle_default_data_bloc(element, duration) {
|
||||
var block = $(element).parents('.show-block');
|
||||
if (block.attr('id') == 'messages') {
|
||||
block.children('.last-commentaire').toggle();
|
||||
$(".commentaires").animate({ scrollTop: $(this).height() }, "slow");
|
||||
}
|
||||
|
||||
block.children('.body').slideToggle(duration);
|
||||
|
||||
block.find('.carret-right').toggle();
|
||||
block.find('.carret-down').toggle();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,46 +2,46 @@ $(document).on('turbolinks:load', action_type_de_champs);
|
|||
|
||||
|
||||
function action_type_de_champs() {
|
||||
$("input[type='email']").on('change', function () {
|
||||
toggleErrorClass(this, validateEmail($(this).val()));
|
||||
});
|
||||
$("input[type='email']").on('change', function () {
|
||||
toggleErrorClass(this, validateEmail($(this).val()));
|
||||
});
|
||||
|
||||
$("input[type='number']").on('change', function () {
|
||||
toggleErrorClass(this, validateNumber($(this).val()));
|
||||
});
|
||||
$("input[type='number']").on('change', function () {
|
||||
toggleErrorClass(this, validateNumber($(this).val()));
|
||||
});
|
||||
|
||||
$("input[type='phone']").on('change', function () {
|
||||
val = $(this).val();
|
||||
val = val.replace(/[ ]/g, '');
|
||||
$("input[type='phone']").on('change', function () {
|
||||
val = $(this).val();
|
||||
val = val.replace(/[ ]/g, '');
|
||||
|
||||
toggleErrorClass(this, validatePhone(val));
|
||||
});
|
||||
toggleErrorClass(this, validatePhone(val));
|
||||
});
|
||||
|
||||
address_type_init();
|
||||
address_type_init();
|
||||
}
|
||||
|
||||
function toggleErrorClass(node, boolean) {
|
||||
if (boolean)
|
||||
$(node).removeClass('input-error');
|
||||
else
|
||||
$(node).addClass('input-error');
|
||||
if (boolean)
|
||||
$(node).removeClass('input-error');
|
||||
else
|
||||
$(node).addClass('input-error');
|
||||
}
|
||||
|
||||
function validatePhone(phone) {
|
||||
var re = /^(0|(\+[1-9]{2})|(00[1-9]{2}))[1-9][0-9]{8}$/;
|
||||
return validateInput(phone, re)
|
||||
var re = /^(0|(\+[1-9]{2})|(00[1-9]{2}))[1-9][0-9]{8}$/;
|
||||
return validateInput(phone, re)
|
||||
}
|
||||
|
||||
function validateEmail(email) {
|
||||
var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
||||
return validateInput(email, re)
|
||||
var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
||||
return validateInput(email, re)
|
||||
}
|
||||
|
||||
function validateNumber(number) {
|
||||
var re = /^[0-9]+$/;
|
||||
return validateInput(number, re)
|
||||
var re = /^[0-9]+$/;
|
||||
return validateInput(number, re)
|
||||
}
|
||||
|
||||
function validateInput(input, regex) {
|
||||
return regex.test(input);
|
||||
return regex.test(input);
|
||||
}
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
$(document).on('turbolinks:load', init_modal_commentaire);
|
||||
|
||||
function init_modal_commentaire() {
|
||||
var modal = $("#modalCommentairesDossierParChamp");
|
||||
var body = modal.find(".modal-body");
|
||||
var originalBody = body.html();
|
||||
var modal = $("#modalCommentairesDossierParChamp");
|
||||
var body = modal.find(".modal-body");
|
||||
var originalBody = body.html();
|
||||
|
||||
modal.on("show.bs.modal", function (e) {
|
||||
body.load(e.relatedTarget.getAttribute("data-href"));
|
||||
});
|
||||
modal.on("show.bs.modal", function (e) {
|
||||
body.load(e.relatedTarget.getAttribute("data-href"));
|
||||
});
|
||||
|
||||
$("#modalCommentairesDossierParChamp").on("hidden.bs.modal", function (e) {
|
||||
body.html(originalBody);
|
||||
});
|
||||
$("#modalCommentairesDossierParChamp").on("hidden.bs.modal", function (e) {
|
||||
body.html(originalBody);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -17,43 +17,43 @@ function pannel_switch() {
|
|||
}
|
||||
|
||||
function the_terms() {
|
||||
var the_terms = $("#dossier_autorisation_donnees");
|
||||
var the_terms = $("#dossier_autorisation_donnees");
|
||||
|
||||
if (the_terms.size() == 0)
|
||||
return;
|
||||
if (the_terms.size() == 0)
|
||||
return;
|
||||
|
||||
check_value(the_terms);
|
||||
|
||||
the_terms.click(function () {
|
||||
check_value(the_terms);
|
||||
});
|
||||
|
||||
the_terms.click(function () {
|
||||
check_value(the_terms);
|
||||
});
|
||||
|
||||
function check_value(the_terms) {
|
||||
if (the_terms.is(":checked")) {
|
||||
$("#etape_suivante").removeAttr("disabled");
|
||||
} else {
|
||||
$("#etape_suivante").attr("disabled", "disabled");
|
||||
}
|
||||
function check_value(the_terms) {
|
||||
if (the_terms.is(":checked")) {
|
||||
$("#etape_suivante").removeAttr("disabled");
|
||||
} else {
|
||||
$("#etape_suivante").attr("disabled", "disabled");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function error_form_siret(invalid_siret) {
|
||||
setTimeout(function () {
|
||||
$("input[type='submit']").val('Erreur SIRET');
|
||||
}, 10);
|
||||
setTimeout(function () {
|
||||
$("input[type='submit']").val('Erreur SIRET');
|
||||
}, 10);
|
||||
|
||||
$("input[type='submit']").removeClass('btn-success').addClass('btn-danger');
|
||||
$("input[type='submit']").removeClass('btn-success').addClass('btn-danger');
|
||||
|
||||
$("#dossier_siret").addClass('input-error').val(invalid_siret).on('input', reset_form_siret);
|
||||
$("#dossier_siret").addClass('input-error').val(invalid_siret).on('input', reset_form_siret);
|
||||
|
||||
}
|
||||
|
||||
function reset_form_siret() {
|
||||
$("input[type='submit']").removeClass('btn-danger').addClass('btn-success').val('Valider');
|
||||
$("#dossier_siret").removeClass('input-error');
|
||||
$("input[type='submit']").removeClass('btn-danger').addClass('btn-success').val('Valider');
|
||||
$("#dossier_siret").removeClass('input-error');
|
||||
}
|
||||
|
||||
function toggle_etape_1() {
|
||||
$('.row.etape.etape_1 .etapes_menu #logos').toggle(100);
|
||||
$('.row.etape.etape_1 .etapes_informations #description_procedure').toggle(100);
|
||||
$('.row.etape.etape_1 .etapes_menu #logos').toggle(100);
|
||||
$('.row.etape.etape_1 .etapes_informations #description_procedure').toggle(100);
|
||||
}
|
||||
|
|
|
@ -1,44 +1,44 @@
|
|||
$(document).on('turbolinks:load', filters_init);
|
||||
|
||||
function filters_init() {
|
||||
$('html').click(function(event) {
|
||||
var visible_filter = $('.filter_framed:visible')
|
||||
if(visible_filter.length) {
|
||||
if (!$(event.target).closest('.filter_framed').is(":visible")) {
|
||||
visible_filter.hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
$('html').click(function(event) {
|
||||
var visible_filter = $('.filter_framed:visible')
|
||||
if(visible_filter.length) {
|
||||
if (!$(event.target).closest('.filter_framed').is(":visible")) {
|
||||
visible_filter.hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(".filter").on('click', function (event) {
|
||||
filter_framed_show(event);
|
||||
filter_framed_close_all_excepted(framed_id(event));
|
||||
event.stopPropagation();
|
||||
});
|
||||
$(".filter").on('click', function (event) {
|
||||
filter_framed_show(event);
|
||||
filter_framed_close_all_excepted(framed_id(event));
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
$(".erase-filter").on('click', function (event) {
|
||||
$(this).parent().find(".filter_input").val("");
|
||||
});
|
||||
$(".erase-filter").on('click', function (event) {
|
||||
$(this).parent().find(".filter_input").val("");
|
||||
});
|
||||
}
|
||||
|
||||
function filter_framed_close_all_excepted(id) {
|
||||
$(".filter_framed:not("+id+")").hide();
|
||||
$(".filter_framed:not("+id+")").hide();
|
||||
|
||||
$(id).toggle();
|
||||
$(id).toggle();
|
||||
}
|
||||
|
||||
function framed_id(event) {
|
||||
return "#framed_" + event.target.id
|
||||
return "#framed_" + event.target.id
|
||||
}
|
||||
|
||||
function filter_framed_show(event) {
|
||||
dom_object = $(framed_id(event));
|
||||
dom_object = $(framed_id(event));
|
||||
|
||||
var offset = $('#main-container').offset();
|
||||
var offset = $('#main-container').offset();
|
||||
|
||||
var y = event.pageY - offset.top;
|
||||
var x = event.pageX - offset.left;
|
||||
var y = event.pageY - offset.top;
|
||||
var x = event.pageX - offset.left;
|
||||
|
||||
dom_object.css('top', (y + 7) + 'px');
|
||||
dom_object.css('left', (x + 7) + 'px');
|
||||
dom_object.css('top', (y + 7) + 'px');
|
||||
dom_object.css('left', (x + 7) + 'px');
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
$(document).on('turbolinks:load', franceconnect_kit);
|
||||
|
||||
function franceconnect_kit() {
|
||||
franceConnectKit.init()
|
||||
franceConnectKit.init()
|
||||
}
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
$(document).on('turbolinks:load', modal_action);
|
||||
|
||||
function modal_action() {
|
||||
$('#PJmodal').on('show.bs.modal', function (event) {
|
||||
$("#PJmodal .modal-body .table .tr_content").hide();
|
||||
$('#PJmodal').on('show.bs.modal', function (event) {
|
||||
$("#PJmodal .modal-body .table .tr_content").hide();
|
||||
|
||||
var button = $(event.relatedTarget) // Button that triggered the modal
|
||||
var modal_title = button.data('modal_title'); // Extract info from data-* attributes
|
||||
var modal_index = button.data('modal_index'); // Extract info from data-* attributes
|
||||
var button = $(event.relatedTarget) // Button that triggered the modal
|
||||
var modal_title = button.data('modal_title'); // Extract info from data-* attributes
|
||||
var modal_index = button.data('modal_index'); // Extract info from data-* attributes
|
||||
|
||||
var modal = $(this)
|
||||
modal.find('#PJmodal_title').html(modal_title);
|
||||
$("#PJmodal .modal-body .table #"+modal_index).show();
|
||||
})
|
||||
var modal = $(this)
|
||||
modal.find('#PJmodal_title').html(modal_title);
|
||||
$("#PJmodal .modal-body .table #"+modal_index).show();
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
$(document).on('turbolinks:load', pref_list_dossier_actions);
|
||||
|
||||
function pref_list_dossier_actions() {
|
||||
pref_list_dossier_open_action();
|
||||
pref_list_dossier_close_action();
|
||||
pref_list_dossier_open_action();
|
||||
pref_list_dossier_close_action();
|
||||
}
|
||||
|
||||
function pref_list_dossier_open_action() {
|
||||
$("#pref_list_dossier_open_action").on('click', function () {
|
||||
$("#pref_list_menu").css('display', 'block');
|
||||
$("#pref_list_menu").css('visibility', 'visible');
|
||||
$("#pref_list_dossier_open_action").on('click', function () {
|
||||
$("#pref_list_menu").css('display', 'block');
|
||||
$("#pref_list_menu").css('visibility', 'visible');
|
||||
|
||||
$("#pref_list_menu").animate({
|
||||
right: 0
|
||||
}, 250);
|
||||
});
|
||||
$("#pref_list_menu").animate({
|
||||
right: 0
|
||||
}, 250);
|
||||
});
|
||||
}
|
||||
|
||||
function pref_list_dossier_close_action() {
|
||||
$("#pref_list_dossier_close_action").on('click', function () {
|
||||
$("#pref_list_menu").animate({
|
||||
right: parseInt($("#pref_list_menu").css('width'), 10)*(-1)+'px'
|
||||
},{
|
||||
duration: 250,
|
||||
complete: function () {
|
||||
$("#pref_list_menu").css('display', 'none');
|
||||
$("#pref_list_menu").css('visibility', 'hidden');
|
||||
}
|
||||
}
|
||||
)
|
||||
});
|
||||
$("#pref_list_dossier_close_action").on('click', function () {
|
||||
$("#pref_list_menu").animate({
|
||||
right: parseInt($("#pref_list_menu").css('width'), 10)*(-1)+'px'
|
||||
},{
|
||||
duration: 250,
|
||||
complete: function () {
|
||||
$("#pref_list_menu").css('display', 'none');
|
||||
$("#pref_list_menu").css('visibility', 'hidden');
|
||||
}
|
||||
}
|
||||
)
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,37 +1,37 @@
|
|||
$(document).on('turbolinks:load', button_edit_procedure_init);
|
||||
|
||||
function button_edit_procedure_init(){
|
||||
buttons_api_carto();
|
||||
button_cerfa();
|
||||
button_individual();
|
||||
buttons_api_carto();
|
||||
button_cerfa();
|
||||
button_individual();
|
||||
}
|
||||
|
||||
function buttons_api_carto () {
|
||||
|
||||
$("#procedure_module_api_carto_use_api_carto").on('change', function() {
|
||||
$("#modules_api_carto").toggle()
|
||||
});
|
||||
$("#procedure_module_api_carto_use_api_carto").on('change', function() {
|
||||
$("#modules_api_carto").toggle()
|
||||
});
|
||||
|
||||
if ($('#procedure_module_api_carto_use_api_carto').is(':checked'))
|
||||
$("#modules_api_carto").show();
|
||||
if ($('#procedure_module_api_carto_use_api_carto').is(':checked'))
|
||||
$("#modules_api_carto").show();
|
||||
}
|
||||
|
||||
function button_cerfa () {
|
||||
|
||||
$("#procedure_cerfa_flag").on('change', function() {
|
||||
$("#procedure_lien_demarche").toggle()
|
||||
});
|
||||
$("#procedure_cerfa_flag").on('change', function() {
|
||||
$("#procedure_lien_demarche").toggle()
|
||||
});
|
||||
|
||||
if ($('#procedure_cerfa_flag').is(':checked'))
|
||||
$("#procedure_lien_demarche").show();
|
||||
if ($('#procedure_cerfa_flag').is(':checked'))
|
||||
$("#procedure_lien_demarche").show();
|
||||
}
|
||||
|
||||
function button_individual () {
|
||||
|
||||
$("#procedure_for_individual").on('change', function() {
|
||||
$("#individual_with_siret").toggle()
|
||||
});
|
||||
$("#procedure_for_individual").on('change', function() {
|
||||
$("#individual_with_siret").toggle()
|
||||
});
|
||||
|
||||
if ($('#procedure_for_individual').is(':checked'))
|
||||
$("#individual_with_siret").show();
|
||||
if ($('#procedure_for_individual').is(':checked'))
|
||||
$("#individual_with_siret").show();
|
||||
}
|
||||
|
|
|
@ -1,59 +1,59 @@
|
|||
$(document).on('turbolinks:load', init_search_anim);
|
||||
|
||||
function init_search_anim(){
|
||||
$("#search_area").on('click', search_fadeIn);
|
||||
$("#search_area").on('click', search_fadeIn);
|
||||
}
|
||||
|
||||
function search_fadeIn(){
|
||||
var search_area = $("#search_area");
|
||||
var body_dom = $('body');
|
||||
var positions = search_area.position();
|
||||
var width = search_area.width();
|
||||
var search_area = $("#search_area");
|
||||
var body_dom = $('body');
|
||||
var positions = search_area.position();
|
||||
var width = search_area.width();
|
||||
|
||||
search_area.css('position', 'fixed');
|
||||
search_area.css('top', positions.top + $('.navbar').height());
|
||||
search_area.css('left', positions.left);
|
||||
search_area.css('z-index', 300);
|
||||
search_area.css('width', width);
|
||||
search_area.find('#q').animate({ height: '50px' });
|
||||
search_area.find('#search_button').animate({ height: '50px' });
|
||||
search_area.css('position', 'fixed');
|
||||
search_area.css('top', positions.top + $('.navbar').height());
|
||||
search_area.css('left', positions.left);
|
||||
search_area.css('z-index', 300);
|
||||
search_area.css('width', width);
|
||||
search_area.find('#q').animate({ height: '50px' });
|
||||
search_area.find('#search_button').animate({ height: '50px' });
|
||||
|
||||
body_dom.append(search_area);
|
||||
$('#mask_search').fadeIn(200);
|
||||
body_dom.append(search_area);
|
||||
$('#mask_search').fadeIn(200);
|
||||
|
||||
var body_width = body_dom.width();
|
||||
var body_width = body_dom.width();
|
||||
|
||||
var search_area_width = body_width/2.5;
|
||||
var search_area_width = body_width/2.5;
|
||||
|
||||
search_area.animate({
|
||||
width: search_area_width,
|
||||
left: (body_width/2 - search_area_width/2 + 40)
|
||||
}, 400, function() {
|
||||
search_area.off();
|
||||
$("#search_area input").focus();
|
||||
search_area.animate({
|
||||
width: search_area_width,
|
||||
left: (body_width/2 - search_area_width/2 + 40)
|
||||
}, 400, function() {
|
||||
search_area.off();
|
||||
$("#search_area input").focus();
|
||||
|
||||
$('#mask_search').on('click', search_fadeOut)
|
||||
});
|
||||
$('#mask_search').on('click', search_fadeOut)
|
||||
});
|
||||
}
|
||||
|
||||
function search_fadeOut(){
|
||||
var search_area = $("#search_area");
|
||||
var search_area = $("#search_area");
|
||||
|
||||
$('#mask_search').fadeOut(200);
|
||||
$('#mask_search').fadeOut(200);
|
||||
|
||||
search_area.fadeOut(200, function(){
|
||||
search_area.css('position', 'static');
|
||||
search_area.css('top', '');
|
||||
search_area.css('left', '');
|
||||
search_area.css('z-index', '');
|
||||
search_area.css('width', 'auto');
|
||||
search_area.find('#q').css('height', 34);
|
||||
search_area.find('#search_button').css('height', 34);
|
||||
search_area.fadeOut(200, function(){
|
||||
search_area.css('position', 'static');
|
||||
search_area.css('top', '');
|
||||
search_area.css('left', '');
|
||||
search_area.css('z-index', '');
|
||||
search_area.css('width', 'auto');
|
||||
search_area.find('#q').css('height', 34);
|
||||
search_area.find('#search_button').css('height', 34);
|
||||
|
||||
$('#search-block').append(search_area);
|
||||
search_area.fadeIn(200);
|
||||
$('#search-block').append(search_area);
|
||||
search_area.fadeIn(200);
|
||||
|
||||
init_search_anim();
|
||||
});
|
||||
init_search_anim();
|
||||
});
|
||||
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
function show_dossier_id_input (){
|
||||
$("#btn_show_dossier_id_input").hide()
|
||||
}
|
||||
$("#btn_show_dossier_id_input").hide()
|
||||
}
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
padding: 15px;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
|
||||
border-radius: 2px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,4 +18,4 @@ $default-spacer: 15px;
|
|||
|
||||
.ml-1 {
|
||||
margin-left: $default-spacer;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,4 +20,3 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,4 +15,4 @@
|
|||
.tt-menu {
|
||||
width: 300px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#cgu {
|
||||
margin-left: 2em;
|
||||
margin-right: 2em;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
width: 300px;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,4 +30,4 @@
|
|||
h4 {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,4 +9,4 @@
|
|||
height: 80px;
|
||||
|
||||
border: solid black 1px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,4 +6,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,4 +17,4 @@
|
|||
.open_pref_list {
|
||||
right: 0 !important;
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,4 +9,4 @@
|
|||
#titre_procedure {
|
||||
margin-top: 3%;
|
||||
margin-bottom: 2%;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,4 +12,4 @@
|
|||
a{
|
||||
color: #c3d9ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
left: 10px;
|
||||
bottom: 10px;
|
||||
z-index: 300;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,4 +31,4 @@
|
|||
color: #fff;
|
||||
background-color: #0097cf;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,4 +11,4 @@
|
|||
li:last-child {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,4 +2,4 @@ class NotificationsChannel < ApplicationCable::Channel
|
|||
def subscribed
|
||||
stream_from 'notifications'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -35,4 +35,4 @@ class Admin::AccompagnateursController < AdminController
|
|||
flash.notice = "Assignement effectué"
|
||||
redirect_to admin_procedure_accompagnateurs_path, procedure_id: params[:procedure_id]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -16,4 +16,4 @@ class Admin::ChangeDossierStateController < AdminController
|
|||
return redirect_to admin_change_dossier_state_path
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -15,4 +15,4 @@ class Admin::PrevisualisationsController < AdminController
|
|||
acc
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -46,4 +46,4 @@ class Admin::TypesDeChampPrivateController < AdminController
|
|||
def create_facade
|
||||
@types_de_champ_facade = AdminTypesDeChampFacades.new true, @procedure
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -56,4 +56,4 @@ class API::V1::DossiersController < APIController
|
|||
nombre_de_page: dossiers.total_pages
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -19,4 +19,4 @@ class APIController < ApplicationController
|
|||
def default_format_json
|
||||
request.format = "json" unless request.params[:format]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,4 +4,4 @@ class Backoffice::CommentairesController < CommentairesController
|
|||
def is_gestionnaire?
|
||||
true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -16,4 +16,4 @@ class Backoffice::PrivateFormulairesController < ApplicationController
|
|||
|
||||
render 'backoffice/dossiers/formulaire_private', formats: :js
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,4 +7,4 @@ class BackofficeController < ApplicationController
|
|||
redirect_to(:backoffice_dossiers)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -17,4 +17,4 @@ class Ban::SearchController < ApplicationController
|
|||
|
||||
render json: {lon: lon, lat: lat, zoom: '14', dossier_id: params[:dossier_id]}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,4 +2,4 @@ class CguController < ApplicationController
|
|||
def index
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -117,4 +117,4 @@ class FranceConnect::ParticulierController < ApplicationController
|
|||
france_connect_information = FranceConnectInformation.find(params[:fci_id])
|
||||
FranceConnectSaltService.new(france_connect_information).valid? params[:salt]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
class Users::CommentairesController < CommentairesController
|
||||
before_action :authenticate_user!
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,4 +10,4 @@ class Users::Dossiers::AddSiretController < ApplicationController
|
|||
flash.alert = t('errors.messages.dossier_not_found')
|
||||
redirect_to url_for users_dossiers_path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
class Users::Dossiers::CommentairesController < CommentairesController
|
||||
before_action :authenticate_user!
|
||||
end
|
||||
end
|
||||
|
|
|
@ -15,4 +15,4 @@ class Users::Dossiers::InvitesController < UsersController
|
|||
flash.alert = t('errors.messages.dossier_not_found')
|
||||
redirect_to url_for users_dossiers_path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -29,4 +29,4 @@ class UsersController < ApplicationController
|
|||
flash.alert = message
|
||||
redirect_to url_for root_path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class DossiersDecorator < Draper::CollectionDecorator
|
||||
delegate :current_page, :per_page, :offset, :total_entries, :total_pages
|
||||
|
||||
|
||||
end
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
class TypeDeChampPrivateDecorator < TypeDeChampDecorator
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
class TypeDePieceJustificativeDecorator < Draper::Decorator
|
||||
delegate_all
|
||||
def button_up params
|
||||
|
@ -34,4 +33,4 @@ class TypeDePieceJustificativeDecorator < Draper::Decorator
|
|||
def count_type_de_piece_justificative
|
||||
@count_type_de_piece_justificative ||= procedure.types_de_piece_justificative.count
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -43,4 +43,4 @@ class AdminProceduresShowFacades
|
|||
def dossiers_termine_total
|
||||
dossiers.where(state: :termine).size
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -45,4 +45,4 @@ class AdminTypesDeChampFacades
|
|||
def add_button_id
|
||||
@private ? :add_type_de_champ_private : :add_type_de_champ
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,4 +4,4 @@ class InviteDossierFacades < DossierFacades
|
|||
def initialize id, email
|
||||
@dossier = Invite.where(email: email, id: id).first!.dossier
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -71,4 +71,4 @@ class FileSizeValidator < ActiveModel::EachValidator
|
|||
include Singleton
|
||||
include ActionView::Helpers::NumberHelper
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -20,4 +20,4 @@ class SIADE::ExercicesAdapter
|
|||
:dateFinExercice,
|
||||
:date_fin_exercice_timestamp]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class AssignTo < ActiveRecord::Base
|
||||
belongs_to :procedure
|
||||
belongs_to :gestionnaire
|
||||
end
|
||||
end
|
||||
|
|
|
@ -28,4 +28,4 @@ class Cerfa < ActiveRecord::Base
|
|||
NotificationService.new('cerfa', self.dossier.id).notify
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,4 +3,4 @@ class Follow < ActiveRecord::Base
|
|||
belongs_to :dossier
|
||||
|
||||
validates_uniqueness_of :gestionnaire_id, :scope => :dossier_id
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,4 +6,4 @@ class FranceConnectInformation < ActiveRecord::Base
|
|||
def self.find_by_france_connect_particulier user_info
|
||||
FranceConnectInformation.find_by(france_connect_particulier_id: user_info[:france_connect_particulier_id])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,4 +5,4 @@ class ProcedurePath < ActiveRecord::Base
|
|||
|
||||
belongs_to :procedure
|
||||
belongs_to :administrateur
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
class TypeDeChampPrivate < TypeDeChamp
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
class TypeDeChampPublic < TypeDeChamp
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,4 +3,4 @@ class CerfaSerializer < ActiveModel::Serializer
|
|||
:content_url
|
||||
|
||||
has_one :user
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,4 +2,4 @@ class ChampPrivateSerializer < ActiveModel::Serializer
|
|||
attributes :value
|
||||
|
||||
has_one :type_de_champ
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,4 +2,4 @@ class ChampPublicSerializer < ActiveModel::Serializer
|
|||
attributes :value
|
||||
|
||||
has_one :type_de_champ
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,4 +2,4 @@ class CommentaireSerializer < ActiveModel::Serializer
|
|||
attributes :email,
|
||||
:body,
|
||||
:created_at
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class DossiersSerializer < ActiveModel::Serializer
|
||||
attributes :id,
|
||||
:updated_at
|
||||
end
|
||||
end
|
||||
|
|
|
@ -11,4 +11,4 @@ class EntrepriseSerializer < ActiveModel::Serializer
|
|||
:date_creation,
|
||||
:nom,
|
||||
:prenom
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,4 +2,4 @@ class EtablissementCsvSerializer < EtablissementSerializer
|
|||
def adresse
|
||||
object.adresse.chomp.gsub("\r\n", ' ').gsub("\r", '')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -12,4 +12,4 @@ class EtablissementSerializer < ActiveModel::Serializer
|
|||
:localite,
|
||||
:code_insee_localite
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,4 +4,4 @@ class ModuleApiCartoSerializer < ActiveModel::Serializer
|
|||
:cadastre
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,4 +4,4 @@ class PieceJustificativeSerializer < ActiveModel::Serializer
|
|||
:content_url
|
||||
|
||||
has_one :user
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,4 +4,4 @@ class TypeDeChampSerializer < ActiveModel::Serializer
|
|||
:type_champ,
|
||||
:order_place,
|
||||
:description
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
class UserSerializer < ActiveModel::Serializer
|
||||
attributes :email
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,4 +22,4 @@ class AccompagnateurService
|
|||
|
||||
@accompagnateur.build_default_preferences_list_dossier @procedure.id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -16,4 +16,4 @@ class BrowserService
|
|||
true
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -13,4 +13,4 @@ class ClamavService
|
|||
return false if response.first.class == ClamAV::VirusResponse
|
||||
true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -53,4 +53,4 @@ class DossierService
|
|||
|
||||
false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -40,4 +40,4 @@ class DossiersListUserService
|
|||
def termine
|
||||
@termine ||= @current_devise_profil.dossiers.termine
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -14,4 +14,4 @@ class FranceConnectSaltService
|
|||
def salt
|
||||
Digest::MD5.hexdigest(model.france_connect_particulier_id + model.given_name + model.family_name + FRANCE_CONNECT.particulier_secret + DateTime.now.to_date.to_s)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -26,4 +26,4 @@ class GeojsonService
|
|||
|
||||
polygon.to_json
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,4 +2,4 @@ class NumberService
|
|||
def self.to_number string
|
||||
string.to_s if Float(string) rescue nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -37,4 +37,4 @@ class PiecesJustificativesService
|
|||
|
||||
piece_justificative
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,4 +2,4 @@ class PrevisualisationService
|
|||
def self.destroy_all_champs dossier
|
||||
Champ.where(dossier_id: dossier.id, type_de_champ_id: dossier.procedure.types_de_champ.ids).destroy_all
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,4 +22,4 @@ class SwitchDeviseProfileService
|
|||
def administrateur_signed_in?
|
||||
!@warden.authenticate(:scope => :administrateur).nil?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,4 +6,4 @@ class UserRoutesAuthorizationService
|
|||
auth[:states].include?(dossier.state.to_sym) &&
|
||||
(auth[:api_carto].nil? ? true : auth[:api_carto] == dossier.procedure.use_api_carto)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,4 +8,4 @@ class BaseUploader < CarrierWave::Uploader::Base
|
|||
'/tmp/tps-dev-cache'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -13,4 +13,4 @@
|
|||
|
||||
%br
|
||||
%br
|
||||
= link_to 'Réaliser un autre dossier', 'change_dossier_state'
|
||||
= link_to 'Réaliser un autre dossier', 'change_dossier_state'
|
||||
|
|
|
@ -14,4 +14,4 @@
|
|||
- Dossier.states.each do |state|
|
||||
%option{value: state[0]}
|
||||
=DossierDecorator.case_state_fr state[1]
|
||||
= f.submit 'Valider'
|
||||
= f.submit 'Valider'
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
= @mail_template.class.const_get(:DISPLAYED_NAME)
|
||||
|
||||
= simple_form_for @mail_template,
|
||||
as: 'mail_template',
|
||||
url: admin_procedure_mail_template_path(@procedure, @mail_template.class.slug),
|
||||
as: 'mail_template',
|
||||
url: admin_procedure_mail_template_path(@procedure, @mail_template.class.slug),
|
||||
method: :put do |f|
|
||||
.row
|
||||
.col-md-6
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
- if @procedure.locked?
|
||||
.alert.alert-info
|
||||
Cette procédure est publiée, certains éléments de la description ne sont plus modifiables
|
||||
|
@ -90,6 +89,3 @@
|
|||
%p.help-block
|
||||
%i.fa.fa-info-circle
|
||||
L'archivage automatique de la procédure entrainera le passage en instruction de tous les dossiers en construction.
|
||||
|
||||
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue