From 4c66ca6f80f28440df60c143b8d72b0ca3f9373f Mon Sep 17 00:00:00 2001 From: Mojca Lorber Date: Thu, 8 Sep 2016 09:17:58 +0200 Subject: [PATCH 1/3] fixes navbar size when resizing window --- app/assets/javascripts/sidebar.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/assets/javascripts/sidebar.js b/app/assets/javascripts/sidebar.js index ba7e38cdb..35573c85e 100644 --- a/app/assets/javascripts/sidebar.js +++ b/app/assets/javascripts/sidebar.js @@ -237,6 +237,7 @@ function resizeSidebarContents() { var wrapper = $("#wrapper"); var tree = $("#sidebar-wrapper .tree"); var toggled = sessionIsSidebarToggled(); + var navbar = $(".navbar-secondary"); if (tree.length && tree.length == 1) { tree.css( @@ -248,8 +249,10 @@ function resizeSidebarContents() { if (toggled === null) { if ($(window).width() < SCREEN_SIZE_LARGE) { wrapper.addClass("toggled"); + navbar.addClass("navbar-without-sidebar"); } else { wrapper.removeClass("toggled"); + navbar.removeClass("navbar-without-sidebar"); } } } From 302a77761547dd7d45695122f234498c0832fba0 Mon Sep 17 00:00:00 2001 From: Mojca Lorber Date: Thu, 8 Sep 2016 12:37:06 +0200 Subject: [PATCH 2/3] fixes button collision --- app/assets/stylesheets/extend/bootstrap.scss | 7 ++ app/views/experiments/canvas.html.erb | 104 +++++++++--------- .../protocols/_protocol_buttons.html.erb | 10 +- 3 files changed, 66 insertions(+), 55 deletions(-) diff --git a/app/assets/stylesheets/extend/bootstrap.scss b/app/assets/stylesheets/extend/bootstrap.scss index 5db0294ef..9cd4d9182 100644 --- a/app/assets/stylesheets/extend/bootstrap.scss +++ b/app/assets/stylesheets/extend/bootstrap.scss @@ -16,3 +16,10 @@ .nav-tabs > li.active.has-error > a { color: $color-apple-blossom; } + +@media (max-width: 886px) { + /* line 18, /usr/local/bundle/gems/bootstrap-sass-3.3.6/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss */ + .hidden-xs-custom { + display: none !important; + } +} \ No newline at end of file diff --git a/app/views/experiments/canvas.html.erb b/app/views/experiments/canvas.html.erb index 0567fe6af..b4be61705 100644 --- a/app/views/experiments/canvas.html.erb +++ b/app/views/experiments/canvas.html.erb @@ -2,60 +2,64 @@ <%= render partial: "shared/sidebar" %> <%= render partial: "shared/secondary_navigation" %> -
- <% if can_edit_canvas(@experiment) %> - <%=link_to canvas_edit_experiment_url(@experiment), - remote: true, - type: 'button', - id: 'edit-canvas-button', - class: 'ajax btn btn-default', - data: { - action: 'edit', - intro: t('tutorial.canvas_click_edit_workflow_html'), - step: '5', - position: 'left' - } do %> - - +
+
+
+ <% if can_edit_canvas(@experiment) %> + <%=link_to canvas_edit_experiment_url(@experiment), + remote: true, + type: 'button', + id: 'edit-canvas-button', + class: 'ajax btn btn-default', + data: { + action: 'edit', + intro: t('tutorial.canvas_click_edit_workflow_html'), + step: '5', + position: 'left' + } do %> + + + <% end %> + <% end %> + + <% if can_edit_experiment(@experiment) || can_archive_experiment(@experiment) %> + + + <%= render partial: 'experiments/dropdown_actions.html.erb', + locals: { project: @project, experiment: @experiment } %> + + <% end %> +
+ +
+ <%=link_to canvas_full_zoom_experiment_path(@experiment), remote: true, type: "button", class: "ajax btn btn-default active", "data-action" => "full_zoom", "data-toggle" => "button", "aria-pressed" => true do %> + <% end %> - <% end %> - - <% if can_edit_experiment(@experiment) || can_archive_experiment(@experiment) %> - - - <%= render partial: 'experiments/dropdown_actions.html.erb', - locals: { project: @project, experiment: @experiment } %> - - <% end %> -
- -
- <%=link_to canvas_full_zoom_experiment_path(@experiment), remote: true, type: "button", class: "ajax btn btn-default active", "data-action" => "full_zoom", "data-toggle" => "button", "aria-pressed" => true do %> - - <% end %> - <%=link_to canvas_medium_zoom_experiment_path(@experiment), remote: true, type: "button", class: "ajax btn btn-default", "data-action" => "medium_zoom" do %> - - <% end %> - <%=link_to canvas_small_zoom_experiment_path(@experiment), remote: true, type: "button", class: "ajax btn btn-default", "data-action" => "small_zoom" do %> - + <%=link_to canvas_medium_zoom_experiment_path(@experiment), remote: true, type: "button", class: "ajax btn btn-default", "data-action" => "medium_zoom" do %> + + <% end %> + <%=link_to canvas_small_zoom_experiment_path(@experiment), remote: true, type: "button", class: "ajax btn btn-default", "data-action" => "small_zoom" do %> + + <% end %> +
+
+ + <% if can_create_experiment(@project) && @experiment.active? %> + <%= link_to new_project_experiment_url(@project), + remote: true, + type: "button", + id: 'new-experiment', + class: "btn btn-primary pull-right" do %> + + <%=t 'experiments.new.create' %> + <% end %> <% end %>
- - <% if can_create_experiment(@project) && @experiment.active? %> - <%= link_to new_project_experiment_url(@project), - remote: true, - type: "button", - id: 'new-experiment', - class: "btn btn-primary pull-right" do %> - - - <% end %> - <% end %>
- +
<% if can_export_protocol_from_module(@my_module) %> - +  <%= t("my_modules.protocols.buttons.export") %> <% else %> - +  <%= t("my_modules.protocols.buttons.export") %> <% end %> <% if can_copy_protocol_to_repository(@my_module) %> <%= link_to copy_to_repository_modal_protocol_path(@protocol, format: :json), class: "btn btn-default", remote: true, data: { action: "copy-to-repository" } do %> - +  <%= t("my_modules.protocols.buttons.copy_to_repository") %> <% end %> <% else %> - +  <%= t("my_modules.protocols.buttons.copy_to_repository") %> <% end %>
\ No newline at end of file From 0435011fee13e0a19e187d37a8894acaf8cc1cec Mon Sep 17 00:00:00 2001 From: Mojca Lorber Date: Thu, 8 Sep 2016 12:43:30 +0200 Subject: [PATCH 3/3] fixes hound --- app/assets/stylesheets/extend/bootstrap.scss | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/extend/bootstrap.scss b/app/assets/stylesheets/extend/bootstrap.scss index 9cd4d9182..a33f5763a 100644 --- a/app/assets/stylesheets/extend/bootstrap.scss +++ b/app/assets/stylesheets/extend/bootstrap.scss @@ -18,8 +18,8 @@ } @media (max-width: 886px) { - /* line 18, /usr/local/bundle/gems/bootstrap-sass-3.3.6/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss */ + // line 18, /usr/local/bundle/gems/bootstrap-sass-3.3.6/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss .hidden-xs-custom { - display: none !important; + display: none; } -} \ No newline at end of file +}