diff options
| author | 2021-01-16 16:11:30 -0500 | |
|---|---|---|
| committer | 2021-01-16 22:11:30 +0100 | |
| commit | 5c18c64afbdc8b888fdedf2d7cc45e1930225f02 (patch) | |
| tree | 3d20526df907da7c2435774ae4647841376ae821 /app | |
| parent | bf639f9b984185e1fb8157a24cc11e2f49b827c7 (diff) | |
Change integration configuration page (#3372)
I've refactored the user query code to be able to use it also on the
integration configuration page. Now, items can be re-organized as in
the user query list.
Diffstat (limited to 'app')
| -rwxr-xr-x | app/Controllers/configureController.php | 5 | ||||
| -rw-r--r-- | app/views/configure/integration.phtml | 10 | ||||
| -rw-r--r-- | app/views/configure/queries.phtml | 2 |
3 files changed, 10 insertions, 7 deletions
diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index b37d2cefa..9316f6ea6 100755 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -145,6 +145,9 @@ class FreshRSS_configure_Controller extends Minz_ActionController { * some unwanted behavior when the end-user was using an ad-blocker. */ public function integrationAction() { + Minz_View::appendScript(Minz_Url::display('/scripts/integration.js?' . @filemtime(PUBLIC_PATH . '/scripts/integration.js'))); + Minz_View::appendScript(Minz_Url::display('/scripts/draggable.js?' . @filemtime(PUBLIC_PATH . '/scripts/draggable.js'))); + if (Minz_Request::isPost()) { $params = Minz_Request::fetchPOST(); FreshRSS_Context::$user_conf->sharing = $params['share']; @@ -275,7 +278,7 @@ 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'))); + Minz_View::appendScript(Minz_Url::display('/scripts/draggable.js?' . @filemtime(PUBLIC_PATH . '/scripts/draggable.js'))); $category_dao = FreshRSS_Factory::createCategoryDao(); $feed_dao = FreshRSS_Factory::createFeedDao(); diff --git a/app/views/configure/integration.phtml b/app/views/configure/integration.phtml index 80779ab18..19d46d8a3 100644 --- a/app/views/configure/integration.phtml +++ b/app/views/configure/integration.phtml @@ -5,7 +5,7 @@ <form method="post" action="<?= _url('configure', 'integration') ?>" data-simple='<div class="form-group" id="group-share-##key##"><label class="group-name">##label##</label><div class="group-controls"><div class="stick"><input type="text" id="share_##key##_name" name="share[##key##][name]" class="extend" value="##label##" placeholder="<?= _t('conf.sharing.share_name') ?>" size="64" /> - <input type="url" id="share_##key##_url" name="share[##key##][url]" class="extend" value="" placeholder="<?= _t('gen.short.not_applicable') ?>" size="64" disabled /><a href="#" class="remove btn btn-attention" data-remove="group-share-##key##"><?= _i('close') ?></a></div> + <input type="url" id="share_##key##_url" name="share[##key##][url]" class="extend" value="" placeholder="<?= _t('gen.short.not_applicable') ?>" size="64" disabled /><a href="#" class="remove btn btn-attention"><?= _i('close') ?></a></div> <input type="hidden" id="share_##key##_type" name="share[##key##][type]" value="##type##" /></div></div>' data-advanced='<div class="form-group" id="group-share-##key##"><label class="group-name">##label##</label><div class="group-controls"> <input type="hidden" id="share_##key##_type" name="share[##key##][type]" value="##type##" /> @@ -14,9 +14,9 @@ <div class="stick"> <input type="text" id="share_##key##_name" name="share[##key##][name]" class="extend" value="" placeholder="<?= _t('conf.sharing.share_name') ?>" size="64" /> <input type="url" id="share_##key##_url" name="share[##key##][url]" class="extend" value="" placeholder="<?= _t('conf.sharing.share_url') ?>" size="64" /> - <a href="#" class="remove btn btn-attention" data-remove="group-share-##key##" title="<?= _t('conf.sharing.remove') ?>"><?= _i('close') ?></a></div> + <a href="#" class="remove btn btn-attention" title="<?= _t('conf.sharing.remove') ?>"><?= _i('close') ?></a></div> <a target="_blank" rel="noreferrer" class="btn" title="<?= _t('conf.sharing.more_information') ?>" href="##help##"><?= _i('help') ?></a> - </div></div>'> + </div></div>' class="draggableList"> <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" /> <legend><?= _t('conf.sharing') ?></legend> <?php @@ -24,7 +24,7 @@ $share = FreshRSS_Share::get($share_options['type']); $share->update($share_options); ?> - <div class="form-group group-share" id="group-share-<?= $key ?>"> + <div class="form-group group-share" id="group-share-<?= $key ?>" draggable="true"> <label class="group-name"> <?= $share->name(true) ?> </label> @@ -39,7 +39,7 @@ <?php } else { ?> <input type="url" id="share_<?= $key ?>_url" name="share[<?= $key ?>][url]" class="extend" value="<?= $share->baseUrl() ?>" placeholder="<?= _t('gen.short.not_applicable') ?>" size="64" disabled/> <?php } ?> - <a href='#' class='remove btn btn-attention' data-remove="group-share-<?= $key ?>" title="<?= _t('conf.sharing.remove') ?>"><?= _i('close') ?></a> + <a href='#' class='remove btn btn-attention' title="<?= _t('conf.sharing.remove') ?>"><?= _i('close') ?></a> </div> <?php if ($share->formType() === 'advanced') { ?> <a target="_blank" rel="noreferrer" class="btn" title="<?= _t('conf.sharing.more_information') ?>" href="<?= $share->help() ?>"><?= _i('help') ?></a> diff --git a/app/views/configure/queries.phtml b/app/views/configure/queries.phtml index 7de2e752e..9c13eeb0e 100644 --- a/app/views/configure/queries.phtml +++ b/app/views/configure/queries.phtml @@ -3,7 +3,7 @@ <div class="post"> <a href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a> - <form method="post" action="<?= _url('configure', 'queries') ?>" id="configureQueries"> + <form method="post" action="<?= _url('configure', 'queries') ?>" class="draggableList"> <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" /> <legend><?= _t('conf.query') ?></legend> |
