barre-outils.js (1533B)
1 function MBarreOutils() { 2 $.extend(this, { 3 monde: null, 4 }); 5 } 6 7 function VBarreOutils(vMondeParente) { 8 $.extend(this,( 9 $('#vue-barre-outils') 10 .jqote({}) 11 .appendTo(vMondeParente))); 12 13 this.vBarreTitre = this.find('.barre-titre'); 14 this.vTitre = this.find('.titre'); 15 this.vBoutonNouveauBloc = this.find('.nouveau-bloc'); 16 this.vBoutonRecherche = this.find('.recherche'); 17 this.vBoutonLog = this.find('.log'); 18 19 this.draggable(); 20 this.resizable(); 21 } 22 23 function CBarreOutils(mBarreOutils, vMondeParente) { 24 this.modèle = mBarreOutils; 25 this.vue = new VBarreOutils(vMondeParente); 26 27 var that = this; 28 (this.vue.vBoutonNouveauBloc) 29 .click(function() { 30 that.modèle.monde.log.envoiMessage("Cliquez-glissez pour créer un nouveau bloc."); 31 that.modèle.monde.outilZone = that.modèle.monde.actionNouveauBloc; 32 }); 33 34 (this.vue.vBoutonRecherche) 35 .click(function() { 36 that.modèle.monde.log.envoiMessage("Nouvelle recherche."); 37 var mr = that.modèle.monde.recherche; 38 var mir = mr.demanderInstance(); 39 that.modèle.monde.ajouterInstanceRecherche(mir); 40 }); 41 42 (this.vue.vBoutonLog) 43 .click(function() { 44 that.modèle.monde.log.envoiMessage("Nouveau log."); 45 var ml = that.modèle.monde.log; 46 var mil = ml.demanderInstance(); 47 that.modèle.monde.ajouterInstanceLog(mil); 48 }); 49 }