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;
}
This diff is collapsed.
/*****************************************************
* .scrutari-panel
******************************************************/
.scrutari-panel-Div {
border-width: 1px;
border-style: solid;
border-color: #ddd;
border-radius: 3px;
}
.scrutari-panel-Heading {
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #ddd;
background-color: #f5f5f5;
}
/*****************************************************
* .overlay-pnael
******************************************************/
.overlay-panel-Header > div {
color: #fff;
background-color: #007bff;
border-bottom: 1px solid #007bff;
}
.overlay-panel-Footer > div > div {
border-color: #007bff;
}
.overlay-panel-Footer button {
color: #fff;
background-color: #007bff;
border-color: #007bff;
}
.overlay-panel-Footer button:hover {
cursor: pointer;
}
.overlay-Waiting .overlay-panel-Footer button[type="submit"]:hover:disabled {
background-color: #61adff;
}
/*****************************************************
* .scrutari
******************************************************/
.scrutari-Hidden {
display: none !important;
display: none !important;
}
.scrutari-Disabled,
.scrutari-panel-Title > .scrutari-Disabled {
.scrutari-Disabled {
color: grey;
}
......@@ -17,6 +20,13 @@ margin-bottom: 0;
background-color: #e9e9e9;
}
.scrutari-On {
}
/*****************************************************
* .scrutari-area
******************************************************/
.scrutari-area-Parameters {
margin-bottom: 25px;
}
......@@ -33,12 +43,46 @@ margin-bottom: 15px;
.scrutari-area-Title {
}
/*****************************************************
* .scrutari-button
******************************************************/
.scrutari-button-Parameters {
width: 100%;
padding-top: 4px;
padding-bottom: 4px;
}
.scrutari-button-Help {
}
/*****************************************************
* .scrutari-category
******************************************************/
.scrutari-category-Tab {
display: inline-block;
padding-left: 4px;
padding-right: 4px;
cursor: pointer;
}
.scrutari-category-Tab:hover {
background-color: #e9e9e9;
}
.scrutari-category-Tab.scrutari-On {
cursor: auto;
background-color: #e9e9e9;
}
/*****************************************************
* .scrutari-export
******************************************************/
.scrutari-export-Atom {
background-image: url("images/export_atom.png");
min-height: 17px;
......@@ -53,6 +97,11 @@ padding-left: 18px;
background-repeat: no-repeat;
}
/*****************************************************
* .scrutari-fiche
******************************************************/
.scrutari-fiche-AttrBlocks {
margin-left: 30px;
font-size: 1.0em;
......@@ -119,19 +168,19 @@ 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 {
......@@ -148,6 +197,11 @@ font-style: italic;
margin-left: 15px;
}
/*****************************************************
* .scrutari-history
******************************************************/
.scrutari-history-Active {
background-color: #e9e9e9;
}
......@@ -164,6 +218,11 @@ margin-left: 6px;
word-wrap: break-word;
}