├── .github
└── FUNDING.yml
├── docs
├── images
│ ├── element.png
│ └── preview.png
├── README.md
├── 01-installation.md
└── 02-basics.md
├── assets
├── .htaccess
├── handler
│ ├── handler.min.js
│ └── handler.js
└── isotope
│ ├── isotope.pkgd.min.js
│ └── isotope.pkgd.js
├── package.json
├── config
├── config.php
├── autoload.php
└── autoload.ini
├── languages
├── en
│ ├── tl_content.php
│ └── tl_article.php
└── de
│ ├── tl_content.php
│ └── tl_article.php
├── dca
├── tl_content.php
└── tl_article.php
├── gulpfile.js
├── composer.json
├── README.md
├── src
├── EventListener
│ ├── ContentDataContainer.php
│ └── TemplateListener.php
└── FilterHelper.php
└── templates
└── modules
└── mod_article_elements_filter.html5
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: codefog
4 |
--------------------------------------------------------------------------------
/docs/images/element.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codefog/contao-elements-filter/HEAD/docs/images/element.png
--------------------------------------------------------------------------------
/docs/images/preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codefog/contao-elements-filter/HEAD/docs/images/preview.png
--------------------------------------------------------------------------------
/docs/README.md:
--------------------------------------------------------------------------------
1 | # Elements filter – Documentation
2 |
3 | 1. [Installation](01-installation.md)
4 | 2. [Basic configuration](02-basics.md)
5 |
--------------------------------------------------------------------------------
/assets/.htaccess:
--------------------------------------------------------------------------------
1 |
2 | Order allow,deny
3 | Allow from all
4 |
5 |
6 | Require all granted
7 |
8 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "gulp": "^3.9.1",
4 | "gulp-rename": "^1.2.2",
5 | "gulp-uglify": "^2.1.2",
6 | "isotope-layout": "^3.0.3"
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/config/config.php:
--------------------------------------------------------------------------------
1 | 'system/modules/elements-filter/templates/modules',
9 | ]
10 | );
11 |
--------------------------------------------------------------------------------
/config/autoload.ini:
--------------------------------------------------------------------------------
1 | ;;
2 | ; List modules which are required to be loaded beforehand
3 | ;;
4 | requires[] = "core"
5 | requires[] = "multicolumnwizard"
6 |
7 | ;;
8 | ; Configure what you want the autoload creator to register
9 | ;;
10 | register_namespaces = false
11 | register_classes = false
12 | register_templates = false
13 |
--------------------------------------------------------------------------------
/languages/en/tl_content.php:
--------------------------------------------------------------------------------
1 | &$GLOBALS['TL_LANG']['tl_content']['elementsFilter_filters'],
16 | 'exclude' => true,
17 | 'inputType' => 'checkbox',
18 | 'options_callback' => [\Codefog\ElementsFilter\EventListener\ContentDataContainer::class, 'getFilters'],
19 | 'eval' => ['multiple' => true, 'tl_class' => 'clr'],
20 | 'sql' => "blob NULL",
21 | ];
22 |
--------------------------------------------------------------------------------
/assets/handler/handler.min.js:
--------------------------------------------------------------------------------
1 | !function(e){function t(t,n){t.fadeOut(function(){t.children().each(function(){var t=e(this);!n||t.hasClass(n)?t.show():t.hide()}),t.fadeIn()})}function n(t,n){t.isotope({filter:function(){return!n||e(this).hasClass(n)}})}function i(){var i=e(this),a=i.data("handler"),s=e(i.data("elements"));if(s.length<1)return void console.error("The element containing elements does not exist: "+i.data("elements"));var l=s.find(".elements-filter").wrapAll('
cssID ?>style): ?> style="= $this->style ?>">
3 |
4 | printable): ?>
5 |
6 |
29 |
30 |
31 |
32 | elementsFilters): ?>
33 |
34 |
35 | elementsFilters as $filter): ?>
36 | - class="= $filter['cssClass'] ?>">
37 | = $filter['label'] ?>
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | = implode('', $this->elements) ?>
46 |
47 |
48 | backlink): ?>
49 |
50 |
= $this->back ?>
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/assets/isotope/isotope.pkgd.min.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Isotope PACKAGED v3.0.3
3 | *
4 | * Licensed GPLv3 for open source use
5 | * or Isotope Commercial License for commercial use
6 | *
7 | * http://isotope.metafizzy.co
8 | * Copyright 2017 Metafizzy
9 | */
10 |
11 | !function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,s,a){function u(t,e,n){var o,s="$()."+i+'("'+e+'")';return t.each(function(t,u){var h=a.data(u,i);if(!h)return void r(i+" not initialized. Cannot call methods, i.e. "+s);var d=h[e];if(!d||"_"==e.charAt(0))return void r(s+" is not a valid method");var l=d.apply(h,n);o=void 0===o?l:o}),void 0!==o?o:t}function h(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new s(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(s.prototype.option||(s.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return u(this,t,e)}return h(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,s=t.console,r="undefined"==typeof s?function(){}:function(t){s.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return n.indexOf(e)==-1&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return n!=-1&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,o=i[n];e=e||[];for(var s=this._onceEvents&&this._onceEvents[t];o;){var r=s&&s[o];r&&(this.off(t,o),delete s[o]),o.apply(this,e),n+=r?0:1,o=i[n]}return this}},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("get-size/get-size",[],function(){return e()}):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=t.indexOf("%")==-1&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e