Skip to content

Commit

Permalink
Merge pull request #3067 from joshangell/develop
Browse files Browse the repository at this point in the history
Add `typeChange` event to `Craft.EntryTypeSwitcher`
  • Loading branch information
brandonkelly authored Jul 4, 2018
2 parents 25a455f + 1a05732 commit 1503df4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

### Changed
- `Craft.EntryTypeSwitcher` now triggers a `typeChange` event after switching the entry type. ([#3067](https://github.com/craftcms/cms/pull/3067))

### Fixed
- Fixed a bug where `craft\i18n\I18N::getPrimarySiteLocale()` and `getPrimarySiteLocaleId()` were returning locale info for the _first_ site, rather than the primary one. ([#3063](https://github.com/craftcms/cms/issues/3063))
- Fixed a bug where element index pages were loading all elements in the view, rather than waiting for the user to scroll to the bottom of the page before loading the next batch. ([#3068](https://github.com/craftcms/cms/issues/3068))
Expand Down
2 changes: 2 additions & 0 deletions src/web/assets/editentry/dist/EntryTypeSwitcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
if (typeof slugGenerator !== 'undefined') {
slugGenerator.setNewSource('#title');
}

this.trigger('typeChange');
}
}, this));
}
Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/editentry/dist/EntryTypeSwitcher.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/web/assets/editentry/dist/EntryTypeSwitcher.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1503df4

Please sign in to comment.