|
|
|
@ -5,22 +5,22 @@ define(['../app', 'angular'], function (app, angular) {
|
|
|
|
|
'use strict';
|
|
|
|
|
app.filter('propsFilter', function () {
|
|
|
|
|
return function (items, props, strictMode) {
|
|
|
|
|
var out = [];
|
|
|
|
|
let out = [];
|
|
|
|
|
|
|
|
|
|
if (angular.isArray(items)) {
|
|
|
|
|
var keys = Object.keys(props);
|
|
|
|
|
let keys = Object.keys(props);
|
|
|
|
|
|
|
|
|
|
if (strictMode) {
|
|
|
|
|
items.forEach(function (item) {
|
|
|
|
|
var itemMatches = true;
|
|
|
|
|
let itemMatches = true;
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < keys.length; i++) {
|
|
|
|
|
var prop = keys[i];
|
|
|
|
|
for (let i = 0; i < keys.length; i++) {
|
|
|
|
|
let prop = keys[i];
|
|
|
|
|
if (props[prop] == null) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
var text = props[prop].toString().toLowerCase();
|
|
|
|
|
var propVal = item[prop];
|
|
|
|
|
let text = props[prop].toString().toLowerCase();
|
|
|
|
|
let propVal = item[prop];
|
|
|
|
|
if (propVal == null) {
|
|
|
|
|
itemMatches = false;
|
|
|
|
|
break;
|
|
|
|
@ -37,16 +37,16 @@ define(['../app', 'angular'], function (app, angular) {
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
items.forEach(function (item) {
|
|
|
|
|
var itemMatches = false;
|
|
|
|
|
let itemMatches = false;
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < keys.length; i++) {
|
|
|
|
|
var prop = keys[i];
|
|
|
|
|
for (let i = 0; i < keys.length; i++) {
|
|
|
|
|
let prop = keys[i];
|
|
|
|
|
if (props[prop] == null) {
|
|
|
|
|
itemMatches = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
var text = props[prop].toString().toLowerCase();
|
|
|
|
|
var propVal = item[prop];
|
|
|
|
|
let text = props[prop].toString().toLowerCase();
|
|
|
|
|
let propVal = item[prop];
|
|
|
|
|
if (propVal == null) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|