Skip to content

Commit

Permalink
Improves Craft 3.4 compatibility. Bump to 1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
mmikkel committed Feb 2, 2020
1 parent 1530b4c commit f32236d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 1.0.6 - 2020-02-02
### Improved
- Improves Craft 3.4 compatibility

## 1.0.5 - 2019-10-21
### Fixed
- Fixes an issue where CP Clear Cache could conflict with other plugins
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "mmikkel/cp-clearcache",
"description": "Less clickin’ to get clearin’",
"type": "craft-plugin",
"version": "1.0.5",
"version": "1.0.6",
"keywords": [
"craft",
"cms",
Expand Down
14 changes: 10 additions & 4 deletions src/resources/cpclearcache.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
$trigger: null,
localStorageKey: 'cpclearcache_selected',

onChange: function (e) {
onChange: function () {
Craft.setLocalStorage(this.localStorageKey, $.map($('input[type="checkbox"]:checked'), function (input) {
return input.value;
}));
Expand All @@ -20,8 +20,9 @@

e.preventDefault();

$form = $(this.data.html);
var $form = $(this.data.html);
$form.attr('id', 'mmikkel-cpclearcache');
$('.info', $form).infoicon();

if (!this.hud) {

Expand Down Expand Up @@ -61,8 +62,13 @@
}

this.$trigger.on('click', $.proxy(this.onClick, this));

$('body').on('change', '#mmikkel-cpclearcache input[type="checkbox"]', $.proxy(this.onChange, this));

$('body')
.on('change', '#mmikkel-cpclearcache input[type="checkbox"]', $.proxy(this.onChange, this))
.on('click', '#mmikkel-cpclearcache .info', e => {
e.preventDefault();
e.stopPropagation();
});

}

Expand Down

0 comments on commit f32236d

Please sign in to comment.