@@ -2,8 +2,7 @@ import Ember from "ember";
22import HasWaypoint from "../mixins/views/has-waypoint" ;
33import config from '../config/environment' ;
44
5- const { alias } = Ember . computed ;
6- const { Component, get } = Ember ;
5+ const { Component, get, computed : { alias } } = Ember ;
76
87export default Component . extend ( HasWaypoint , {
98 /*
@@ -15,9 +14,9 @@ export default Component.extend(HasWaypoint, {
1514 itemType : null ,
1615 name : alias ( 'item.name' ) ,
1716 routeName : null ,
18- id : function ( ) {
17+ id : computed ( 'item.name' , 'itemType' , function ( ) {
1918 return "%@_%@" . fmt ( get ( this , 'itemType' ) , get ( this , 'item.name' ) ) ;
20- } . property ( 'item.name' , 'itemType' ) . readOnly ( ) ,
19+ } ) . readOnly ( ) ,
2120 isPrivate : alias ( 'item.isPrivate' ) ,
2221 classNames : [ 'property' , 'item-entry' ] ,
2322 classNameBindings : [ 'isPrivate:private' ] ,
@@ -40,16 +39,17 @@ export default Component.extend(HasWaypoint, {
4039 router . replaceWith ( routeName , name ) ;
4140 } ,
4241
43- isVisible : function ( ) {
42+ isVisible : computed ( 'show-private' , 'show-protected' , 'show-deprecated' ,
43+ 'show-inherited' , 'item.isPrivate' , 'item.isProtected' ,
44+ 'item.inheritedFrom' , 'item.isDeprecated' ,
45+ function ( ) {
4446 if ( get ( this , 'item.isPrivate' ) && ! get ( this , 'show-private' ) ) { return false ; }
4547 if ( get ( this , 'item.inheritedFrom' ) && ! get ( this , 'show-inherited' ) ) { return false ; }
4648 if ( get ( this , 'item.isProtected' ) && ! get ( this , 'show-protected' ) ) { return false ; }
4749 if ( get ( this , 'item.isDeprecated' ) && ! get ( this , 'show-deprecated' ) ) { return false ; }
4850
4951 return true ;
50- } . property ( 'show-private' , 'show-protected' , 'show-deprecated' ,
51- 'show-inherited' , 'item.isPrivate' , 'item.isProtected' ,
52- 'item.inheritedFrom' , 'item.isDeprecated' ) ,
52+ } ) ,
5353 /**
5454 The URL where you cand find the code for this property on github.
5555 TODO: don't link to blob/master,
@@ -58,7 +58,7 @@ export default Component.extend(HasWaypoint, {
5858
5959 @returns String
6060 */
61- codeLocation : function ( ) {
61+ codeLocation : computed ( 'item.file' , 'item.line' , function ( ) {
6262 return '%@/blob/%@/%@#L%@' . fmt ( config . githubUrl , config . sha , get ( this , 'item.file' ) , get ( this , 'item.line' ) ) ;
63- } . property ( 'item.file' , 'item.line' ) . readOnly ( )
63+ } ) . readOnly ( )
6464} ) ;
0 commit comments