[webpack.ue.view] updated layout to allow updating 'volumes' [TODO: implement js for managing it]

This commit is contained in:
xdrm-brackets 2018-03-11 17:48:50 +01:00
parent de79bfffde
commit 17c7355b4d
3 changed files with 36 additions and 4 deletions

View File

@ -22,6 +22,14 @@
<div :class="gstore.create_err.length > 0 ? 'sub warning' : 'sub'" :data-valid='gstore.create_err_valid?1:0'>{{ gstore.create_err }}</div>
<div class='footer'>
<span class='course'><input type='text' placeholder='???' v-model='gstore.create_vol.c'><span>Cours</span></span>
<hr>
<span class='td'><input type='text' placeholder='???' v-model='gstore.create_vol.td'><span>TD</span></span>
<hr>
<span class='tp'><input type='text' placeholder='???' v-model='gstore.create_vol.tp'><span>TP</span></span>
</div>
<div class='footer'>
<button class='valid' @click='gstore.ic_handler()'>Créer l'UE</button>
</div>
@ -74,11 +82,24 @@
<span v-show='gstore.edit_i!=pi' :class="(ue.volumeTD == 0) ? 'td' : 'td active'">{{ ue.volumeTD }}h <span>TD</span></span>
<hr v-show='gstore.edit_i!=pi'>
<span v-show='gstore.edit_i!=pi' :class="(ue.volumeTP == 0) ? 'tp' : 'tp active'">{{ ue.volumeTP }}h <span>TP</span></span>
<!-- if EDIT MODE -->
<button v-show='gstore.edit_i==pi' class='search' @click='gstore.ie_handler(pi)'>Modifier l'UE</button>
<button v-show='gstore.edit_i==pi' class='grey' @click='gstore.ie_toggle(-1)'>Annuler</button>
<span v-show='gstore.edit_i==pi' class='course'><input type='text' placeholder='???' v-model='gstore.edit_vol.c'><span>Cours</span></span>
<hr v-show='gstore.edit_i==pi'>
<span v-show='gstore.edit_i==pi' class='td'><input type='text' placeholder='???' v-model='gstore.edit_vol.td'><span>TD</span></span>
<hr v-show='gstore.edit_i==pi'>
<span v-show='gstore.edit_i==pi' class='tp'><input type='text' placeholder='???' v-model='gstore.edit_vol.tp'><span>TP</span></span>
<!-- endif -->
</div>
<!-- if EDIT MODE -->
<div class='footer' v-show='gstore.edit_i==pi'>
<button v-show='gstore.edit_i==pi' class='search' @click='gstore.ie_handler(pi)'>Modifier l'UE</button>
<button v-show='gstore.edit_i==pi' class='grey' @click='gstore.ie_toggle(-1)'>Annuler</button>
</div>
</section>
</div>

View File

@ -103,7 +103,7 @@ gstore.add('create_card', false);
gstore.add('create_form', '-');
gstore.add('create_label', '');
gstore.add('create_code', '');
// gstore.add('create_h', '');
gstore.add('create_vol', { c: '', td: '', tp: ''});
/* (3) Initialize error message */
gstore.add('create_err_valid', false);
@ -287,7 +287,7 @@ gstore.add('edit_i', -1);
gstore.add('edit_form', '-');
gstore.add('edit_label', '');
gstore.add('edit_code', '');
// gstore.add('edit_h', '');
gstore.add('edit_vol', { c: '', td: '', tp: ''});
/* (3) Initialize error message */
gstore.add('edit_err_valid', false);

View File

@ -585,6 +585,17 @@
text-transform: uppercase;
}
/* (7.1-edit) Card footer input */
& > input{
width: 2.5em;
margin: 0;
padding: 0;
border: 0;
}
}
/* (7.1-edit) Card button submit */