Skip to content

Commit

Permalink
Merge pull request #435 from ember-admin/ember-2
Browse files Browse the repository at this point in the history
Ember 2
  • Loading branch information
OpakAlex committed Aug 18, 2015
2 parents 88fd223 + c34b27b commit 7a002a2
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 16 deletions.
2 changes: 1 addition & 1 deletion addon/components/admin-batch-checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var batchCheckbox = Ember.Checkbox.extend({
return this.get('batches').removeObject(this.get('context'));
}
}),
observerForChangeBatchesCollection: Ember.observer('batches.@each', function() {
observerForChangeBatchesCollection: Ember.observer('batches.[]', function() {
return Ember.run.later((function(_this) {
return function() {
if (_this.get('batches').length === 0 && _this.get('selectAll')) {
Expand Down
6 changes: 3 additions & 3 deletions addon/mixins/controllers/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ import Ember from 'ember';
import Attributes from 'ember-cli-admin/dsl/attributes';

export default Ember.Mixin.create({
formAttributes: Ember.computed('modelAttributes.@each', {
formAttributes: Ember.computed('modelAttributes.[]', {
get: function() {
return Attributes.withoutId(this.get("model").constructor);
}
}),

showAttributes: Ember.computed('modelAttributes.@each', {
showAttributes: Ember.computed('modelAttributes.[]', {
get: function(){
return Attributes.withoutId(this.get("model").constructor);
}
}),

tableAttributes: Ember.computed('modelAttributes.@each', {
tableAttributes: Ember.computed('modelAttributes.[]', {
get: function() {
return this.get('modelAttributes');
}
Expand Down
14 changes: 8 additions & 6 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,28 @@
"name": "ember-cli-admin",
"dependencies": {
"jquery": "^1.11.1",
"ember": "1.13.2",
"ember-data": "1.13.4",
"ember": "2.0.0",
"ember-data": "2.0.0-beta.2",
"ember-resolver": "~0.1.12",
"loader.js": "stefanpenner/loader.js#3.2.1",
"ember-cli-shims": "stefanpenner/ember-cli-shims#0.0.3",
"ember-cli-test-loader": "rwjblue/ember-cli-test-loader#0.1.3",
"ember-load-initializers": "stefanpenner/ember-load-initializers#0.1.4",
"ember-qunit": "0.4.1",
"ember-qunit": "0.4.7",
"ember-qunit-notifications": "0.0.7",
"qunit": "~1.17.1",
"pretender": "~0.6.0",
"pretender": "~0.9.0",
"bootstrap-datepicker": "~1.4.0",
"ember-inflector": "~1.3.1",
"lodash": "~3.7.0",
"Faker": "~2.1.3"
"Faker": "~3.0.0"
},
"devDependencies": {
"bootstrap-sass-official": "~3.3.4",
"typeahead.js": "~0.11.1",
"jquery-ui-sortable": "*",
"jquery-ui-touch-punch-improved": "*"
},
"resolutions": {
"ember": "2.0.0"
}
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@
"broccoli-concat": "0.0.12",
"broccoli-merge-trees": "^0.2.1",
"broccoli-static-compiler": "^0.2.1",
"ember-cli": "1.13.1",
"ember-cli": "1.13.8",
"ember-cli-app-version": "0.3.3",
"ember-cli-bootstrap-datepicker": "0.5.3",
"ember-cli-content-security-policy": "0.4.0",
"ember-cli-dependency-checker": "^1.0.0",
"ember-cli-ic-ajax": "0.1.1",
"ember-cli-inject-live-reload": "^1.3.0",
"ember-cli-map": "0.4.2",
"ember-cli-mirage": "0.1.5",
"ember-cli-mirage": "0.1.8",
"ember-cli-qunit": "0.3.15",
"ember-cli-sass": "4.0.0-beta.5",
"ember-cli-uglify": "1.0.1",
"ember-data": "1.13.4",
"ember-data": "2.0.0-beta.2",
"ember-disable-prototype-extensions": "^1.0.0",
"ember-disable-proxy-controllers": "^1.0.0",
"ember-export-application-global": "^1.0.2",
Expand Down
6 changes: 3 additions & 3 deletions tests/acceptance/sorting-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ test('switching from sorting by one attribute to another works as expected - rec
function(assert) {
assert.expect(1);

let user = users[2];
user.name = 'Aaron';
let user = server.create('user', {id: 3, name: 'Aaron'});
let avatar = server.create('avatar', {id: 6});

visit('/users');

Expand All @@ -59,4 +59,4 @@ test('switching from sorting by one attribute to another works as expected - rec
andThen(function() {
assert.equal(find('tbody tr:first td[data-column="id"]:contains("3")').length, 1);
});
});
});
8 changes: 8 additions & 0 deletions tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@
<script src="assets/dummy.js"></script>
<script src="testem.js"></script>
<script src="assets/test-loader.js"></script>
<script type="text/javascript" charset="utf-8">
Function.prototype.bind = Function.prototype.bind || function (thisp) {
var fn = this;
return function () {
return fn.apply(thisp, arguments);
};
};
</script>
{{content-for 'body-footer'}}
{{content-for 'test-body-footer'}}
</body>
Expand Down

0 comments on commit 7a002a2

Please sign in to comment.