In JS, TPS -> DS
This commit is contained in:
parent
1b8b6a3274
commit
17421e54cc
13 changed files with 21 additions and 21 deletions
|
@ -1,3 +1,3 @@
|
|||
TPS.toggleCondidentielExplanation = function(event) {
|
||||
DS.toggleCondidentielExplanation = function(event) {
|
||||
$(".confidentiel-explanation").toggle();
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ $(document).on("click", "body", function () {
|
|||
$(".print-menu").removeClass("open fade-in-down");
|
||||
});
|
||||
|
||||
TPS.togglePrintMenu = function(event) {
|
||||
DS.togglePrintMenu = function(event) {
|
||||
event.stopPropagation();
|
||||
$(".print-menu").toggleClass("open fade-in-down");
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ $(document).on("click", "body", function () {
|
|||
$(".header-menu").removeClass("open fade-in-down");
|
||||
});
|
||||
|
||||
TPS.toggleHeaderMenu = function(event) {
|
||||
DS.toggleHeaderMenu = function(event) {
|
||||
event.stopPropagation();
|
||||
$(".header-menu").toggleClass("open fade-in-down");
|
||||
}
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
// namespace
|
||||
window.TPS = window.TPS || {};
|
||||
window.DS = window.DS || {};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
TPS.scrollMessagerie = function () {
|
||||
DS.scrollMessagerie = function () {
|
||||
var scrollTo = function ($container, $scrollTo) {
|
||||
$container.scrollTop(
|
||||
$scrollTo.offset().top - $container.offset().top + $container.scrollTop()
|
||||
|
@ -21,4 +21,4 @@ TPS.scrollMessagerie = function () {
|
|||
}
|
||||
};
|
||||
|
||||
document.addEventListener("turbolinks:load", TPS.scrollMessagerie);
|
||||
document.addEventListener("turbolinks:load", DS.scrollMessagerie);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
TPS.showMotivation = function (state) {
|
||||
DS.showMotivation = function (state) {
|
||||
$(".motivation." + state).show();
|
||||
$(".dropdown-items").hide();
|
||||
};
|
||||
|
||||
TPS.motivationCancel = function () {
|
||||
DS.motivationCancel = function () {
|
||||
$(".motivation").hide();
|
||||
$(".dropdown-items").show();
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
TPS.toggleChart = function(event, chartClass) {
|
||||
DS.toggleChart = function(event, chartClass) {
|
||||
var nextSelectorItem = $(event.target),
|
||||
nextChart = $(chartClass),
|
||||
nextChartId = nextChart.children().first().attr("id"),
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
- if gestionnaire_signed_in? || user_signed_in?
|
||||
%li
|
||||
.header-menu-opener
|
||||
= image_tag "icons/account-circle.svg", onclick: "javascript:TPS.toggleHeaderMenu(event);", title: "Mon compte"
|
||||
= image_tag "icons/account-circle.svg", onclick: "javascript:DS.toggleHeaderMenu(event);", title: "Mon compte"
|
||||
%ul.header-menu
|
||||
%li
|
||||
.menu-item{ title: current_email }
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
%li
|
||||
= "Dossier nº #{dossier.id}"
|
||||
.mixed-buttons-bar
|
||||
.button.dropdown.icon-only.print-menu-opener{ onclick: "javascript:TPS.togglePrintMenu(event);" }
|
||||
.button.dropdown.icon-only.print-menu-opener{ onclick: "javascript:DS.togglePrintMenu(event);" }
|
||||
%span.icon.printer
|
||||
%ul.print-menu
|
||||
%li
|
||||
= link_to "Tout le dossier", print_gestionnaire_dossier_path(dossier.procedure, dossier), target: "_blank", class: "menu-item menu-link"
|
||||
%li
|
||||
= link_to "Uniquement cet onglet", "#", onclick: "TPS.togglePrintMenu; window.print()", class: "menu-item menu-link"
|
||||
= link_to "Uniquement cet onglet", "#", onclick: "DS.togglePrintMenu; window.print()", class: "menu-item menu-link"
|
||||
|
||||
= render partial: "new_gestionnaire/procedures/dossier_actions", locals: { procedure: dossier.procedure, dossier: dossier, dossier_is_followed: current_gestionnaire&.follow?(dossier) }
|
||||
= render partial: "state_button", locals: { dossier: dossier }
|
||||
|
|
|
@ -28,17 +28,17 @@
|
|||
.description
|
||||
%h4 En instruction
|
||||
L'usager ne peut modifier son dossier pendant l'instruction
|
||||
%li{ onclick: "TPS.showMotivation('accept');" }
|
||||
%li{ onclick: "DS.showMotivation('accept');" }
|
||||
%span.icon.accept
|
||||
.description
|
||||
%h4 Accepter
|
||||
L'usager sera notifié que son dossier a été accepté
|
||||
%li{ onclick: "TPS.showMotivation('without-continuation');" }
|
||||
%li{ onclick: "DS.showMotivation('without-continuation');" }
|
||||
%span.icon.without-continuation
|
||||
.description
|
||||
%h4 Classer sans suite
|
||||
L'usager ne recevra aucune notification
|
||||
%li{ onclick: "TPS.showMotivation('refuse');" }
|
||||
%li{ onclick: "DS.showMotivation('refuse');" }
|
||||
%span.icon.refuse
|
||||
.description
|
||||
%h4 Refuser
|
||||
|
|
|
@ -9,5 +9,5 @@
|
|||
%p.help
|
||||
L'acceptation du dossier envoie automatiquement une attestation à l'usager.
|
||||
.text-right
|
||||
%span.button{ onclick: 'TPS.motivationCancel();' } Annuler
|
||||
%span.button{ onclick: 'DS.motivationCancel();' } Annuler
|
||||
= button_tag 'Valider la décision', name: :process_action, value: process_action, class: 'button primary', title: title, data: { confirm: confirm }
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
- else
|
||||
.confidentiel-wrapper
|
||||
= f.label :confidentiel, 'Cet avis est'
|
||||
= f.select :confidentiel, [['partagé avec les autres experts', false], ['confidentiel', true]], {}, onchange: "javascript:TPS.toggleCondidentielExplanation(event);"
|
||||
= f.select :confidentiel, [['partagé avec les autres experts', false], ['confidentiel', true]], {}, onchange: "javascript:DS.toggleCondidentielExplanation(event);"
|
||||
.confidentiel-explanation
|
||||
Il ne sera pas affiché aux autres experts consultés mais sera visible par les accompagnateurs
|
||||
.send-wrapper
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
|
||||
.stat-card.stat-card-half.pull-left
|
||||
%ul.segmented-control.pull-right
|
||||
%li.segmented-control-item.segmented-control-item-active{ :onclick => "TPS.toggleChart(event, '.monthly-procedures-chart');" }
|
||||
%li.segmented-control-item.segmented-control-item-active{ :onclick => "DS.toggleChart(event, '.monthly-procedures-chart');" }
|
||||
Par mois
|
||||
%li.segmented-control-item{ :onclick => "TPS.toggleChart(event, '.cumulative-procedures-chart');" }
|
||||
%li.segmented-control-item{ :onclick => "DS.toggleChart(event, '.cumulative-procedures-chart');" }
|
||||
Cumul
|
||||
%span.stat-card-title.pull-left Procédures dématérialisées
|
||||
.clearfix
|
||||
|
@ -30,9 +30,9 @@
|
|||
|
||||
.stat-card.stat-card-half.pull-left
|
||||
%ul.segmented-control.pull-right
|
||||
%li.segmented-control-item.segmented-control-item-active{ :onclick => "TPS.toggleChart(event, '.monthly-dossiers-chart');" }
|
||||
%li.segmented-control-item.segmented-control-item-active{ :onclick => "DS.toggleChart(event, '.monthly-dossiers-chart');" }
|
||||
Par mois
|
||||
%li.segmented-control-item{ :onclick => "TPS.toggleChart(event, '.cumulative-dossiers-chart');" }
|
||||
%li.segmented-control-item{ :onclick => "DS.toggleChart(event, '.cumulative-dossiers-chart');" }
|
||||
Cumul
|
||||
%span.stat-card-title.pull-left Dossiers déposés
|
||||
.clearfix
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue