cms/app-client/app/controllers/application.js
changeset 224 d284324358b2
parent 219 3578846b66f4
child 227 5c9250f55f4b
equal deleted inserted replaced
223:2457942e7453 224:d284324358b2
   112             }
   112             }
   113             return this.set('currentId', this.get('filteredDocuments').get('firstObject').id);
   113             return this.set('currentId', this.get('filteredDocuments').get('firstObject').id);
   114         },
   114         },
   115         play: function(item){
   115         play: function(item){
   116             this.set("currentId", item.id);
   116             this.set("currentId", item.id);
   117         },
       
   118 
       
   119         showMore: function(item){
       
   120             var domItem = Ember.$("#"+item.id.replace( /(:|\.|\[|\]|,)/g, "\\$1" ));
       
   121             if (domItem.hasClass("show-more")){
       
   122                 domItem.toggleClass("show-more", false);
       
   123             } else{
       
   124                 Ember.$(".result-item").toggleClass("show-more", false);
       
   125                 domItem.toggleClass("show-more", true);
       
   126             }
       
   127         },
       
   128 
       
   129         toggleModal: function(item){
       
   130             if (typeof(item) !== 'undefined'){
       
   131                 this.set("detail", item.id);
       
   132             } else {
       
   133                 this.set("detail", null);
       
   134             }
       
   135         }
   117         }
   136 
   118 
   137     }
   119     }
   138 });
   120 });