fix hound

This commit is contained in:
Mojca Lorber 2017-01-03 11:04:09 +01:00
parent e555535dfb
commit c476faca30
5 changed files with 8 additions and 8 deletions

View file

@ -206,7 +206,7 @@ function initProtocolPreviewModal() {
modalBody.html(data.html); modalBody.html(data.html);
modalFooter.html(data.footer); modalFooter.html(data.footer);
modal.modal("show"); modal.modal("show");
initHandsOnTable($(document)); initHandsOnTable(modalBody);
}, },
error: function (error) { error: function (error) {
// TODO // TODO

View file

@ -1145,6 +1145,7 @@ ul.content-module-activities {
width: 70%; width: 70%;
} }
} }
#protocol-preview-modal .modal-dialog { #protocol-preview-modal .modal-dialog {
.modal-body { .modal-body {
max-height: 75vh; max-height: 75vh;

View file

@ -26,8 +26,7 @@ class ProtocolsController < ApplicationController
] ]
before_action :check_view_all_permissions, only: [ before_action :check_view_all_permissions, only: [
:index, :index,
:datatable, :datatable
:preview
] ]
before_action :check_unlink_permissions, only: [ before_action :check_unlink_permissions, only: [
:unlink, :unlink,

View file

@ -166,9 +166,9 @@ class ProtocolsDatatable < AjaxDatatablesRails::Base
end end
def name_html(record) def name_html(record)
"<a href='#' data-action='protocol-preview'" + "<a href='#' data-action='protocol-preview'" \
" data-url='#{preview_protocol_path(record)}'>" + "data-url='#{preview_protocol_path(record)}'>" \
"#{record.name}" + "#{record.name}" \
"</a>" "</a>"
end end

View file

@ -240,7 +240,7 @@ Rails.application.routes.draw do
member do member do
get "linked_children", to: "protocols#linked_children" get "linked_children", to: "protocols#linked_children"
post "linked_children_datatable", to: "protocols#linked_children_datatable" post "linked_children_datatable", to: "protocols#linked_children_datatable"
get "preview", to: "protocols#preview" get 'preview', to: 'protocols#preview'
patch "metadata", to: "protocols#update_metadata" patch "metadata", to: "protocols#update_metadata"
patch "keywords", to: "protocols#update_keywords" patch "keywords", to: "protocols#update_keywords"
post "clone", to: "protocols#clone" post "clone", to: "protocols#clone"