diff options
Diffstat (limited to 'app/assets')
| -rw-r--r-- | app/assets/javascripts/modal_confirmation.js | 31 | ||||
| -rw-r--r-- | app/assets/stylesheets/modules/_vj_collection.sass | 10 | 
2 files changed, 40 insertions, 1 deletions
| diff --git a/app/assets/javascripts/modal_confirmation.js b/app/assets/javascripts/modal_confirmation.js new file mode 100644 index 000000000..e82a8a81b --- /dev/null +++ b/app/assets/javascripts/modal_confirmation.js @@ -0,0 +1,31 @@ +$(document).ready(() => { +  $.rails.allowAction = (link) => { +    let message = link.data('confirm') +    if (!message) return true +    showConfirmModal(link) +    return false +  } + +  let showConfirmModal = (link) => { +    let message = link.data('confirm') +    let html = `<div class="modal fade" id="confirmationDialog" tabindex="1" role="dialog"> +        <div class="modal-container"> +          <div class="modal-dialog"> +            <div class="modal-content"> +              <div class="modal-header"> +                <h4 class="modal-title"> ${I18n.t('warning')} </h4> +              </div> +              <div class="modal-body"> +                <p>${message}</p> +              </div> +              <div class="modal-footer"> +                <a data-dismiss="modal" class="btn">${I18n.t('cancel')}</a> +                <a data-dismiss="modal" class="btn btn-primary" data-method=${link.data('method')} href=${link.attr('href')}>${I18n.t('ok')}</a> +              </div> +            </div> +          </div> +        </div> +      </div> ` +    $(html).modal() +  } +})
\ No newline at end of file diff --git a/app/assets/stylesheets/modules/_vj_collection.sass b/app/assets/stylesheets/modules/_vj_collection.sass index 9bb19f75f..b230991fb 100644 --- a/app/assets/stylesheets/modules/_vj_collection.sass +++ b/app/assets/stylesheets/modules/_vj_collection.sass @@ -22,7 +22,7 @@            display: block            height: 100% -          > span +          > span:not(.small)              position: absolute              display: block              line-height: 1em @@ -268,9 +268,12 @@            margin-bottom: 0px            & > *              display: inline-block +          .t2e-item-list +            overflow: scroll              & > *                overflow: hidden                min-width: 0 +              max-width: none            &.open              margin-bottom: 40px @@ -305,6 +308,11 @@    .table-2entries > .t2e-head > .td > div > span::after      bottom: -6px !important +  .table-2entries > .t2e-head > .td > div > span +    text-overflow: ellipsis +    overflow: hidden +    white-space: nowrap +    .table.table-2entries .t2e-item-list .t2e-item      background-color: #F9F9F9 | 
