Skip to content
This repository has been archived by the owner on Nov 11, 2017. It is now read-only.

Commit

Permalink
Refactored demos to remove -list postfix
Browse files Browse the repository at this point in the history
  • Loading branch information
taras committed Mar 7, 2015
1 parent bb6758b commit ead2b26
Show file tree
Hide file tree
Showing 24 changed files with 37 additions and 35 deletions.
16 changes: 8 additions & 8 deletions tests/dummy/app/router.js
Expand Up @@ -6,14 +6,14 @@ var Router = Ember.Router.extend({
});

Router.map(function() {
this.route('basic-list');
this.route('mobile-list');
this.route('mobile-large-images-list');
this.route('mobile-small-images-list');
this.route('multi-height-list');
this.route('multi-height-multi-view-list');
this.route('multi-height-virtual-list');
this.route('pull-to-refresh-list');
this.route('simple');
this.route('mobile');
this.route('mobile-large-images');
this.route('mobile-small-images');
this.route('multi-height');
this.route('multi-height-multi-view');
this.route('multi-height-virtual');
this.route('pull-to-refresh');
this.route('virtual');
this.route('virtual-strange-ratios');
});
Expand Down
5 changes: 3 additions & 2 deletions tests/dummy/app/styles/app.css
Expand Up @@ -104,10 +104,11 @@
left: 0;
}

.pull-to-refresh {
.pull-to-refresh-animation {
background-color: yellow;
height: 45px;
left:0; right: 0;
left:0;
right: 0;
position: absolute;
text-align: center;
padding-top:30px;
Expand Down
16 changes: 8 additions & 8 deletions tests/dummy/app/templates/application.hbs
@@ -1,13 +1,13 @@
<h2 id="title">Ember List View Demos</h2>
<ul>
<li>{{#link-to 'basic-list'}}Basic{{/link-to}}</li>
<li>{{#link-to 'mobile-list'}}Mobile{{/link-to}}</li>
<li>{{#link-to 'mobile-large-images-list'}}Mobile Large Images{{/link-to}}</li>
<li>{{#link-to 'mobile-small-images-list'}}Mobile Small Images{{/link-to}}</li>
<li>{{#link-to 'multi-height-list'}}Multi Height{{/link-to}}</li>
<li>{{#link-to 'multi-height-multi-view-list'}}Multi Height - Multi View{{/link-to}}</li>
<li>{{#link-to 'multi-height-virtual-list'}}Multi Height - Virtual{{/link-to}}</li>
<li>{{#link-to 'pull-to-refresh-list'}}Pull to refresh{{/link-to}}</li>
<li>{{#link-to 'simple'}}Simple{{/link-to}}</li>
<li>{{#link-to 'mobile'}}Mobile{{/link-to}}</li>
<li>{{#link-to 'mobile-large-images'}}Mobile Large Images{{/link-to}}</li>
<li>{{#link-to 'mobile-small-images'}}Mobile Small Images{{/link-to}}</li>
<li>{{#link-to 'multi-height'}}Multi Height{{/link-to}}</li>
<li>{{#link-to 'multi-height-multi-view'}}Multi Height - Multi View{{/link-to}}</li>
<li>{{#link-to 'multi-height-virtual'}}Multi Height - Virtual{{/link-to}}</li>
<li>{{#link-to 'pull-to-refresh'}}Pull to refresh{{/link-to}}</li>
<li>{{#link-to 'virtual'}}Virtual{{/link-to}}</li>
<li>{{#link-to 'virtual-strange-ratios'}}Virtual Strange Ratios{{/link-to}}</li>
</ul>
Expand Down
@@ -1,5 +1,5 @@
<h3>Multi Height Virtual</h3>

<div class="multi-height">
{{view 'multi-height-virtual' content=model}}
{{view 'multi-height-virtual-list' content=model}}
</div>
@@ -1,5 +1,5 @@
<h3>Multi Height</h3>

<div class="multi-height">
{{view 'multi-height' content=model}}
{{view 'multi-height-list' content=model}}
</div>
1 change: 1 addition & 0 deletions tests/dummy/app/templates/pull-to-refresh-animation.hbs
@@ -0,0 +1 @@
{{view.label}}
8 changes: 0 additions & 8 deletions tests/dummy/app/templates/pull-to-refresh-list.hbs

This file was deleted.

9 changes: 8 additions & 1 deletion tests/dummy/app/templates/pull-to-refresh.hbs
@@ -1 +1,8 @@
{{view.label}}
<h3>Pull to refresh</h3>

<div class="pull-to-refresh-list">
{{#collection 'refreshable-list' content=model height=500 width=500 elementWidth=100 rowHeight=100}}
<img {{bind-attr src=imageSrc}}/>
<div class="text"> {{name}}</div>
{{/collection}}
</div>
@@ -1,6 +1,6 @@
<h3>Basic</h3>
<h3>Simple</h3>

<div class="basic-list">
<div class="simple-list">
{{#ember-list items=model height=300 width=500 rowHeight=100 element-width=100}}
{{name}}
{{/ember-list}}
Expand Down
9 changes: 5 additions & 4 deletions tests/dummy/app/views/refreshable-list.js
@@ -1,12 +1,12 @@
import Ember from 'ember';
import VirtualListView from 'list-view/virtual_list_view';
import ListItemView from 'list-view/list_item_view';
import {images} from '../utils/make-model';
import images from '../utils/images';

export default VirtualListView.extend({
pullToRefreshViewClass: Ember.View.extend({
classNames: ['pull-to-refresh'],
templateName: 'pull-to-refresh',
classNames: ['pull-to-refresh-animation'],
templateName: 'pull-to-refresh-animation',
label: function(){
if (this.get('refreshing')) {
return "Updating...";
Expand All @@ -23,7 +23,8 @@ export default VirtualListView.extend({
Ember.run.later(function(){
view.get('controller').insertAt(0, {
name: 'Item -1',
imageSrc: images[2]
// TODO: fix this missing image
imageSrc: images.images[0]
});
finishRefresh();
}, 1000);
Expand Down

0 comments on commit ead2b26

Please sign in to comment.