Projekt

Obecné

Profil

« Předchozí | Další » 

Revize a5af9025

Přidáno uživatelem Pavel Fidranský před téměř 6 roky(ů)

minor Node filters fixes

Zobrazit rozdíly:

sources/src/main/webapp/js/components/filterModalWindow.js
529 529
									const attribute = vertex.attributes.find(attribute => attribute[0] === filterAttributeName);
530 530
									const attributeValues = attribute[1].split(', ');
531 531

  
532
									// some (at least one) of the attribute items should be contained in the filters
532 533
									return attributeValues.some(attributeValue => {
533 534
										return values.indexOf(attributeValue) > -1;
534 535
									});
......
540 541
									const attribute = vertex.attributes.find(attribute => attribute[0] === filterAttributeName);
541 542
									const attributeValues = attribute[1].split(', ');
542 543

  
543
									return attributeValues.some(attributeValue => {
544
									// every of the attribute items should not be contained in the filters (translated: none of the items should be contained in the filters)
545
									return attributeValues.every(attributeValue => {
544 546
										return values.indexOf(attributeValue) < 0;
545 547
									});
546 548
								};
......
553 555
							filterFunction = vertex => {
554 556
								const attribute = vertex.attributes.find(attribute => attribute[0] === filterAttributeName);
555 557
								const a = parseInt(attribute[1]);
556
								const b = formData.get('value-from') !== '' ? Date.parse(formData.get('value-from')) : Date.now();
558
								const b = formData.get('value-from') !== '' ? Date.parse(formData.get('value-from')) : 0;
557 559
								const c = formData.get('value-to') !== '' ? Date.parse(formData.get('value-to')) : Date.now();
558 560
								return (a >= b) && (a <= c);
559 561
							};
......
571 573

  
572 574
							filterFunction = vertex => {
573 575
								const attribute = vertex.attributes.find(attribute => attribute[0] === filterAttributeName);
574
								return comparatorFn(new Date(attribute[1]), new Date(formData.get('value')));
576
								return comparatorFn(new Date(parseInt(attribute[1])), new Date(formData.get('value')));
575 577
							};
576 578
						}
577 579
						break;

Také k dispozici: Unified diff