Commit 61de935d authored by Vincent Calame's avatar Vincent Calame

Prise en compte du nouveau traitement de framework.css

parent e656fc62
......@@ -93,7 +93,7 @@ function initFramework() {
$framework = 'bootstrap3';
if (isset($_REQUEST['framework'])) {
switch($_REQUEST['framework']) {
case 'standalone':
case 'none':
case 'bootstrap3':
case 'bootstrap2':
$framework = $_REQUEST['framework'];
......@@ -127,7 +127,7 @@ function initEngineOptions() {
}
if (!array_key_exists("css-links", $engineArray)) {
$GLOBALS['scrutari']['engine']['css-links'] = array("static/scrutarijs/scrutarijs.css");
$GLOBALS['scrutari']['engine']['css-links'] = array();
}
if (!array_key_exists("js-links", $engineArray)) {
$GLOBALS['scrutari']['engine']['js-links'] = array();;
......
......@@ -169,6 +169,9 @@ function escapeQuote($value) {
<link rel="stylesheet" href="static/bootstrap/2.3.2/css/bootstrap-responsive.min.css">
<?php } ?>
<?php
$scrutarijsCssPath = "";
$frameworkCssPath = "";
$themeCssPath = "";
if ($GLOBALS['scrutari']['dev']) {
$devPath = $GLOBALS['scrutari']['conf']['dev-path'];
$list = file($devPath.'list.txt');
......@@ -179,10 +182,24 @@ if ($GLOBALS['scrutari']['dev']) {
echo '<script src="'.$devPath.'src/js/'.$jsfile.'"></script>'."\n";
}
}
echo '<script src="'.$devPath.'src/frameworks/'.$GLOBALS['scrutari']['framework'].'/init.js"></script>'."\n";
$scrutarijsCssPath = $devPath.'src/css/scrutarijs.css';
$frameworkCssPath = $devPath.'src/frameworks/'.$GLOBALS['scrutari']['framework'].'/resources/framework.css';
$themeCssPath = $devPath.'src/frameworks/'.$GLOBALS['scrutari']['framework'].'/resources/theme.css';
} else {
echo '<script src="static/scrutarijs/scrutarijs.js"></script>';
echo "\n".'<script src="static/scrutarijs/l10n/'.$GLOBALS['scrutari']['l10n'].'.js"></script>';
echo "\n".'<script src="static/scrutarijs/frameworks/'.$GLOBALS['scrutari']['framework'].'.js"></script>';
$scrutarijsCssPath = 'static/scrutarijs/scrutarijs.css';
$frameworkCssPath = 'static/scrutarijs/frameworks/'.$GLOBALS['scrutari']['framework'].'/framework.css';
$themeCssPath = 'static/scrutarijs/frameworks/'.$GLOBALS['scrutari']['framework'].'/theme.css';
}
echo '<link rel="stylesheet" href="'.$scrutarijsCssPath.'">'."\n";
if (file_exists($frameworkCssPath)) {
echo '<link rel="stylesheet" href="'.$frameworkCssPath.'">'."\n";
}
if (file_exists($themeCssPath)) {
echo '<link rel="stylesheet" href="'.$themeCssPath.'">'."\n";
}
$count = count($GLOBALS['scrutari']['engine']['js-links']);
for($i = 0; $i < $count; $i++) {
......@@ -190,13 +207,7 @@ for($i = 0; $i < $count; $i++) {
}
$count = count($GLOBALS['scrutari']['engine']['css-links']);
for($i = 0; $i < $count; $i++) {
$cssLink = $GLOBALS['scrutari']['engine']['css-links'][$i];
if ($GLOBALS['scrutari']['dev']) {
if ($cssLink == "static/scrutarijs/scrutarijs.css") {
$cssLink = $GLOBALS['scrutari']['conf']['dev-path']."src/css/scrutarijs.css";
}
}
echo '<link rel="stylesheet" href="'.$cssLink.'">'."\n";
echo '<link rel="stylesheet" href="'.$GLOBALS['scrutari']['engine']['css-links'][$i].'">'."\n";
}
?>
<script>
......@@ -248,7 +259,7 @@ for($i = 0; $i < $count; $i++) {
var scrutariConfig = new Scrutari.Config("<?php echo $GLOBALS['scrutari']['engine']['name'];?>","<?php echo $GLOBALS['scrutari']['engine']['url'];?>", "<?php echo $GLOBALS['scrutari']['lang'];?>", "<?php echo $GLOBALS['scrutari']['origin'];?>", {<?php
addEngineOption('fiche-fields', 'ficheFields');
?>"":""});
Scrutari.Client.init(scrutariConfig, "mainContainer", {<?php
Scrutari.Client.init(scrutariConfig, "scrutariClient", {<?php
if (array_key_exists('with-corpus', $GLOBALS['scrutari']['engine'])) {
echo "\n ".'withCorpus'.': '.booleanToString($GLOBALS['scrutari']['engine']['with-corpus']).',';
}
......@@ -281,6 +292,11 @@ for($i = 0; $i < $count; $i++) {
.scrutaristandalone-CurrentFicheBlock {
background-color: #e9e9e9;
}
.scrutaristandalone-Client {
max-width: 1170px;
margin: auto;
}
</style>
<?php
$customFile = "custom/".$GLOBALS['scrutari']['engine']['name'].".php";
......@@ -290,7 +306,16 @@ if (file_exists($customFile)) {
?>
</head>
<body>
<div class="container" id="mainContainer">
<?php
$scrutariClientClass = "scrutaristandalone-Client";
switch($GLOBALS['scrutari']['framework']) {
case 'bootstrap3':
case 'bootstrap2':
$scrutariClientClass = "container";
}
?>
<div class="<?php echo $scrutariClientClass; ?>" id="scrutariClient">
</div>
</body>
</html>
.scrutari-panel-Title > .scrutari-Disabled {
color: grey;
}
.scrutari-panel-Title > .scrutari-panel-Active {
color: green;
}
......@@ -2,12 +2,9 @@ var SCRUTARI_HTML = {
_name:'bootstrap2',
structure:{
'area-input':'<div data-scrutari-area="input"> <div class="row-fluid"> <div class="span9"> <div class="input-append"> <input type="text" class="scrutari-input-Text search search-query" size="60" name="q" value=""> <input class="btn" type="submit" value="_ button_submit"> </div> </div> <div class="span3"> <button type="button" data-scrutari-button="parametersDisplay" class="scrutari-button-Parameters scrutari-Hidden btn btn-primary" data-toggle="button" data-scrutari-state="off"> <span class="icon-cog icon-white"></span> <span>_ button_parameters</span> </button> </div> </div> </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>',
'area-result':'<div data-scrutari-area="result" class="scrutari-area-Result"> <div class="row-fluid"> <div class="span12" data-scrutari-block="ficheDisplay"> </div> </div> <div class="row-fluid"> <div class="span7"> <div class="scrutari-Hidden" data-scrutari-hidden="empty"> {{result-share}} {{result-export}} {{result-subsearch}} </div> </div> <div class="span4 offset1"> {{result-history}} </div> </div> <div class="row-fluid scrutari-Hidden" data-scrutari-hidden="empty"> <div class="span12"> {{result-poweredby}} </div> </div> </div> ',
'area-stats':'<div data-scrutari-area="stats" class="scrutari-area-Stats"> <div class="row-fluid"> <div class="span12"> {{stats-global}} <span class="scrutari-Hidden" data-scrutari-hidden="filter"> &nbsp; | &nbsp; </span> {{stats-filter}} <span class="scrutari-Hidden" data-scrutari-hidden="start"> &nbsp; | &nbsp; </span> {{stats-result}} </div> </div> </div> ',
'area-title':'<div data-scrutari-area="title" class="scrutari-area-Title"> <div class="row-fluid"> <div class="span12"> <p class="scrutari-title-Main" data-scrutari-title="main"></p> </div> </div> </div> ',
'main-form':'<form data-scrutari-form="mainsearch"> {{area-input}} {{area-parameters}} </form>',
'main':'{{area-title}} {{main-form}} {{area-stats}} {{area-result}} {{modal-loading}} {{modal-help_mode}} {{modal-help_ponderation}} {{modal-help_periode}}',
'modal-help_mode':'<div class="modal hide fade" data-scrutari-modal="help_mode" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <p class="modal-title scrutari-modal-Title">_ mode_help</p> <div class="modal-body">_ help_mode.html</div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">_ button_close</button> </div> </div> </div> </div> </div> ',
'modal-help_periode':'<div class="modal hide fade" data-scrutari-modal="help_periode" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <p class="modal-title scrutari-modal-Title">_ periode_help</p> <div class="modal-body">_ help_periode.html</div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">_ button_close</button> </div> </div> </div> </div> </div>',
'modal-help_ponderation':'<div class="modal hide fade" data-scrutari-modal="help_ponderation" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <p class="modal-title scrutari-modal-Title">_ ponderation_help</p> <div class="modal-body">_ help_ponderation.html</div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">_ button_close</button> </div> </div> </div> </div> </div>',
......@@ -18,6 +15,9 @@ structure:{
'panel-lang':'<div class="panel panel-default scrutari-panel-Div scrutari-Hidden" data-scrutari-panel="lang"> <div class="panel-heading scrutari-panel-Heading"> <h4 class="panel-title scrutari-panel-Title" style="cursor: pointer;" data-toggle="collapse" data-target="[data-scrutari-block=\'langPanelBody\']"> <span class="icon-filter"></span> _ title_filter_lang <span data-scrutari-label="langFilter" class="small scrutari-Disabled" data-scrutari-alternate="_ filter_on">_ filter_off</span> </h4> </div> <div class="panel-body scrutari-panel-WithTools collapse" data-scrutari-block="langPanelBody"> <div class="row-fluid"> <div class="span12"> <div class="btn-toolbar"> <div class="btn-group btn-group-sm"> <button type="button" data-scrutari-button="langEnable" class="btn btn-primary" data-toggle="button" data-scrutari-state="off"> <span data-scrutari-alternate="_ button_filter_off">_ button_filter_on</span> </button> </div> <div class="btn-group btn-group-sm"> <button type="button" data-scrutari-button="langCheckAll" class="btn btn-primary" disabled>_ button_check_all</button> <button type="button" data-scrutari-button="langUncheckAll" class="btn btn-primary" disabled>_ button_uncheck_all</button> </div> </div> </div> </div> <div class="row-fluid"> <div class="span4 scrutari-Disabled" data-scrutari-group="langColumns"></div> <div class="span4 scrutari-Disabled" data-scrutari-group="langColumns"></div> <div class="span4 scrutari-Disabled" data-scrutari-group="langColumns"></div> <div class="span4 scrutari-Disabled" data-scrutari-group="langColumns"></div> </div> </div> </div>',
'panel-options':'<div class="panel panel-default scrutari-panel-Div" data-scrutari-panel="options"> <div class="panel-heading scrutari-panel-Heading"> <h4 class="panel-title scrutari-panel-Title" style="cursor: pointer;" data-toggle="collapse" data-target="[data-scrutari-block=\'optionsPanelBody\']"> <span class="icon-wrench"></span> _ title_options </h4> </div> <div class="panel-body collapse" data-scrutari-block="optionsPanelBody"> <div class="row-fluid"> <div class="span4"> <p>_ mode_title<br/><button data-scrutari-button="modeHelp" type="button" class="btn btn-primary btn-xs" title="_ mode_help"><span class="icon-question-sign icon-white"></span></button></p> <p><label class="scrutari-Label"><input type="radio" name="q-mode" value="intersection" checked> _ mode_intersection</label></p> <p><label class="scrutari-Label"><input type="radio" name="q-mode" value="union"> _ mode_union</label></p> <p><label class="scrutari-Label"><input type="radio" name="q-mode" value="operation"> _ mode_operation</label></p> <p><label class="scrutari-Label"><input type="checkbox" name="wildchar" value="end" checked> _ wildchar_end</label></p> </div> <div class="span4"> <p>_ ponderation_title<br/><button data-scrutari-button="ponderationHelp" type="button" class="btn btn-primary btn-xs" title="_ ponderation_help"><span class="icon-question-sign icon-white"></span></button></p> <p><label class="scrutari-Label"><input type="radio" name="ponderation" value="pertinence" checked> _ ponderation_pertinence</label></p> <p><label class="scrutari-Label"><input type="radio" name="ponderation" value="date"> _ ponderation_date</label></p> </div> <div class="span4"> <p>_ periode_title<br/><button data-scrutari-button="periodeHelp" type="button" class="btn btn-primary btn-xs" title="_ periode_help"><span class="icon-question-sign icon-white"></span></button></p> <p><input type="text" class="scrutari-input-Text" name="periode" value="" size="20"></p> </div> </div> </div> </div> ',
'result-subsearch':'<form data-scrutari-form="subsearch"> <p class="scrutari-links-Title">_ title_subquery_1<span data-scrutari-block="currentSearchSequence"></span>_ title_subquery_2</p> <div class="input-append"> <input type="text" class="search search-query scrutari-input-Text" size="20" name="q"> <input class="btn" type="submit" value="_ button_submit"> </div> </form>',
'area-parameters':'<div data-scrutari-area="parameters" class="scrutari-area-Parameters scrutari-Hidden"> {{panel-options}} {{panel-corpus}} {{panel-base}} {{panel-lang}} {{panel-category}} </div>',
'main-form':'<form data-scrutari-form="mainsearch"> {{area-input}} {{area-parameters}} </form>',
'main':'{{area-title}} {{main-form}} {{area-stats}} {{area-result}} {{modal-loading}} {{modal-help_mode}} {{modal-help_ponderation}} {{modal-help_periode}}',
'result-export':'<p class="scrutari-links-Title">_ links</p> <p class="scrutari-export-Ods"><a href="#" data-scrutari-link="ods" target="_blank">_ link_ods</a></p> <p class="scrutari-export-Atom"><a href="#" data-scrutari-link="atom" target="_blank">_ link_atom</a></p> ',
'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-poweredby':'<p class="scrutari-links-Poweredby"><a href="http://www.scrutari.net" target="_blank"><span class="scrutari-icon-Logo"></span> _ link_poweredby</a></p>',
......@@ -29,11 +29,11 @@ structure:{
templates:{
'categoryfichedisplay':'<ul class="nav nav-tabs" role="tablist"> {{for array}} <li class="{{if active}}active{{/if}}"> <a role="tab" data-toggle="tab" {{if category.phraseMap.description}}title="{{>category.phraseMap.description}}"{{/if}} href="javascript:load_category_{{:category.name}}" data-target="[data-scrutari-block=\'category_{{:category.name}}\']"> {{>category.title}} ({{:fichestat}}) </a> </li> {{/for}} </ul> <div class="tab-content"> {{for array}} <div class="tab-pane{{if active}} active{{/if}}" data-scrutari-block="category_{{:category.name}}"> <div data-scrutari-block="topPagination_{{:category.name}}"></div> <div data-scrutari-block="fiches_{{:category.name}}"></div> <div data-scrutari-block="bottomPagination_{{:category.name}}"></div> </div> {{/for}} </div>',
'history':'<div data-scrutari-block="{{:name}}" class="scrutari-history-Block scrutari-history-Active"> <button type="button" data-scrutari-role="remove" data-scrutari-button="removeHistory" data-scrutari-history-name="{{:name}}" class="close scrutari-Hidden" title="{{>~scrutari_loc(\'_ button_remove\')}}"><span aria-hidden="true">&times;</span><span class="sr-only">{{>~scrutari_loc("_ button_remove")}}</span></button> {{if fichestat > 0}}<a href="javascript:load_{{:name}}" data-scrutari-button="loadHistory" data-scrutari-history-name="{{:name}}">{{/if}} {{>sequence}} ({{:fichestat}}) {{if fichestat > 0}}</a>{{/if}} <br/><span data-scrutari-role="subsearch"></span> </div> ',
'tabs':'<div class="pagination"> <ul class="scrutari-result-Pagination"> {{for tabArray}} {{if state===\'active\'}} <li class="active"><span>{{>title}}</span></li> {{else state===\'disabled\'}} <li class="disabled"><span>{{>title}}</span></li> {{else}} <li><a href="javascript:load_tab_{{:number}}" data-scrutari-button="ficheTab" data-scrutari-type="{{:~root.type}}" data-scrutari-position="{{:~root.position}}" data-scrutari-number="{{:number}}" {{if ~root.category}} data-scrutari-category="{{:~root.category}}"{{/if}}>{{>title}}</a></li> {{/if}} {{/for}} </ul> </div>',
'tabs':'<div class="pagination"> <ul class="scrutari-pagination-List"> {{for tabArray}} {{if state===\'active\'}} <li class="active"><span>{{>title}}</span></li> {{else state===\'disabled\'}} <li class="disabled"><span>{{>title}}</span></li> {{else}} <li><a href="javascript:load_tab_{{:number}}" data-scrutari-button="ficheTab" data-scrutari-type="{{:~root.type}}" data-scrutari-position="{{:~root.position}}" data-scrutari-number="{{:number}}" {{if ~root.category}} data-scrutari-category="{{:~root.category}}"{{/if}}>{{>title}}</a></li> {{/if}} {{/for}} </ul> </div>',
'base':' <p> <label class="scrutari-Label" {{if phraseMap.longtitle}}title="{{>phraseMap.longtitle}}"{{/if}}><input type="checkbox" name="base" value="{{:codebase}}"> {{if baseicon}} <img src="{{:baseicon}}" alt="" class="scrutari-panel-Icon"> {{/if}} {{>title}} ({{:~scrutari_format(stats.fiche)}}) </label> </p>',
'category':' <p> <label class="scrutari-Label" {{if phraseMap.description}}title="{{>phraseMap.description}}"{{/if}}> <input type="checkbox" name="category" value="{{:name}}"> {{>title}} ({{:~scrutari_format(stats.fiche)}}) </label> </p>',
'corpus':' <p> <label class="scrutari-Label"><input type="checkbox" name="corpus" value="{{:codecorpus}}"> {{>title}} ({{:~scrutari_format(stats.fiche)}}) </label> </p>',
'emptyfichedisplay':'<em>{{>~scrutari_loc("_ result_none")}}</em>',
'emptyfichedisplay':'<p><em>{{>~scrutari_loc("_ result_none")}}</em></p> {{if 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}}',
'fiche':' <div class="scrutari-fiche-Block" data-scrutari-block="fiche_{{:codefiche}}"> {{if _thumbnail}} <div class="scrutari-fiche-Thumbnail"> <img class="scrutari-fiche-ThumbnailImg" alt="" src="{{:_thumbnail}}"/> {{if _icon}} <img class="scrutari-fiche-ThumbnailIcon" alt="" src="{{:_icon}}"/> {{/if}} </div> {{else _icon}} <div class="scrutari-fiche-Icon"><img alt="" src="{{:_icon}}"/></div> {{/if}} <div class="scrutari-fiche-Body {{if _thumbnail}}scrutari-fiche-ThumbnailBody{{/if}}"> <p class="scrutari-fiche-Titre"> <a href="{{:href}}" class="scrutari-fiche-Link" data-scrutari-link="fiche_{{:codefiche}}" {{if _target}} target="{{:_target}}"{{/if}}> {{if mtitre}} {{:~scrutari_mark(mtitre)}} {{else}} {{:href}} {{/if}} </a> </p> {{if msoustitre}} <p class="scrutari-fiche-Soustitre"> {{:~scrutari_mark(msoustitre)}} </p> {{/if}} {{if year}} <p class="scrutari-fiche-Year"> {{:year}} </p> {{/if}} {{if _primaryAttributeArray}} {{for _primaryAttributeArray tmpl="scrutari-fiche_attributes" /}} {{/if}} {{if mcomplementArray}} {{for mcomplementArray}} <p class="scrutari-fiche-Complement"> <span class="scrutari-label-Complement"> {{>title}} {{>~scrutari_loc("_ colon")}} </span> {{:~scrutari_mark(mvalue)}} </p> {{/for}} {{/if}} {{if _secondaryAttributeArray}} {{for _secondaryAttributeArray tmpl="scrutari-fiche_attributes" /}} {{/if}} {{if _motcleArray}} <p class="scrutari-fiche-Motcle"> <span class="scrutari-label-Motcle"> {{if _motcleArray.length == 1}} {{>~scrutari_loc("_ fiche_motscles_one")}} {{else}} {{>~scrutari_loc("_ fiche_motscles_many")}} {{/if}} </span> {{for _motcleArray ~len=_motcleArray.length}} {{if mlabelArray}}{{for mlabelArray}}{{if #index > 0}}/{{/if}}{{:~scrutari_mark(mvalue)}}{{/for}}{{/if}}{{if #index != (~len -1)}}, {{/if}} {{/for}} </p> {{/if}} </div> </div> ',
'fiche_attributes':'<p class="scrutari-fiche-Attribute"> <span class="scrutari-label-Attribute">{{>title}}{{>~scrutari_loc("_ colon")}}</span> {{if type!=="block"}} {{for valueArray ~len=valueArray.length}} {{:~scrutari_mark(#data)}}{{if #index != (~len -1)}}, {{/if}} {{/for}} {{/if}} </p> {{if type==="block"}} <p class="scrutari-fiche-AttrBlocks">…<br/> {{for valueArray ~len=valueArray.length}} {{if #index > 0}}<br/>…<br/>{{/if}} {{:~scrutari_mark(#data)}} {{/for}} <br/>…</p> {{/if}}',
'ficheloading':'<span class="scrutari-icon-Loader"></span> {{>~scrutari_loc(\'_ loading_pagination\')}}',
......@@ -41,3 +41,11 @@ templates:{
'uniquefichedisplay':'<div data-scrutari-block="topPagination"></div> <div data-scrutari-block="fiches"></div> <div data-scrutari-block="bottomPagination"></div> '
}
};
function SCRUTARI_FRAMEWORKINIT (scrutariClient) {
scrutariClient._modalFunction = function ($modal, action) {
$modal.modal(action);
};
}
.scrutari-panel-Title > .scrutari-Disabled {
color: grey;
}
.scrutari-panel-Title > .scrutari-panel-Active {
color: green;
}
......@@ -2,12 +2,9 @@ var SCRUTARI_HTML = {
_name:'bootstrap3',
structure:{
'area-input':'<div data-scrutari-area="input"> <div class="row"> <div class="col-md-8 col-lg-7"> <input type="text" class="scrutari-input-Text" size="60" name="q" value=""> <input type="submit" value="_ button_submit"> </div> <div class="col-md-4 col-lg-offset-1"> <button type="button" data-scrutari-button="parametersDisplay" class="scrutari-button-Parameters scrutari-Hidden btn btn-primary" data-toggle="button" data-scrutari-state="off"> <span class="glyphicon glyphicon-cog"></span> <span>_ button_parameters</span> </button> </div> </div> </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>',
'area-result':'<div data-scrutari-area="result" class="scrutari-area-Result"> <div class="row"> <div class="col-md-8 col-lg-7" data-scrutari-block="ficheDisplay"> </div> <div class="col-md-4 col-lg-offset-1"> <div class="scrutari-Hidden" data-scrutari-hidden="empty"> {{result-share}} {{result-export}} {{result-subsearch}} </div> {{result-history}} </div> </div> <div class="row scrutari-Hidden" data-scrutari-hidden="empty"> <div class="col-xs-12"> {{result-poweredby}} </div> </div> </div>',
'area-stats':'<div data-scrutari-area="stats" class="scrutari-area-Stats"> <div class="row"> <div class="col-xs-12"> {{stats-global}} <span class="scrutari-Hidden" data-scrutari-hidden="filter"> &nbsp; | &nbsp; </span> {{stats-filter}} <span class="scrutari-Hidden" data-scrutari-hidden="start"> &nbsp; | &nbsp; </span> {{stats-result}} </div> </div> </div> ',
'area-title':'<div data-scrutari-area="title" class="scrutari-area-Title"> <div class="row"> <div class="col-xs-12"> <p class="scrutari-title-Main" data-scrutari-title="main"></p> </div> </div> </div> ',
'main-form':'<form data-scrutari-form="mainsearch"> {{area-input}} {{area-parameters}} </form>',
'main':'{{area-title}} {{main-form}} {{area-stats}} {{area-result}} {{modal-loading}} {{modal-help_mode}} {{modal-help_ponderation}} {{modal-help_periode}}',
'modal-help_mode':'<div class="modal fade" data-scrutari-modal="help_mode" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <p class="modal-title scrutari-modal-Title">_ mode_help</p> <div class="modal-body">_ help_mode.html</div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">_ button_close</button> </div> </div> </div> </div> </div>',
'modal-help_periode':'<div class="modal fade" data-scrutari-modal="help_periode" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <p class="modal-title scrutari-modal-Title">_ periode_help</p> <div class="modal-body">_ help_periode.html</div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">_ button_close</button> </div> </div> </div> </div> </div>',
'modal-help_ponderation':'<div class="modal fade" data-scrutari-modal="help_ponderation" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <p class="modal-title scrutari-modal-Title">_ ponderation_help</p> <div class="modal-body">_ help_ponderation.html</div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">_ button_close</button> </div> </div> </div> </div> </div>',
......@@ -17,6 +14,9 @@ structure:{
'panel-corpus':'<div class="panel panel-default scrutari-panel-Div scrutari-Hidden" data-scrutari-panel="corpus"> <div class="panel-heading scrutari-panel-Heading"> <p class="panel-title scrutari-panel-Title" style="cursor: pointer;" data-toggle="collapse" data-target="[data-scrutari-block=\'corpusPanelBody\']"> <span class="glyphicon glyphicon-filter"></span> _ title_filter_corpus <span data-scrutari-label="corpusFilter" class="small scrutari-Disabled" data-scrutari-alternate="_ filter_on">_ filter_off</span> </p> </div> <div class="panel-body scrutari-panel-WithTools collapse" data-scrutari-block="corpusPanelBody"> <div class="row"> <div class="col-sm-12"> <div class="btn-toolbar"> <div class="btn-group btn-group-sm"> <button type="button" data-scrutari-button="corpusEnable" class="btn btn-primary" data-toggle="button" data-scrutari-state="off"> <span data-scrutari-alternate="_ button_filter_off">_ button_filter_on</span> </button> </div> <div class="btn-group btn-group-sm"> <button type="button" data-scrutari-button="corpusCheckAll" class="btn btn-primary" disabled>_ button_check_all</button> <button type="button" data-scrutari-button="corpusUncheckAll" class="btn btn-primary" disabled>_ button_uncheck_all</button> </div> </div> </div> </div> <div class="row"> <div class="col-sm-3 scrutari-Disabled" data-scrutari-group="corpusColumns"></div> <div class="col-sm-3 scrutari-Disabled" data-scrutari-group="corpusColumns"></div> <div class="col-sm-3 scrutari-Disabled" data-scrutari-group="corpusColumns"></div> <div class="col-sm-3 scrutari-Disabled" data-scrutari-group="corpusColumns"></div> </div> </div> </div>',
'panel-lang':'<div class="panel panel-default scrutari-panel-Div scrutari-Hidden" data-scrutari-panel="lang"> <div class="panel-heading scrutari-panel-Heading"> <p class="panel-title scrutari-panel-Title" style="cursor: pointer;" data-toggle="collapse" data-target="[data-scrutari-block=\'langPanelBody\']"> <span class="glyphicon glyphicon-filter"></span> _ title_filter_lang <span data-scrutari-label="langFilter" class="small scrutari-Disabled" data-scrutari-alternate="_ filter_on">_ filter_off</span> </p> </div> <div class="panel-body scrutari-panel-WithTools collapse" data-scrutari-block="langPanelBody"> <div class="row"> <div class="col-sm-12"> <div class="btn-toolbar"> <div class="btn-group btn-group-sm"> <button type="button" data-scrutari-button="langEnable" class="btn btn-primary" data-toggle="button" data-scrutari-state="off"> <span data-scrutari-alternate="_ button_filter_off">_ button_filter_on</span> </button> </div> <div class="btn-group btn-group-sm"> <button type="button" data-scrutari-button="langCheckAll" class="btn btn-primary" disabled>_ button_check_all</button> <button type="button" data-scrutari-button="langUncheckAll" class="btn btn-primary" disabled>_ button_uncheck_all</button> </div> </div> </div> </div> <div class="row"> <div class="col-sm-3 scrutari-Disabled" data-scrutari-group="langColumns"></div> <div class="col-sm-3 scrutari-Disabled" data-scrutari-group="langColumns"></div> <div class="col-sm-3 scrutari-Disabled" data-scrutari-group="langColumns"></div> <div class="col-sm-3 scrutari-Disabled" data-scrutari-group="langColumns"></div> </div> </div> </div>',
'panel-options':'<div class="panel panel-default scrutari-panel-Div" data-scrutari-panel="options"> <div class="panel-heading scrutari-panel-Heading"> <p class="panel-title scrutari-panel-Title" style="cursor: pointer;" data-toggle="collapse" data-target="[data-scrutari-block=\'optionsPanelBody\']"> <span class="glyphicon glyphicon-wrench"></span> _ title_options </p> </div> <div class="panel-body collapse" data-scrutari-block="optionsPanelBody"> <div class="row"> <div class="col-sm-3"> <p>_ mode_title<br/><button data-scrutari-button="modeHelp" type="button" class="btn btn-primary btn-xs" title="_ mode_help"><span class="glyphicon glyphicon-question-sign"></span></button></p> <p><label class="scrutari-Label"><input type="radio" name="q-mode" value="intersection" checked> _ mode_intersection</label></p> <p><label class="scrutari-Label"><input type="radio" name="q-mode" value="union"> _ mode_union</label></p> <p><label class="scrutari-Label"><input type="radio" name="q-mode" value="operation"> _ mode_operation</label></p> <p><label class="scrutari-Label"><input type="checkbox" name="wildchar" value="end" checked> _ wildchar_end</label></p> </div> <div class="col-sm-3"> <p>_ ponderation_title<br/><button data-scrutari-button="ponderationHelp" type="button" class="btn btn-primary btn-xs" title="_ ponderation_help"><span class="glyphicon glyphicon-question-sign"></span></button></p> <p><label class="scrutari-Label"><input type="radio" name="ponderation" value="pertinence" checked> _ ponderation_pertinence</label></p> <p><label class="scrutari-Label"><input type="radio" name="ponderation" value="date"> _ ponderation_date</label></p> </div> <div class="col-sm-3"> <p>_ periode_title<br/><button data-scrutari-button="periodeHelp" type="button" class="btn btn-primary btn-xs" title="_ periode_help"><span class="glyphicon glyphicon-question-sign"></span></button></p> <p><input type="text" class="scrutari-input-Text" name="periode" value="" size="20"></p> </div> </div> </div> </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>',
'main-form':'<form data-scrutari-form="mainsearch"> {{area-input}} {{area-parameters}} </form>',
'main':'{{area-title}} {{main-form}} {{area-stats}} {{area-result}} {{modal-loading}} {{modal-help_mode}} {{modal-help_ponderation}} {{modal-help_periode}}',
'result-export':'<p class="scrutari-links-Title">_ links</p> <p class="scrutari-export-Ods"><a href="#" data-scrutari-link="ods" target="_blank">_ link_ods</a></p> <p class="scrutari-export-Atom"><a href="#" data-scrutari-link="atom" target="_blank">_ link_atom</a></p> ',
'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-poweredby':'<p class="scrutari-links-Poweredby"><a href="http://www.scrutari.net" target="_blank"><span class="scrutari-icon-Logo"></span> _ link_poweredby</a></p>',
......@@ -33,7 +33,7 @@ templates:{
'base':' <p> <label class="scrutari-Label" {{if phraseMap.longtitle}}title="{{>phraseMap.longtitle}}"{{/if}}><input type="checkbox" name="base" value="{{:codebase}}"> {{if baseicon}} <img src="{{:baseicon}}" alt="" class="scrutari-panel-Icon"> {{/if}} {{>title}} ({{:~scrutari_format(stats.fiche)}}) </label> </p>',
'category':' <p> <label class="scrutari-Label" {{if phraseMap.description}}title="{{>phraseMap.description}}"{{/if}}> <input type="checkbox" name="category" value="{{:name}}"> {{>title}} ({{:~scrutari_format(stats.fiche)}}) </label> </p>',
'corpus':' <p> <label class="scrutari-Label"><input type="checkbox" name="corpus" value="{{:codecorpus}}"> {{>title}} ({{:~scrutari_format(stats.fiche)}}) </label> </p>',
'emptyfichedisplay':'<em>{{>~scrutari_loc("_ result_none")}}</em>',
'emptyfichedisplay':'<p><em>{{>~scrutari_loc("_ result_none")}}</em></p> {{if 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}}',
'fiche':' <div class="scrutari-fiche-Block" data-scrutari-block="fiche_{{:codefiche}}"> {{if _thumbnail}} <div class="scrutari-fiche-Thumbnail"> <img class="scrutari-fiche-ThumbnailImg" alt="" src="{{:_thumbnail}}"/> {{if _icon}} <img class="scrutari-fiche-ThumbnailIcon" alt="" src="{{:_icon}}"/> {{/if}} </div> {{else _icon}} <div class="scrutari-fiche-Icon"><img alt="" src="{{:_icon}}"/></div> {{/if}} <div class="scrutari-fiche-Body {{if _thumbnail}}scrutari-fiche-ThumbnailBody{{/if}}"> <p class="scrutari-fiche-Titre"> <a href="{{:href}}" class="scrutari-fiche-Link" data-scrutari-link="fiche_{{:codefiche}}" {{if _target}} target="{{:_target}}"{{/if}}> {{if mtitre}} {{:~scrutari_mark(mtitre)}} {{else}} {{:href}} {{/if}} </a> </p> {{if msoustitre}} <p class="scrutari-fiche-Soustitre"> {{:~scrutari_mark(msoustitre)}} </p> {{/if}} {{if year}} <p class="scrutari-fiche-Year"> {{:year}} </p> {{/if}} {{if _primaryAttributeArray}} {{for _primaryAttributeArray tmpl="scrutari-fiche_attributes" /}} {{/if}} {{if mcomplementArray}} {{for mcomplementArray}} <p class="scrutari-fiche-Complement"> <span class="scrutari-label-Complement"> {{>title}} {{>~scrutari_loc("_ colon")}} </span> {{:~scrutari_mark(mvalue)}} </p> {{/for}} {{/if}} {{if _secondaryAttributeArray}} {{for _secondaryAttributeArray tmpl="scrutari-fiche_attributes" /}} {{/if}} {{if _motcleArray}} <p class="scrutari-fiche-Motcle"> <span class="scrutari-label-Motcle"> {{if _motcleArray.length == 1}} {{>~scrutari_loc("_ fiche_motscles_one")}} {{else}} {{>~scrutari_loc("_ fiche_motscles_many")}} {{/if}} </span> {{for _motcleArray ~len=_motcleArray.length}} {{if mlabelArray}}{{for mlabelArray}}{{if #index > 0}}/{{/if}}{{:~scrutari_mark(mvalue)}}{{/for}}{{/if}}{{if #index != (~len -1)}}, {{/if}} {{/for}} </p> {{/if}} </div> </div> ',
'fiche_attributes':'<p class="scrutari-fiche-Attribute"> <span class="scrutari-label-Attribute">{{>title}}{{>~scrutari_loc("_ colon")}}</span> {{if type!=="block"}} {{for valueArray ~len=valueArray.length}} {{:~scrutari_mark(#data)}}{{if #index != (~len -1)}}, {{/if}} {{/for}} {{/if}} </p> {{if type==="block"}} <p class="scrutari-fiche-AttrBlocks">…<br/> {{for valueArray ~len=valueArray.length}} {{if #index > 0}}<br/>…<br/>{{/if}} {{:~scrutari_mark(#data)}} {{/for}} <br/>…</p> {{/if}}',
'ficheloading':'<span class="scrutari-icon-Loader"></span> {{>~scrutari_loc(\'_ loading_pagination\')}}',
......@@ -41,3 +41,11 @@ templates:{
'uniquefichedisplay':'<div data-scrutari-block="topPagination"></div> <div data-scrutari-block="fiches"></div> <div data-scrutari-block="bottomPagination"></div> '
}
};
function SCRUTARI_FRAMEWORKINIT (scrutariClient) {
scrutariClient._modalFunction = function ($modal, action) {
$modal.modal(action);
};
}
/*****************************************************
* .none-input
******************************************************/
.none-input-Container {
display: flex;
}
.none-input-Search {
width: 66%;
}
.none-input-Parameters {
width: 34%;
}
/*****************************************************
* .none-modal
******************************************************/
.none-modal-Content {
position: relative;
display: flex;
flex-direction: column;
background-color: #fff;
background-clip: padding-box;
border: 1px solid rgba(0, 0, 0, 0.2);
border-radius: 0.3rem;
outline: 0;
}
@media (min-width: 576px) {
.none-modal-Dialog {
max-width: 500px;
margin: 30px auto;
}
}
.none-modal-Footer {
display: flex;
align-items: center;
justify-content: flex-end;
padding: 15px;
border-top: 1px solid #e9ecef;
}
.none-modal-Footer > :not(:first-child) {
margin-left: .25rem;
}
.none-modal-Footer > :not(:last-child) {
margin-right: .25rem;
}
.none-modal-Header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 15px;
border-bottom: 1px solid #e9ecef;
}
.none-modal-Title {
margin-bottom: 0;
line-height: 1.5;
font-size: 1.25rem;
}
/*****************************************************
* .none-panel
******************************************************/
.none-panel-Columns {
display: flex;
}
.none-panel-Columns > div {
width: 25%;
}
/*****************************************************
* .none-result
******************************************************/
.none-result-Container {
display: flex;
}
.none-result-FicheDisplay {
width: 66%;
}
.none-result-Sidebar {
width: 34%;
}
/*****************************************************
* .overlay
******************************************************/
.overlay-Blocker {
position: fixed;
top: 0; right: 0; bottom: 0; left: 0;
width: 100%; height: 100%;
overflow: hidden;
z-index: 10000;
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;
align-items: center;
}
.overlay-Dialog {
position: relative;
box-sizing: border-box;
background: #fff;
border-radius: 8px;
box-shadow: 0 0 10px #000;
text-align: left;
max-width: 700px;
}
.overlay-Waiting {
cursor: wait;
}
.overlay-Waiting input[type="submit"] {
cursor: wait;
}
.overlay-panel-Header, .overlay-panel-Content, .overlay-panel-Footer {
display: table-row;
}
.overlay-panel-Header > div {
border-top-left-radius: 8px;
border-top-right-radius: 8px;
text-align: left;
font-weight: bold;
min-height: 10px;
padding-top: 20px;
padding-bottom: 20px;
padding-left: 10px;
padding-right: 10px;
border-bottom: 1px solid #ddd;
}
.overlay-panel-Content > div {
padding: 10px 20px;
text-align: left;
font-size: 0.9em;
min-width: 20vw;
max-width: 90vw;
max-height: 70vh;
overflow: auto;
background-color: #fff;
}
.overlay-panel-Content > div p {
margin-left: 0;
}
.overlay-panel-Footer > div {
clear: both;
padding-bottom: 8px;
background-color: #fff;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
}
.overlay-panel-Footer > div > div {
border-top: 1px solid #ddd;
text-align: right;
padding-top: 8px;
padding-left: 10px;
padding-right: 10px;
}
.overlay-panel-Footer button {
display: inline-block;
font-weight: 400;
text-align: center;
white-space: nowrap;
vertical-align: middle;
user-select: none;
border: 1px solid transparent;
padding: .5em .75em;
line-height: 1.25;
border-radius: .25em;
transition: all .15s ease-in-out;
}
.overlay-panel-Footer button:hover {
cursor: pointer;
}
.overlay-Waiting .overlay-panel-Footer button[type="submit"]:hover:disabled {
cursor: wait;
}
.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;
}
.overlay-button-Close:hover {
background-color: #61adff;
}
var SCRUTARI_HTML = {
_name:'none',
structure:{
'area-input':'<div data-scrutari-area="input"> <div class="none-input-Container"> <div class="none-input-Search"> <input type="text" class="scrutari-input-Text" size="60" name="q" value=""> <input type="submit" value="_ button_submit"> </div> <div class="none-input-Parameters"> <button type="button" data-scrutari-button="parametersDisplay" class="scrutari-button-Parameters scrutari-Hidden" data-scrutari-state="off"> <span>_ button_parameters</span> </button> </div> </div> </div>',
'area-result':'<div data-scrutari-area="result" class="scrutari-area-Result"> <div class="none-result-Container"> <div class="none-result-FicheDisplay" data-scrutari-block="ficheDisplay"> </div> <div class="none-result-Sidebar"> <div class="scrutari-Hidden" data-scrutari-hidden="empty"> {{result-share}} {{result-export}} {{result-subsearch}} </div> {{result-history}} </div> </div> <div class="scrutari-Hidden" data-scrutari-hidden="empty"> {{result-poweredby}} </div> </div>',
'area-stats':'<div data-scrutari-area="stats" class="scrutari-area-Stats"> {{stats-global}} <span class="scrutari-Hidden" data-scrutari-hidden="filter"> &nbsp; | &nbsp; </span> {{stats-filter}} <span class="scrutari-Hidden" data-scrutari-hidden="start"> &nbsp; | &nbsp; </span> {{stats-result}} </div> ',
'area-title':'<div data-scrutari-area="title" class="scrutari-area-Title"> <p class="scrutari-title-Main" data-scrutari-title="main"></p> </div> ',
'modal-help_mode':'<div class="scrutari-Hidden" data-scrutari-modal="help_mode" aria-hidden="true"> <div data-none-role="header"> <p class="scrutari-modal-Title">_ mode_help</p> </div> <div data-none-role="content"> _ help_mode.html </div> </div>',
'modal-help_periode':'<div class="scrutari-Hidden" data-scrutari-modal="help_periode" aria-hidden="true"> <div data-none-role="header"> <p class="scrutari-modal-Title">_ periode_help</p> </div> <div data-none-role="content"> _ help_periode.html </div> </div>',
'modal-help_ponderation':'<div class="scrutari-Hidden" data-scrutari-modal="help_ponderation" aria-hidden="true"> <div data-none-role="header"> <p class="scrutari-modal-Title">_ ponderation_help</p> </div> <div data-none-role="content"> _ help_ponderation.html </div> </div>',
'modal-loading':'<div class="scrutari-Hidden" data-scrutari-modal="loading" aria-hidden="true"> <div data-none-role="content"> <p class="scrutari-modal-Title"><span class="scrutari-icon-Loader"></span> _ loading_search</p> </div> </div>',
'panel-base':'<div class="scrutari-panel-Div scrutari-Hidden" data-scrutari-panel="base"> <div class="scrutari-panel-Heading"> <p class="scrutari-panel-Title" data-scrutari-button="blockDisplay" 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> </p> </div> <div class="scrutari-panel-WithTools scrutari-Hidden" data-scrutari-block="basePanelBody"> <div class="none-panel-Toolbar"> <span class="none-panel-ButtonGroup"> <button type="button" data-scrutari-button="baseEnable" data-scrutari-state="off"> <span data-scrutari-alternate="_ button_filter_off">_ button_filter_on</span> </button> </span> <span class="none-panel-ButtonGroup"> <button type="button" data-scrutari-button="baseCheckAll" disabled>_ button_check_all</button> <button type="button" data-scrutari-button="baseUncheckAll" disabled>_ button_uncheck_all</button> </span> </div> <div class="none-panel-Columns"> <div class="scrutari-Disabled" data-scrutari-group="baseColumns"></div> <div class="scrutari-Disabled" data-scrutari-group="baseColumns"></div> <div class="scrutari-Disabled" data-scrutari-group="baseColumns"></div> <div class="scrutari-Disabled" data-scrutari-group="baseColumns"></div> </div> </div> </div>',
'panel-category':'<div class="scrutari-panel-Div scrutari-Hidden" data-scrutari-panel="category"> <div class="scrutari-panel-Heading"> <p class="scrutari-panel-Title" data-scrutari-button="blockDisplay" 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> </p> </div> <div class="scrutari-panel-WithTools scrutari-Hidden" data-scrutari-block="categoryPanelBody"> <div class="none-panel-Toolbar"> <span class="none-panel-ButtonGroup"> <button type="button" data-scrutari-button="categoryEnable" data-scrutari-state="off"> <span data-scrutari-alternate="_ button_filter_off">_ button_filter_on</span> </button> </span> <span class="none-panel-ButtonGroup"> <button type="button" data-scrutari-button="categoryCheckAll" disabled>_ button_check_all</button> <button type="button" data-scrutari-button="categoryUncheckAll" disabled>_ button_uncheck_all</button> </span> </div> <div class="none-panel-Columns"> <div class="scrutari-Disabled" data-scrutari-group="categoryColumns"></div> <div class="scrutari-Disabled" data-scrutari-group="categoryColumns"></div> <div class="scrutari-Disabled" data-scrutari-group="categoryColumns"></div> <div class="scrutari-Disabled" data-scrutari-group="categoryColumns"></div> </div> </div> </div>',
'panel-corpus':'<div class="scrutari-panel-Div scrutari-Hidden" data-scrutari-panel="corpus"> <div class="scrutari-panel-Heading"> <p class="scrutari-panel-Title" data-scrutari-button="blockDisplay" 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> </p> </div> <div class="scrutari-panel-WithTools scrutari-Hidden" data-scrutari-block="corpusPanelBody"> <div class="none-panel-Toolbar"> <span class="none-panel-ButtonGroup"> <button type="button" data-scrutari-button="corpusEnable" data-scrutari-state="off"> <span data-scrutari-alternate="_ button_filter_off">_ button_filter_on</span> </button> </span> <span class="none-panel-ButtonGroup"> <button type="button" data-scrutari-button="corpusCheckAll" disabled>_ button_check_all</button> <button type="button" data-scrutari-button="corpusUncheckAll" disabled>_ button_uncheck_all</button> </span> </div> <div class="none-panel-Columns"> <div class="scrutari-Disabled" data-scrutari-group="corpusColumns"></div> <div class="scrutari-Disabled" data-scrutari-group="corpusColumns"></div> <div class="scrutari-Disabled" data-scrutari-group="corpusColumns"></div> <div class="scrutari-Disabled" data-scrutari-group="corpusColumns"></div> </div> </div> </div>',
'panel-lang':'<div class="scrutari-panel-Div scrutari-Hidden" data-scrutari-panel="lang"> <div class="scrutari-panel-Heading"> <p class="scrutari-panel-Title" data-scrutari-button="blockDisplay" 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> </p> </div> <div class="crutari-panel-WithTools scrutari-Hidden" data-scrutari-block="langPanelBody"> <div class="none-panel-Toolbar"> <span class="none-panel-ButtonGroup"> <button type="button" data-scrutari-button="langEnable" data-scrutari-state="off"> <span data-scrutari-alternate="_ button_filter_off">_ button_filter_on</span> </button> </span> <span class="none-panel-ButtonGroup"> <button type="button" data-scrutari-button="langCheckAll" disabled>_ button_check_all</button> <button type="button" data-scrutari-button="langUncheckAll" disabled>_ button_uncheck_all</button> </span> </div> <div class="none-panel-Columns"> <div class="scrutari-Disabled" data-scrutari-group="langColumns"></div> <div class="scrutari-Disabled" data-scrutari-group="langColumns"></div> <div class="scrutari-Disabled" data-scrutari-group="langColumns"></div> <div class="scrutari-Disabled" data-scrutari-group="langColumns"></div> </div> </div> </div>',
'panel-options':'<div class="scrutari-panel-Div" data-scrutari-panel="options"> <div class="scrutari-panel-Heading"> <p class="scrutari-panel-Title" data-scrutari-button="blockDisplay" data-scrutari-state="off" data-scrutari-target="optionsPanelBody"> _ title_options </p> </div> <div class="scrutari-Hidden" data-scrutari-block="optionsPanelBody"> <div class="none-panel-Columns"> <div> <p>_ mode_title<br/><button data-scrutari-button="modeHelp" type="button" class="scrutari-button-Help" title="_ mode_help">?</button></p> <p><label class="scrutari-Label"><input type="radio" name="q-mode" value="intersection" checked> _ mode_intersection</label></p> <p><label class="scrutari-Label"><input type="radio" name="q-mode" value="union"> _ mode_union</label></p> <p><label class="scrutari-Label"><input type="radio" name="q-mode" value="operation"> _ mode_operation</label></p> <p><label class="scrutari-Label"><input type="checkbox" name="wildchar" value="end" checked> _ wildchar_end</label></p> </div> <div> <p>_ ponderation_title<br/><button data-scrutari-button="ponderationHelp" type="button" class="scrutari-button-Help" title="_ ponderation_help">?</button></p> <p><label class="scrutari-Label"><input type="radio" name="ponderation" value="pertinence" checked> _ ponderation_pertinence</label></p> <p><label class="scrutari-Label"><input type="radio" name="ponderation" value="date"> _ ponderation_date</label></p> </div> <div> <p>_ periode_title<br/><button data-scrutari-button="periodeHelp" type="button" class="scrutari-button-Help" title="_ periode_help">?</button></p> <p><input type="text" class="scrutari-input-Text" name="periode" value="" size="20"></p> </div> </div> </div> </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>',
'main-form':'<form data-scrutari-form="mainsearch"> {{area-input}} {{area-parameters}} </form>',
'main':'{{area-title}} {{main-form}} {{area-stats}} {{area-result}} {{modal-loading}} {{modal-help_mode}} {{modal-help_ponderation}} {{modal-help_periode}}',
'result-export':'<p class="scrutari-links-Title">_ links</p> <p class="scrutari-export-Ods"><a href="#" data-scrutari-link="ods" target="_blank">_ link_ods</a></p> <p class="scrutari-export-Atom"><a href="#" data-scrutari-link="atom" target="_blank">_ link_atom</a></p> ',
'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-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-share':'<p class="scrutari-links-Title">_ title_share</p> <p><a href="#" data-scrutari-link="permalink" target="_blank">_ link_permalink</a></p>',
'result-subsearch':'<form data-scrutari-form="subsearch"> <p class="scrutari-links-Title">_ title_subquery_1<span data-scrutari-block="currentSearchSequence"></span>_ title_subquery_2</p> <input type="text" class="scrutari-input-Text" size="20" name="q"> <input type="submit" value="_ button_submit"> </form>',
'stats-filter':'<span class="scrutari-Hidden" data-scrutari-hidden="filter" data-scrutari-count="stats-filter"> <abbr class="scrutari-stats-Abbr" title="_ stats_filter_title">_ stats_filter_short</abbr> &nbsp; <span class="scrutari-stats-Count" data-scrutari-role="value"></span> </span>',
'stats-global':'<span class="scrutari-Hidden" data-scrutari-hidden="init" data-scrutari-count="stats-global"> <abbr class="scrutari-stats-Abbr" title="_ stats_global_title">_ stats_global_short</abbr> &nbsp; <span class="scrutari-stats-Count" data-scrutari-role="value"></span> </span>',
'stats-result':'<span class="scrutari-Hidden" data-scrutari-hidden="start" data-scrutari-count="stats-result"> <abbr class="scrutari-stats-Abbr" title="_ stats_result_title">_ stats_result_short</abbr> &nbsp; <span class="scrutari-stats-Count" data-scrutari-role="value"></span> </span>'
},
templates:{
'base':' <p> <label class="scrutari-Label" {{if phraseMap.longtitle}}title="{{>phraseMap.longtitle}}"{{/if}}><input type="checkbox" name="base" value="{{:codebase}}"> {{if baseicon}} <img src="{{:baseicon}}" alt="" class="scrutari-panel-Icon"> {{/if}} {{>title}} ({{:~scrutari_format(stats.fiche)}}) </label> </p>',
'category':' <p> <label class="scrutari-Label" {{if phraseMap.description}}title="{{>phraseMap.description}}"{{/if}}> <input type="checkbox" name="category" value="{{:name}}"> {{>title}} ({{:~scrutari_format(stats.fiche)}}) </label> </p>',
'categoryfichedisplay':'<div class="scrutari-category-List" role="tablist"> {{for array}} <span role="tab" class="scrutari-category-Tab {{if active}}scrutari-On{{/if}}" data-scrutari-role="category-tab" data-scrutari-button="categoryTab" {{if category.phraseMap.description}}title="{{>category.phraseMap.description}}"{{/if}} data-scrutari-category="{{:category.name}}"> {{>category.title}} ({{:fichestat}}) </span> {{/for}} </div> {{for array}} <div class="scrutari-category-Content {{if !active}}scrutari-Hidden{{/if}}" data-scrutari-role="category-content" data-scrutari-category="{{:category.name}}"> <div data-scrutari-block="topPagination_{{:category.name}}"></div> <div data-scrutari-block="fiches_{{:category.name}}"></div> <div data-scrutari-block="bottomPagination_{{:category.name}}"></div> </div> {{/for}}',
'corpus':' <p> <label class="scrutari-Label"><input type="checkbox" name="corpus" value="{{:codecorpus}}"> {{>title}} ({{:~scrutari_format(stats.fiche)}}) </label> </p>',
'emptyfichedisplay':'<p><em>{{>~scrutari_loc("_ result_none")}}</em></p> {{if 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}}',
'fiche':' <div class="scrutari-fiche-Block" data-scrutari-block="fiche_{{:codefiche}}"> {{if _thumbnail}} <div class="scrutari-fiche-Thumbnail"> <img class="scrutari-fiche-ThumbnailImg" alt="" src="{{:_thumbnail}}"/> {{if _icon}} <img class="scrutari-fiche-ThumbnailIcon" alt="" src="{{:_icon}}"/> {{/if}} </div> {{else _icon}} <div class="scrutari-fiche-Icon"><img alt="" src="{{:_icon}}"/></div> {{/if}} <div class="scrutari-fiche-Body {{if _thumbnail}}scrutari-fiche-ThumbnailBody{{/if}}"> <p class="scrutari-fiche-Titre"> <a href="{{:href}}" class="scrutari-fiche-Link" data-scrutari-link="fiche_{{:codefiche}}" {{if _target}} target="{{:_target}}"{{/if}}> {{if mtitre}} {{:~scrutari_mark(mtitre)}} {{else}} {{:href}} {{/if}} </a> </p> {{if msoustitre}} <p class="scrutari-fiche-Soustitre"> {{:~scrutari_mark(msoustitre)}} </p> {{/if}} {{if year}} <p class="scrutari-fiche-Year"> {{:year}} </p> {{/if}} {{if _primaryAttributeArray}} {{for _primaryAttributeArray tmpl="scrutari-fiche_attributes" /}} {{/if}} {{if mcomplementArray}} {{for mcomplementArray}} <p class="scrutari-fiche-Complement"> <span class="scrutari-label-Complement"> {{>title}} {{>~scrutari_loc("_ colon")}} </span> {{:~scrutari_mark(mvalue)}} </p> {{/for}} {{/if}} {{if _secondaryAttributeArray}} {{for _secondaryAttributeArray tmpl="scrutari-fiche_attributes" /}} {{/if}} {{if _motcleArray}} <p class="scrutari-fiche-Motcle"> <span class="scrutari-label-Motcle"> {{if _motcleArray.length == 1}} {{>~scrutari_loc("_ fiche_motscles_one")}} {{else}} {{>~scrutari_loc("_ fiche_motscles_many")}} {{/if}} </span> {{for _motcleArray ~len=_motcleArray.length}} {{if mlabelArray}}{{for mlabelArray}}{{if #index > 0}}/{{/if}}{{:~scrutari_mark(mvalue)}}{{/for}}{{/if}}{{if #index != (~len -1)}}, {{/if}} {{/for}} </p> {{/if}} </div> </div> ',
'fiche_attributes':'<p class="scrutari-fiche-Attribute"> <span class="scrutari-label-Attribute">{{>title}}{{>~scrutari_loc("_ colon")}}</span> {{if type!=="block"}} {{for valueArray ~len=valueArray.length}} {{:~scrutari_mark(#data)}}{{if #index != (~len -1)}}, {{/if}} {{/for}} {{/if}} </p> {{if type==="block"}} <p class="scrutari-fiche-AttrBlocks">…<br/> {{for valueArray ~len=valueArray.length}} {{if #index > 0}}<br/>…<br/>{{/if}} {{:~scrutari_mark(#data)}} {{/for}} <br/>…</p> {{/if}}',
'ficheloading':'<span class="scrutari-icon-Loader"></span> {{>~scrutari_loc(\'_ loading_pagination\')}}',
'history':'<div data-scrutari-block="{{:name}}" class="scrutari-history-Block scrutari-history-Active"> {{if fichestat > 0}}<a href="javascript:load_{{:name}}" data-scrutari-button="loadHistory" data-scrutari-history-name="{{:name}}">{{/if}} {{>sequence}} ({{:fichestat}}) {{if fichestat > 0}}</a>{{/if}} <a data-scrutari-role="remove" data-scrutari-button="removeHistory" data-scrutari-history-name="{{:name}}" class="scrutari-Hidden" title="{{>~scrutari_loc(\'_ button_remove\')}}"><span aria-hidden="true">&times;</span></a> <br/><span data-scrutari-role="subsearch"></span> </div>',
'lang':' <p> <label class="scrutari-Label"><input type="checkbox" name="lang" value="{{:lang}}"> {{>title}} [{{:lang}}] ({{:~scrutari_format(fiche)}}) </label> </p>',
'tabs':'<div class="scrutari-pagination-List"> {{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="ficheTab" data-scrutari-type="{{:~root.type}}" data-scrutari-position="{{:~root.position}}" data-scrutari-number="{{:number}}" {{if ~root.category}} data-scrutari-category="{{:~root.category}}"{{/if}}>{{>title}}</span> {{/if}} {{/for}} </div>',
'uniquefichedisplay':'<div data-scrutari-block="topPagination"></div> <div data-scrutari-block="fiches"></div> <div data-scrutari-block="bottomPagination"></div> '
}
};
function SCRUTARI_FRAMEWORKINIT (scrutariClient) {
scrutariClient._modalFunction = function ($modal, action) {
switch(action) {
case 'show':
if (!$modal.data("overlayId")) {
var overlayId = Overlay.start({
header: $modal.children("[data-none-role='header']").html(),
content: $modal.children("[data-none-role='content']").html(),
closeTooltip: scrutariClient.loc("_ button_close")
});
$modal.data("overlayId", overlayId);
}
break;
case 'hide':
Overlay.end($modal);
$modal.data("overlayId", null);
break;
}
};
}
/**
* Objet global définissant l'espace de nom Overlay
*
* @namespace Overlay
*/
var Overlay = {};
Overlay.idNumber = 1;
Overlay.activeInfoArray = new Array();
$(document).on('keydown.overlay', function(event) {
if (event.which === 27) {
var length = Overlay.activeInfoArray.length;
if (length > 0) {
var overlayInfo = Overlay.activeInfoArray[length - 1];
if (overlayInfo.escapeClose) {
Overlay.end(overlayInfo.overlayId);
}
}
}
});
Overlay.Info = function (overlayId, escapeClose) {
this.overlayId = overlayId;
this.escapeClose = escapeClose;
};
Overlay.start = function (settings) {
var closeTooltip = "Fermer";
if (settings.closeTooltip) {
closeTooltip = settings.closeTooltip;
}
var overlayIdNumber = Overlay.idNumber;
Overlay.idNumber++;
var overlayId = "overlayBlocker_" + overlayIdNumber;
Overlay.activeInfoArray.push(new Overlay.Info(overlayId, _checkSetting("escapeClose")));
var $overlayBlocker = $("<div/>").attr("id", overlayId).attr("class", "overlay-Blocker").attr("data-role", "overlay");
var $overlayDialog = $("<div/>").attr("class", "overlay-Dialog").appendTo($overlayBlocker);
$overlayDialog.data("overlayId", overlayId);
$("body")
.append($overlayBlocker)
.css('overflow','hidden');
var overlayBody = "<div class='overlay-panel-Header'></div><div class='overlay-panel-Content'></div><div class='overlay-panel-Footer'><div></div></div>";
var includeForm = false;
if (settings.formAttrs || settings.ajaxForm || settings.formSubmit) {
includeForm = true;
var $form = $("<form/>");
if (settings.formAttrs) {
for(var prop in settings.formAttrs) {
$form.attr(prop, settings.formAttrs[prop]);
}
}
if (settings.ajaxForm) {
var initialBeforeSubmit = settings.ajaxForm.beforeSubmit;
settings.ajaxForm.beforeSubmit = function (arr, $form, options) {
if ((initialBeforeSubmit) && (initialBeforeSubmit(arr, $form, options) === false)) {
return false;
}
_startWaiting();
};
var initialSuccess = settings.ajaxForm.success;
settings.ajaxForm.success = function (data, textStatus, jqXHR, $form) {
_endWaiting();
initialSuccess(data, textStatus, jqXHR, $form);
};
$form.ajaxForm(settings.ajaxForm);
} else if (settings.formSubmit) {
$form.submit(function () {
return settings.formSubmit($(this));
});
}
$overlayDialog.append($form.html(overlayBody));
$form.data("overlayId", overlayId);
} else {
$overlayDialog.html(overlayBody);
}
_setContent(".overlay-panel-Header", settings.header);
_setContent(".overlay-panel-Content", settings.content);
_setContent(".overlay-panel-Footer > div", settings.footer);
var clickClose = _checkSetting("clickClose");
var showClose = _checkSetting("showClose");
$overlayBlocker
.click(function() {
if (clickClose) {
Overlay.end(overlayId);
}
})
.data("beforeEnd", settings.beforeEnd)
.data("afterEnd", settings.afterEnd)
.css("z-index", 10000 + overlayIdNumber);
if (showClose) {
$overlayDialog
.append("<button data-role='close' class='overlay-button-Close' title='" + closeTooltip + "'>&times</button>")
.on("click.overlay", "[data-role='close']", function () {
Overlay.end(overlayId);
});
}
$overlayDialog
.click(function (event) {
event.stopPropagation();
});
if (settings.isWaiting) {
_startWaiting();
}
$overlayBlocker.fadeIn(function () {
$overlayDialog.show();
if (settings.afterStart) {
settings.afterStart($overlayDialog);
} else if (includeForm) {
$overlayDialog.find(":input").filter("[type!='hidden']").first().trigger("focus");
}
});
return overlayId;
function _checkSetting(propName) {
if (settings.hasOwnProperty(propName)) {
return settings[propName];
}
return true;
}
function _setContent (selector, content) {
if (!content) {
$overlayDialog.find(selector).empty();
} else if (content.jquery) {
$overlayDialog.find(selector).empty().append($("<div/>").append(content));
} else {
$overlayDialog.find(selector).empty().append($("<div/>").html(content));
}
}
function _startWaiting() {
$overlayBlocker.find("[type='submit']").prop("disabled", true);
$overlayBlocker.addClass("overlay-Waiting");
}
function _endWaiting() {
$overlayBlocker.find("[type='submit']").prop("disabled", false);
$overlayBlocker.removeClass("overlay-Waiting");
}
};
Overlay.end = function (overlayId, callback) {
if (overlayId.jquery) {
overlayId = overlayId.data("overlayId");
}
if (!overlayId) {
return;
}
var $overlayBlocker = $("#" + overlayId);
var beforeEnd = $overlayBlocker.data("beforeEnd");
if (beforeEnd) {
var result = beforeEnd($overlayBlocker.children("div"));
if (result === false) {
return;
}
}
_pop();
$overlayBlocker.empty();
var afterEnd = $overlayBlocker.data("afterEnd");
$overlayBlocker.fadeOut(function() {
$("#" + overlayId).remove();
if ($("body").children("[data-role='overlay']").length === 0) {
$("body").css('overflow','');
}
if (afterEnd) {