Commit ba4f1f98 authored by David Foucher's avatar David Foucher

Merge branch 'beautify-rules' into 'vue-editor'

Fixing bugs

See merge request !26
parents 5b8924e8 c4e1a73d
Pipeline #2376 passed with stages
in 9 minutes and 21 seconds
...@@ -201,6 +201,19 @@ ...@@ -201,6 +201,19 @@
background-color : #384EAA; background-color : #384EAA;
color: white; color: white;
} }
.main-button:hover:disabled {
border: 1px solid #384EAA;
background-color : #BDBADE;
color: black;
}
.main-button-primary {
background-color : #384EAA;
color: white;
}
.main-button-primary:hover {
background-color : #0D0850;
color: white;
}
.loading-gif { .loading-gif {
padding-top: 8rem; padding-top: 8rem;
} }
......
...@@ -12,29 +12,36 @@ ...@@ -12,29 +12,36 @@
</div> </div>
</div> </div>
<div class="row mt-3"> <div class="row mt-3">
<div class="col-md-4"> <div class="col-md-4 col-sm-12">
<div id="chart-container"> <div id="chart-container">
<ModificationChart @on-receive="update" :values="modification_chart_datas.datasets" :labels="modification_chart_datas.labels"></ModificationChart> <ModificationChart @on-receive="update" :values="modification_chart_datas.datasets" :labels="modification_chart_datas.labels"></ModificationChart>
</div> </div>
</div> </div>
<div class="col-md-8"> <div v-if="!isLoading">
<div id="modification_list"> <div class="col-md-8 col-sm-12">
<div v-if="selected_rule"> <div id="modification_list">
<h5> Modification(s) de la règle {{ selected_rule }} ({{ Object.keys(selected_modification_list).length }}) </h5> <div v-if="selected_rule">
<ul v-for="modification in selected_modification_list" :key="modification.id" class="dash"> <h5> Modification(s) de la règle en cours de validation {{ selected_rule }} ({{ Object.keys(selected_modification_list).length }}) </h5>
<li> <ul v-for="modification in selected_modification_list" :key="modification.id" class="dash">
<a :href="'referentiel#'+selected_rule+'.rules#modified'"> {{ modification.title }} </a> <li>
</li> <a :href="'referentiel#'+selected_rule+'.rules#modified'"> {{ modification.title }} </a>
</ul> </li>
</div> </ul>
<div v-else> </div>
<h5> Toutes les modifications ({{ Object.keys(modification_list).length }})</h5> <div v-else>
<ul v-for="modification in modification_list" :key="modification.id" class="dash"> <h5> Toutes les modifications en cours de validation ({{ Object.keys(modification_list).length }})</h5>
<li> {{ modification.title }} </li> <ul v-for="modification in modification_list" :key="modification.id" class="dash">
</ul> <li>
<a :href="'referentiel#'+modification.file.split('/').pop().split('.')[0]+'.rules#modified'"> {{ modification.title }} - ({{ modification.file.split('/').pop().split('.')[0] }})</a>
</li>
</ul>
</div>
</div> </div>
</div> </div>
</div> </div>
<div v-else class="text-center loading-gif">
<img src="./../assets/images/loading.gif" alt="loading...">
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -54,6 +61,7 @@ ...@@ -54,6 +61,7 @@
selected_modification_list: {}, selected_modification_list: {},
selected_rule: '', selected_rule: '',
test:0, test:0,
isLoading: true,
} }
}, },
beforeMount: function() { beforeMount: function() {
...@@ -65,9 +73,11 @@ ...@@ -65,9 +73,11 @@
.get('/source/modified') .get('/source/modified')
.then(response => { .then(response => {
this.modification_list = response.body; this.modification_list = response.body;
this.isLoading = false;
return true; return true;
}, response => { }, response => {
if(response.status == 500) this.modification_list = {}; if(response.status == 500) this.modification_list = {};
this.isLoading = false;
return false; return false;
}) })
}, },
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<div id="financement-create-financement" class="col-md-6 col-sm-12 col-xs-12 my-auto"> <div id="financement-create-financement" class="col-md-6 col-sm-12 col-xs-12 my-auto">
<div class="form-inline pull-right"> <div class="form-inline pull-right">
<div class="form-group mx-sm-3 mb-2"> <div class="form-group mx-sm-3 mb-2">
<input type="button" href="#" class="btn btn-outline-success form-control" value="Créer un financement" disabled /> <input type="button" href="#" class="btn main-button form-control" value="Créer un financement" disabled />
</div> </div>
</div> </div>
</div> </div>
......
...@@ -53,7 +53,8 @@ ...@@ -53,7 +53,8 @@
'tag-file-renamed': '<span class="d2h-tag d2h-moved d2h-moved-tag">RENOMMÉ</span>', 'tag-file-renamed': '<span class="d2h-tag d2h-moved d2h-moved-tag">RENOMMÉ</span>',
'tag-file-added': '<span class="d2h-tag d2h-added d2h-added-tag">AJOUTÉ</span>', 'tag-file-added': '<span class="d2h-tag d2h-added d2h-added-tag">AJOUTÉ</span>',
'file-summary-wrapper': '<div class="d2h-file-list-wrapper"><div class="d2h-file-list-header"><span class="d2h-file-list-title">Fichiers modifiés ({{filesNumber}})</span><a class="d2h-file-switch d2h-hide">cacher</a><a class="d2h-file-switch d2h-show">show</a></div><ol class="d2h-file-list">{{{files}}}</ol></div>', 'file-summary-wrapper': '<div class="d2h-file-list-wrapper"><div class="d2h-file-list-header"><span class="d2h-file-list-title">Fichiers modifiés ({{filesNumber}})</span><a class="d2h-file-switch d2h-hide">cacher</a><a class="d2h-file-switch d2h-show">show</a></div><ol class="d2h-file-list">{{{files}}}</ol></div>',
'generic-wrapper': '<div class="d2h-wrapper">{{{content}}}</div>' 'generic-wrapper': '<div class="d2h-wrapper">{{{content}}}</div>',
'file-summary-line':'<li class="d2h-file-list-line"><span class="d2h-file-name-wrapper">{{>fileIcon}}<a href="#'+this.modification.file.split('/').pop()+'" class="d2h-file-name">{{fileName}}</a><span class="d2h-file-stats"><span class="d2h-lines-added">{{addedLines}}</span><span class="d2h-lines-deleted">{{deletedLines}}</span></span></span></li>'
} }
}); });
}, },
......
...@@ -78,14 +78,14 @@ ...@@ -78,14 +78,14 @@
}, },
printRulePath: function () { printRulePath: function () {
var path = ""; var path = "";
var printpath = "("; var printpath = "";
if(this.windowLocationHash.split('#').length -1 > 1) {