--- /dev/null
+/*
+Copyright (c) Igor Barma, Alexandre Desoubeaux, Christian Martel, Eric Brun, Mathieu Amblard, Gwenael Gevet, Pierre Guillot, 2012
+ * Copyright Alexandre Desoubeaux, Christian Martel, Cedric Lecarpentier, Alexandre Lefevre, Marc Salvat 2014-2016
+ * Copyright Alexandre Desoubeaux, Christian Martel, Cedric Lecarpentier, Marc Salvat, Marc Suarez, Harifetra Ramamonjy 2017
+For licensing, see README.txt or http://www.pentilanero.com (Cecill-C or AGPL or LGPL)
+*/
+Ext.ns("EntSavoie.CantineCollege");
+EntSavoie.CantineCollege.ConfigPlanAlimentaire = function (config) {
+ Ext.apply(this, config);
+
+ // Ajoute le texte des erreurs
+ Ext.QuickTips.init();
+ // turn on validation errors beside the field globally
+ Ext.form.Field.prototype.msgTarget = 'side';
+
+ this.nbDatesByPlan = this.nbDatesByPlan || 20;
+ this.nbDatesByGrid = this.nbDatesByGrid || 5;
+
+ /**
+ * Arbre des categories
+ */
+ this.treeBanqueLoader = this.treeBanqueLoader || new Ext.tree.TreeLoader({
+ dataUrl: this.renderURLAjax+'&jspPage=%2Fajax%2FcategorieForTree.jsp'
+ });
+
+ this.treeBanquePanel = this.treeBanquePanel || new Ext.tree.TreePanel({
+ cls: "treeBanquePanelForConfiguration",
+ border: false,
+ useArrows: true,
+ autoScroll: true,
+ animate: true,
+ containerScroll: true,
+ loader: this.treeBanqueLoader,
+ rootVisible: true,
+ enableDrop: false,
+ enableDrag : true,
+ ddGroup: 'configPlanAlimentaireDD',
+ singleExpand: true,
+ root: {
+ nodeType: 'async',
+ text: "Catégories", // Texte du noeud
+ draggable: false, // Désactiver le Drag and drop sur ce noeud
+ id: "allCategories", // Id du rootNodePah
+ leaf: false,
+ allowDrop: false,
+ iconCls: 'allRecipe',
+ expanded: true
+ }
+ });
+
+ this.menuConfigurationPanel = this.menuConfigurationPanel || new Ext.Panel({
+ border: true,
+ autoScroll: true
+ });
+
+ this.previousButton = this.previousButton || new Ext.Button({
+ text: 'Retour',
+ iconCls: 'previous',
+ handler: this.onPreviousPanel,
+ style: "margin-left: 50px",
+ tooltip: "Retourner sur la page d'accueil",
+ scope: this
+ });
+
+ this.previousTBarButton = this.previousTBarButton || new Ext.Button({
+ text: 'Retour',
+ iconCls: 'previous',
+ handler: this.onPreviousPanel,
+ style: "margin-right: 10px",
+ tooltip: "Retourner sur la page d'accueil",
+ scope: this
+ });
+
+ this.nextButton = this.nextButton || new Ext.Button({
+ text: 'Suivant',
+ iconCls: 'next',
+ style: "margin-right: 50px",
+ handler: this.onNextPanel,
+ tooltip: "Aller à l'étape suivante",
+ scope: this
+ });
+
+ this.nextTBarButton = this.nextTBarButton || new Ext.Button({
+ text: 'Suivant',
+ iconCls: 'next',
+ style: "margin-right: 20px",
+ handler: this.onNextPanel,
+ tooltip: "Aller à l'étape suivante",
+ scope: this
+ });
+
+ this.saveConfigurationBtn = this.saveConfigurationBtn || new Ext.Button({
+ iconCls: 'save',
+ text: "Enregistrer",
+ handler: this.onSavePlanConfiguration,
+ tooltip: "Enregistrer la configuration du plan alimentaire",
+ scope: this
+ });
+
+ this.saveConfigurationTBarBtn = this.saveConfigurationTBarBtn || new Ext.Button({
+ iconCls: 'save',
+ text: "Enregistrer",
+ style: "margin-right: 10px",
+ handler: this.onSavePlanConfiguration,
+ tooltip: "Enregistrer la configuration du plan alimentaire",
+ scope: this
+ });
+
+ this.exportPlanConfigurationBtn = this.exportPlanConfigurationBtn || new Ext.Button({
+ iconCls: 'exportPlanConfigurationCls',
+ text: "Imprimer",
+ handler: this.onExportPlanConfiguration,
+ tooltip: "Export la configuration du plan au format PDF",
+ hidden: true,
+ scope: this
+ });
+
+ this.exportPlanConfigurationTBarBtn = this.exportPlanConfigurationTBarBtn || new Ext.Button({
+ iconCls: 'exportPlanConfigurationCls',
+ text: "Imprimer",
+ style: "margin-right: 10px",
+ handler: this.onExportPlanConfiguration,
+ tooltip: "Export la configuration du plan au format PDF",
+ hidden: true,
+ scope: this
+ });
+
+ this.tip = this.tip || new Ext.slider.Tip({
+ scope: this,
+ getText: function(thumb){
+ if(thumb.value == 0){
+ return String.format("<b>Configuration du plan alimentaire</b>");
+ } else if(thumb.value == 1){
+ return String.format("<b>Etape 1 : </b><br />Saisie des plats protidiques");
+ } else if(thumb.value == 2){
+ return String.format("<b>Etape 2 : </b><br />Saisie des garnitures");
+ } else if(thumb.value == 3){
+ return String.format("<b>Etape 3 : </b><br />Saisie des entrées");
+ } else if(thumb.value == 4){
+ return String.format("<b>Etape 4 : </b><br />Saisie des desserts");
+ } else if(thumb.value == 5){
+ return String.format("<b>Etape 5 : </b><br />Saisie des fromages");
+ }
+ }
+ });
+
+ this.slider = this.slider || new Ext.Slider({
+ width: 214,
+ increment: 1,
+ minValue: 0,
+ maxValue: 5,
+ plugins: this.tip
+ });
+
+ this.configPlanAlimentaireTitle = this.configPlanAlimentaireTitle || new Ext.form.Label({
+ text: "Configuration du plan alimentaire",
+ cls: "toolBarHeaderTextCls"
+ });
+
+ this.closeToolBtn = this.closeToolBtn || new Ext.BoxComponent({
+ autoEl: {
+ html: '<div class="x-tool x-tool-close"> </div>'
+ }
+ });
+
+ this.tbar = this.tbar || new Ext.Toolbar({
+ cls: "x-panel-header",
+ items: [
+ this.configPlanAlimentaireTitle,
+ {xtype: 'tbspacer', width: 100},
+ this.slider,
+ "->",
+ this.previousTBarButton,
+ this.exportPlanConfigurationTBarBtn,
+ this.saveConfigurationTBarBtn,
+ this.nextTBarButton,
+ this.closeToolBtn
+ ]
+ });
+
+ /**
+ * Constructeur
+ */
+ EntSavoie.CantineCollege.ConfigPlanAlimentaire.superclass.constructor.call(this, {
+ border: false,
+ layout: 'border',
+ width: "auto",
+ monitorResize: true,
+ frame: true,
+ defaults: {
+ collapsible: false,
+ split: false,
+ border: false
+ },
+ items: [
+ {
+ width: 150,
+ region: "west",
+ border: true,
+ layout: 'fit',
+ items: [this.treeBanquePanel]
+ },{
+ region: "center",
+ width: "auto",
+ border: false,
+ autoScroll: false,
+ layout: "fit",
+ items: [this.menuConfigurationPanel]
+ }
+ ],
+ buttonAlign: "left",
+ tbar: this.tbar,
+ buttons: [this.previousButton, "->", this.exportPlanConfigurationBtn, "-", this.saveConfigurationBtn, this.nextButton]
+ });
+
+ this.on("activate", this.onActivateConfigPlanAlimentaire, this);
+ this.closeToolBtn.on("render", this.onRenderCloseToolBtn, this);
+ this.slider.on("changecomplete", this.onChangeCompleteSlider, this);
+
+};
+
+Ext.extend(EntSavoie.CantineCollege.ConfigPlanAlimentaire, Ext.Panel, {
+ initComponent: function () {
+ EntSavoie.CantineCollege.ConfigPlanAlimentaire.superclass.initComponent.call(this);
+ },
+
+ createConfigurationGrid: function(begin, end, data){
+
+ var myFields = [];
+ var myColumns = [];
+
+ myFields.push({name: "id"});
+ myFields.push({name: 'typeRecette'});
+
+ var column1 = {
+ header: '',
+ dataIndex: 'typeRecette',
+ width: 130,
+ fixed: true,
+ menuDisabled: true
+ };
+ myColumns.push(column1);
+
+ for(j=begin; j<end; j++){
+ myFields.push(this.fields[j]);
+ myColumns.push(this.columns[j]);
+ }
+
+ //Pour le tri
+ myFields.push({name: 'sort'});
+
+ var myStore = new Ext.data.ArrayStore({
+ idProperty: 'id',
+ fields: myFields,
+ sortInfo: {
+ field: 'sort',
+ direction: 'ASC'
+ }
+ });
+
+ var myConfig = new Ext.grid.ColumnModel({
+ columns: myColumns
+ });
+
+ // create the editor grid
+ var myConfigPlanAlimentaireGrid = new Ext.grid.GridPanel({
+ store: myStore,
+ enableColumnHide: true,
+ height: 147,
+ columnLines: true,
+ disableSelection: true,
+ trackMouseOver: false,
+ stripeRows: true,
+ cm: myConfig,
+ width: "auto",
+ autoHeight: true,
+ autoScroll: false,
+ viewConfig: {
+ forceFit:true,
+ scrollOffset: 0
+ }
+ });
+
+ myConfigPlanAlimentaireGrid.on("viewready", this.onViewReadyConfigPlanAlimentaireGrid, this);
+ myConfigPlanAlimentaireGrid.on("cellclick", this.onCellClickConfigPlanAlimentaireGrid, this);
+
+ this.menuConfigurationPanel.add(myConfigPlanAlimentaireGrid);
+ this.menuConfigurationPanel.doLayout();
+ this.doLayout();
+
+ myStore.loadData(data);
+
+ },
+
+ onActivateConfigPlanAlimentaire: function(panel){
+
+ this.wait = new Ext.LoadMask(Ext.getBody(), {msg: "<b>Chargement des informations en cours.</b> <br/> Veuillez patienter ..."});
+ this.wait.show();
+
+ this.slider.setValue(0);
+
+ /*
+ * Disable des boutons de navigation
+ * Pour attendre que les stores soient charges afin de naviguer
+ */
+ this.slider.disable();
+ this.nextButton.disable();
+ this.previousButton.disable();
+ this.nextTBarButton.disable();
+ this.previousTBarButton.disable();
+
+ this.menuConfigurationPanel.removeAll(true);
+
+ //On doit creer 4 grilles pour afficher 20 jours sur une seule page
+ //On creer les columns et les fields dont on a besoin
+ this.columns = [];
+ this.fields = [];
+
+ //On crée les colonnes pour la grid
+ for(i=1; i<=this.mainContainer.dates.length; i++){
+ var date = this.mainContainer.dates[i-1];
+ var dateArray = date.split("/");
+ var d = new Date(dateArray[2], dateArray[1]-1, dateArray[0]);
+ var dateColumn = {
+ width: "auto",
+ header: "<div align='center'><b>" + d.format("D d M Y") + "</b></div>",
+ dataIndex: date,
+ menuDisabled: true,
+ renderer: {
+ fn: function(value, metaData, record, rowIndex, colIndex, store) {
+ if(colIndex != 0){
+ var categories = "";
+ var categorieArray = record.get(store.fields.get(colIndex+1).name);
+ for(var i=0; i<categorieArray.length; i++){
+ var categorie = categorieArray[i];
+ categories += '<table class="x-table-layout" cellspacing="0">' +
+ '<tbody>' +
+ '<tr class="color-' + categorie.couleur + '">' +
+ '<td class="x-table-layout-cell">' +
+ '<label>' + categorie.nomCategorie + '</label>' +
+ '</td>' +
+ '<td class="x-table-layout-cell">' +
+ '<div class="deleteCategorieConfig" onclick="deleteCategorieFromConfig(\'' + record.get('id') + '\', \'' + store.fields.get(colIndex+1).name + '\', \'' + categorie.categorieId + '\')"></div>' +
+ '</td>' +
+ '</tr>' +
+ '</tbody>' +
+ '</table>';
+ }
+
+ return categories;
+ } else {
+ return value;
+ }
+ },
+ scope: this
+ }
+ };
+ this.columns.push(dateColumn);
+ this.fields.push({name: date});
+ }
+
+ var nbGridToCreate = this.nbDatesByPlan/this.nbDatesByGrid;
+
+ Ext.Ajax.request({
+ url: this.actionURLAjax,
+ params:{
+ cmd: "getConfigPlanAlimentaireStore",
+ planAlimentaireId: this.mainContainer.planAlimentaireId,
+ nbGridToCreate: nbGridToCreate,
+ nbDatesByGrid: this.nbDatesByGrid
+ },
+ scope: this,
+ success: this.onSuccessGetConfigPlanAlimentaireStore,
+ failure: this.onFailureGetConfigPlanAlimentaireStore
+ });
+ },
+
+ onSuccessGetConfigPlanAlimentaireStore: function(response, options) {
+ // Traitement des messages
+ var backObj = "";
+ try{
+ backObj = Ext.decode(response.responseText);
+ } catch (e){
+ this.onActivateConfigPlanAlimentaire(this);
+ }
+ if (!backObj.success) {
+ Ext.MessageBox.alert("Attention", "En raison d'un dysfonctionnement réseau l'opération demandée n'a pas pu être effectuée", function(btn){}, this);
+ } else {
+ var nbGridToCreate = this.nbDatesByPlan/this.nbDatesByGrid;
+
+ //On cree 4 grids de 5 colonnes
+ for(i=0; i<nbGridToCreate; i++){
+ this.createConfigurationGrid(i*this.nbDatesByGrid, i*this.nbDatesByGrid + this.nbDatesByGrid, backObj.listConfigPlanAlimentaire[i]);
+ }
+
+ /*
+ * Enable les boutons de navigation
+ * Lorsque tout est charge
+ */
+ this.slider.enable();
+ this.nextButton.enable();
+ this.previousButton.enable();
+ this.nextTBarButton.enable();
+ this.previousTBarButton.enable();
+
+ /*
+ * On recalcul la vue des fois qu'un scroll soit apparu
+ */
+ var grids = this.menuConfigurationPanel.items;
+ //Boucle sur les grilles
+ for(i=0; i<grids.length; i++){
+ var grid = grids.get(i);
+ grid.view.refresh();
+ }
+ }
+
+ this.wait.hide();
+ },
+
+ onFailureGetConfigPlanAlimentaireStore: function(response, options) {
+ this.wait.hide();
+ Ext.MessageBox.alert("Attention", "En raison d'un dysfonctionnement réseau l'opération demandée n'a pas pu être effectuée", function(btn){}, this);
+ },
+
+ onViewReadyConfigPlanAlimentaireGrid: function(grid){
+
+ this.dropZone = new Ext.dd.DropZone(grid.getId(),
+ {
+ scope: this,
+ ddGroup : 'configPlanAlimentaireDD',
+ getTargetFromEvent: function(e) {
+ var t = e.getTarget(grid.view.cellSelector);
+ if (t) {
+ var rowIndex = grid.view.findRowIndex(t);
+ var columnIndex = grid.view.findCellIndex(t);
+ if ((rowIndex !== false) && (columnIndex !== false)) {
+ return {
+ node: t,
+ record: grid.store.getAt(rowIndex),
+ fieldName: grid.getColumnModel().getDataIndex(columnIndex),
+ rowIndex: rowIndex,
+ columnIndex: columnIndex
+ };
+ }
+ }
+ },
+
+ onNodeEnter: function(target, dd, e, dragData) {
+ delete this.dropOK;
+ if (!target) {
+ return;
+ }
+
+ //Drop disable sur la premiere colonne
+ if(target.fieldName == "typeRecette"){
+ return;
+ }
+
+ //On regarde si l'element drag correspond au type de la recette
+ if(dragData.node.attributes.typeRecette.indexOf(target.record.get("id")) == -1){
+ return;
+ }
+
+ var categs = target.record.get(target.fieldName);
+ for(i=0; i<categs.length; i++){
+ var categ = categs[i];
+ if(categ.categorieId == dragData.node.id){
+ return;
+ }
+ }
+
+ this.dropOK = true;
+ Ext.fly(target.node).addClass('x-drop-target-active');
+ },
+
+ onNodeOver: function(target, dd, e, dragData) {
+ return this.dropOK?"x-dd-drop-ok":"x-dd-drop-nodrop";
+ },
+
+ onNodeOut: function(target, dd, e, dragData) {
+ Ext.fly(target.node).removeClass('x-drop-target-active');
+ },
+
+ onNodeDrop: function(target, dd, e, dragData) {
+ if (this.dropOK) {
+ var rec = target.record;
+ grid.store.remove(target.record);
+
+ var categs = target.record.get(target.fieldName);
+ categs.push({categorieId: dragData.node.id, nomCategorie: dragData.node.text, couleur: dragData.node.attributes.couleur});
+ rec.set(target.fieldName, categs);
+
+ grid.store.addSorted(rec);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ });
+ },
+
+ onCellClickConfigPlanAlimentaireGrid: function(grid, rowIndex, columnIndex, e){
+ var fieldName = grid.getColumnModel().getDataIndex(columnIndex);
+ var record = grid.store.getAt(rowIndex);
+ var node = this.treeBanquePanel.getSelectionModel().getSelectedNode();
+
+ if(node){
+ if(node.draggable){
+ if(fieldName == "typeRecette"){
+ return;
+ }
+
+ if(node.attributes.typeRecette.indexOf(record.get("id")) == -1){
+ return;
+ }
+
+ var rec = record;
+
+ var categs = rec.get(fieldName);
+ for(i=0; i<categs.length; i++){
+ var categ = categs[i];
+ if(categ.categorieId == node.id){
+ return;
+ }
+ }
+
+ grid.store.remove(record);
+ categs.push({categorieId: node.id, nomCategorie: node.text, couleur: node.attributes.couleur});
+ rec.set(fieldName, categs);
+
+ grid.store.addSorted(rec);
+ }
+ }
+ },
+
+ //Suppression d'un categorie de la config
+ deleteCategorieFromConfig: function(id, dateField, categorieId){
+
+ //On cherche la grid qui contenant la categorie supprime
+ var grids = this.menuConfigurationPanel.items;
+ var gridToUpdate = null;
+
+ //Boucle sur les grilles
+ for(i=0; i<grids.length; i++){
+ var grid = grids.get(i);
+ var store = grid.getStore();
+ var records = store.getRange();
+ //Boucles sur les records
+ for(j=0; j<records.length; j++){
+ var rec = records[j];
+ var fields = store.fields;
+ //Boucle sur les champs des records
+ for(k=0; k<fields.length; k++){
+ //Si on est sur une date
+ var field = fields.get(k).name;
+ if(field.indexOf(dateField) != -1){
+ gridToUpdate = grid;
+ break;
+ }
+ }
+ }
+ }
+
+ //Normallement c'est toujours le cas
+ if(gridToUpdate){
+ var index = gridToUpdate.store.find('id', id);
+ var rec = gridToUpdate.store.getAt(index);
+ var categs = rec.get(dateField);
+ gridToUpdate.store.remove(rec);
+
+ //Suppression du field
+ for(var i=0; i<categs.length;i++ ) {
+ if(categs[i].categorieId == categorieId){
+ categs.splice(i,1);
+ }
+ }
+
+ rec.set(dateField, categs);
+ gridToUpdate.store.addSorted(rec);
+ }
+ },
+
+ onSavePlanConfiguration: function(btn){
+ this.action = 'save';
+ this.savePlanConfiguration();
+ },
+
+ onPreviousPanel: function(btn){
+ this.action = 'previous';
+ this.savePlanConfiguration();
+ },
+
+ onNextPanel: function(btn){
+ this.action = 'next';
+ this.savePlanConfiguration();
+ },
+
+ onRenderCloseToolBtn: function(el){
+ el.getEl().on('click', function(){this.onPreviousPanel();}, this);
+ },
+
+ onChangeCompleteSlider: function(slider, newValue, thumb){
+ this.mainContainer.menuPlanAlimentairePanel.step = newValue;
+ this.action = "next";
+ this.savePlanConfiguration();
+ },
+
+ savePlanConfiguration: function(){
+
+ this.wait = new Ext.LoadMask(Ext.getBody(), {msg: "<b>Enregistrement de la configuration en cours.</b> <br/> Veuillez patienter ..."});
+ this.wait.show();
+
+ var configs = new Array();
+ var grids = this.menuConfigurationPanel.items;
+ //Boucle sur les grilles
+ for(i=0; i<grids.length; i++){
+ var grid = grids.get(i);
+ var store = grid.getStore();
+ var records = store.getRange();
+ //Boucles sur les records
+ for(j=0; j<records.length; j++){
+ var rec = records[j];
+ var fields = store.fields;
+ //Boucle sur les champs des records
+ for(k=0; k<fields.length; k++){
+ //Si on est sur une date
+ var field = fields.get(k).name;
+ if(field.indexOf("/") != -1){
+ var categories = rec.get(field);
+ //Boucle sur les categories
+ for(l=0; l<categories.length; l++){
+ var conf = {
+ date: field,
+ typeRecette: rec.get("id"),
+ categorie: categories[l].categorieId
+ }
+ configs.push(conf);
+ }
+ }
+ }
+ }
+ }
+
+ Ext.Ajax.request({
+ url: this.actionURLAjax,
+ params:{
+ cmd: "savePlanConfiguration",
+ planAlimentaireId: this.mainContainer.planAlimentaireId,
+ configs: Ext.util.JSON.encode(configs)
+ },
+ scope: this,
+ success: this.onSuccessSavePlanConfiguration,
+ failure: this.onFailureSavePlanConfiguration
+ });
+ },
+
+ onSuccessSavePlanConfiguration: function(response, options) {
+ this.wait.hide();
+ // Traitement des messages
+ var backObj = "";
+ try{
+ backObj = Ext.decode(response.responseText);
+ } catch (e){
+ this.savePlanConfiguration();
+ }
+ if (!backObj.success) {
+ Ext.MessageBox.alert("Attention", "En raison d'un dysfonctionnement réseau l'opération demandée n'a pas pu être effectuée", function(btn){}, this);
+ } else {
+ if(this.action == "save"){
+ Ext.slideMsg.msg("Sauvegarde de la configuration du plan alimentaire", "La configuration du plan alimentaire a correctement été enregistrée.");
+ } else if(this.action == "previous"){
+ this.mainContainer.layout.setActiveItem(0);
+ } else if(this.action == "next"){
+ this.mainContainer.layout.setActiveItem(2);
+ }
+ }
+ },
+
+ onFailureSavePlanConfiguration: function(response, options) {
+ this.wait.hide();
+ Ext.MessageBox.alert("Attention", "En raison d'un dysfonctionnement réseau l'opération demandée n'a pas pu être effectuée", function(btn){}, this);
+ },
+
+ /*
+ * Export de la configuration du plan alimentaire au format pdf
+ */
+ onExportPlanConfiguration: function(btn){
+ Ext.MessageBox.show({
+ title: "Export au format PDF",
+ msg: "<b>Attention :</b> Les données non sauvegardées ne seront pas présentent dans l'export au format PDF. </br>" +
+ "Nom du fichier :",
+ buttons: {yes:"Valider", no:"Annuler"},
+ value: "configuration_des_categories",
+ fn: this.exportPlanConfiguration,
+ prompt: true,
+ minWidth:250,
+ scope: this
+ });
+ },
+
+ exportPlanConfiguration: function(btn, fileName){
+ if (btn=="no") {
+ return false;
+ }
+
+ this.wait = new Ext.LoadMask(Ext.getBody(), {msg: "<b>Export de la configuration en cours</b> <br/> Veuillez patienter ..."});
+ this.wait.show();
+
+ Ext.Ajax.request({
+ url: this.actionURLAjax,
+ params: {
+ cmd: "exportPlanConfiguration",
+ planAlimentaireId: this.mainContainer.planAlimentaireId
+ },
+ scope: this,
+ success: this.onSuccessExportFormToPDF,
+ failure: this.onFailureExportFormToPDF
+ });
+ },
+
+ onSuccessExportFormToPDF: function(response, options) {
+ this.wait.hide();
+ // Traitement des messages
+ var backObj = Ext.decode(response.responseText);
+ if (!backObj.success) {
+ Ext.MessageBox.alert("Attention", "En raison d'un dysfonctionnement réseau l'opération demandée n'a pas pu être effectuée", function(btn){}, this);
+ } else {
+ Ext.slideMsg.msg("Export de la configuration du plan", "L'export de la configuration du plan alimentaire au format PDF a correctement été réalisé.");
+ Ext.MessageBox.show({
+ title: "Export de la configuration du plan alimentaire",
+ msg: backObj.hrefFile,
+ icon: Ext.MessageBox.INFO,
+ buttons: {yes:"OK"},
+ minWidth: 350
+ });
+ }
+ },
+
+ onFailureExportFormToPDF: function(response, options) {
+ this.wait.hide();
+ Ext.MessageBox.alert("Attention", "En raison d'un dysfonctionnement réseau l'opération demandée n'a pas pu être effectuée", function(btn){}, this);
+ }
+
+
+});