From 2cfcba0ceb53c4e96cba0db9e5c5d689d0a683cc Mon Sep 17 00:00:00 2001 From: Mojca Lorber Date: Tue, 13 Dec 2016 10:39:18 +0100 Subject: [PATCH 1/7] add protocol preview modal --- app/assets/javascripts/protocols/index.js | 35 +++++++++++++++++++ app/controllers/protocols_controller.rb | 16 +++++++++ app/datatables/protocols_datatable.rb | 10 +++++- app/views/protocols/index.html.erb | 1 + .../index/_protocol_preview_modal.html.erb | 15 ++++++++ .../_protocol_preview_modal_body.html.erb | 0 config/locales/en.yml | 2 ++ config/routes.rb | 1 + 8 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 app/views/protocols/index/_protocol_preview_modal.html.erb create mode 100644 app/views/protocols/index/_protocol_preview_modal_body.html.erb diff --git a/app/assets/javascripts/protocols/index.js b/app/assets/javascripts/protocols/index.js index 844f9bb75..d8aa44818 100644 --- a/app/assets/javascripts/protocols/index.js +++ b/app/assets/javascripts/protocols/index.js @@ -16,6 +16,7 @@ function init() { initProtocolsTable(); initRowSelection(); initKeywordFiltering(); + initProtocolPreviewModal(); initLinkedChildrenModal(); initCreateNewModal(); initModals(); @@ -187,6 +188,33 @@ function initKeywordFiltering() { }); } +function initProtocolPreviewModal() { + // Only do this if the repository is public/private + if (repositoryType !== "archive") { + protocolsTableEl.on("click", "a[data-action='protocol-preview']", function(e) { + var link = $(this); + $.ajax({ + url: link.attr("data-url"), + type: "GET", + dataType: "json", + success: function (data) { + var modal = $("#protocol-preview-modal"); + var modalTitle = modal.find(".modal-title"); + var modalBody = modal.find(".modal-body"); + modalTitle.html(data.title); + modalBody.html(data.html); + modal.modal("show"); + }, + error: function (error) { + // TODO + } + }); + e.preventDefault(); + return false; + }); + } +} + function initLinkedChildrenModal() { // Only do this if the repository is public/private if (repositoryType !== "archive") { @@ -343,6 +371,13 @@ function initModals() { $(this).find(".modal-body #linked-children-table").DataTable().destroy(); $(this).find(".modal-body").html(""); }); + + // Protocol preview modal close action + $("#protocol-preview-modal").on("hidden.bs.modal", function(e) { + $(this).find(".modal-title").html(""); + // Destroy the embedded data + $(this).find(".modal-body").html(""); + }); } function updateDataTableSelectAllCheckbox() { diff --git a/app/controllers/protocols_controller.rb b/app/controllers/protocols_controller.rb index 7778d5c08..385ae2e1d 100644 --- a/app/controllers/protocols_controller.rb +++ b/app/controllers/protocols_controller.rb @@ -11,6 +11,7 @@ class ProtocolsController < ApplicationController before_action :check_view_permissions, only: [ :protocol_status_bar, :updated_at_label, + :preview, :linked_children, :linked_children_datatable ] @@ -80,6 +81,21 @@ class ProtocolsController < ApplicationController end end + def preview + respond_to do |format| + format.json do + render json: { + title: I18n.t('protocols.index.preview.title', + protocol: @protocol.name), + html: render_to_string( + partial: 'protocols/index/protocol_preview_modal_body.html.erb', + locals: { protocol: @protocol } + ) + } + end + end + end + def linked_children respond_to do |format| format.json { diff --git a/app/datatables/protocols_datatable.rb b/app/datatables/protocols_datatable.rb index 59abf56ac..328936063 100644 --- a/app/datatables/protocols_datatable.rb +++ b/app/datatables/protocols_datatable.rb @@ -12,6 +12,7 @@ class ProtocolsDatatable < AjaxDatatablesRails::Base def_delegator :@view, :can_restore_protocol def_delegator :@view, :can_export_protocol def_delegator :@view, :linked_children_protocol_path + def_delegator :@view, :preview_protocol_path def initialize(view, organization, type, user) super(view) @@ -94,7 +95,7 @@ class ProtocolsDatatable < AjaxDatatablesRails::Base "DT_CanArchive": can_archive_protocol(protocol), "DT_CanRestore": can_restore_protocol(protocol), "DT_CanExport": can_export_protocol(protocol), - "1": record.name, + "1": name_html(record), "2": keywords_html(record), "3": modules_html(record), "4": record.full_username_str, @@ -164,6 +165,13 @@ class ProtocolsDatatable < AjaxDatatablesRails::Base end end + def name_html(record) + "" + + "#{record.name}" + + "" + end + def keywords_html(record) if !record.protocol_keywords_str || record.protocol_keywords_str.empty? "#{I18n.t("protocols.no_keywords")}" diff --git a/app/views/protocols/index.html.erb b/app/views/protocols/index.html.erb index 02a22d0e6..12af69280 100644 --- a/app/views/protocols/index.html.erb +++ b/app/views/protocols/index.html.erb @@ -130,6 +130,7 @@ <%= render partial: "protocols/index/restore_results_modal.html.erb" %> <%= render partial: "protocols/index/import_results_modal.html.erb" %> <%= render partial: "protocols/index/linked_children_modal.html.erb" %> +<%= render partial: "protocols/index/protocol_preview_modal.html.erb" %> <%= render partial: "protocols/import_export/import_elements.html.erb" %> diff --git a/app/views/protocols/index/_protocol_preview_modal.html.erb b/app/views/protocols/index/_protocol_preview_modal.html.erb new file mode 100644 index 000000000..dd0c46182 --- /dev/null +++ b/app/views/protocols/index/_protocol_preview_modal.html.erb @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/app/views/protocols/index/_protocol_preview_modal_body.html.erb b/app/views/protocols/index/_protocol_preview_modal_body.html.erb new file mode 100644 index 000000000..e69de29bb diff --git a/config/locales/en.yml b/config/locales/en.yml index 28e8ee98c..afd667ea1 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1201,6 +1201,8 @@ en: thead_created_at: "Created at" thead_archived_on: "Archived at" thead_updated_at: "Last modified at" + preview: + title: "Protocol preview" linked_children: title: "Tasks linked to protocol %{protocol}" used_in: "Number of tasks linked to this protocol: %{nr}" diff --git a/config/routes.rb b/config/routes.rb index a2f8e2447..e6aa20a0a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -240,6 +240,7 @@ Rails.application.routes.draw do member do get "linked_children", to: "protocols#linked_children" post "linked_children_datatable", to: "protocols#linked_children_datatable" + get "preview", to: "protocols#preview" patch "metadata", to: "protocols#update_metadata" patch "keywords", to: "protocols#update_keywords" post "clone", to: "protocols#clone" From 40e3240a999493933d7d9ac2108f6b4949ca1e07 Mon Sep 17 00:00:00 2001 From: Mojca Lorber Date: Thu, 22 Dec 2016 11:43:11 +0100 Subject: [PATCH 2/7] add content to preview modal --- app/assets/javascripts/protocols/index.js | 2 +- app/assets/javascripts/protocols/steps.js.erb | 1 + app/assets/stylesheets/themes/scinote.scss | 18 ++ app/controllers/protocols_controller.rb | 3 +- app/views/protocols/index.html.erb | 14 ++ .../index/_protocol_preview_modal.html.erb | 6 +- .../_protocol_preview_modal_body.html.erb | 179 ++++++++++++++++++ config/locales/en.yml | 2 +- 8 files changed, 219 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/protocols/index.js b/app/assets/javascripts/protocols/index.js index d8aa44818..594504062 100644 --- a/app/assets/javascripts/protocols/index.js +++ b/app/assets/javascripts/protocols/index.js @@ -204,6 +204,7 @@ function initProtocolPreviewModal() { modalTitle.html(data.title); modalBody.html(data.html); modal.modal("show"); + initHandsOnTable($(document)); }, error: function (error) { // TODO @@ -375,7 +376,6 @@ function initModals() { // Protocol preview modal close action $("#protocol-preview-modal").on("hidden.bs.modal", function(e) { $(this).find(".modal-title").html(""); - // Destroy the embedded data $(this).find(".modal-body").html(""); }); } diff --git a/app/assets/javascripts/protocols/steps.js.erb b/app/assets/javascripts/protocols/steps.js.erb index 9dbb8b598..1f2eeeda6 100644 --- a/app/assets/javascripts/protocols/steps.js.erb +++ b/app/assets/javascripts/protocols/steps.js.erb @@ -284,6 +284,7 @@ function toggleButtons(show) { // Creates handsontable where needed function initHandsOnTable(root) { + root.find("[data-role='hot-table']").each(function() { var $container = $(this).find("[data-role='step-hot-table']"); var contents = $(this).find('.hot-contents'); diff --git a/app/assets/stylesheets/themes/scinote.scss b/app/assets/stylesheets/themes/scinote.scss index 7f63232ef..390fb48e9 100644 --- a/app/assets/stylesheets/themes/scinote.scss +++ b/app/assets/stylesheets/themes/scinote.scss @@ -1139,6 +1139,24 @@ ul.content-module-activities { } } +/* Preview protocol modal */ +@media (min-width: 768px) { + #protocol-preview-modal .modal-dialog { + width: 70%; + } +} +#protocol-preview-modal .modal-dialog { + .modal-body { + max-height: 75vh; + overflow-y: auto; + width: 100%; + + .ql-editor { + min-height: initial; + } + } +} + /* Import protocol/s modal */ #import-protocol-modal .modal-dialog { width: 70%; diff --git a/app/controllers/protocols_controller.rb b/app/controllers/protocols_controller.rb index 385ae2e1d..039cd01c0 100644 --- a/app/controllers/protocols_controller.rb +++ b/app/controllers/protocols_controller.rb @@ -26,7 +26,8 @@ class ProtocolsController < ApplicationController ] before_action :check_view_all_permissions, only: [ :index, - :datatable + :datatable, + :preview ] before_action :check_unlink_permissions, only: [ :unlink, diff --git a/app/views/protocols/index.html.erb b/app/views/protocols/index.html.erb index 12af69280..b7be9f1b9 100644 --- a/app/views/protocols/index.html.erb +++ b/app/views/protocols/index.html.erb @@ -136,3 +136,17 @@ <%= stylesheet_link_tag 'datatables' %> <%= javascript_include_tag "protocols/index" %> +<%= javascript_include_tag "protocols/steps" %> + + +<%= javascript_include_tag "lodash" %> +<%= javascript_include_tag "numeral" %> +<%= javascript_include_tag "numeric" %> +<%= javascript_include_tag "md5" %> +<%= javascript_include_tag "jstat" %> +<%= javascript_include_tag "formula" %> +<%= javascript_include_tag "parser" %> +<%= javascript_include_tag "ruleJS" %> +<%= javascript_include_tag "handsontable.formula" %> +<%= javascript_include_tag "big.min" %> +<%= stylesheet_link_tag "handsontable.formula" %> \ No newline at end of file diff --git a/app/views/protocols/index/_protocol_preview_modal.html.erb b/app/views/protocols/index/_protocol_preview_modal.html.erb index dd0c46182..28b29bdb0 100644 --- a/app/views/protocols/index/_protocol_preview_modal.html.erb +++ b/app/views/protocols/index/_protocol_preview_modal.html.erb @@ -3,8 +3,8 @@ - \ No newline at end of file + diff --git a/app/views/protocols/index/_protocol_preview_modal_body.html.erb b/app/views/protocols/index/_protocol_preview_modal_body.html.erb index e69de29bb..2a26af512 100644 --- a/app/views/protocols/index/_protocol_preview_modal_body.html.erb +++ b/app/views/protocols/index/_protocol_preview_modal_body.html.erb @@ -0,0 +1,179 @@ +
+
+
+ +
+
+ + <%= l(@protocol.created_at, format: :full) %> +
+
+ +
+
+ +
+
+ + <%= render partial: "protocols/header/updated_at_label.html.erb" %> +
+
+ +
+
+ +
+
+ + <%= @protocol.added_by.full_name %> +
+
+ +
+
+ +
+
+ + <%= render partial: "protocols/header/keywords_label.html.erb" %> +
+
+ +
+
+ +
+
+ + <%= render partial: "protocols/header/authors_label.html.erb" %> +
+
+ +
+
+ +
+
+ + <%= render partial: "protocols/header/description_label.html.erb" %> +
+
+
+ +
+
+
+

<%= t("protocols.steps.subtitle") %>

+
+
+
+ <% protocol.steps.order(:position).each do |step| %> +
"> +
+ <%= step.position + 1 %> +
+
+
+ <%= step.name %> | + <%= raw t("protocols.steps.published_on", timestamp: l(step.created_at, format: :full), user: step.user.full_name) %> +
+
+
+
+
+ <% if strip_tags(step.description).blank? %> + <%= t("protocols.steps.no_description") %> + <% else %> +
+ <%= step.description.html_safe %> +
+ <% end %> +
+
+
+ <% unless step.tables.blank? then %> +
+
+ <%= t("protocols.steps.tables") %> + <% step.tables.each do |table| %> +
+ <%= hidden_field(table, :contents, value: table.contents_utf_8, class: "hot-contents") %> +
+
+ <% end %> +
+ <% end %> + + <% assets = ordered_assets(step) %> + <% unless assets.blank? then %> +
+
+ <%= t("protocols.steps.files") %> +
    + <% assets.each do |asset| %> +
  • + <%= image_tag preview_asset_path(asset) if asset.is_image? %> +

    <%= truncate(asset.file_file_name, + length: Constants::FILENAME_TRUNCATION_LENGTH) %>

    +
  • + <% end %> +
+
+ <% end %> + + <% unless step.checklists.blank? then %> +
+
+ <% step.checklists.each do |checklist| %> + <%= checklist.name %> + <% if checklist.checklist_items.empty? %> +
+ <%= t("protocols.steps.empty_checklist") %> +
+ <% else %> + <% ordered_checklist_items(checklist).each do |checklist_item| %> +
+ +
+ <% end %> + <% end %> + <% end %> +
+ <% end %> + +
+
+
+
+
+ <% end %> +
+ + <% if protocol.steps.count == 0 %> +
+ <%= t("protocols.steps.no_steps") %> +
+ <% end %> +
+ +<%= javascript_include_tag "protocols/steps" %> + + +<%= javascript_include_tag "lodash" %> +<%= javascript_include_tag "numeral" %> +<%= javascript_include_tag "numeric" %> +<%= javascript_include_tag "md5" %> +<%= javascript_include_tag "jstat" %> +<%= javascript_include_tag "formula" %> +<%= javascript_include_tag "parser" %> +<%= javascript_include_tag "ruleJS" %> +<%= javascript_include_tag "handsontable.formula" %> +<%= javascript_include_tag "big.min" %> +<%= stylesheet_link_tag "handsontable.formula" %> \ No newline at end of file diff --git a/config/locales/en.yml b/config/locales/en.yml index afd667ea1..adbf4100a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1202,7 +1202,7 @@ en: thead_archived_on: "Archived at" thead_updated_at: "Last modified at" preview: - title: "Protocol preview" + title: "%{protocol} preview" linked_children: title: "Tasks linked to protocol %{protocol}" used_in: "Number of tasks linked to this protocol: %{nr}" From e555535dfb09de63100725ef7178ee3008a3b751 Mon Sep 17 00:00:00 2001 From: Mojca Lorber Date: Tue, 3 Jan 2017 10:04:14 +0100 Subject: [PATCH 3/7] add edit button to protocol preview modal --- app/assets/javascripts/protocols/index.js | 2 ++ app/controllers/protocols_controller.rb | 4 ++++ app/datatables/protocols_datatable.rb | 2 +- app/views/protocols/index/_protocol_preview_modal.html.erb | 4 +--- .../protocols/index/_protocol_preview_modal_footer.html.erb | 4 ++++ 5 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 app/views/protocols/index/_protocol_preview_modal_footer.html.erb diff --git a/app/assets/javascripts/protocols/index.js b/app/assets/javascripts/protocols/index.js index 594504062..cc52d41a6 100644 --- a/app/assets/javascripts/protocols/index.js +++ b/app/assets/javascripts/protocols/index.js @@ -201,8 +201,10 @@ function initProtocolPreviewModal() { var modal = $("#protocol-preview-modal"); var modalTitle = modal.find(".modal-title"); var modalBody = modal.find(".modal-body"); + var modalFooter = modal.find(".modal-footer"); modalTitle.html(data.title); modalBody.html(data.html); + modalFooter.html(data.footer); modal.modal("show"); initHandsOnTable($(document)); }, diff --git a/app/controllers/protocols_controller.rb b/app/controllers/protocols_controller.rb index 039cd01c0..d680d99d6 100644 --- a/app/controllers/protocols_controller.rb +++ b/app/controllers/protocols_controller.rb @@ -91,6 +91,10 @@ class ProtocolsController < ApplicationController html: render_to_string( partial: 'protocols/index/protocol_preview_modal_body.html.erb', locals: { protocol: @protocol } + ), + footer: render_to_string( + partial: 'protocols/index/protocol_preview_modal_footer.html.erb', + locals: { protocol: @protocol } ) } end diff --git a/app/datatables/protocols_datatable.rb b/app/datatables/protocols_datatable.rb index 328936063..450d5974d 100644 --- a/app/datatables/protocols_datatable.rb +++ b/app/datatables/protocols_datatable.rb @@ -95,7 +95,7 @@ class ProtocolsDatatable < AjaxDatatablesRails::Base "DT_CanArchive": can_archive_protocol(protocol), "DT_CanRestore": can_restore_protocol(protocol), "DT_CanExport": can_export_protocol(protocol), - "1": name_html(record), + "1": protocol.in_repository_archived? ? record.name : name_html(record), "2": keywords_html(record), "3": modules_html(record), "4": record.full_username_str, diff --git a/app/views/protocols/index/_protocol_preview_modal.html.erb b/app/views/protocols/index/_protocol_preview_modal.html.erb index 28b29bdb0..68f35c55b 100644 --- a/app/views/protocols/index/_protocol_preview_modal.html.erb +++ b/app/views/protocols/index/_protocol_preview_modal.html.erb @@ -7,9 +7,7 @@ - + diff --git a/app/views/protocols/index/_protocol_preview_modal_footer.html.erb b/app/views/protocols/index/_protocol_preview_modal_footer.html.erb new file mode 100644 index 000000000..430b7e028 --- /dev/null +++ b/app/views/protocols/index/_protocol_preview_modal_footer.html.erb @@ -0,0 +1,4 @@ + +<% if can_edit_protocol(@protocol) %> + <%= link_to t("general.edit"), edit_protocol_path(@protocol), :class => "btn btn-primary" %> +<% end %> From c476faca30fc7c688645ed21baef9506e2608e1f Mon Sep 17 00:00:00 2001 From: Mojca Lorber Date: Tue, 3 Jan 2017 11:04:09 +0100 Subject: [PATCH 4/7] fix hound --- app/assets/javascripts/protocols/index.js | 2 +- app/assets/stylesheets/themes/scinote.scss | 1 + app/controllers/protocols_controller.rb | 3 +-- app/datatables/protocols_datatable.rb | 8 ++++---- config/routes.rb | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/protocols/index.js b/app/assets/javascripts/protocols/index.js index cc52d41a6..89ef85b41 100644 --- a/app/assets/javascripts/protocols/index.js +++ b/app/assets/javascripts/protocols/index.js @@ -206,7 +206,7 @@ function initProtocolPreviewModal() { modalBody.html(data.html); modalFooter.html(data.footer); modal.modal("show"); - initHandsOnTable($(document)); + initHandsOnTable(modalBody); }, error: function (error) { // TODO diff --git a/app/assets/stylesheets/themes/scinote.scss b/app/assets/stylesheets/themes/scinote.scss index 390fb48e9..a46ea031c 100644 --- a/app/assets/stylesheets/themes/scinote.scss +++ b/app/assets/stylesheets/themes/scinote.scss @@ -1145,6 +1145,7 @@ ul.content-module-activities { width: 70%; } } + #protocol-preview-modal .modal-dialog { .modal-body { max-height: 75vh; diff --git a/app/controllers/protocols_controller.rb b/app/controllers/protocols_controller.rb index d680d99d6..2e6ced426 100644 --- a/app/controllers/protocols_controller.rb +++ b/app/controllers/protocols_controller.rb @@ -26,8 +26,7 @@ class ProtocolsController < ApplicationController ] before_action :check_view_all_permissions, only: [ :index, - :datatable, - :preview + :datatable ] before_action :check_unlink_permissions, only: [ :unlink, diff --git a/app/datatables/protocols_datatable.rb b/app/datatables/protocols_datatable.rb index 450d5974d..1c6ecab6c 100644 --- a/app/datatables/protocols_datatable.rb +++ b/app/datatables/protocols_datatable.rb @@ -166,10 +166,10 @@ class ProtocolsDatatable < AjaxDatatablesRails::Base end def name_html(record) - "" + - "#{record.name}" + - "" + "" \ + "#{record.name}" \ + "" end def keywords_html(record) diff --git a/config/routes.rb b/config/routes.rb index e6aa20a0a..a10db4101 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -240,7 +240,7 @@ Rails.application.routes.draw do member do get "linked_children", to: "protocols#linked_children" 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 "keywords", to: "protocols#update_keywords" post "clone", to: "protocols#clone" From a0704cd873bf01457a753d8fa57e10267c5eb1c3 Mon Sep 17 00:00:00 2001 From: Mojca Lorber Date: Tue, 3 Jan 2017 17:33:01 +0100 Subject: [PATCH 5/7] remove duplicated includes of css and js --- app/assets/javascripts/protocols/index.js | 2 ++ app/assets/javascripts/protocols/steps.js.erb | 1 - .../index/_protocol_preview_modal_body.html.erb | 15 --------------- 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/app/assets/javascripts/protocols/index.js b/app/assets/javascripts/protocols/index.js index 89ef85b41..eed54dc7c 100644 --- a/app/assets/javascripts/protocols/index.js +++ b/app/assets/javascripts/protocols/index.js @@ -205,6 +205,7 @@ function initProtocolPreviewModal() { modalTitle.html(data.title); modalBody.html(data.html); modalFooter.html(data.footer); + initHandsOnTable(modalBody); modal.modal("show"); initHandsOnTable(modalBody); }, @@ -379,6 +380,7 @@ function initModals() { $("#protocol-preview-modal").on("hidden.bs.modal", function(e) { $(this).find(".modal-title").html(""); $(this).find(".modal-body").html(""); + $(this).find(".modal-footer").html(""); }); } diff --git a/app/assets/javascripts/protocols/steps.js.erb b/app/assets/javascripts/protocols/steps.js.erb index 1f2eeeda6..9dbb8b598 100644 --- a/app/assets/javascripts/protocols/steps.js.erb +++ b/app/assets/javascripts/protocols/steps.js.erb @@ -284,7 +284,6 @@ function toggleButtons(show) { // Creates handsontable where needed function initHandsOnTable(root) { - root.find("[data-role='hot-table']").each(function() { var $container = $(this).find("[data-role='step-hot-table']"); var contents = $(this).find('.hot-contents'); diff --git a/app/views/protocols/index/_protocol_preview_modal_body.html.erb b/app/views/protocols/index/_protocol_preview_modal_body.html.erb index 2a26af512..ea4530bf9 100644 --- a/app/views/protocols/index/_protocol_preview_modal_body.html.erb +++ b/app/views/protocols/index/_protocol_preview_modal_body.html.erb @@ -162,18 +162,3 @@ <% end %> - -<%= javascript_include_tag "protocols/steps" %> - - -<%= javascript_include_tag "lodash" %> -<%= javascript_include_tag "numeral" %> -<%= javascript_include_tag "numeric" %> -<%= javascript_include_tag "md5" %> -<%= javascript_include_tag "jstat" %> -<%= javascript_include_tag "formula" %> -<%= javascript_include_tag "parser" %> -<%= javascript_include_tag "ruleJS" %> -<%= javascript_include_tag "handsontable.formula" %> -<%= javascript_include_tag "big.min" %> -<%= stylesheet_link_tag "handsontable.formula" %> \ No newline at end of file From 0011474ea392a080a2188bacbd22e0da6c1283bd Mon Sep 17 00:00:00 2001 From: Mojca Lorber Date: Tue, 3 Jan 2017 17:43:55 +0100 Subject: [PATCH 6/7] fix hound --- app/assets/stylesheets/themes/scinote.scss | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/assets/stylesheets/themes/scinote.scss b/app/assets/stylesheets/themes/scinote.scss index a46ea031c..ccd726b81 100644 --- a/app/assets/stylesheets/themes/scinote.scss +++ b/app/assets/stylesheets/themes/scinote.scss @@ -1139,7 +1139,7 @@ ul.content-module-activities { } } -/* Preview protocol modal */ +// Preview protocol modal @media (min-width: 768px) { #protocol-preview-modal .modal-dialog { width: 70%; @@ -1151,7 +1151,6 @@ ul.content-module-activities { max-height: 75vh; overflow-y: auto; width: 100%; - .ql-editor { min-height: initial; } From fe37ac3b6d758025de05bf814dea21844d83cbff Mon Sep 17 00:00:00 2001 From: Mojca Lorber Date: Tue, 3 Jan 2017 17:46:30 +0100 Subject: [PATCH 7/7] fix hound 2 --- app/assets/stylesheets/themes/scinote.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/stylesheets/themes/scinote.scss b/app/assets/stylesheets/themes/scinote.scss index ccd726b81..51b10a7d2 100644 --- a/app/assets/stylesheets/themes/scinote.scss +++ b/app/assets/stylesheets/themes/scinote.scss @@ -1151,6 +1151,7 @@ ul.content-module-activities { max-height: 75vh; overflow-y: auto; width: 100%; + .ql-editor { min-height: initial; }