Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Apr 19, 2012
@kheldysh kheldysh Ensure removal of orphaned emptyViews 6eb11b0
Commits on Apr 20, 2012
@kheldysh kheldysh Merge pull request #15 from kheldysh/jesse-6335
 Ensure removal of orphaned emptyViews
0bff91c
Showing with 19 additions and 1 deletion.
  1. +19 −1 views/collection_view.js
View
20 views/collection_view.js
@@ -1,3 +1,21 @@
Flame.CollectionView = Ember.CollectionView.extend(Flame.LayoutSupport, Flame.EventManager, {
- classNames: ['flame-list-view']
+ classNames: ['flame-list-view'],
+
+ init: function() {
+ this._super();
+ var emptyViewClass = this.get('emptyView');
+ if (emptyViewClass) {
+ emptyViewClass.reopen({
+ // Ensures removal if orphaned, circumventing the emptyView issue
+ // (https://github.com/emberjs/ember.js/issues/233)
+ ensureEmptyViewRemoval: function() {
+ if (!this.get('parentView')) {
+ Ember.run.next(this, 'remove');
+ }
+ }.observes('parentView')
+ });
+
+ }
+ }
+
});

No commit comments for this range

Something went wrong with that request. Please try again.