chg: [eventFiltering] Started integration of tag filtering - WiP

pull/4076/head
mokaddem 2019-02-08 10:21:21 +01:00
parent 213b8f994e
commit a4dd22bd4a
2 changed files with 34 additions and 41 deletions

View File

@ -1590,7 +1590,8 @@ class EventsController extends AppController
// look in the parameters if we are doing advanced filtering or not // look in the parameters if we are doing advanced filtering or not
private function __checkIfAdvancedFiltering($filters) { private function __checkIfAdvancedFiltering($filters) {
$advancedFilteringActive = array_diff_key($filters, array('sort'=>0, 'direction'=>0, 'focus'=>0, 'extended'=>0, 'overrideLimit'=>0, 'filterColumnsOverwrite'=>0, 'attributeFilter'=>0)); $advancedFilteringActive = array_diff_key($filters, array('sort'=>0, 'direction'=>0, 'focus'=>0, 'extended'=>0, 'overrideLimit'=>0, 'filterColumnsOverwrite'=>0, 'attributeFilter'=>0, 'extended' => 0));
debug($advancedFilteringActive);
if (count($advancedFilteringActive) > 0) { if (count($advancedFilteringActive) > 0) {
if (count(array_diff_key($advancedFilteringActive, array('deleted', 'includeRelatedTags'))) > 0) { if (count(array_diff_key($advancedFilteringActive, array('deleted', 'includeRelatedTags'))) > 0) {
$res = true; $res = true;

View File

@ -136,36 +136,28 @@ function triggerEventFilteringTool(clicked) {
5: "Inherit", 5: "Inherit",
} }
}, },
// { {
// "input": "radio", "input": "select",
// "type": "integer", "type": "string",
// "operators": [ "operators": [
// "equal", "equal",
// ], ],
// "unique": true, "unique": true,
// "id": "taggedAttributes", "id": "taggedAttributes",
// "label": "Tags", "label": "Tags",
// "values": { "values": <?php echo json_encode(array()); ?>
// 0: "Both", },
// 1: "Untagged Attribute", {
// 2: "Tagged Attribute" "input": "select",
// } "type": "string",
// }, "operators": [
// { "equal",
// "input": "radio", ],
// "type": "integer", "unique": true,
// "operators": [ "id": "galaxyAttachedAttributes",
// "equal", "label": "Galaxies",
// ], "values": <?php echo json_encode(array()); ?>
// "unique": true, },
// "id": "galaxyAttachedAttributes",
// "label": "Galaxies",
// "values": {
// 0: "Both",
// 1: "Attributes without galaxy",
// 2: "Attributes with galaxy"
// }
// },
// { // {
// "input": "select", // "input": "select",
// "type": "string", // "type": "string",
@ -274,16 +266,16 @@ function triggerEventFilteringTool(clicked) {
operator: 'in', operator: 'in',
value: <?php echo isset($filters['distribution']) ? json_encode($filters['distribution']) : json_encode(array(0, 1, 2, 3, 4, 5)); ?> value: <?php echo isset($filters['distribution']) ? json_encode($filters['distribution']) : json_encode(array(0, 1, 2, 3, 4, 5)); ?>
}, },
// { {
// field: 'taggedAttributes', field: 'taggedAttributes',
// id: 'taggedAttributes', id: 'taggedAttributes',
// value: <?php echo isset($filters['taggedAttributes']) ? h($filters['taggedAttributes']) : 0; ?> value: <?php echo isset($filters['taggedAttributes']) ? h($filters['taggedAttributes']) : 0; ?>
// }, },
// { {
// field: 'galaxyAttachedAttributes', field: 'galaxyAttachedAttributes',
// id: 'galaxyAttachedAttributes', id: 'galaxyAttachedAttributes',
// value: <?php echo isset($filters['galaxyAttachedAttributes']) ? h($filters['galaxyAttachedAttributes']) : 0; ?> value: <?php echo isset($filters['galaxyAttachedAttributes']) ? h($filters['galaxyAttachedAttributes']) : 0; ?>
// }, },
// { // {
// condition: 'OR', // condition: 'OR',
// not: false, // not: false,