...
 
Commits (2)
......@@ -289,8 +289,8 @@ dl:nth-child(even) {
.page-content {
width: 100vw;
position: absolute;
left: 15rem;
top: 6rem;
left: 14rem;
top: 5rem;
transition: all 0.4s;
}
......@@ -305,7 +305,7 @@ dl:nth-child(even) {
border-radius: 5px;
width: 80vw;
height: 100vh;
margin: 1rem;
margin: 3rem;
-webkit-box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.1);
-moz-box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.1);
box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.1);
......@@ -323,6 +323,12 @@ dl:nth-child(even) {
font-style: bolder;
}
#ref-last-update {
font-size: 0.9em;
color: #000; /* Fallback for older browsers */
color: rgba(0, 0, 0, 0.5);
}
/*#ref-filter-row {
}
......
......@@ -2,53 +2,53 @@
<progress style="display: none" id="progress" />
<!-- Horizontal navbar -->
<div class="horizontal-nav bg-light" id="sidebar">
<div class="horizontal-nav bg-white" id="sidebar">
<ul class="nav bg-light mb-0">
<li class="nav-item bg-light">
<ul class="nav bg-white mb-0">
<li class="nav-item bg-white">
</li>
</ul>
</div>
<!-- End horizontal navbar -->
<!-- Vertical navbar -->
<div class="vertical-nav bg-light" id="sidebar">
<ul class="nav flex-column bg-light mb-0">
<li class="nav-item bg-light">
<div class="vertical-nav bg-white" id="sidebar">
<ul class="nav flex-column bg-white mb-0">
<li class="nav-item bg-white">
<a href="." id="nav-title" class="nav-link text-dark"></a>
</li>
<li class="nav-item">
<a href="." class="{selected: window.location.hash.startsWith('')} nav-link text-dark bg-light">
<a href="." class="{selected: window.location.hash.startsWith('')} nav-link text-dark bg-white">
<img src="/explorer/images/Icone_Home.svg" width="23" height="23" class="d-inline-block nav-icon" alt="">
Accueil
</a>
</li>
<li class="nav-item">
<a href="#rules" class="{selected: window.location.hash.startsWith('#rules')} nav-link text-dark bg-light">
<a href="#rules" class="{selected: window.location.hash.startsWith('#rules')} nav-link text-dark bg-white">
<img src="/explorer/images/Icone_Referentiel.svg" width="23" height="23" class="d-inline-block nav-icon" alt="">
Référentiel
</a>
</li>
<li class="nav-item">
<a href="#financements" class="{selected: window.location.hash.startsWith('#financements')} nav-link text-dark bg-light">
<a href="#financements" class="{selected: window.location.hash.startsWith('#financements')} nav-link text-dark bg-white">
<img src="/explorer/images/Icone_Financement.svg" width="23" height="23" class="d-inline-block nav-icon" alt="">
Financements
</a>
</li>
<li class="nav-item">
<a href="#simulate" class="{selected: window.location.hash.startsWith('#simulate')} nav-link text-dark bg-light">
<a href="#simulate" class="{selected: window.location.hash.startsWith('#simulate')} nav-link text-dark bg-white">
<img src="/explorer/images/Icone_Simulateur.svg" width="23" height="23" class="d-inline-block nav-icon" alt="">
Simulateur
</a>
</li>
<li class="nav-item">
<a href="#scenarios" class="{selected: window.location.hash.startsWith('#scenarios')} nav-link text-dark bg-light">
<a href="#scenarios" class="{selected: window.location.hash.startsWith('#scenarios')} nav-link text-dark bg-white">
<img src="/explorer/images/Icone_Scenarios.svg" width="23" height="23" class="d-inline-block nav-icon" alt="">
Scénarios
</a>
</li>
<li class="nav-item">
<a href="#tools" class="{selected: window.location.hash.startsWith('#tools')} nav-link text-dark bg-light">
<a href="#tools" class="{selected: window.location.hash.startsWith('#tools')} nav-link text-dark bg-white">
<img src="/explorer/images/Icone_Outils.svg" width="23" height="23" class="d-inline-block nav-icon" alt="">
Outils
</a>
......
<rules>
<div id="ref-main-div" class="bg-light">
<div id="ref-main-div" class="bg-white">
<div id="ref-header-row">
<div class="container">
<div class="row mb-4">
<div id="ref-count-financements" class="col-md-3 col-sm-6 col-xs-12">
<span id="ref-count-financements-number" class="ref-count-financements-text">{ this.count_financements }&nbsp;</span>
<span class="ref-count-financements-text" if={ this.lt_two }>financement</span>
<span class="ref-count-financements-text" if={ !this.lt_two }>financements</span>
<span id="ref-count-financements-number" class="ref-results-count-number ref-count-financements-text">{ this.count_financements }</span>
<span class="ref-count-financements-text" if={ this.lt_two }>&nbsp;financement</span>
<span class="ref-count-financements-text" if={ !this.lt_two }>&nbsp;financements</span>
</div>
<div id="ref-create-financement" class="col-md-3 col-sm-6 col-xs-12 my-auto">
<button href="#" class="btn btn-outline-success" disabled>Créer un financement</button>
......@@ -16,7 +16,6 @@
<div class="form-group mx-sm-3 mb-2">
<input class="form-control" id="financement-search-field" name="financement-search" type="search" placeholder="Rechercher">
</div>
<button class="btn btn-success mb-2" id="financement-search-button">OK</button>
</div>
</div>
</div>
......@@ -37,19 +36,19 @@
<hr class="ref-horizontal-separator">
<div id="ref-result-row" class="container">
<span class="ref-results-count" if={ this.lt_two }>
Résultat ({ this.count_financements })
Résultat (<span class="ref-results-count-number">{ this.count_financements }</span>)
</span>
<span class="ref-results-count" if={ !this.lt_two }>
Résultats ({ this.count_financements })
Résultats (<span class="ref-results-count-number">{ this.count_financements }</span>)
</span>
<div id="ref-results-list">
<ul each={ this.financements } class="container">
<li class="row">
<ul id="ul-ref-results-list" class="container">
<li each={ this.financements } class="mt-4 row">
<span class="col-md-3 col-sm-12">
<strong>{ intitule }</strong>
<strong class="ref-fields">{ intitule }</strong>
</span>
<span class="col-md-8 col-sm-11">
<button each={ tag in _tags} class="btn btn-outline-info" href="#" disabled>{ tag }</button>
<button each={ tag in _tags} class="ref-results-tags btn btn-outline-info" href="#" disabled>{ tag }</button>
</span>
<span class="col-md-1 col-sm-1 pull-right">
<button href="https://framagit.org/ybon/trefle/tree/master/trefle/config/financements.yml" target="_blank" class="text-dark btn btn-outline-light" disabled>
......@@ -63,39 +62,8 @@
</div>
</div>
<!--
<aside>
<h2 class="page-title">Règles de gestion</h2>
<financements-menu title="Règles régionales" namespace="région"></financements-menu>
<financements-menu title="Règles nationales" namespace="règles nationales"></financements-menu>
<financements-menu title="Règles des organismes paritaires" namespace="organisme paritaire"></financements-menu>
<financements-menu title="Règles de rémunérations" namespace="rémunération"></financements-menu>
<financements-menu title="Règles de normalisation" namespace="normalisation"></financements-menu>
</aside>
<div if={ this.financement }>
<h3>{ this.financement.path } <a href=https://framagit.org/ybon/trefle/tree/master/trefle/config/financements/{ this.financement.path } target=_blank> <i class="icon">edit</i></a></h3>
<financement content={ this.financement.data } class=with-lines></financement>
</div>
<div if={ !this.financement }>
<p>Sélectionner une règle dans le menu.</p>
</div>
<financements-menu>
<h4>{ this.opts.title }</h4>
<ul>
<li each={ props, id in this.parent.financements } if={ props.path.startsWith(this.opts.namespace) }>
<a href="#financements/{ id }" class='{ on: this.parent.parent.active && this.parent.parent.active.startsWith(id) }' title={ id }>
{ props.name }
</a>
</li>
</ul>
</financements-menu>
-->
<script>
this.financements = []
this.count_financements = 0
this.lt_two = false;
......@@ -113,14 +81,85 @@
}
if (this.count_financements<2) this.lt_two=true;
this.update()
})
})
}
this.mixin(View)
$(document).ready(function() {
$("#ref-main-div").css("height","100%");
$("#ref-main-div").css("min-height","100vh");
$("#financement-search-field").focus().keyup(function(event){
var search_field = $(this);
var search_field_value = search_field.val();
if(search_field_value== ''){
$("#ul-ref-results-list li").show();
$(".ref-results-count-number").empty().text($("#ul-ref-results-list li:visible").length);
return true;
}
var regexp = '\\b(.*)';
for (var i in search_field_value){
regexp += '('+search_field_value[i]+')';
}
regexp += '(.*)';
$("#ul-ref-results-list li").show();
$("#ul-ref-results-list li").each(function() {
$(this).find(".ref-results-tags").each(function() {
var item = $(this);
var regexp_results = item.text().match(new RegExp(regexp,'i'));
if(regexp_results){
var matching_string = '';
for(var i in regexp_results){
if(i > 0){
matching_string += regexp_results[i];
}
}
item.parent().parent().show();
return false;
} else{
item.parent().parent().hide();
}
$(".ref-results-count-number").empty().append($("#ul-ref-results-list li:visible").length);
})
});
});
})
/*$(document).ready(function() {
$("#ref-main-div").css("height","100%");
$("#ref-main-div").css("min-height","100vh");
$("#financement-search-field").focus().keyup(function(event){
var search_field = $(this);
var search_field_value = search_field.val();
if(search_field_value== ''){
$("#ul-ref-results-list li").show();
$(".ref-results-count-number").empty().text($("#ul-ref-results-list li:visible").length);
return true;
}
var regexp = '\\b(.*)';
for (var i in search_field_value){
regexp += '('+search_field_value[i]+')';
}
regexp += '(.*)\\b';
$("#ul-ref-results-list li").show();
$("#ul-ref-results-list").find('li .ref-fields').each(function() {
var item = $(this);
var regexp_results = item.text().match(new RegExp(regexp,'i'));
if(results){
var matching_string = '';
for(var i in regexp_results){
if(i > 0){
matching_string += regexp_results[i];
}
}
item.empty().append(matching_string)
} else{
item.parent().parent().hide();
}
$(".ref-results-count-number").empty().append($("#ul-ref-results-list li:visible").length);
});
});
})*/
</script>
......
......@@ -32,14 +32,14 @@
<header data-is=navbar style="border:none"></header>
<main>
<div class="page-content">
<schema class=tools></schema>
<glossary class=full></glossary>
<rules></rules>
<simulate class=tools></simulate>
<financements class=full></financements>
<scenarios class=tools></scenarios>
<tools></tools>
<div class="page-content bg-light">
<div data-is=schema class=tools></div>
<div data-is=glossary class=full></div>
<div data-is=rules></div>
<div data-is=simulate class=tools></div>
<div data-is=financements class=full></div>
<div data-is=scenarios class=tools></div>
<div data-is=tools></div>
</div>
</main>
......