--- /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.MainCantine = 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.planAlimentairePanel = this.planAlimentairePanel || new EntSavoie.CantineCollege.MainPlanAlimentaire({
+ renderURLAjax: this.renderURLAjax,
+ actionURLAjax: this.actionURLAjax
+ });
+
+ this.recettePanel = this.recettePanel || new EntSavoie.Recette({
+ renderURLAjax: this.renderURLAjax,
+ actionURLAjax: this.actionURLAjax,
+ isDepartement: false
+ });
+
+ this.configurationPanel = this.configurationPanel || new EntSavoie.CantineCollege.Configuration({
+ renderURLAjax: this.renderURLAjax,
+ actionURLAjax: this.actionURLAjax
+ });
+
+ this.tabCantine = new Ext.TabPanel ({
+ monitorResize: true,
+ width: "auto",
+ cls:"auto-width-tab-strip",
+ border: false,
+ plain: true,
+ activeTab: 0,
+ items: [this.planAlimentairePanel, this.recettePanel, this.configurationPanel]
+ });
+
+ /**
+ * Constructeur
+ */
+ EntSavoie.CantineCollege.MainCantine.superclass.constructor.call(this, {
+ border: false,
+ bodyStyle:{"background-color": "white"},
+ height: EntSavoie.FullScreen.fired()?EntSavoie.FullScreen.getContainerHeight():Global.Portlet.height,
+ monitorResize: true,
+ width: "auto",
+ layout: 'fit',
+ items: [this.tabCantine]
+ });
+
+};
+
+Ext.extend(EntSavoie.CantineCollege.MainCantine, Ext.Panel, {
+ initComponent: function () {
+ EntSavoie.CantineCollege.MainCantine.superclass.initComponent.call(this);
+ },
+
+ deleteCategorieFromConfig: function(id, field, categorie){
+ this.planAlimentairePanel.configPlanAlimentairePanel.deleteCategorieFromConfig(id, field, categorie);
+ }
+});