From 0e7e8f26a123aca22553614f5eab52b48d82f3eb Mon Sep 17 00:00:00 2001 From: Dominik Seeger <dominik.seeger@gmx.net> Date: Fri, 7 Dec 2018 15:11:11 +0100 Subject: [PATCH] fixed submission toolbar styling --- .../AnnotatedSubmissionBottomToolbar.vue | 154 +++++++++++------- 1 file changed, 96 insertions(+), 58 deletions(-) diff --git a/frontend/src/components/submission_notes/toolbars/AnnotatedSubmissionBottomToolbar.vue b/frontend/src/components/submission_notes/toolbars/AnnotatedSubmissionBottomToolbar.vue index 0005c11b..891c567b 100644 --- a/frontend/src/components/submission_notes/toolbars/AnnotatedSubmissionBottomToolbar.vue +++ b/frontend/src/components/submission_notes/toolbars/AnnotatedSubmissionBottomToolbar.vue @@ -1,61 +1,78 @@ +<!-- TODO: remove inline stylings --> + <template> - <v-toolbar dense class="bottom-toolbar"> - <v-tooltip top v-if="skippable"> - <v-btn - slot="activator" - id="skip-submission" - outline round color="grey darken-2" - @click="skipSubmission" - >Skip</v-btn> - <span>Skip this submission</span> - </v-tooltip> - <v-spacer/> - <v-alert - class="score-alert ma-3" - color="error" - icon="warning" - :value="scoreError" - >{{ scoreError }}</v-alert> - <span class="mr-2">Score:</span> - <input - class="score-text-field" - type="number" - id="score-input" - v-model="score" - @input="validateScore" - @change="validateScore" - /> - <span> / {{fullScore}}</span> - <v-btn - outline round flat - id="score-zero" - @click="score = 0" - color="red lighten-1" - class="score-button">0</v-btn> - <v-btn - outline round flat - id="score-full" - @click="score = fullScore" - color="blue darken-3" - class="score-button">{{fullScore}}</v-btn> - <v-tooltip top v-if="showFinalCheckbox"> - <v-toolbar-items slot="activator" style="margin-top: 28px;"> - <v-checkbox slot="activator" v-model="isFinal" class="final-checkbox"/> - <span>Final</span> - </v-toolbar-items> - <span>Non final feedback will be sent to the reviewer.</span> - </v-tooltip> - <v-tooltip top> - <v-btn - color="success" - slot="activator" - id="submit-feedback" - :loading="loading" - @click="submit" - >Submit<v-icon>chevron_right</v-icon></v-btn> - <span>Submit and continue</span> - </v-tooltip> - </v-toolbar> + <v-container class="bottom-container"> + <v-layout wrap> + <v-flex sm4 md4 lg2> + <v-tooltip top v-if="skippable"> + <v-btn slot="activator" outline round + id="skip-submission" + color="grey darken-2" + @click="skipSubmission">Skip</v-btn> + <span>Skip this submission</span> + </v-tooltip> + <v-spacer /> + <v-alert class="score-alert ma-3" + color="error" + icon="warning" + :value="scoreError">{{ scoreError }}</v-alert> + </v-flex> + <v-flex> + <v-layout wrap class="score-submit-container"> + <v-flex xs5 class="score-flex"> + <span class="mr-2">Score:</span> + <input class="score-text-field" + id="score-input" + type="number" + v-model="score" + @input="validateScore" + @change="validateScore" /> + <span> / {{fullScore}}</span> + <v-btn outline round flat + id="score-zero" + class="score-button" + @click="score=0" + color="red lighten-1">0 + </v-btn> + <v-btn outline round flat + id="score-full" + @click="score=fullScore" + color="blue darken-3" + class="score-button">{{fullScore}} + </v-btn> + </v-flex> + <v-flex class="submit-flex" xs3 sm3> + <v-layout> + <v-flex xs4> + <v-tooltip top v-if="showFinalCheckbox"> + <v-toolbar-items class="final-container" + slot="activator"> + <label>Final</label> + <v-checkbox slot="activator" + v-model="isFinal" + class="final-checkbox" /> + </v-toolbar-items> + <span>Non final feedback will be sent to the reviewer.</span> + </v-tooltip> + </v-flex> + <v-flex xs> + <v-tooltip top> + <v-btn color="success" + id="submit-feedback" + slot="activator" + :loading="loading" + @click="submit">Submit + <v-icon>chevron_right</v-icon> + </v-btn> + <span>Submit and continue</span> + </v-tooltip> + </v-flex> + </v-layout> + </v-flex> + </v-layout> + </v-flex> + </v-layout> + </v-container> </template> <script> @@ -158,6 +175,9 @@ export default { </script> <style scoped> + .bottom-container { + padding: 0px; + } .bottom-toolbar { font-size: large; } @@ -174,7 +194,25 @@ export default { .score-button { min-width: 0px; } + .final-container { + margin-top: 15px; + height: 10px; + } .final-checkbox { - float: left; + margin-left: 10px; + padding-top: 0; + margin-top: 0; + } + .submit-flex { + min-width: 190px; + margin-left: 10px; + } + .score-flex { + margin-left: 10px; + min-width: 250px; + + } + .score-submit-container { + justify-content: space-between; } </style> -- GitLab