summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Alexis Degrugillier <aledeg@users.noreply.github.com> 2021-01-08 19:47:20 -0500
committerGravatar GitHub <noreply@github.com> 2021-01-09 01:47:20 +0100
commit896f9d33637ec510937bc13a34f98f669795ab49 (patch)
treeee0bad5c959c47163a47609e7482d7643e12e530 /app
parent5e4c392cf23fbfd2198ad93a163d982fc84b0e52 (diff)
Add user query manual sorting (#3346)
* Add user query manual sorting Before, to change the user query order, you'll have to delete them and recreate them. It was not really efficient. Now, you can drag and drop them to ease reordering. See #2216 and #2015 * Remove cancel action on user query configuration Before, the cancel action was useless since it was not wired. Now, there is no cancel action. See #2015
Diffstat (limited to 'app')
-rwxr-xr-xapp/Controllers/configureController.php2
-rw-r--r--app/views/configure/queries.phtml5
2 files changed, 4 insertions, 3 deletions
diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php
index 5c8814895..6358f48c2 100755
--- a/app/Controllers/configureController.php
+++ b/app/Controllers/configureController.php
@@ -275,6 +275,8 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
* checking if categories and feeds are still in use.
*/
public function queriesAction() {
+ Minz_View::appendScript(Minz_Url::display('/scripts/user.query.js?' . @filemtime(PUBLIC_PATH . '/scripts/user.query.js')));
+
$category_dao = FreshRSS_Factory::createCategoryDao();
$feed_dao = FreshRSS_Factory::createFeedDao();
$tag_dao = FreshRSS_Factory::createTagDao();
diff --git a/app/views/configure/queries.phtml b/app/views/configure/queries.phtml
index cebd61547..032f18621 100644
--- a/app/views/configure/queries.phtml
+++ b/app/views/configure/queries.phtml
@@ -3,12 +3,12 @@
<div class="post">
<a href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
- <form method="post" action="<?= _url('configure', 'queries') ?>">
+ <form method="post" action="<?= _url('configure', 'queries') ?>" id="configureQueries">
<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
<legend><?= _t('conf.query') ?></legend>
<?php foreach ($this->queries as $key => $query) { ?>
- <div class="form-group" id="query-group-<?= $key ?>">
+ <div class="form-group" id="query-group-<?= $key ?>" draggable="true">
<label class="group-name" for="queries_<?= $key ?>_name">
<?= _t('conf.query.number', $key + 1) ?>
</label>
@@ -77,7 +77,6 @@
<div class="form-group form-actions">
<div class="group-controls">
<button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button>
- <button type="reset" class="btn"><?= _t('gen.action.cancel') ?></button>
</div>
</div>
<?php } else { ?>