this.addEvents(
- /**
- * Changement dans la saisie
- * @event saisieChange
- * @param valide
- */
+ /**
+ * Changement dans la saisie
+ * @event saisieChange
+ * @param valide
+ */
this.Constantes.eventId.saisieChange,
- /**
- * Ajoute une appréciation
- * @appreciation
- */
+ /**
+ * Ajoute une appréciation
+ * @appreciation
+ */
this.Constantes.eventId.actionInsereAppreciation,
- /**
- * Demande l'actualisation du graph
- */
+ /**
+ * Demande l'actualisation du graph
+ */
this.Constantes.eventId.actionActualiserGraph);
// Définition de la configuration par défaut
click: function() {
this.fireEvent(
this.Constantes.eventId.actionInsereAppreciation,
- {
- texte: this.appreciationTextArea.getValue()
- });
+ {
+ texte: this.appreciationTextArea.getValue()
+ });
},
scope: this
},
var record = this.storeSaisie.getAt(0);
if ((record !== undefined) && (record !== null)) {
this.formSaisie.getForm().loadRecord(record);
- if ((this.ConfigServeur.data.verrouille !== true) &&
- (record.get('actif') !== false)) {
- this.appreciationTextArea.enable();
- this.banqueAppreciationBoutonEnregistrer.enable();
- this.avisType1ComboBox.enable();
- this.avisType2ComboBox.enable();
+ if (record.get('actif') !== false){
+ if (this.ConfigServeur.data.isDirection == true ||
+ (this.ConfigServeur.data.isProfPrincipal == true && this.ConfigServeur.data.isDatePublicationBulletinDepassee == false) ||
+ this.ConfigServeur.data.verrouille !== true) {
+ this.appreciationTextArea.enable();
+ this.banqueAppreciationBoutonEnregistrer.enable();
+ this.avisType1ComboBox.enable();
+ this.avisType2ComboBox.enable();
+ }
}
}
function(store, records) {
if (records.length > 0) {
this.formSaisie.getForm().loadRecord(records[0]);
- if ((records[0].get('verrouille') !== true) &&
- (records[0].get('actif') !== false)) {
- this.appreciationTextArea.enable();
- this.banqueAppreciationBoutonEnregistrer.enable();
- this.banqueAppreciation.enable();
- this.avisType1ComboBox.enable();
- this.avisType2ComboBox.enable();
+ if (records[0].get('actif') !== false){
+ if (this.ConfigServeur.data.isDirection == true ||
+ (this.ConfigServeur.data.isProfPrincipal == true && this.ConfigServeur.data.isDatePublicationBulletinDepassee == false) ||
+ records[0].get('verrouille') !== true) {
+ this.appreciationTextArea.enable();
+ this.banqueAppreciationBoutonEnregistrer.enable();
+ this.banqueAppreciation.enable();
+ this.avisType1ComboBox.enable();
+ this.avisType2ComboBox.enable();
+ }
}
else {
this.appreciationTextArea.disable();