Permalink
Browse files

fix(project): process feedback

  • Loading branch information...
VMBindraban
VMBindraban committed Jun 10, 2016
1 parent a891790 commit 595787bc7e41651fc9f9dbf11cce1816b109c821
@@ -50,5 +50,7 @@
</tbody>
</table>
<pager resource.bind="repository" criteria.bind="criteriaPager" page.bind="page" limit.bind="limit"></pager>
<div show.bind="pages > 1">
<pager resource.bind="repository" criteria.bind="criteriaPager" page.bind="page" pages.two-way="pages" limit.bind="limit"></pager>
</div>
</template>
@@ -73,7 +73,7 @@ define(['exports', 'aurelia-framework', 'aurelia-view-manager', 'aurelia-orm', '
throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');
}
var _dec, _dec2, _dec3, _dec4, _dec5, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14;
var _dec, _dec2, _dec3, _dec4, _dec5, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15;
var DataTable = exports.DataTable = (_dec = (0, _aureliaFramework.customElement)('data-table'), _dec2 = (0, _aureliaViewManager.resolvedView)('aurelia-data-table', 'datatable'), _dec3 = (0, _aureliaFramework.inject)(_aureliaRouter.Router, Element, _aureliaOrm.EntityManager), _dec4 = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), _dec5 = (0, _aureliaFramework.computedFrom)('columns'), _dec(_class = _dec2(_class = _dec3(_class = (_class2 = function () {
function DataTable(Router, element, entityManager) {
@@ -105,7 +105,9 @@ define(['exports', 'aurelia-framework', 'aurelia-view-manager', 'aurelia-orm', '
_initDefineProp(this, 'page', _descriptor13, this);
_initDefineProp(this, 'criteriaPager', _descriptor14, this);
_initDefineProp(this, 'pages', _descriptor14, this);
_initDefineProp(this, 'criteriaPager', _descriptor15, this);
this.count = 0;
this.columnsArray = [];
@@ -136,35 +138,37 @@ define(['exports', 'aurelia-framework', 'aurelia-view-manager', 'aurelia-orm', '
});
};
DataTable.prototype.pageChanged = function pageChanged(newValue, oldvalue) {
DataTable.prototype.pageChanged = function pageChanged() {
this.load();
};
DataTable.prototype.buildCriteria = function buildCriteria() {
var crit = {};
var criteria = {};
if (this.searchable !== null && Object.keys(this.searchCriteria).length) {
var propertyName = Object.keys(this.searchCriteria)[0];
if (this.searchCriteria[propertyName]) {
crit['where'] = {};
crit['where'][propertyName] = {};
crit['where'][propertyName]['contains'] = this.searchCriteria[propertyName];
var _criteria$where;
criteria.where = (_criteria$where = {}, _criteria$where[propertyName] = {
contains: this.searchCriteria[propertyName]
}, _criteria$where);
this.criteriaPager = crit['where'];
this.criteriaPager = criteria.where;
}
}
if (this.sortable !== null && Object.keys(this.sortingCriteria).length) {
var _propertyName = Object.keys(this.sortingCriteria)[0];
if (this.sortingCriteria[_propertyName]) {
crit['sort'] = _propertyName + ' ' + this.sortingCriteria[_propertyName];
criteria.sort = _propertyName + ' ' + this.sortingCriteria[_propertyName];
}
}
crit['skip'] = this.page * this.limit - this.limit;
crit['limit'] = this.limit;
criteria.skip = this.page * this.limit - this.limit;
criteria.limit = this.limit;
return crit;
return criteria;
};
DataTable.prototype.populate = function populate(row) {
@@ -292,6 +296,7 @@ define(['exports', 'aurelia-framework', 'aurelia-view-manager', 'aurelia-orm', '
if (!label) {
return;
}
var aliased = label.split(' as '),
cleanedLabel = clean(aliased[0]);
@@ -365,7 +370,10 @@ define(['exports', 'aurelia-framework', 'aurelia-view-manager', 'aurelia-orm', '
initializer: function initializer() {
return 1;
}
}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, 'criteriaPager', [_aureliaFramework.bindable], {
}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, 'pages', [_aureliaFramework.bindable], {
enumerable: true,
initializer: null
}), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, 'criteriaPager', [_aureliaFramework.bindable], {
enumerable: true,
initializer: null
}), _applyDecoratedDescriptor(_class2.prototype, 'columnLabels', [_dec5], Object.getOwnPropertyDescriptor(_class2.prototype, 'columnLabels'), _class2.prototype)), _class2)) || _class) || _class) || _class);
@@ -50,5 +50,7 @@
</tbody>
</table>
<pager resource.bind="repository" criteria.bind="criteriaPager" page.bind="page" limit.bind="limit"></pager>
<div show.bind="pages > 1">
<pager resource.bind="repository" criteria.bind="criteriaPager" page.bind="page" pages.two-way="pages" limit.bind="limit"></pager>
</div>
</template>
@@ -7,7 +7,7 @@ exports.DataTable = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _dec, _dec2, _dec3, _dec4, _dec5, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14;
var _dec, _dec2, _dec3, _dec4, _dec5, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15;
var _aureliaFramework = require('aurelia-framework');
@@ -94,7 +94,9 @@ var DataTable = exports.DataTable = (_dec = (0, _aureliaFramework.customElement)
_initDefineProp(this, 'page', _descriptor13, this);
_initDefineProp(this, 'criteriaPager', _descriptor14, this);
_initDefineProp(this, 'pages', _descriptor14, this);
_initDefineProp(this, 'criteriaPager', _descriptor15, this);
this.count = 0;
this.columnsArray = [];
@@ -125,35 +127,37 @@ var DataTable = exports.DataTable = (_dec = (0, _aureliaFramework.customElement)
});
};
DataTable.prototype.pageChanged = function pageChanged(newValue, oldvalue) {
DataTable.prototype.pageChanged = function pageChanged() {
this.load();
};
DataTable.prototype.buildCriteria = function buildCriteria() {
var crit = {};
var criteria = {};
if (this.searchable !== null && Object.keys(this.searchCriteria).length) {
var propertyName = Object.keys(this.searchCriteria)[0];
if (this.searchCriteria[propertyName]) {
crit['where'] = {};
crit['where'][propertyName] = {};
crit['where'][propertyName]['contains'] = this.searchCriteria[propertyName];
var _criteria$where;
criteria.where = (_criteria$where = {}, _criteria$where[propertyName] = {
contains: this.searchCriteria[propertyName]
}, _criteria$where);
this.criteriaPager = crit['where'];
this.criteriaPager = criteria.where;
}
}
if (this.sortable !== null && Object.keys(this.sortingCriteria).length) {
var _propertyName = Object.keys(this.sortingCriteria)[0];
if (this.sortingCriteria[_propertyName]) {
crit['sort'] = _propertyName + ' ' + this.sortingCriteria[_propertyName];
criteria.sort = _propertyName + ' ' + this.sortingCriteria[_propertyName];
}
}
crit['skip'] = this.page * this.limit - this.limit;
crit['limit'] = this.limit;
criteria.skip = this.page * this.limit - this.limit;
criteria.limit = this.limit;
return crit;
return criteria;
};
DataTable.prototype.populate = function populate(row) {
@@ -281,6 +285,7 @@ var DataTable = exports.DataTable = (_dec = (0, _aureliaFramework.customElement)
if (!label) {
return;
}
var aliased = label.split(' as '),
cleanedLabel = clean(aliased[0]);
@@ -354,7 +359,10 @@ var DataTable = exports.DataTable = (_dec = (0, _aureliaFramework.customElement)
initializer: function initializer() {
return 1;
}
}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, 'criteriaPager', [_aureliaFramework.bindable], {
}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, 'pages', [_aureliaFramework.bindable], {
enumerable: true,
initializer: null
}), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, 'criteriaPager', [_aureliaFramework.bindable], {
enumerable: true,
initializer: null
}), _applyDecoratedDescriptor(_class2.prototype, 'columnLabels', [_dec5], Object.getOwnPropertyDescriptor(_class2.prototype, 'columnLabels'), _class2.prototype)), _class2)) || _class) || _class) || _class);
@@ -50,5 +50,7 @@
</tbody>
</table>
<pager resource.bind="repository" criteria.bind="criteriaPager" page.bind="page" limit.bind="limit"></pager>
<div show.bind="pages > 1">
<pager resource.bind="repository" criteria.bind="criteriaPager" page.bind="page" pages.two-way="pages" limit.bind="limit"></pager>
</div>
</template>
@@ -1,4 +1,4 @@
var _dec, _dec2, _dec3, _dec4, _dec5, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14;
var _dec, _dec2, _dec3, _dec4, _dec5, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15;
function _initDefineProp(target, property, descriptor, context) {
if (!descriptor) return;
@@ -78,7 +78,9 @@ export let DataTable = (_dec = customElement('data-table'), _dec2 = resolvedView
_initDefineProp(this, 'page', _descriptor13, this);
_initDefineProp(this, 'criteriaPager', _descriptor14, this);
_initDefineProp(this, 'pages', _descriptor14, this);
_initDefineProp(this, 'criteriaPager', _descriptor15, this);
this.count = 0;
this.columnsArray = [];
@@ -107,35 +109,37 @@ export let DataTable = (_dec = customElement('data-table'), _dec2 = resolvedView
});
}
pageChanged(newValue, oldvalue) {
pageChanged() {
this.load();
}
buildCriteria() {
let crit = {};
let criteria = {};
if (this.searchable !== null && Object.keys(this.searchCriteria).length) {
let propertyName = Object.keys(this.searchCriteria)[0];
if (this.searchCriteria[propertyName]) {
crit['where'] = {};
crit['where'][propertyName] = {};
crit['where'][propertyName]['contains'] = this.searchCriteria[propertyName];
criteria.where = {
[propertyName]: {
contains: this.searchCriteria[propertyName]
}
};
this.criteriaPager = crit['where'];
this.criteriaPager = criteria.where;
}
}
if (this.sortable !== null && Object.keys(this.sortingCriteria).length) {
let propertyName = Object.keys(this.sortingCriteria)[0];
if (this.sortingCriteria[propertyName]) {
crit['sort'] = propertyName + ' ' + this.sortingCriteria[propertyName];
criteria.sort = propertyName + ' ' + this.sortingCriteria[propertyName];
}
}
crit['skip'] = this.page * this.limit - this.limit;
crit['limit'] = this.limit;
criteria.skip = this.page * this.limit - this.limit;
criteria.limit = this.limit;
return crit;
return criteria;
}
populate(row) {
@@ -214,6 +218,7 @@ export let DataTable = (_dec = customElement('data-table'), _dec2 = resolvedView
if (!label) {
return;
}
let aliased = label.split(' as '),
cleanedLabel = clean(aliased[0]);
@@ -325,7 +330,10 @@ export let DataTable = (_dec = customElement('data-table'), _dec2 = resolvedView
initializer: function () {
return 1;
}
}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, 'criteriaPager', [bindable], {
}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, 'pages', [bindable], {
enumerable: true,
initializer: null
}), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, 'criteriaPager', [bindable], {
enumerable: true,
initializer: null
}), _applyDecoratedDescriptor(_class2.prototype, 'columnLabels', [_dec5], Object.getOwnPropertyDescriptor(_class2.prototype, 'columnLabels'), _class2.prototype)), _class2)) || _class) || _class) || _class);
@@ -50,5 +50,7 @@
</tbody>
</table>
<pager resource.bind="repository" criteria.bind="criteriaPager" page.bind="page" limit.bind="limit"></pager>
<div show.bind="pages > 1">
<pager resource.bind="repository" criteria.bind="criteriaPager" page.bind="page" pages.two-way="pages" limit.bind="limit"></pager>
</div>
</template>
@@ -3,7 +3,7 @@
System.register(['aurelia-framework', 'aurelia-view-manager', 'aurelia-orm', 'aurelia-router', 'json-statham'], function (_export, _context) {
"use strict";
var bindable, inject, computedFrom, customElement, bindingMode, resolvedView, EntityManager, Router, Statham, _createClass, _dec, _dec2, _dec3, _dec4, _dec5, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, DataTable;
var bindable, inject, computedFrom, customElement, bindingMode, resolvedView, EntityManager, Router, Statham, _createClass, _dec, _dec2, _dec3, _dec4, _dec5, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, DataTable;
function _initDefineProp(target, property, descriptor, context) {
if (!descriptor) return;
@@ -119,7 +119,9 @@ System.register(['aurelia-framework', 'aurelia-view-manager', 'aurelia-orm', 'au
_initDefineProp(this, 'page', _descriptor13, this);
_initDefineProp(this, 'criteriaPager', _descriptor14, this);
_initDefineProp(this, 'pages', _descriptor14, this);
_initDefineProp(this, 'criteriaPager', _descriptor15, this);
this.count = 0;
this.columnsArray = [];
@@ -150,35 +152,37 @@ System.register(['aurelia-framework', 'aurelia-view-manager', 'aurelia-orm', 'au
});
};
DataTable.prototype.pageChanged = function pageChanged(newValue, oldvalue) {
DataTable.prototype.pageChanged = function pageChanged() {
this.load();
};
DataTable.prototype.buildCriteria = function buildCriteria() {
var crit = {};
var criteria = {};
if (this.searchable !== null && Object.keys(this.searchCriteria).length) {
var propertyName = Object.keys(this.searchCriteria)[0];
if (this.searchCriteria[propertyName]) {
crit['where'] = {};
crit['where'][propertyName] = {};
crit['where'][propertyName]['contains'] = this.searchCriteria[propertyName];
var _criteria$where;
criteria.where = (_criteria$where = {}, _criteria$where[propertyName] = {
contains: this.searchCriteria[propertyName]
}, _criteria$where);
this.criteriaPager = crit['where'];
this.criteriaPager = criteria.where;
}
}
if (this.sortable !== null && Object.keys(this.sortingCriteria).length) {
var _propertyName = Object.keys(this.sortingCriteria)[0];
if (this.sortingCriteria[_propertyName]) {
crit['sort'] = _propertyName + ' ' + this.sortingCriteria[_propertyName];
criteria.sort = _propertyName + ' ' + this.sortingCriteria[_propertyName];
}
}
crit['skip'] = this.page * this.limit - this.limit;
crit['limit'] = this.limit;
criteria.skip = this.page * this.limit - this.limit;
criteria.limit = this.limit;
return crit;
return criteria;
};
DataTable.prototype.populate = function populate(row) {
@@ -306,6 +310,7 @@ System.register(['aurelia-framework', 'aurelia-view-manager', 'aurelia-orm', 'au
if (!label) {
return;
}
var aliased = label.split(' as '),
cleanedLabel = clean(aliased[0]);
@@ -379,7 +384,10 @@ System.register(['aurelia-framework', 'aurelia-view-manager', 'aurelia-orm', 'au
initializer: function initializer() {
return 1;
}
}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, 'criteriaPager', [bindable], {
}), _descriptor14 = _applyDecoratedDescriptor(_class2.prototype, 'pages', [bindable], {
enumerable: true,
initializer: null
}), _descriptor15 = _applyDecoratedDescriptor(_class2.prototype, 'criteriaPager', [bindable], {
enumerable: true,
initializer: null
}), _applyDecoratedDescriptor(_class2.prototype, 'columnLabels', [_dec5], Object.getOwnPropertyDescriptor(_class2.prototype, 'columnLabels'), _class2.prototype)), _class2)) || _class) || _class) || _class));
@@ -50,5 +50,7 @@
</tbody>
</table>
<pager resource.bind="repository" criteria.bind="criteriaPager" page.bind="page" limit.bind="limit"></pager>
<div show.bind="pages > 1">
<pager resource.bind="repository" criteria.bind="criteriaPager" page.bind="page" pages.two-way="pages" limit.bind="limit"></pager>
</div>
</template>
Oops, something went wrong.

0 comments on commit 595787b

Please sign in to comment.