Noosfero/noosfero

View on GitHub
plugins/custom_forms/public/style.scss

Summary

Maintainability
Test Coverage
@import 'style/*';

.controller-profile_editor a.control-panel-custom-forms,
.controller-profile_editor .msie6 a.control-panel-custom-forms {
  background-image: url(/plugins/custom_forms/icons/custom-forms.png)
}

.action-table {
  width: 100%;
  overflow: hidden;

  th, td {
    text-align: center;
  }

  .actions {
    white-space: nowrap;
    text-align: left;
  }

  .new-item {
    background-color: #EEE;
  }

  td a:not(.button) {
    text-decoration: underline;
  }
}

.edit-information {
  display: none;
}
.modal .edit-information {
  display: block;
}

.field-box {
  margin: 10px 0;
}

.field-box > div {
  overflow: hide;
}

.field-box .button {
  margin-left: 15px;
}

.field-box .addition-buttons .button {
  margin: 0px;
}

.field-box .required-field label{
  font-weight: bold;
  color: #c00;
}
.field-box .required-field label:after {
  content: ' (*)';
}

.field-select-type {
  margin: 10px 0;
}

.field-text-default {
  margin-top: 10px;
}

.field-list, .default-field-list {
  list-style-type: none;
  margin: 0px;
  padding: 0px;
}
.field-list {
  cursor: move;
}

.field-list label, .field-list legend {
  cursor: move;
}

ul.field-list > li > fieldset:hover {
  border: 2px dotted #BBB;
}

tr.addition-buttons {
  cursor: auto;
}

#ui-datepicker-div {
  border: 1px solid #CCC;
}
.ui-slider-horizontal {
  border: 1px solid #BBB;
  border-radius: 4px;
}

.action-custom_forms_plugin_myprofile-submissions #content,
#content #custom-forms-plugin_submission, #content .query-overview {
  h3 {
    font-variant: small-caps;
    color: #555753;
    text-align: left;
    border-bottom: 2px solid #2e3436;
    font-size: 20px;
  }
}

.partial-results-link {
  margin: 15px 0;
  display: block;
  text-align: center;
}

#content #custom-forms-plugin_submission {
  div.form-description {
    margin-bottom: 20px;
  }

  .query-form .form-submission {
    border-top: 1px solid #777;
    padding-top: 10px;

    .formfieldline {
      margin-bottom: 25px;

      label {
        font-size: 16px;
      }

      .formfield {
        margin-top: 10px;

        input[type=text] {
          width: 100%;
          height: 40px;
        }

        select {
          width: 50%;
          height: 40px;
        }

        .field-alternative-row {
          margin-top: 5px;

          label {
            margin-left: 10px;
          }
        }
      }
    }
  }
}

#custom-forms-plugin_submission .notify {
  padding: 8px;
  color: rgba(0, 0, 0, 0.6);
}

#custom-forms-plugin_submission .custom-form-options {
  text-align: right;
}

#custom-forms-plugin_submission textarea {
  width: 100%;
  height: 10em;
}

#custom-forms-plugin_submission-view th {
  border: none;
  text-align: right;
}
#custom-forms-plugin_submission-view td {
  padding: 5px 0;
}

#custom-forms-plugin_submission-view td img {
  vertical-align: middle;
}

#custom-forms-plugin_submission-view td ul {
  padding: 0;
  margin: 0;
}
#custom-forms-plugin_submission-view td li {
  list-style: none;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><rect x="3.5" y="3.5" width="10" height="10" fill="black" stroke="black" fill-opacity="0.2" opacity="0.4" ry="1"/><path d="M 4,5 8.5,13 16,0 8.5,8.5 z"/></svg>') no-repeat 0 50%;
  padding: 0 0 0 20px;
  margin: 0;
}

/* Poll */

.poll-question {
  width: 70%;
}

.poll-question input {
  width: 100%
}

.poll-select-type {
  width: 30%;
}

.poll-type {
  text-align: center;
  width: 10%;
}

.poll-option {
  width: 50%;
  padding-left: 0px;
}

.poll-preselected {
  text-align: center;
  width: 20%;
}

.poll-remove {
  text-align: center;
  width: 20%;
}

.poll-type-icon {
  display: inline-block;
}

.poll-option-input {
  width: 100%;
}

.add-poll-option .remove-poll-option {
  display: none;
}

#poll-options .field-list tr {
  cursor: move;
}

#poll-options .field-list .add-poll-option {
  cursor: auto;
}

.review_text_align {
  text-align: center;
}

#queries-form {
  display: flex;
}

#queries-form input[type=text] {
  background: none !important;
  border: 1px solid #90949c;
  border-radius: 4px;
  outline: none !important;
  flex-grow: 1;
  padding: 6px;
  margin-right: 5px
}

#queries-form select {
padding: 6px 25px 6px 10px;
margin-right: 5px;
height: 100%;
border: 1px solid #e3e3e3;
border-radius: 3px;
background: url(/plugins/custom_forms/icons/selectbox-down-arrow.png) right center no-repeat;
background-color: #fff;
color: #444444;
font-size: 1.1em;
line-height: 16px;
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
}

#queries ul.results-list {
list-style: none;
padding-left: 0px;
}

#queries ul.results-list li {
border-top: 1px solid #ddd;
padding: 20px 15px;
}

#queries ul.results-list li:first-child {
border-top: none;
}

#queries ul.results-list li:nth-child(odd) {
background-color: #f9f9f9;
}

#queries ul.results-list li a.form-link {
color: #333;
cursor: pointer;
display: block;
font-size: 1.3em;
margin-bottom: 3px;
text-decoration: none;
}

#queries ul.results-list li a.form-link:hover {
color: #666;
}

#queries ul.results-list li a.form-results {
  text-decoration: none;
  color: #90949c;
}

#queries ul.results-list li a.form-results:hover {
  color: #555753;
}

#queries ul.results-list li .form-info {
color: #90949c;
font-size: 10px;
}

#queries ul.results-list li .form-info i {
font-size: 0.9em;
margin-right: 1px;
}

#queries ul.results-list li .form-info .bullet {
padding: 0px 2px;
}

#queries ul.results-list li p {
margin: 5px 0px;
}

#queries ul.results-list li .form-description {
margin-top: 6px;
}

#queries ul.results-list li .form-image-header {
width: 100%;
height: 100px;
margin-bottom: 10px;
background-size: cover;
}

#queries ul.results-list li .no-results {
font-size: 14px;
font-style: italic;
}

#content .query-header, #content .submissions-header {
  .bullet {
    padding: 0px 4px;
  }

  a {
    color: #fff;
    cursor: pointer;
    background-color: #428bca;
    border: 1px solid #357ebd;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;

    &:hover, &:visited {
      text-decoration: none;
      color: white;
    }

    &:hover {
      background-color: #3071a9;
      border: 1px solid #285e8e;
    }
  }
}

#content .submissions-header {
  margin: 10px 0 20px;
  display: flex;
  align-items: center;

  span {
    flex: 1;
  }

  a:not(:last-child) {
    margin-right: 5px;
  }
}

#content .query-overview {
  .query-header {
    color: #90949c;

    a {
      float: right;
    }
  }

  div.table-of-contents {
    margin-top: 30px;
    background-color: #eee;
    padding-top: 20px;
    padding-bottom: 20px;
    padding: 20px 30px;
    width: calc(50% - 60px);

    ul li:not(:last-child) {
      margin-bottom: 5px;
    }
  }

  .overview {
    margin-top: 35px;

    table caption, h4 {
      font-size: 14px;
      font-weight: 400;
      margin-bottom: 10px;
    }

    table.results-table {
      position: absolute;
      left: -100vw;
    }

    table.review_text_align {
      td {
        padding: 8px 4px;
        &:not(:first-child) {
          text-align: left;
        }
      }

      tr {
        &:not(:last-child) {
          border-bottom: solid 1px #e8e8e8;
        }
      }

      th {
        border-bottom: 1px solid #90949c;
        font-weight: 400;
      }

      th:first-child, td:first-child {
        width: 20%;
      }
    }

    div:nth-child(n + 2) {
      margin-top: 30px;
    }
  }
}

div.token-input-dropdown {
  z-index: 9999 !important;
}

#content div.import-submissions {
  div.important {
    padding: 10px 5px;
    display: flex;
    border: 1px solid #ff5722;

    p {
      margin: 0;
      flex: 3;
      padding-right: 5px;
    }

    a.button {
      flex: 1;
      max-width: 120px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      text-align: right;
    }
  }

  div.instructions {
    h4 {
      margin-bottom: 5px;
    }

    ul {
      margin: 0;
      padding-left: 20px;
    }
  }

  form {
    margin-top: 15px;

    p {
      margin: 0 0 20px;
      font-size: 11px;
    }
  }
}

div.import-report {
  position: relative;

  p.result-msg {
    padding: 15px 10px;
    background-color: #526a75;
    color: white;
  }

  div.error-msgs {
    padding: 15px 10px;
    background-color: #FFEB3B;
    margin-bottom: 20px;
    margin-bottom: 20px;

    p {
      margin: 0;
    }

    p:first-child {
      margin-bottom: 10px;
      font-weight: bold;
    }
  }

  div.table-scroll {
    overflow-x: scroll;
  }

  table {
    margin-bottom: 30px;
    overflow-x: auto;

    tbody {
      display: block;
      max-height: 300px;
      overflow-y: scroll;
    }

    thead, tbody tr {
      display: table;
      table-layout: fixed;
    }

    th, td {
      min-width: 100px;
      max-width: 100px;
    }

    td {
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    th:first-child, td:first-child {
      min-width: unset;
      width: 10%;
    }

    td:first-child {
      text-align: center;
      background-color: #eee;
    }

    td:not(:first-child) {
      font-style: italic;
    }

    td.error {
      color: black;
      background-color: #ffe2d9;
    }

    td.error {
      cursor: pointer;
    }
  }

  .failed-csv-content {
    display: none;
  }

  .tooltip-error {
    display: none;
    position: absolute;
    background-color: #ffc107;
    border-radius: 3px;
    max-width: 150px;
    padding: 20px;
    opacity: 0.9;
  }
}

div.import-submissions, div.import-report {
  .button-bar {
    display: flex;
    justify-content: space-between;
  }
}

div.labelled-check {
  margin-bottom: 5px;
}

#content .CustomFormsPlugin-query-form,
#content #custom-forms-plugin_confirmation,
#content #custom-forms-plugin_submission,
#content .custom-forms-plugin_polls-block {
  display: flex;
  flex-direction: column;
  height: 100%;

  .form-submission {
    margin-top: 5px;
    overflow-y: auto;
    text-align: justify;

    .field-alternative-row {
      display: block;

      mark {
        background: transparent;
        padding: 0 0.2em;
        border-radius: 2px;
      }

      &.checked mark {
        background: rgba(200, 200, 200, 0.5);
      }
    }
  }

  &.query-kind-survey {
    .formfield.type-radio, .formfield.type-hidden {
      columns: 2;
      column-gap: 1em;
    }
  }

  .no-results {
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    height: 100%;
    text-align: center;
  }

  .formlabel {
    font-size: 14px;
    margin-bottom: 3px;
  }

  .required-field {
    .formlabel {
      font-size: 12px;
      margin-bottom: 0;
    }

    .formfield.type-text {
      padding: 0;
    }
  }

  .button-bar {
    padding-top: 0;
    margin-bottom: 0;
    flex-grow: 1;
    align-items: flex-end;
    display: flex;

    .icon-cancel, br {
      display: none;
    }

    input.button.submit {
      height: 32px;
      line-height: 32px;
      padding: 0;
      background-image: none;
      width: 100%;
    }

    div.notify {
      display: none;
    }
  }
}

#content .custom-forms-plugin_polls-block {
  a.button.icon-back {
    display: none;
  }
}

#custom-forms-plugin_submission .form-submission {
  margin-bottom: 20px;
}