Nouvelle version du client ScrutariJs

This commit is contained in:
Vincent Calame 2023-07-08 16:22:12 +02:00 committed by root
parent 36b4178bb9
commit 8d30afaf19
7 changed files with 197 additions and 351 deletions

View File

@ -131,13 +131,17 @@ Structure du client
<h3>Vos résultats</h3>
</div>
<div data-scrutari-block="paginationBlock"></div>
<div class="scrutari-Hidden" data-scrutari-hidden="empty">
<!-- main.area-result.result-poweredby -->
<p class="scrutari-links-Poweredby"><a href="http://www.scrutari.net" target="_blank"><span class="scrutari-icon-Logo"></span> Recherche effectuée par Scrutari</a></p>
<!-- /main.area-result.result-poweredby -->
</div>
</div>
<!-- /main.area-result -->
<!-- main.area-poweredby -->
<div class="scrutari-area-Poweredby scrutari-Hidden" data-scrutari-hidden="empty">
<p>
<a href="http://www.scrutari.net" target="_blank">
<span class="scrutari-icon-Logo"></span> Recherche effectuée par Scrutari
</a>
</p>
</div>
<!-- /main.area-poweredby -->
<!-- /main -->

View File

@ -13,7 +13,7 @@
[<script src="(#CHEMIN{javascript/scrutarijs/Scrutari.Lav.js}|timestamp)"></script>]
[(#REM) Structure et gabarits par défaut]
[<script src="(#CHEMIN{javascript/scrutarijs/frameworks/_default.js}|timestamp)"></script>]
[<script src="(#CHEMIN{javascript/scrutarijs/frameworks/default.js}|timestamp)"></script>]
[<link rel="stylesheet" href="(#CSS{javascript/scrutarijs/scrutarijs.css})" type="text/css" />]

View File

@ -32,7 +32,7 @@ Scrutari.Lav.formatSearchSequence = function (client, scrutariResult) {
q = q.replace(/\|\|/g, '@%ou%@');
q = q.replace(/\*/g, '@%*%@');
q = Scrutari.escape(q);
q = q.replace(/@%/g, '<span class="scrutari-lav-Operateur">');
q = q.replace(/@%/g, '<span class="lav-Operateur">');
q = q.replace(/%@/g, '</span>');
return q;
};
@ -234,7 +234,8 @@ Scrutari.Lav.getInitOptions = function () {
return {
withCorpus: false,
ficheTarget: "_blank",
ficheBodyList: "fiche_mtitre,fiche_msoustitre,libreavous_start_ul,fiche_primaryattributearray,fiche_mcomplementarray,fiche_secondaryattributearray,fiche_motclearray,fiche_bythesaurusarray,libreavous_end_ul", //Ajout de libreavous_start_ul et libreavous_end_ul, retrait de fiche_year
ficheBodyList: "fiche_mtitre,fiche_msoustitre,libreavous_start_ul,fiche_primaryattributearray,fiche_mcomplementarray,fiche_secondaryattributearray,fiche_motclearray,fiche_bythesaurusarray,libreavous_end_ul", //Ajout de libreavous_start_ul et libreavous_end_ul, retrait de fiche_year,
historyAtLast: true,
ignoreList: "area-title,area-stats,modal-*", //Utilisé en mode développement
hooks: Scrutari.Lav.HOOKS,
functions: Scrutari.Lav.FUNCTIONS

View File

@ -1,26 +1,26 @@
var SCRUTARI_HTML = {
_name:'_default',
_name:'default',
structure:{
'area-input':'<div data-scrutari-area="input" class="scrutari-area-Input"> <input type="search" size="40" name="q" value=""> <button type="submit">_ button_submit</button> <button type="button" data-scrutari-button="parametersDisplay" class="scrutari-Hidden" data-scrutari-state="off"> _ button_parameters </button> </div> ',
'area-input':'<div data-scrutari-area="input" class="scrutari-area-Input"> <div> <input type="search" size="40" name="q" value=""> <button type="submit">_ button_submit</button> </div> <button type="button" data-scrutari-button="parametersDisplay" class="scrutari-Hidden" data-scrutari-state="off"> _ button_parameters </button> </div> ',
'area-parameters':'<div data-scrutari-area="parameters" class="scrutari-area-Parameters scrutari-Hidden"> {{panel-options}} {{panel-corpus}} {{panel-base}} {{panel-lang}} {{panel-category}} <div class="scrutari-area-Resubmit"> <button type="submit">_ button_resubmit</button> </div> </div>',
'area-result':'<div data-scrutari-area="result" class="scrutari-area-Result"> <div data-scrutari-block="paginationBlock"></div> <div class="scrutari-Hidden" data-scrutari-hidden="empty"> {{result-links}} </div> {{result-history}} <div class="scrutari-Hidden" data-scrutari-hidden="threshold"> {{result-subsearch}} </div> <div class="scrutari-Hidden" data-scrutari-hidden="empty"> {{result-poweredby}} </div> </div>',
'area-poweredby':'<div class="scrutari-area-Poweredby scrutari-Hidden" data-scrutari-hidden="empty"> <p> <a href="http://www.scrutari.net" target="_blank"> <span class="scrutari-icon-Logo"></span> _ link_poweredby </a> </p> </div>',
'area-result':'<div data-scrutari-area="result" class="scrutari-area-Result"> <div data-scrutari-block="paginationBlock"></div> <div> {{result-links}} </div> <div> {{result-history}} </div> <div> {{result-subsearch}} </div> </div>',
'area-stats':'<div data-scrutari-area="stats" class="scrutari-area-Stats"> {{stats-table}} </div> ',
'area-title':'<div data-scrutari-area="title" class="scrutari-area-Title"> <p class="scrutari-title-Main" data-scrutari-title="main"></p> </div> ',
'area-title':'<div data-scrutari-area="title" class="scrutari-area-Title"> <p> <span data-scrutari-label="mainTitle"></span> </p> </div> ',
'main-form':'<form data-scrutari-form="mainsearch" role="search"> {{area-input}} {{area-parameters}} </form>',
'main':'{{area-title}} {{main-form}} {{area-stats}} {{area-result}} {{modal-*}}',
'main':'{{area-title}} {{main-form}} {{area-stats}} {{area-result}} {{area-poweredby}} {{modal-*}}',
'modal-help_mode':'<aside class="scrutari-Hidden" data-scrutari-modal="help_mode" aria-hidden="true"> <header> _ mode_help </header> <div> _ help_mode.html </div> </aside>',
'modal-help_periode':'<aside class="scrutari-Hidden" data-scrutari-modal="help_periode" aria-hidden="true"> <header> _ periode_help </header> <div> _ help_periode.html </div> </aside>',
'modal-help_ponderation':'<aside class="scrutari-Hidden" data-scrutari-modal="help_ponderation" aria-hidden="true"> <header> _ ponderation_help </header> <div> _ help_ponderation.html </div> </aside>',
'modal-loading':'<aside class="scrutari-Hidden" data-scrutari-modal="loading" aria-hidden="true"> <div> <span class="scrutari-icon-Loader"></span> _ loading_search </div> </aside>',
'panel-base':'<section class="scrutari-Hidden" data-scrutari-panel="base"> <header> <h1 data-scrutari-button="toggleBlock" data-scrutari-state="off" data-scrutari-target="basePanelBody"> _ title_filter_base <span data-scrutari-label="baseFilter" class="scrutari-panel-State scrutari-Disabled" data-scrutari-alternate="_ filter_on">_ filter_off</span> </h1> </header> <div class="scrutari-Hidden" data-scrutari-block="basePanelBody"> <div> <span> <button type="button" data-scrutari-button="enablePanel" data-scrutari-target="base" data-scrutari-state="off"> <span data-scrutari-alternate="_ button_filter_off">_ button_filter_on</span> </button> </span> <span> <button type="button" data-scrutari-button="checkAll" data-scrutari-target="base" disabled>_ button_check_all</button> <button type="button" data-scrutari-button="uncheckAll" data-scrutari-target="base" disabled>_ button_uncheck_all</button> </span> </div> <div> <div class="scrutari-panel-ColumnDisabled" data-scrutari-group="baseColumns"></div> <div class="scrutari-panel-ColumnDisabled" data-scrutari-group="baseColumns"></div> <div class="scrutari-panel-ColumnDisabled" data-scrutari-group="baseColumns"></div> <div class="scrutari-panel-ColumnDisabled" data-scrutari-group="baseColumns"></div> </div> </div> </section>',
'panel-category':'<section class="scrutari-Hidden" data-scrutari-panel="category"> <header> <h1 data-scrutari-button="toggleBlock" data-scrutari-state="off" data-scrutari-target="categoryPanelBody"> _ title_filter_category <span data-scrutari-label="categoryFilter" class="scrutari-panel-State scrutari-Disabled" data-scrutari-alternate="_ filter_on">_ filter_off</span> </h1> </header> <div class="scrutari-Hidden" data-scrutari-block="categoryPanelBody"> <div> <span> <button type="button" data-scrutari-button="enablePanel" data-scrutari-target="category" data-scrutari-state="off"> <span data-scrutari-alternate="_ button_filter_off">_ button_filter_on</span> </button> </span> <span> <button type="button" data-scrutari-button="checkAll" data-scrutari-target="category" disabled>_ button_check_all</button> <button type="button" data-scrutari-button="uncheckAll" data-scrutari-target="category" disabled>_ button_uncheck_all</button> </span> </div> <div > <div class="scrutari-panel-ColumnDisabled" data-scrutari-group="categoryColumns"></div> <div class="scrutari-panel-ColumnDisabled" data-scrutari-group="categoryColumns"></div> <div class="scrutari-panel-ColumnDisabled" data-scrutari-group="categoryColumns"></div> <div class="scrutari-panel-ColumnDisabled" data-scrutari-group="categoryColumns"></div> </div> </div> </section>',
'panel-corpus':'<section class="scrutari-Hidden" data-scrutari-panel="corpus"> <header> <h1 data-scrutari-button="toggleBlock" data-scrutari-state="off" data-scrutari-target="corpusPanelBody"> _ title_filter_corpus <span data-scrutari-label="corpusFilter" class="scrutari-panel-State scrutari-Disabled" data-scrutari-alternate="_ filter_on">_ filter_off</span> </h1> </header> <div class="scrutari-Hidden" data-scrutari-block="corpusPanelBody"> <div> <span> <button type="button" data-scrutari-button="enablePanel" data-scrutari-target="corpus" data-scrutari-state="off"> <span data-scrutari-alternate="_ button_filter_off">_ button_filter_on</span> </button> </span> <span> <button type="button" data-scrutari-button="checkAll" data-scrutari-target="corpus" disabled>_ button_check_all</button> <button type="button" data-scrutari-button="uncheckAll" data-scrutari-target="corpus" disabled>_ button_uncheck_all</button> </span> </div> <div> <div class="scrutari-panel-ColumnDisabled" data-scrutari-group="corpusColumns"></div> <div class="scrutari-panel-ColumnDisabled" data-scrutari-group="corpusColumns"></div> <div class="scrutari-panel-ColumnDisabled" data-scrutari-group="corpusColumns"></div> <div class="scrutari-panel-ColumnDisabled" data-scrutari-group="corpusColumns"></div> </div> </div> </section>',
'panel-lang':'<section class="scrutari-Hidden" data-scrutari-panel="lang"> <header> <h1 data-scrutari-button="toggleBlock" data-scrutari-state="off" data-scrutari-target="langPanelBody"> _ title_filter_lang <span data-scrutari-label="langFilter" class="scrutari-panel-State scrutari-Disabled" data-scrutari-alternate="_ filter_on">_ filter_off</span> </h1> </header> <div class="scrutari-Hidden" data-scrutari-block="langPanelBody"> <div> <span> <button type="button" data-scrutari-button="enablePanel" data-scrutari-target="lang" data-scrutari-state="off"> <span data-scrutari-alternate="_ button_filter_off">_ button_filter_on</span> </button> </span> <span> <button type="button" data-scrutari-button="checkAll" data-scrutari-target="lang" disabled>_ button_check_all</button> <button type="button" data-scrutari-button="uncheckAll" data-scrutari-target="lang" disabled>_ button_uncheck_all</button> </span> </div> <div> <div class="scrutari-panel-ColumnDisabled" data-scrutari-group="langColumns"></div> <div class="scrutari-panel-ColumnDisabled" data-scrutari-group="langColumns"></div> <div class="scrutari-panel-ColumnDisabled" data-scrutari-group="langColumns"></div> <div class="scrutari-panel-ColumnDisabled" data-scrutari-group="langColumns"></div> </div> </div> </section>',
'panel-options':'<section data-scrutari-panel="options"> <header> <h1 data-scrutari-button="toggleBlock" data-scrutari-state="off" data-scrutari-target="optionsPanelBody"> _ title_options </h1> </header> <div class="scrutari-Hidden" data-scrutari-block="optionsPanelBody"> <div> <div> <p><span>_ mode_title</span><button data-scrutari-button="showModal" data-scrutari-target="help_mode" type="button" title="_ mode_help">?</button></p> <p><label><input type="radio" name="q-mode" value="intersection" checked> _ mode_intersection</label></p> <p><label><input type="radio" name="q-mode" value="union"> _ mode_union</label></p> <p><label><input type="radio" name="q-mode" value="operation"> _ mode_operation</label></p> <p><label><input type="checkbox" name="wildchar" value="end" checked> _ wildchar_end</label></p> </div> <div> <p><span>_ ponderation_title</span><button data-scrutari-button="showModal" data-scrutari-target="help_ponderation" type="button" title="_ ponderation_help">?</button></p> <p><label><input type="radio" name="ponderation" value="pertinence" checked> _ ponderation_pertinence</label></p> <p><label><input type="radio" name="ponderation" value="date"> _ ponderation_date</label></p> </div> <div> <p><span>_ periode_title</span><button data-scrutari-button="showModal" data-scrutari-target="help_periode" type="button" title="_ periode_help">?</button></p> <p><input type="text" name="periode" value="" size="20"></p> </div> </div> </div> </section>',
'panel-base':'<details class="scrutari-Hidden" data-scrutari-panel="base"> <summary> _ title_filter_base <span data-scrutari-label="baseFilter" class="scrutari-panel-State scrutari-Disabled" data-scrutari-alternate="_ filter_on">_ filter_off</span> </summary> <div> <div class="scrutari-panel-Toolbar"> <span class="scrutari-panel-ButtonGroup"> <button type="button" data-scrutari-button="enablePanel" data-scrutari-target="base" data-scrutari-state="off"> <span data-scrutari-alternate="_ button_filter_off">_ button_filter_on</span> </button> </span> <span class="scrutari-panel-ButtonGroup"> <button type="button" data-scrutari-button="checkAll" data-scrutari-target="base" disabled>_ button_check_all</button> <button type="button" data-scrutari-button="uncheckAll" data-scrutari-target="base" disabled>_ button_uncheck_all</button> </span> </div> <div class="scrutari-panel-Columns scrutari-Disabled" data-scrutari-block="columnsBlock-base"> <div></div> <div></div> <div></div> <div></div> </div> </div> </details>',
'panel-category':'<details class="scrutari-Hidden" data-scrutari-panel="category"> <summary> _ title_filter_category <span data-scrutari-label="categoryFilter" class="scrutari-panel-State scrutari-Disabled" data-scrutari-alternate="_ filter_on">_ filter_off</span> </summary> <div> <div class="scrutari-panel-Toolbar"> <span class="scrutari-panel-ButtonGroup"> <button type="button" data-scrutari-button="enablePanel" data-scrutari-target="category" data-scrutari-state="off"> <span data-scrutari-alternate="_ button_filter_off">_ button_filter_on</span> </button> </span> <span class="scrutari-panel-ButtonGroup"> <button type="button" data-scrutari-button="checkAll" data-scrutari-target="category" disabled>_ button_check_all</button> <button type="button" data-scrutari-button="uncheckAll" data-scrutari-target="category" disabled>_ button_uncheck_all</button> </span> </div> <div class="scrutari-panel-Columns scrutari-Disabled" data-scrutari-block="columnsBlock-category"> <div></div> <div></div> <div></div> <div></div> </div> </div> </details>',
'panel-corpus':'<details class="scrutari-Hidden" data-scrutari-panel="corpus"> <summary> _ title_filter_corpus <span data-scrutari-label="corpusFilter" class="scrutari-panel-State scrutari-Disabled" data-scrutari-alternate="_ filter_on">_ filter_off</span> </summary> <div> <div class="scrutari-panel-Toolbar"> <span class="scrutari-panel-ButtonGroup"> <button type="button" data-scrutari-button="enablePanel" data-scrutari-target="corpus" data-scrutari-state="off"> <span data-scrutari-alternate="_ button_filter_off">_ button_filter_on</span> </button> </span> <span class="scrutari-panel-ButtonGroup"> <button type="button" data-scrutari-button="checkAll" data-scrutari-target="corpus" disabled>_ button_check_all</button> <button type="button" data-scrutari-button="uncheckAll" data-scrutari-target="corpus" disabled>_ button_uncheck_all</button> </span> </div> <div class="scrutari-panel-Columns scrutari-Disabled" data-scrutari-block="columnsBlock-corpus"> <div></div> <div></div> <div></div> <div></div> </div> </div> </details>',
'panel-lang':'<details class="scrutari-Hidden" data-scrutari-panel="lang"> <summary> _ title_filter_lang <span data-scrutari-label="langFilter" class="scrutari-panel-State scrutari-Disabled" data-scrutari-alternate="_ filter_on">_ filter_off</span> </summary> <div> <div class="scrutari-panel-Toolbar"> <span class="scrutari-panel-ButtonGroup"> <button type="button" data-scrutari-button="enablePanel" data-scrutari-target="lang" data-scrutari-state="off"> <span data-scrutari-alternate="_ button_filter_off">_ button_filter_on</span> </button> </span> <span class="scrutari-panel-ButtonGroup"> <button type="button" data-scrutari-button="checkAll" data-scrutari-target="lang" disabled>_ button_check_all</button> <button type="button" data-scrutari-button="uncheckAll" data-scrutari-target="lang" disabled>_ button_uncheck_all</button> </span> </div> <div class="scrutari-panel-Columns scrutari-Disabled" data-scrutari-block="columnsBlock-lang"> <div></div> <div></div> <div></div> <div></div> </div> </div> </details>',
'panel-options':'<details data-scrutari-panel="options"> <summary> _ title_options </summary> <div> <div class="scrutari-panel-Columns"> <div> <p><span>_ mode_title</span><button data-scrutari-button="showModal" data-scrutari-target="help_mode" type="button" title="_ mode_help">?</button></p> <div> <label><input type="radio" name="q-mode" value="intersection" checked> _ mode_intersection</label> <label><input type="radio" name="q-mode" value="union"> _ mode_union</label> <label><input type="radio" name="q-mode" value="operation"> _ mode_operation</label> <label><input type="checkbox" name="wildchar" value="end" checked> _ wildchar_end</label> </div> </div> <div> <p><span>_ ponderation_title</span><button data-scrutari-button="showModal" data-scrutari-target="help_ponderation" type="button" title="_ ponderation_help">?</button></p> <div> <label><input type="radio" name="ponderation" value="pertinence" checked> _ ponderation_pertinence</label> <label><input type="radio" name="ponderation" value="date"> _ ponderation_date</label> </div> </div> <div> <p><span>_ periode_title</span><button data-scrutari-button="showModal" data-scrutari-target="help_periode" type="button" title="_ periode_help">?</button></p> <div> <input type="text" name="periode" value="" size="20"> </div> </div> </div> </div> </details>',
'result-history':'<div class="scrutari-Hidden" data-scrutari-hidden="start"> <p class="scrutari-links-Title">_ title_history</p> <div data-scrutari-block="historyList"> </div> </div>',
'result-links':'<p class="scrutari-links-Title">_ title_share</p> <p class="scrutari-links-Permalink"> <a href="#" data-scrutari-link="permalink" target="_blank" title="_ link_permalink" > <span data-scrutari-label="permalinkValue"></span> </a> </p> <p class="scrutari-links-Title">_ title_download</p> <p> <a href="#" data-scrutari-link="ods" target="_blank" title="_ link_ods" class="scrutari-links-ButtonLike">ods</a> <a href="#" data-scrutari-link="csv" target="_blank" title="_ link_csv" class="scrutari-links-ButtonLike">csv</a> </p> <p class="scrutari-links-Title">_ title_feed</p> <p> <a href="#" data-scrutari-link="atom" target="_blank" title="_ link_atom" class="scrutari-links-ButtonLike">atom</a> </p>',
'result-poweredby':'<p class="scrutari-links-Poweredby"><a href="http://www.scrutari.net" target="_blank"><span class="scrutari-icon-Logo"></span> _ link_poweredby</a></p>',
'result-subsearch':'<form data-scrutari-form="subsearch"> <p class="scrutari-subsearch-Title">_ title_subsearch</p> <input type="search" size="40" name="q"> <button type="submit">_ button_subsearch</button> </form>',
'result-links':'<div class="scrutari-Hidden" data-scrutari-hidden="empty"> <p class="scrutari-links-Title">_ title_share</p> <p class="scrutari-links-Permalink"> <a href="#" data-scrutari-link="permalink" target="_blank" title="_ link_permalink" > <span data-scrutari-label="permalinkValue"></span> </a> </p> <p class="scrutari-links-Title">_ title_download</p> <p> <a href="#" data-scrutari-link="ods" target="_blank" title="_ link_ods" class="scrutari-links-ButtonLike">ods</a> <a href="#" data-scrutari-link="csv" target="_blank" title="_ link_csv" class="scrutari-links-ButtonLike">csv</a> </p> <p class="scrutari-links-Title">_ title_feed</p> <p> <a href="#" data-scrutari-link="atom" target="_blank" title="_ link_atom" class="scrutari-links-ButtonLike">atom</a> </p> </div>',
'result-subsearch':'<div class="scrutari-Hidden" data-scrutari-hidden="threshold"> <form data-scrutari-form="subsearch" role="search"> <p class="scrutari-subsearch-Title">_ title_subsearch</p> <div class="scrutari-subsearch-Form"> <input type="search" size="40" name="q"> <button type="submit">_ button_subsearch</button> </div> </form> </div>',
'stats-filter':'<tr class="scrutari-Hidden" data-scrutari-hidden="filter" data-scrutari-count="stats-filter"> <td class="scrutari-stats-Cell"><abbr class="scrutari-stats-Abbr" title="_ stats_filter_title">_ stats_filter_short</abbr></td> <td class="scrutari-stats-Cell scrutari-stats-Number"><span class="scrutari-stats-Count" data-scrutari-component="value"></span></td> <td class="scrutari-stats-Cell scrutari-stats-Titles"><span data-scrutari-component="titles"></span></td> </tr>',
'stats-global':'<tr class="scrutari-Hidden" data-scrutari-hidden="init" data-scrutari-count="stats-global"> <td class="scrutari-stats-Cell"><abbr class="scrutari-stats-Abbr" title="_ stats_global_title">_ stats_global_short</abbr></td> <td class="scrutari-stats-Cell scrutari-stats-Number"><span class="scrutari-stats-Count" data-scrutari-component="value"></span></td> </tr>',
'stats-result':'<tr class="scrutari-Hidden" data-scrutari-hidden="start" data-scrutari-count="stats-result"> <td class="scrutari-stats-Cell"><abbr class="scrutari-stats-Abbr" title="_ stats_result_title">_ stats_result_short</abbr></td> <td class="scrutari-stats-Cell scrutari-stats-Number"><span class="scrutari-stats-Count" data-scrutari-component="value"></span></td> </tr>',
@ -45,8 +45,8 @@ templates:{
'lang':' <p> <label class="scrutari-Label"><input type="checkbox" name="lang" value="{{:lang}}" data-scrutari-title="{{:lang}}"> <span data-scrutari-component="stat-text">{{> title}} [{{:lang}}] <small>(<span data-scrutari-stat-type="lang" data-scrutari-stat-key="{{:lang}}" data-scrutari-stat-default="{{:fiche}}"></span>{{:~scrutari_format(fiche)}})</small></span> </label> </p>',
'loading':'<span class="scrutari-icon-Loader"></span> {{>~scrutari_loc(\'_ loading_pagination\')}}',
'pagination_empty':'<p><em>{{>~scrutari_loc("_ result_none")}}</em></p> {{if withFilter}} <p><em>{{>~scrutari_loc("_ result_fitlerwarning")}}</em></p> {{else scrutariResult.searchMeta.reportArray.length > 0}} <p>Analyse des termes de la recherche{{>~scrutari_loc("_ colon")}}</p> <dl> {{for scrutariResult.searchMeta.reportArray}} <dt>{{> text}}</dt> <dl> {{if canonicalArray.length > 0}} <p>Correspondances trouvées (entre parenthèses, le nombre d\'occurrences par langue): </p> <ul> {{for canonicalArray}} <li> {{> canonical}} ({{for langreportArray}}{{if #index > 0}}, {{/if}}{{:lang}}={{:ficheCount}}{{/for}}) </li> {{/for}} </ul> {{/if}} {{if neighbourArray.length > 0}} <p>Pas de correspondances trouvées. Termes se rapprochant (entre parenthèses, le code des langues concernées) : </p> <ul> {{for neighbourArray}} <li> {{> neighbour}} <small>({{for langArray}}{{if #index > 0}}, {{/if}}{{:#data}}{{/for}})</small> </li> {{/for}} </ul> {{/if}} {{if canonicalArray.length == 0 && neighbourArray.length == 0}} <p>Aucune correspondance ou terme voisin trouvé</p> {{/if}} </dl> {{/for}} </dl> {{/if}}',
'pagination_groups':'<div class="scrutari-group-List" role="tablist"> {{for array}} <span role="tab" class="scrutari-group-Tab {{if active}}scrutari-On{{/if}}" data-scrutari-button="ficheGroupTab" {{if description}}title="{{>description}}"{{/if}} data-scrutari-target="{{:name}}"> {{>title}} ({{:fichestat}}) </span> {{/for}} </div> {{for array}} <div class="scrutari-group-Content {{if !active}}scrutari-Hidden{{/if}}" data-scrutari-block="ficheGroup-{{:name}}" data-scrutari-name="{{:name}}"> <div data-scrutari-block="topTabs-{{:name}}"></div> <div data-scrutari-block="ficheList-{{:name}}"></div> <div data-scrutari-block="bottomTabs-{{:name}}"></div> </div> {{/for}}',
'pagination_groups':'<div class="scrutari-group-List" role="tablist"> {{for array}} <button role="tab" class="scrutari-group-Tab" {{if active}}disabled{{/if}} data-scrutari-button="ficheGroupTab" {{if description}}title="{{>description}}"{{/if}} data-scrutari-target="{{:name}}"> {{>title}} ({{:fichestat}}) </button> {{/for}} </div> {{for array}} <div class="scrutari-group-Content {{if !active}}scrutari-Hidden{{/if}}" data-scrutari-block="ficheGroup-{{:name}}" data-scrutari-name="{{:name}}"> <div data-scrutari-block="topTabs-{{:name}}"></div> <div data-scrutari-block="ficheList-{{:name}}"></div> <div data-scrutari-block="bottomTabs-{{:name}}"></div> </div> {{/for}}',
'pagination_unique':'<div data-scrutari-block="topTabs"></div> <div data-scrutari-block="ficheList"></div> <div data-scrutari-block="bottomTabs"></div>',
'tabs':'<div class="scrutari-pagination-TabList"> {{for tabArray}} {{if state===\'active\'}} <span class="scrutari-pagination-Current">{{>title}}</span> {{else state===\'disabled\'}} <span class="scrutari-pagination-Disabled scrutari-Disabled">{{>title}}</span> {{else}} <span class="scrutari-pagination-Tab" data-scrutari-button="paginationTab" data-scrutari-type="{{:~root.type}}" data-scrutari-position="{{:~root.position}}" data-scrutari-number="{{:number}}" {{if ~root.ficheGroupName}} data-scrutari-fiche-group-name="{{:~root.ficheGroupName}}"{{/if}}>{{>title}}</span> {{/if}} {{/for}} </div>'
'tabs':'<div class="scrutari-pagination-TabList"> {{for tabArray}} {{if state===\'active\'}} <button class="scrutari-pagination-Tab" disabled>{{>title}}</button> {{else state===\'etc\'}} <span class="scrutari-pagination-Etc">{{>title}}</span> {{else}} <button class="scrutari-pagination-Tab" role="tab" data-scrutari-button="paginationTab" data-scrutari-type="{{:~root.type}}" data-scrutari-position="{{:~root.position}}" data-scrutari-number="{{:number}}" {{if ~root.ficheGroupName}} data-scrutari-fiche-group-name="{{:~root.ficheGroupName}}"{{/if}}>{{>title}}</button> {{/if}} {{/for}} </div>'
}
};

View File

@ -28,6 +28,17 @@ input[type="text"], input[type="search"] {
}
/*****************************************************
* .scrutari-area : Surcharge de classes Scrutari par défaut
******************************************************/
.scrutari-area-Poweredby {
font-size: 0.8em;
text-align: center;
margin-top: 20px;
padding-bottom: 10px;
}
/*****************************************************
* .scrutari-fiche : Surcharge de classes Scrutari par défaut
******************************************************/
@ -63,6 +74,9 @@ input[type="text"], input[type="search"] {
.scrutari-history-Block {
display: inline-block;
padding: 2px;
margin-top: 6px;
margin-left: 6px;
}
.scrutari-history-Load, .scrutari-history-Remove {
@ -74,6 +88,10 @@ input[type="text"], input[type="search"] {
text-rendering: geometricPrecision;
}
.scrutari-history-Subsearch {
margin-left: 10px;
}
/*****************************************************
* .scrutari-overlay : Surcharge de classes Scrutari par défaut
@ -100,6 +118,13 @@ input[type="text"], input[type="search"] {
}
.scrutari-overlay-button-Close {
position: absolute;
display: block;
top: -12.5px;
right: -12.5px;
display: block;
width: 30px;
height: 30px;
margin-right: 1.5rem;
margin-top: 1.5rem;
border-radius: 00;
@ -141,6 +166,21 @@ input[type="text"], input[type="search"] {
font-size: 1.1em;
}
.scrutari-pagination-Tab {
padding-left: 4px;
padding-right: 4px;
border: none;
background-color: transparent;
cursor: pointer;
color: #005184;
}
.scrutari-pagination-Tab:disabled {
cursor: auto;
background-color: #648bab;
color: #fff;
}
/*****************************************************
* .lav- : Classes spécifiques à la version

View File

@ -2,19 +2,21 @@
* .scrutari
******************************************************/
.scrutari-Hidden {
display: none !important;
.scrutari-Disabled {
color: grey;
}
.scrutari-Disabled {
color: grey;
.scrutari-Excluded {
text-decoration: line-through;
color: grey;
}
.scrutari-Hidden {
display: none !important;
}
.scrutari-Mark {
background-color: #e9e9e9;
}
.scrutari-On {
background-color: #e9e9e9;
}
@ -23,25 +25,25 @@ background-color: #e9e9e9;
******************************************************/
.scrutari-fiche-Attribute {
margin-left: 15px;
font-size: 1.0em;
margin-bottom: 2px;
margin-left: 15px;
font-size: 1.0em;
margin-bottom: 2px;
}
.scrutari-fiche-AttributeBlock {
margin-bottom: 2px;
margin-bottom: 2px;
}
.scrutari-fiche-AttributeTitle {
margin-left: 15px;
font-size: 1.0em;
margin-bottom: 0;
margin-left: 15px;
font-size: 1.0em;
margin-bottom: 0;
}
.scrutari-fiche-AttributeValue {
margin-left: 30px;
font-size: 1.0em;
margin-bottom: 0;
margin-left: 30px;
font-size: 1.0em;
margin-bottom: 0;
}
.scrutari-fiche-AttributeValues {
@ -57,107 +59,86 @@ margin-bottom: 0;
}
.scrutari-fiche-Block {
margin-bottom: 15px;
padding-left: 3px;
margin-bottom: 15px;
padding-left: 3px;
}
.scrutari-fiche-Body {
margin-left: 21px;
margin-left: 21px;
}
.scrutari-fiche-Body.scrutari-fiche-ThumbnailBody {
margin-left: 110px;
margin-left: 110px;
}
.scrutari-fiche-Body::after {
content: '';
display: block;
clear: left;
content: '';
display: block;
clear: left;
}
.scrutari-fiche-Complement {
margin-left: 15px;
font-size: 1.0em;
margin-bottom: 2px;
margin-left: 15px;
font-size: 1.0em;
margin-bottom: 2px;
}
.scrutari-fiche-Icon {
float: left;
margin-top: 0;
float: left;
margin-top: 0;
}
.scrutari-fiche-Motcle {
font-variant: small-caps;
font-size: 1.0em;
margin-left: 15px;
margin-bottom: 2px;
font-variant: small-caps;
font-size: 1.0em;
margin-left: 15px;
margin-bottom: 2px;
}
.scrutari-fiche-Soustitre {
margin-bottom: 3px;
font-style: italic;
margin-left: 10px;
margin-bottom: 3px;
font-style: italic;
margin-left: 10px;
}
.scrutari-fiche-Thumbnail {
float: left;
margin-top: 0;
position: relative;
float: left;
margin-top: 0;
position: relative;
}
.scrutari-fiche-ThumbnailImg {
max-width: 100px;
max-width: 100px;
}
.scrutari-fiche-ThumbnailIcon {
display: block;
position: absolute;
top: 0;
left: 0;
border-right-color: #fff;
border-right-style: solid;
border-right-width: 3px;
border-bottom-color: #fff;
border-bottom-style: solid;
border-bottom-width: 2px;
background-color: #fff;
border-bottom-right-radius: 2px;
z-index: 100;
display: block;
position: absolute;
top: 0;
left: 0;
border-right-color: #fff;
border-right-style: solid;
border-right-width: 3px;
border-bottom-color: #fff;
border-bottom-style: solid;
border-bottom-width: 2px;
background-color: #fff;
border-bottom-right-radius: 2px;
z-index: 100;
}
.scrutari-fiche-Titre {
font-size: 1.1em;
margin-bottom: 4px;
margin-left: 0;
margin-top: 0;
font-size: 1.1em;
margin-bottom: 4px;
margin-left: 0;
margin-top: 0;
}
.scrutari-fiche-Year {
font-size: 1.0em;
margin-bottom: 3px;
font-style: italic;
margin-left: 15px;
}
/*****************************************************
* .scrutari-group
******************************************************/
.scrutari-group-Tab {
display: inline-block;
padding-left: 4px;
padding-right: 4px;
cursor: pointer;
}
.scrutari-group-Tab:hover {
background-color: #e9e9e9;
}
.scrutari-group-Tab.scrutari-On {
cursor: auto;
background-color: #e9e9e9;
font-size: 1.0em;
margin-bottom: 3px;
font-style: italic;
margin-left: 15px;
}
@ -166,51 +147,33 @@ background-color: #e9e9e9;
******************************************************/
.scrutari-history-Active {
background-color: #e9e9e9;
background-color: #e9e9e9;
}
.scrutari-history-Block {
padding: 2px;
margin-top: 6px;
margin-left: 6px;
word-wrap: break-word;
word-wrap: break-word;
}
.scrutari-history-Load {
}
.scrutari-history-Remove {
}
.scrutari-history-Search {
}
.scrutari-history-Subsearch {
margin-left: 10px;
}
/*****************************************************
* .scrutari-icon
******************************************************/
.scrutari-icon-Loader {
background-image: url("images/ajax-loader.gif");
position: relative;
display: inline-block;
width: 16px;
height: 16px;
background-image: url("images/ajax-loader.gif");
position: relative;
display: inline-block;
width: 16px;
height: 16px;
}
.scrutari-icon-Logo {
background-image: url("images/logo-scrutari.png");
position: relative;
bottom: -10px;
display: inline-block;
width: 32px;
height: 32px;
background-image: url("images/logo-scrutari.png");
position: relative;
bottom: -10px;
display: inline-block;
width: 32px;
height: 32px;
}
@ -219,16 +182,16 @@ height: 32px;
******************************************************/
.scrutari-label-Attribute {
font-style: italic;
font-style: italic;
}
.scrutari-label-Complement {
font-style: italic;
font-style: italic;
}
.scrutari-label-Motcle {
font-style: italic;
font-variant: normal;
font-style: italic;
font-variant: normal;
}
@ -236,76 +199,15 @@ font-variant: normal;
* .scrutari-links
******************************************************/
.scrutari-links-ButtonLike {
display: inline-block;
padding-top: 2px;
padding-right: 5px;
padding-left: 5px;
border-radius: 3px;
border-style: solid;
border-width: 1px;
border-color: #a0a0a0;
margin-right: 5px;
color: #515151;
}
.scrutari-links-ButtonLike:visited {
color: #515151;
}
.scrutari-links-ButtonLike:hover {
background-color: #dfdfdf;
color: #515151;
text-decoration: none;
}
.scrutari-links-Permalink {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.scrutari-links-Permalink:hover {
white-space: normal;
overflow-wrap: break-word;
}
.scrutari-links-Poweredby {
font-size: 0.8em;
text-align: center;
margin-top: 20px;
}
.scrutari-links-Title {
margin-top: 20px;
margin-bottom: 5px;
word-wrap: break-word;
font-weight: bold;
}
/*****************************************************
* .scrutari-pagination
******************************************************/
.scrutari-pagination-TabList {
margin-top: 15px;
margin-bottom: 15px;
}
.scrutari-pagination-Tab, .scrutari-pagination-Current, .scrutari-pagination-Disabled {
display: inline-block;
padding-left: 4px;
padding-right: 4px;
}
.scrutari-pagination-Tab {
cursor: pointer;
}
.scrutari-pagination-Current, .scrutari-pagination-Tab:hover {
background-color: #e9e9e9;
white-space: normal;
overflow-wrap: break-word;
}
@ -314,20 +216,15 @@ background-color: #e9e9e9;
******************************************************/
.scrutari-panel-Active {
color: green;
color: green;
}
.scrutari-panel-ColumnDisabled {
opacity: 0.5;
}
.scrutari-panel-Excluded {
text-decoration: line-through;
color: grey;
.scrutari-panel-Columns.scrutari-Disabled {
opacity: 0.5;
}
.scrutari-panel-Icon {
vertical-align: baseline;
vertical-align: baseline;
}
@ -344,7 +241,6 @@ vertical-align: baseline;
padding: 20px;
box-sizing: border-box;
background-color: rgba(0,0,0, 0.75);
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
@ -352,41 +248,21 @@ vertical-align: baseline;
}
.scrutari-overlay-Component_content {
padding: 10px 20px;
text-align: left;
font-size: 90%;
min-width: 20vw;
max-width: 90vw;
max-height: 70vh;
overflow: auto;
background-color: #fff;
}
.scrutari-overlay-Component_dialog {
position: relative;
box-sizing: border-box;
background: #fff;
background-color: #fff;
box-shadow: 0 0 10px #000;
text-align: left;
}
.scrutari-overlay-Component_footer {
clear: both;
padding-bottom: 8px;
padding-top: 8px;
padding-left: 10px;
padding-right: 10px;
text-align: right;
}
.scrutari-overlay-Component_header {
text-align: left;
font-size: large;
min-height: 10px;
padding-top: 20px;
padding-bottom: 20px;
padding-left: 10px;
padding-right: 10px;
}
.scrutari-overlay-Waiting {
@ -394,91 +270,26 @@ vertical-align: baseline;
}
/*******************************************************************************
* .overlay-button-
*******************************************************************************/
.scrutari-overlay-button-Close {
position: absolute;
top: -12.5px;
right: -12.5px;
display: block;
width: 30px;
height: 30px;
border-radius: 15px;
border: none;
font-size: 20px;
background-color: #000;
color: #fff;
}
.scrutari-overlay-button-Close:hover {
background-color: #ddd;
}
/*****************************************************
* .scrutari-stats
******************************************************/
.scrutari-stats-Table {
margin-bottom: 5px;
}
.scrutari-stats-Abbr {
text-decoration: none;
}
.scrutari-stats-Count {
font-family: monospace;
font-weight: bold;
text-align: right;
text-decoration: none;
}
.scrutari-stats-Filter {
color: green;
color: green;
}
.scrutari-stats-None {
color: red;
}
.scrutari-stats-Titles {
font-size: 0.9em;
padding-left: 10px;
color: red;
}
.scrutari-stats-Cell {
vertical-align: baseline;
vertical-align: baseline;
}
.scrutari-stats-Number {
text-align: right;
padding-left: 10px;
padding-right: 3px;
}
/*****************************************************
* .scrutari-subsearch
******************************************************/
.scrutari-subsearch-Title {
margin-top: 0;
margin-bottom: 0;
}
.scrutari-subsearch-Form {
margin-top: 0;
margin-bottom: 25px;
}
/*****************************************************
* .scrutari-title
******************************************************/
.scrutari-title-Main {
font-size: 1.3em;
margin-top: 20px;
margin-bottom: 10px;
text-align: right;
}

View File

@ -1,4 +1,4 @@
/* version: 4198 */
/* version: 4209 */
var Scrutari = {};
Scrutari.log = function (msg) {
if ((console) && (console.log)) {
@ -1092,7 +1092,7 @@ Scrutari.Utils.getTabArray = function (ficheCount, paginationLength, currentPagi
result.push({
number: 0,
title: "…",
state: 'disabled'
state: 'etc'
});
}
for(var i = paginationNumberStart; i <= paginationNumberEnd; i++) {
@ -1110,7 +1110,7 @@ Scrutari.Utils.getTabArray = function (ficheCount, paginationLength, currentPagi
result.push({
number: 0,
title: "…",
state: 'disabled'
state: 'etc'
});
}
return result;
@ -1985,7 +1985,12 @@ Scrutari.History.prototype.setCurrentResult = function (scrutariResult, searchOr
fichestat: scrutariResult.getFicheCount(),
sequence: Scrutari.Utils.formatSearchSequence(client, scrutariResult)
};
$historyListBlock.prepend(client.render("history", contextObj));
let html = client.render("history", contextObj);
if (client.options.historyAtLast) {
$historyListBlock.append(html);
} else {
$historyListBlock.prepend(html);
}
}
};
Scrutari.History.prototype.removeHistory = function (historyName) {
@ -2056,6 +2061,7 @@ Scrutari.Client = function (scrutariConfig, clientId) {
ignoreThumbnail: false,
ficheBodyList: null,
mainTitle: null,
historyAtLast: false,
hooks: {},
functions: {
uiInit: null
@ -2079,15 +2085,14 @@ Scrutari.Client = function (scrutariConfig, clientId) {
};
this.cssClasses = {
disabled: "scrutari-Disabled",
excluded: "scrutari-Excluded",
hidden: "scrutari-Hidden",
mark: "scrutari-Mark",
on: "scrutari-On",
activeHistory: "scrutari-history-Active",
activePanel: "scrutari-panel-Active",
excludedPanel: "scrutari-panel-Excluded",
filterStat: "scrutari-stats-Filter",
noneStat: "scrutari-stats-None",
disabledPanelColumn: "scrutari-panel-ColumnDisabled"
noneStat: "scrutari-stats-None"
};
this._locInstance = new Scrutari.Loc();
this._ignoreArray = new Array();
@ -2246,9 +2251,6 @@ Scrutari.Client.prototype.$count = function (name, action, value) {
Scrutari.Client.prototype.$form = function (name) {
return this.$({scrutariForm: name});
};
Scrutari.Client.prototype.$group = function (name) {
return this.$({scrutariGroup: name});
};
Scrutari.Client.prototype.$hidden = function (name, action) {
var $hidden = this.$({scrutariHidden: name});
if (action) {
@ -2447,13 +2449,6 @@ Scrutari.Client.prototype.initButtons = function (actionHandler) {
case 'clearHistory':
client.history.clear();
break;
case 'toggleBlock':
if (Scrutari.Utils.toggle($(button), "scrutariState") === 'on') {
client.show(client.$block(target));
} else {
client.hide(client.$block(target));
}
break;
case 'ficheGroupTab':
_ficheGroupTab(target);
break;
@ -2481,12 +2476,7 @@ Scrutari.Client.prototype.initButtons = function (actionHandler) {
}
});
client.$button("ficheGroupTab").each(function (index, element) {
let onClass = client.cssClasses.on;
if (element.dataset.scrutariTarget === target) {
element.classList.add(onClass);
} else {
element.classList.remove(onClass);
}
element.disabled = (element.dataset.scrutariTarget === target);
});
}
function _paginationTab (button) {
@ -3093,28 +3083,24 @@ Scrutari.DefaultUi.init = function (client) {
if (langSortFunction) {
langArray = langArray.sort(langSortFunction);
}
Scrutari.Utils.divideIntoColumns(langArray, client.$group("langColumns"), client.getTemplate("lang"));
client.$panel('lang', 'show');
Scrutari.DefaultUi.initColumns(client, langArray,"lang");
}
if ((scrutariMeta.withCategory()) && (Scrutari.exists(client.$panel('category')))) {
var categoryArray = scrutariMeta.getCategoryArray(Scrutari.Utils.getCategorySortFunction(client.options.categorySort, locales));
Scrutari.Utils.divideIntoColumns(categoryArray, client.$group("categoryColumns"), client.getTemplate("category"));
client.$panel('category', 'show');
Scrutari.DefaultUi.initColumns(client, categoryArray, "category");
}
if (client.options.withCorpus) {
if (Scrutari.exists(client.$panel('corpus'))) {
var corpusArray = scrutariMeta.getCorpusArray(Scrutari.Utils.getCorpusSortFunction(client.options.corpusSort, locales));
if (corpusArray.length > 1) {
Scrutari.Utils.divideIntoColumns(corpusArray, client.$group("corpusColumns"), client.getTemplate("corpus"));
client.$panel('corpus', 'show');
Scrutari.DefaultUi.initColumns(client, corpusArray, "corpus");
}
}
} else {
if (Scrutari.exists(client.$panel('base'))) {
var baseArray = scrutariMeta.getBaseArray(Scrutari.Utils.getBaseSortFunction(client.options.baseSort, locales));
if (baseArray.length > 1) {
Scrutari.Utils.divideIntoColumns(baseArray, client.$group("baseColumns"), client.getTemplate("base"));
client.$panel('base', 'show');
Scrutari.DefaultUi.initColumns(client, baseArray, "base");
}
}
}
@ -3270,7 +3256,7 @@ Scrutari.DefaultUi.actionHandler = function (client, button, action, target) {
var state = Scrutari.Utils.toggle($button, "scrutariState");
_enableChekButtons();
Scrutari.Utils.toggle.classes($button, state, client.cssClasses.on, "");
Scrutari.Utils.toggle.classes(client.$group(target + "Columns"), state, "", client.cssClasses.disabledPanelColumn);
Scrutari.Utils.toggle.classes(client.$block("columnsBlock", target), state, "", client.cssClasses.disabled);
Scrutari.Utils.toggle.text($button.children("span"), "scrutariAlternate");
var $filterLabel = client.$label(target + "Filter");
Scrutari.Utils.toggle.text($filterLabel, "scrutariAlternate");
@ -3343,6 +3329,10 @@ Scrutari.DefaultUi.initFilter = function (client, target, checkedArray) {
client.$button("enablePanel", target).click();
}
};
Scrutari.DefaultUi.initColumns = function (client, array, name) {
Scrutari.Utils.divideIntoColumns(array, client.$block("columnsBlock", name).children("div"), client.getTemplate(name));
client.$panel(name, 'show');
};
Scrutari.DefaultUi.filterChange = function (client) {
var globalFicheCount = client.scrutariMeta.getGlobalFicheCount();
var filterState = client.buildFilterState();
@ -3408,18 +3398,18 @@ Scrutari.DefaultUi.filterChange = function (client) {
var key = element.dataset.scrutariStatKey;
var ficheCount = client.stats.getFicheCount(type, key);
var $statTitle = Scrutari.$parents($el, {scrutariComponent: "stat-text"});
let excludedPanelClass = client.cssClasses.excludedPanel;
let excludedClass = client.cssClasses.excluded;
if (ficheCount != element.dataset.scrutariStatDefault) {
if (ficheCount === 0) {
$el.html("");
$statTitle.addClass(excludedPanelClass);
$statTitle.addClass(excludedClass);
} else {
$statTitle.removeClass(excludedPanelClass);
$statTitle.removeClass(excludedClass);
$el.html(client.formatNumber(ficheCount) + " / ");
}
} else {
$el.html("");
$statTitle.removeClass(excludedPanelClass);
$statTitle.removeClass(excludedClass);
}
});
}