diff --git a/js/feed.js b/js/feed.js new file mode 100644 index 0000000..8f8719b --- /dev/null +++ b/js/feed.js @@ -0,0 +1,9 @@ +/*global $, dotclear */ +'use strict'; + +$(() => { + $('.checkboxes-helpers').each(function () { + dotclear.checkboxesHelpers(this, undefined, '#form-entries td input[type=checkbox]', '#form-entries #feed-action'); + }); + dotclear.condSubmit('#form-entries td input[type=checkbox]', '#form-entries #feed-action'); +}); \ No newline at end of file diff --git a/js/feeds.js b/js/feeds.js new file mode 100644 index 0000000..6a22d5c --- /dev/null +++ b/js/feeds.js @@ -0,0 +1,9 @@ +/*global $, dotclear */ +'use strict'; + +$(() => { + $('.checkboxes-helpers').each(function () { + dotclear.checkboxesHelpers(this, undefined, '#form-feeds td input[type=checkbox]', '#form-feeds #feeds-action'); + }); + dotclear.condSubmit('#form-feeds td input[type=checkbox]', '#form-feeds #feeds-action'); +}); \ No newline at end of file diff --git a/js/list.js b/js/list.js deleted file mode 100644 index 2886045..0000000 --- a/js/list.js +++ /dev/null @@ -1,8 +0,0 @@ -/*global $, dotclear */ -'use strict'; - -$(() => { - $('.checkboxes-helpers').each(function(){dotclear.checkboxesHelpers(this);}); - dotclear.condSubmit('#form-feeds td input[type=checkbox]', '#form-feeds #feeds-action'); - dotclear.condSubmit('#form-entries td input[type=checkbox]', '#form-entries #feed-action'); -}); \ No newline at end of file diff --git a/src/Manage.php b/src/Manage.php index 840a913..a54befb 100644 --- a/src/Manage.php +++ b/src/Manage.php @@ -143,7 +143,7 @@ class Manage extends dcNsProcess ( isset($feeds_list) && !dcCore::app()->error->flag() ? $feeds_filter->js(dcCore::app()->adminurl->get('admin.plugin.' . My::id(), ['part' => 'feeds'], '&')) . - dcPage::jsModuleLoad(My::id() . '/js/list.js') + dcPage::jsModuleLoad(My::id() . '/js/feeds.js') : '' ) . dcPage::jsPageTabs() diff --git a/src/ManageFeed.php b/src/ManageFeed.php index 73be913..2a4f7ff 100644 --- a/src/ManageFeed.php +++ b/src/ManageFeed.php @@ -197,7 +197,7 @@ class ManageFeed extends dcNsProcess ( $v->id && isset($post_filter) && !dcCore::app()->error->flag() ? $post_filter->js(dcCore::app()->adminurl->get('admin.plugin.' . My::id(), ['part' => 'feed', 'feed_id' => $v->id], '&') . '#entries') . - dcPage::jsModuleLoad(My::id() . '/js/list.js') + dcPage::jsModuleLoad(My::id() . '/js/feed.js') : '' ) . dcPage::jsPageTabs() .