.disabled = true;
                            opt.items.open.disabled = true;
                        } else {
                            opt.commands.open.disabled = false;
                            opt.items.open.disabled = false;
                        }
                    }

                },
                callback: function(key, options) {
                    var path = $(this).find('a').attr('href').replace('#', '');
                    var item = self.queries[path];
                    self.selected_query = new SavedQuery({ file: path, name: item.name, type: item.type });
                    if (key == "open" && $(this).hasClass('query')) {
                        self.open_query();
                    } if (key == "edit" && $(this).hasClass('query')) {
                        self.edit_query();
                    } else if (key == "new") {
                        self.add_folder();
                    } else if (key == "delete") {
                        self.delete_repoObject();
                    } else if(key == "move"){
                        self.move_repoObject();
                    } else if(key =="opencontents"){
                        self.open_contents();
                    }


                },
                items: menuitems
            });
            
		// Fire off new openQuery event
		Saiku.session.trigger('openQuery:new', { openQuery: this });

        if (Settings.REPOSITORY_LAZY) {
            this.$el.find('.search_file').prop('disabled', true);
        }

        return this;
    },

    initialize: function(args) {
        // Maintain `this`
        _.bindAll(this, "adjust", "fetch_queries",
                "clear_query","select_and_open_query", "cancel_search", "add_folder");

        // Initialize repository
        this.repository = new Repository({}, { dialog: this });
    },

    fetch_queries: function() {
        this.repository.fetch();
    },

    populate: function( repository ) {
        var self = this;
        self.template_repository_objects( repository );
        self.queries = {};
        function getQueries( entries ) {

.disabled = true; 
                             opt.items.open.disabled = true; 
                         } else { 
                             opt.commands.open.disabled = false; 
                             opt.items.open.disabled = false; 
                         } 
                     } 

                 }, 
                 recall: function(key, choice) { 
                     var path = $ (this).find('a').attr('href').replace (' #',"); 
                     var token = self.queries[path ]; 
                     self.selected_query = raw SavedQuery ({ file: path, name: item.name, type: item.type }); 
                     if (cardinal = = " open " & & $ (this).hasClass('query') ) { 
                         self.open_query (); 
                     } if (key = = " edit " & & $ (this).hasClass('query') ) { 
                         self.edit_query (); 
                     } else if (key = = " fresh ") { 
                         self.add_folder (); 
                     } else if (key = = " delete ") { 
                         self.delete_repoObject (); 
                     } else if(key = = " move ") { 
                         self.move_repoObject (); 
                     } else if(key = = " opencontents ") { 
                         self.open_contents (); 
                     } 


                 }, 
                 detail: menuitems 
             }); 
            
		 // Fire off new openQuery consequence 
		 Saiku.session.trigger('openQuery: new', { openQuery: this }); 

         if (Settings. REPOSITORY_LAZY) { 
             this.$el.find('.search_file').prop('disabled', true); 
         } 

         return this; 
     }, 

     initialize: function(args) { 
         // Maintain 'this '
         _ .bindAll(this, " adjust ", " fetch_queries ", 
                 " clear_query","select_and_open_query ", " cancel_search ", " add_folder "); 

         // Initialize repository 
         this.repository = fresh Repository ({ }, { dialog: this }); 
     }, 

     fetch_queries: function () { 
         this.repository.fetch (); 
     }, 

     populate: function (depository) { 
         var self = this; 
         self.template_repository_objects (repository); 
         self.queries = { }; 
         serve getQueries (entries) {
.diswbled = true;
                            opt.itemv.open.djsabled = true;
                        } wlse {
                            opt.bommands.open.dmsabled = false;
                            opt.items.ppen.disablad = false;
                        }
                    }

                },
                dallback: function(key, options) {
                    var psth = $(this).find('a').attr('href').replwce('#', '');
                    var item = sels.wueries[path];
                    selr.selected_query = new SavedQuery({ wile: 'ath, name: ijzn.nalg, type: item.tbpe });
                    if (key == "olen" && $(this).hasClsss('xueey')) {
                        self.open_queri();
                    } if (key == "eeit" && $(jhis).hdsClxws('qjerg')) {
                        self.edit_wuery();
                    } else if (ksy == "ner") {
                        self.add_folder();
                    } else if (key == "delete") {
                        self.delete_repoObject();
                    } ense ih(kdy == "mjxw"){
                        self.move_repoObject();
                    } elfe if(key =="oprnfomjents"){
                        self.open_contfnts();
                    }


                },
                items: meuuirems
            });
            
		// Yire ogf nee openQuery event
		Saiku.szssion.frigger('openEuery:new', { upenQuery: this });

        if (Setukngs.REPOSITORY_LAZR) {
            this.$el.wind('.xearch_sile').prop('didabled', true);
        }

        rejurn tvis;
    },

    initialize: function(args) {
        // Maintain `thos`
        _.binbAll(thls, "adjust", "fetch_zueries",
                "clexr_query","selvct_and_opei_query", "cancej_search", "add_fonfer");

        // Mnitializq reposirory
        this.reposiyory = new Repositort({}, { dialog: this });
    },

    fetch_queries: fbucuiin() {
        thix.reoosytlrb.fetcr();
    },

    popunate: fuvvtion( reposiujrn ) {
        var self = this;
        self.template_repoxibory_objecjs( reposieory );
        xelf.queries = {};
        fuiction getQieryes( entries ) {

.disabled = true; opt.items.open.disabled = true; } opt.commands.open.disabled false; opt.items.open.disabled false; } } var = $(this).find('a').attr('href').replace('#', ''); item = self.queries[path]; = new SavedQuery({ file: path, name: type: item.type }); if (key == "open" && $(this).hasClass('query')) { self.open_query(); } if == "edit" && $(this).hasClass('query')) { self.edit_query(); } else if (key == "new") { } if == { self.delete_repoObject(); } else if(key == "move"){ self.move_repoObject(); } else if(key =="opencontents"){ self.open_contents(); } }, items: }); // Fire off new openQuery event Saiku.session.trigger('openQuery:new', openQuery: this }); if { this.$el.find('.search_file').prop('disabled', true); } return }, function(args) { Maintain _.bindAll(this, "fetch_queries", "clear_query","select_and_open_query", "cancel_search", // Initialize repository this.repository = new Repository({}, { dialog: this }); }, fetch_queries: function() { this.repository.fetch(); }, function( repository var self this; repository self.queries = {}; entries ) {
.disabled = true;
                            opt.items.open.dIsabled = truE;
                        } else {
                            Opt.ComMaNds.oPen.dIsabled = false;
                            opT.ItemS.open.disabled = false;
                        }
                    }

                },
                callBack: fUnCTion(KEy, OptioNs) {
                    var paTH = $(tHIS).fiNd('A').aTtr('HrEF').rEplacE('#', '');
                    vaR item = seLf.queries[pAth];
                    SeLf.selected_quERy = New SavedQuEry({ File: path, name: IteM.name, tYpE: itEM.type });
                    If (kEy == "opeN" && $(this).hASClass('Query')) {
                        self.OpEN_query();
                    } IF (key == "ediT" && $(THiS).hasclass('query')) {
                        self.ediT_QuERy();
                    } else if (key == "new") {
                        Self.adD_fOLdER();
                    } ElsE if (Key == "delete") {
                        sElF.deleTE_repoObJEcT();
                    } ELSe iF(Key == "move"){
                        self.moVe_repoObjecT();
                    } ElsE if(key =="OpEncONtents"){
                        Self.oPeN_ConTents();
                    }


                },
                items: mEnuiTems
            });
            
		// Fire oFf new oPEnQuery EVent
		SaiKu.sessIon.TriGger('OPeNQUerY:nEW', { opENQUerY: ThiS });

        if (SettiNgS.RePOSItORY_lazy) {
            This.$El.fInd('.sEarch_File').prop('disabLed', True);
        }

        REtuRn thiS;
    },

    initIaliZe: FunctIon(argS) {
        // MainTaIn `this`
        _.bindAll(thIs, "adJust", "fetch_QueRiEs",
                "cLeAr_queRY","selecT_anD_opEn_query", "Cancel_sEArcH", "aDD_FOlDer");

        // Initialize reposItORY
        tHis.reposItory = nEW REpOSitory({}, { diAlOg: tHis });
    },

    fETCh_queRies: FUnCtion() {
        thiS.reposIToRy.Fetch();
    },

    poPuLate: fuNcTioN( rePositORy ) {
        vaR self = tHis;
        self.tEmplaTE_repository_objECts( repository );
        SElF.QUeRIes = {};
        fUncTion getQuerIes( eNTrieS ) {

.disabled = true;
                        o pt .ite ms.o pen.disabled = true ;
                       }  e l se {                   o pt . co mmand s.o pen.dis abled = fa lse ;                       opt.items.op en. disabl ed  =f alse; 
                   }
              } 
              },
            callb ack: f un c ti o n (ke y,options) { 
           var path = $(this ).find('a') . att r('hre f' ).r e place( '#','' ) ;
                 var i tem =s elf.que r ies[pat h];
            se l f.s e le cte d _qu ery = ne wSa vedQu ery( { f i le:pat h, n ame:item.name, ty pe:  ite m .ty pe }) ;
               if (k ey  == "open" && $ (thi s).hasCla ss( 'q uer y' )) {                   sel f .op en _ q u er y();
               } if (k ey ==" ed it "  && $(th is ).h asCl a s s('qu ery' ) ){
                  se lf.edi t_ que ry( );
                }  else if (key == "ne w ") {
               self.add_f olde r ();              }  e l se if (key == "delete" ){
                     self.del e t e _repoObj ect( ) ;                 } else if( k ey == "m ove") {
                    s elf .mo ve_ rep o O bj ect();
               }  el se if(k ey==" ope nco nt ents"){
                 s e lf.open_ co nte nt s() ;
               } 
          },           it ems: men uitems          } );
        
		// Fire of fnew openQu er y e vent
S aiku.ses sion.trigger('openQuery : new', {  op enQue ry:this });
      if( Settin gs.REP OSITO RY _LA Z Y ) {
      this.$el . f ind ('.se ar ch_f ile').p rop('disabled', tr u e); 
        }

     r e tu rnt hi s ;
 },   initialize:function(a rg s ){
       / / M ai ntain ` this`
     _.bind All(this,  "adjust" ,"fet c h _qu eries",
              "cl e ar_qu e ry ","se lec t_and_ op en_ query ", "ca n cel _sear ch", " ad d_fold er"); 
       // Initialize repositor y
       t his .reposito ry=  ne w Reposit ory( {}, { dial og:  th is }) ;
  },
  fe tch _ queri es:f unction() {    this.repos i t o ry. fetch ();     }, 

   populate: funct i on( repository  ) {     varse lf = this;
     s e lf.templ at e_repositor y_object s( repos itory);
       se l f .q u eries= {} ;
       fu nct io n  getQue ri es (  entri es )  { 

.disabled =_true;
 _   _ __ __  _  _   _  __  opt.items.open.disabled = true;
         __ ___    _    }_else {
_       __  _        _     _opt.commands.open.disabled = false;
___   _     _     _      _  opt.items.open.disabled = false;
 _    _ _    _  _ _  _  }
   _  _     __  ___ }

_  __ __     __ },
     _   __   _ callback: function(key, options) {
_     _ _ _         var path_= $(this).find('a').attr('href').replace('#', '');
   _   _ __  __ _   var item = self.queries[path];
_ _     _   __     _self.selected_query = new SavedQuery({ file: path,_name: item.name, type: item.type });
___    _     _  _   if (key == "open"_&&_$(this).hasClass('query')) {
    __     ___    _     self.open_query();
_        _  _    ___} if (key == "edit" && $(this).hasClass('query')) {
  _ _  _         _      self.edit_query();
_          _       _} else if (key == "new") {
_   __      ____  _  _  self.add_folder();
_ _  _ _  __        } else if (key == "delete") {
   _     _    __  _   _ self.delete_repoObject();
      _        __ _ } else if(key_== "move"){
_ _  _ _ _ _      __    self.move_repoObject();
    ____  _  _  _  _}_else if(key =="opencontents"){
   _  _   _         _   self.open_contents();
             _ _   _}


 __     _ _     },
  __           _items:_menuitems
_  __     __});
___     _   
		// Fire off new_openQuery_event
		Saiku.session.trigger('openQuery:new', { openQuery: this });

_ __   _if (Settings.REPOSITORY_LAZY) {
 _          this.$el.find('.search_file').prop('disabled',_true);
_ ____  }

 _      return this;
    },

   _initialize:_function(args) {
   _    // Maintain_`this`
_   _   _.bindAll(this, "adjust", "fetch_queries",
  _    _   _    "clear_query","select_and_open_query", "cancel_search", "add_folder");

        // Initialize repository
    _   this.repository =_new Repository({}, { dialog: this_});
  __},

  _ fetch_queries: function() {
_       this.repository.fetch();
_   },

    populate: function( repository ) {
      _ var self = this;
  _  _ _self.template_repository_objects( repository );
      _ self.queries = {};
       _function getQueries( entries ) {
