Merge pull request #5319 from sboursen-scinote/sb_SCI-8286

Update config after protocol.io changed page_id [SCI-8286]
This commit is contained in:
artoscinote 2023-04-18 12:50:31 +02:00 committed by GitHub
commit 009bffa77a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View file

@ -136,7 +136,7 @@ function applySearchCallback() {
} }
PerfectSb().update_all(); PerfectSb().update_all();
// Reset page id after every request // Reset page id after every request
$('form.protocols-search-bar #page-id').val(1); $('form.protocols-search-bar #page-id').val(0);
// Apply all callbacks on new elements // Apply all callbacks on new elements
applyClickCallbackOnProtocolCards(); applyClickCallbackOnProtocolCards();

View file

@ -37,7 +37,7 @@ module ProtocolImporters
# Default 10. # Default 10.
# page_id (optional): int (1..n) # page_id (optional): int (1..n)
# id of page. # id of page.
# Default is 1. # Default is 1. (the first page_id: 0)
def protocol_list(query_params = {}) def protocol_list(query_params = {})
local_sorting = false local_sorting = false
response = with_handle_network_errors do response = with_handle_network_errors do

View file

@ -13,7 +13,7 @@
class: 'protocols-search-bar', class: 'protocols-search-bar',
remote: true do %> remote: true do %>
<%= hidden_field_tag 'protocol_source', 'protocolsio/v3' %> <%= hidden_field_tag 'protocol_source', 'protocolsio/v3' %>
<%= hidden_field_tag 'page_id', 1, id: 'page-id' %> <%= hidden_field_tag 'page_id', 0, id: 'page-id' %>
<div class='header'> <div class='header'>
<div class='protocols-search-bar-panel'> <div class='protocols-search-bar-panel'>
<div class='sci-input-container left-icon'> <div class='sci-input-container left-icon'>

View file

@ -272,7 +272,7 @@ class Constants
order_field: :activity, order_field: :activity,
order_dir: :desc, order_dir: :desc,
page_size: 50, page_size: 50,
page_id: 1, page_id: 0,
fields: 'id,title,authors,created_on,uri,stats,published_on' fields: 'id,title,authors,created_on,uri,stats,published_on'
} }
}, },