EBernhardson has uploaded a new change for review. https://gerrit.wikimedia.org/r/286084
Change subject: Drop unused wikiBaseUrl template parameter ...................................................................... Drop unused wikiBaseUrl template parameter Change-Id: Iaaa79046a62ddc0e1772619ba00209fe9dea2575 --- M src/RelevanceScoring/Controller/QueriesController.php M views/score_query.twig 2 files changed, 3 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/discernatron refs/changes/84/286084/1 diff --git a/src/RelevanceScoring/Controller/QueriesController.php b/src/RelevanceScoring/Controller/QueriesController.php index 121df14..4012c2e 100644 --- a/src/RelevanceScoring/Controller/QueriesController.php +++ b/src/RelevanceScoring/Controller/QueriesController.php @@ -115,14 +115,9 @@ return $this->app->redirect($this->app->path('random_query', ['saved' => 1])); } - $wiki = reset($results)['wiki']; - $parts = parse_url($this->wikis[$wiki]); - $baseUrl = $parts['scheme'].'://'.$parts['host'].'/wiki/'; - return $this->twig->render('score_query.twig', [ 'query' => $query, 'results' => $results, - 'wikiBaseUrl' => $baseUrl, 'form' => $form->createView(), 'saved' => (bool) $request->query->get('saved'), ]); diff --git a/views/score_query.twig b/views/score_query.twig index 4098215..3d9a9c0 100644 --- a/views/score_query.twig +++ b/views/score_query.twig @@ -128,5 +128,8 @@ onChange.apply(row.find('input[value=' + (next) + ']').prop('checked', true)); } }); + $(document).ready(function () { + $('input:checked').each(onChange); + }); </script> {% endblock %} -- To view, visit https://gerrit.wikimedia.org/r/286084 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaaa79046a62ddc0e1772619ba00209fe9dea2575 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/discovery/discernatron Gerrit-Branch: master Gerrit-Owner: EBernhardson <ebernhard...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits