Commit 43a4ab1f authored by David Foucher's avatar David Foucher

Fix filepath for save rule modification

parent e7a8e67f
Pipeline #2176 passed with stage
in 1 minute and 21 seconds
......@@ -22,7 +22,7 @@
</div>
<div class="col-md-8 col-sm-12 col-xs-12">
<div v-if="this.show">
<Rule :data="this.currentRuleContent" :name="this.currentRuleName" :printRulePath="this.printRulePath" :rulePath="this.rulePath" :key="this.rerenderKey"></Rule>
<Rule :data="this.currentRuleContent" :name="this.currentRuleName" :path="this.currentRuleFilePath" :printRulePath="this.printRulePath" :rulePath="this.rulePath" :key="this.rerenderKey"></Rule>
</div>
<div v-else>
<h2>Sélectionnez une règle.</h2>
......@@ -69,6 +69,10 @@
currentRuleName: function () {
return this.windowLocationHash.split('#').pop();
},
currentRuleFilePath: function () {
if(this.windowLocationHash !== '') return this.rules[this.currentRuleName]['path'];
else return null;
},
printRulePath: function () {
var path = "";
var printpath = "(";
......
......@@ -61,7 +61,7 @@
components: {
TreeItem,
},
props: ['name', 'data', 'printRulePath', 'rulePath'],
props: ['name', 'data', 'path', 'printRulePath', 'rulePath'],
data: function(){
return {
ruleData: this.data,
......@@ -94,7 +94,7 @@
title: this.name,
comment: this.comment,
content: this.content,
filename: 'trefle/config/rules/' + this.data.path
filename: 'trefle/config/rules/' + this.path
}
this.$http
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment