Skip to content
Snippets Groups Projects
Commit 31031db1 authored by Deleted User's avatar Deleted User
Browse files

Nouveau design de la page add_tuto.

parent 1279e157
No related branches found
No related tags found
1 merge request!17Finish basic design
......@@ -13,4 +13,8 @@
.new_labels-enter, .new_labels-leave-to, .tutos-enter, .tutos-leave-to {
opacity: 0;
transform: translateY(0px);
}
.len_input {
width: 400px;
}
\ No newline at end of file
<html>
<head>
<title>Add tuto</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Add tutos</title>
<link rel="stylesheet" href="static/add_tuto.css">
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
<div id='hierarchy'>
<span v-for='(value, index) in table'>
<span @click="activate_lo(index)">{{ value[1] }}</span>
<img v-if='is_active[index] % 2 == 1' src="static/checked.png">
<br>
</span>
{{ labels_add }}
<br>
<span v-for='(value, index) in all_labels'>
<span v-if="value[2] == 1"><ul>{{ value[1] }}</span>
<span v-else></span></ul><li>{{ value[1] }}</li></span>
</span>
</div>
<div class="container">
<div class="row">
<div class="offset-md-1 col-md-3">
<div id='hierarchy'>
<span v-for='(value, index) in table'>
<span @click="activate_lo(index)">{{ value[1] }}</span>
<img v-if='is_active[index] % 2 == 1' src="static/checked.png">
<br>
</span>
{{ labels_add }}
<br>
</div>
</div>
<div class="col-md-7">
<div id='form'>
<h3>[[ status ]]</h3>
<form name="form1" method="post" action="">
<div class="form-group">
<label>Titre : </label>
<input type="text" name="title" class="len_input form-control" placeholder="Créer une image Docker"/>
</div>
<div class="form-group">
<label>Lien : </label>
<input type="text" name="link" class="len_inpu form-control" placeholder="http://"/>
</div>
<div class="form-group">
<label>Prescriber : </label>
<input type="text" name="prescriber" class="len_input form-control" placeholder="Jean Dupont"/>
</div>
<input type="hidden" name="labels" value= "" />
<button type="submit" class="btn btn-primary">Ajouter</button>
</form>
</div>
</div>
</div>
<div id='form'>
<h3>[[ status ]]</h3>
<form name="form1" method="post" action="">
<p>
<label>Titre : </label><input type="text" name="title"/><br>
<br><label>Lien : </label><input type="text" name="link"/><br>
<br><label>Prescriber : </label><input type="text" name="prescriber"/>
</p>
<input type="hidden" name="labels" value= "" />
<input type="submit" value="Envoyer" />
</form>
</div>
</body>
......@@ -65,11 +85,9 @@
var hierarchy = new Vue({
el: '#hierarchy',
data: {
all_labels: [],
table: order_intent_labels_tab(),
is_active: create_empty_tab(40),
labels_add: [],
ok: [1, 0, 1, 0, 0, 1, 0, 0]
labels_add: []
},
methods: {
activate_lo: function (index) {
......@@ -86,14 +104,6 @@
}
}
});
hierarchy.all_labels = hierarchy.get_all_labels();
for (var i = 0; hierarchy.all_labels[i]; i++) {
console.log(get_all_childs_of_father(hierarchy.all_labels, hierarchy.all_labels[i][0]));
}
for (var i = 0; hierarchy.all_labels[i]; i++) {
hierarchy.all_labels[i][2] = hierarchy.ok[i];
}
</script>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment