trusty-festivity-extension 2.3.9 → 2.3.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c1e4223245c99ba6bba595b7d10ab4fe19c0ff1
4
- data.tar.gz: 381410efffa0d321457e0c0a262ed5ce284423f5
3
+ metadata.gz: dc684bbca1daf60494d469936f1052aa9be513c9
4
+ data.tar.gz: 8608b78d593da59473ee0548504d7805db27f06e
5
5
  SHA512:
6
- metadata.gz: de5d46dcf1fab1a88114988e6bfa07552e53ad355ac45fa86e464514f28fdf779f55bd1f33803c24da5301fd81dd085eaa6f2dc4d1d15b7f2973af2e5346d67b
7
- data.tar.gz: 4b47743b2b42b0ef9a906e650420235a57c8989814dfdcfa09de4b261178f08b14b33dff32bd88baeb5aeb7b6216e8b11801e3952fb87fcf8497e2e1b00d4f89
6
+ metadata.gz: 5595efad9e4ab46b8f1efd095cccf74bfe45657893327d50ad289f8e07a9b6ec6dff348ffd8b61833a26f754b4dd43c540dcc55fba85c7f2d390e4e9ccd06570
7
+ data.tar.gz: d8d82308a8074aa1e84d6b53d08f6ae9c9eebac85390f466c9313562d33df3f6fc74cc731bff122ba73817a71b5667f65a4e0d039d066096410213b64fa2048a
@@ -1,40 +1,9 @@
1
1
  $(document).ready(function() {
2
- var $toggler = $('.toggler-root')
3
- $togglerTrigger = $('.toggler-trigger'),
2
+ var $toggler = $('.toggler-root'),
4
3
  parentClass = "content-expanded",
5
4
  expandedClass = "is-expanded",
6
5
  $sidebarFilters = $('.menu-content-wrapper > .filters-wrapper');
7
6
 
8
- function toggler() {
9
- $togglerTrigger.on("click", function(e) {
10
- e.preventDefault();
11
-
12
- var content = $(this).next();
13
-
14
- if (content.hasClass(expandedClass)) {
15
- contentCollapse(content);
16
- $(this).attr('aria-expanded', false)
17
- content.attr('aria-hidden', true);
18
- } else {
19
- contentExpand(content);
20
- $(this).attr('aria-expanded', true)
21
- content.attr('aria-hidden', false);
22
- }
23
- });
24
- };
25
-
26
- function contentExpand(content) {
27
- content.parent().addClass(parentClass);
28
- content.addClass(expandedClass).stop().slideDown();
29
- };
30
-
31
- function contentCollapse(content) {
32
- content.parent().removeClass(parentClass);
33
- content.removeClass(expandedClass).stop().slideUp();
34
- };
35
-
36
- toggler();
37
-
38
7
  $('.show-filters-trigger').on('click', function(e){
39
8
  e.preventDefault();
40
9
  $('.overflow-wrapper').addClass('show-filters');
@@ -1,5 +1,36 @@
1
1
  Festivity.Filters = {
2
+ parentClass: function(){ return "content-expanded"},
3
+ expandedClass: function(){ return "is-expanded"},
4
+ togglerTrigger: function(){ return $('.toggler-trigger')},
5
+ toggler: function() {
6
+ Festivity.Filters.togglerTrigger().off("click");
7
+ Festivity.Filters.togglerTrigger().on("click", function(e) {
8
+ e.preventDefault();
9
+
10
+ var content = $(this).next();
11
+
12
+ if (content.hasClass(Festivity.Filters.expandedClass())) {
13
+ Festivity.Filters.contentCollapse(content);
14
+ $(this).attr('aria-expanded', false)
15
+ content.attr('aria-hidden', true);
16
+ } else {
17
+ Festivity.Filters.contentExpand(content);
18
+ $(this).attr('aria-expanded', true)
19
+ content.attr('aria-hidden', false);
20
+ }
21
+ });
22
+ },
23
+ contentExpand: function(content) {
24
+ content.parent().addClass(Festivity.Filters.parentClass());
25
+ content.addClass(Festivity.Filters.expandedClass()).stop().slideDown();
26
+ },
27
+
28
+ contentCollapse: function(content) {
29
+ content.parent().removeClass(Festivity.Filters.parentClass());
30
+ content.removeClass(Festivity.Filters.expandedClass()).stop().slideUp();
31
+ },
2
32
  bindEvents: function() {
33
+ Festivity.Filters.toggler();
3
34
  $(".date-filters input[type='checkbox'], .category-filters input[type='checkbox']").click(function(e){
4
35
  if (e.target.checked == false) {
5
36
  $("input[data-sort='" + $(e.target).attr("data-sort") + "']").removeAttr('checked');
@@ -63,6 +94,7 @@ Festivity.Filters = {
63
94
  Festivity.Filters.bindListEvents();
64
95
  Festivity.Filters.toggleClearButton();
65
96
  Festivity.Filters.updateActiveFilters();
97
+ Festivity.Filters.toggler();
66
98
  }
67
99
  });
68
100
  },
@@ -1,5 +1,5 @@
1
1
  module TrustyFestivityExtension
2
- VERSION = "2.3.9"
2
+ VERSION = "2.3.10"
3
3
  SUMMARY = "Festival microsite engine for Trusty CMS"
4
4
  DESCRIPTION = "Event management for arts festivals."
5
5
  URL = "http://github.com/pgharts/trusty-festivity-extension"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trusty-festivity-extension
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.9
4
+ version: 2.3.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Sipple