forked from emberjs/ember-inspector
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgraded ember list view to v 0.0.6 Moved required properties into list-view mixin Part of emberjs#360
- Loading branch information
1 parent
20c6af8
commit 138b4ac
Showing
13 changed files
with
54 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Ember from "ember"; | ||
import ListItemView from "ember-inspector/views/list-item"; | ||
|
||
const { Mixin, computed } = Ember; | ||
|
||
export default Mixin.create({ | ||
contentHeight: Ember.computed.alias('controller.controllers.application.contentHeight'), | ||
|
||
height: computed('contentHeight', function() { | ||
let headerHeight = 31; | ||
let contentHeight = this.get('contentHeight'); | ||
|
||
// In testing list-view is created before `contentHeight` is set | ||
// which will trigger an exception | ||
if (!contentHeight) { | ||
return 1; | ||
} | ||
return contentHeight - headerHeight; | ||
}), | ||
rowHeight: 30, | ||
itemViewClass: ListItemView | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
|
||
.list-view { | ||
.list-view { | ||
position: relative; | ||
font-size: 11px; | ||
height: 100%; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import ListView from "ember-inspector/views/list"; | ||
import ListItemView from "ember-inspector/views/list-item"; | ||
import ListView from 'ember-list-view'; | ||
import ListItemView from 'ember-inspector/views/list-item'; | ||
import ListViewMixin from 'ember-inspector/mixins/views/list-view'; | ||
|
||
export default ListView.extend({ | ||
export default ListView.extend(ListViewMixin, { | ||
itemViewClass: ListItemView.extend({ | ||
templateName: "instance_item" | ||
}) | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import ListItemView from "list-view/list-item-view"; | ||
import ListItemView from 'ember-list-view/list-item-view'; | ||
|
||
export default ListItemView.extend({ | ||
classNames: ["list-tree__item-wrapper", "row-wrapper"] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,6 @@ | ||
import Ember from "ember"; | ||
import ListItemView from "ember-inspector/views/list-item"; | ||
import ListView from "list-view/list-view"; | ||
const { computed } = Ember; | ||
import ListViewMixin from 'ember-inspector/mixins/views/list-view'; | ||
|
||
export default ListView.extend({ | ||
classNames: ["list-tree"], | ||
|
||
contentHeight: Ember.computed.alias('controller.controllers.application.contentHeight'), | ||
|
||
height: computed('contentHeight', function() { | ||
let headerHeight = 31; | ||
let contentHeight = this.get('contentHeight'); | ||
|
||
// In testing list-view is created before `contentHeight` is set | ||
// which will trigger an exception | ||
if (!contentHeight) { | ||
return 1; | ||
} | ||
return contentHeight - headerHeight; | ||
}), | ||
rowHeight: 30, | ||
itemViewClass: ListItemView | ||
export default ListView.extend(ListViewMixin, { | ||
classNames: ["list-tree"] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import ListView from "ember-inspector/views/list"; | ||
import ListView from 'ember-list-view'; | ||
import ListItemView from "ember-inspector/views/list-item"; | ||
import ListViewMixin from 'ember-inspector/mixins/views/list-view'; | ||
|
||
export default ListView.extend({ | ||
export default ListView.extend(ListViewMixin, { | ||
itemViewClass: ListItemView.extend({ | ||
templateName: "promise_item" | ||
}) | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters