From 9ce7cdd23770bc6a751103d76173543b44e12091 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Thu, 21 Oct 2021 22:22:02 +0200 Subject: [PATCH] add autosubmit on admin menu --- CHANGELOG.md | 2 ++ index.php | 1 + js/index.js | 8 ++++++++ 3 files changed, 11 insertions(+) create mode 100644 js/index.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 11ded9a..a875dc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ - [ ] add priority on lists of filters for replacement order - [ ] add auto-find post title in content - [ ] split filters into modules +- [x] add autosubmit onadmin menu +- [ ] move sort options from blog pref to user pref 2021.09.05 - fix duplicate records id diff --git a/index.php b/index.php index bc70305..9c69eca 100644 --- a/index.php +++ b/index.php @@ -165,6 +165,7 @@ echo ' //dcPage::jsLoad('js/_posts_list.js') . dcPage::jsToolbar() . dcPage::jsPageTabs() . +dcPage::jsLoad(dcPage::getPF('enhancePostContent/js/index.js')) . # --BEHAVIOR-- enhancePostContentAdminHeader $core->callBehavior('enhancePostContentAdminHeader', $core) . ' diff --git a/js/index.js b/js/index.js new file mode 100644 index 0000000..70df43a --- /dev/null +++ b/js/index.js @@ -0,0 +1,8 @@ +/*global $, dotclear */ +'use strict'; + +$(function () { + $('#part').on('change', function () { + this.form.submit(); + }); +}); \ No newline at end of file