Add new buttons to protocols, tasks, experiments, projects

This commit is contained in:
aignatov-bio 2019-12-04 11:27:22 +01:00
parent aba3baf685
commit ef3814ccec
41 changed files with 341 additions and 289 deletions

View file

@ -496,6 +496,10 @@ function animateReposition(el, left, top) {
function bindModeChange() {
var buttons = $('#diagram-buttons').find("a[type='button']");
$('.change-canvas-view').off().on('click', '.sci-toggle-item', function() {
$(this).next().click();
})
buttons.on('click', function() {
var action = $(this).data("action");

View file

@ -65,6 +65,7 @@ var Comments = (function() {
$el.find('textarea'),
$el.find('.new-comment-button')
);
$el.find('textarea').focus().blur();
$el.find('.new-comment-button').off('click').click(() => {
var errorField = $el.find('.new-message-error');
var newButton = this;

View file

@ -13,7 +13,7 @@
function AddUserButtonTemplate() {
return `
<a href="#" class="btn btn-primary" data-trigger="invite-users"
<a href="#" class="sci-btn" data-trigger="invite-users"
data-turbolinks="false" data-modal-id="team-invite-users-modal"
>
<span class="fas fa-plus"></span>

View file

@ -19,14 +19,14 @@
@import "handsontable.full.min";
@import "ajax-bootstrap-select.min";
@import "extend/bootstrap";
@import "themes/*";
@import "extend/*";
@import "hooks/*";
@import "partials/*";
@import "my_modules/protocols/*";
@import "my_modules/results/*";
@import "protocols/*";
@import "hooks/*";
@import "partials/*";
@import "settings/*";
@import "shared/*";
@import "themes/*";
@import "*"

View file

@ -134,8 +134,8 @@ $btn-success-color: $color-white;
$btn-success-bg: $brand-primary;
$btn-success-border: darken($btn-success-bg, 5%);
$btn-info-color: $color-white;
$btn-info-bg: $brand-info;
$btn-info-border: darken($btn-info-bg, 5%);
$btn-info-bg: $brand-primary;
$btn-info-border: $brand-primary;
$btn-warning-color: $color-white;
$btn-warning-bg: $brand-warning;
$btn-warning-border: darken($btn-warning-bg, 5%);

View file

@ -140,6 +140,7 @@
}
.new-marvinjs-upload-button {
padding: 2px 16px;
.new-marvinjs-upload-icon {
display: inline-block;

View file

@ -259,6 +259,7 @@
.my-module-recent-protocols {
flex-grow: 1;
height: 36px;
margin-bottom: 5px;
position: relative;

View file

@ -8,10 +8,14 @@
#results-toolbar {
.help_tooltips {
.btn-default {
border: 0;
color: inherit;
margin-left: 10px;
align-items: center;
display: flex;
.add-result-text {
display: inline-block;
line-height: 36px;
margin-bottom: 5px;
margin-right: 5px;
}
}
}
}

View file

@ -48,26 +48,38 @@ $color-module-hover: $brand-primary;
/* Canvas index page */
#canvas-container:not(.canvas-container-edit-mode) {
margin-top: 20px;
margin-top: 5px;
}
/**********************************
* jsPlumb CANVAS RELATED STYLING *
*********************************/
#diagram-buttons {
margin-bottom: 10px;
align-items: center;
display: flex;
#edit-canvas-button {
margin-right: 5px;
}
.actions-button {
margin-right: 15px;
}
.toolbarButtons {
align-items: center;
display: flex;
.zoom-text {
margin-right: 5px;
}
}
}
#update-canvas {
#canvas-new-module {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
.btn-group > .btn:first-child {
border-bottom-left-radius: 0;
}
.btn-group > .btn:last-child {
border-bottom-right-radius: 0;
.canvas-header{
margin-bottom: 5px;
}
}

View file

@ -13,6 +13,7 @@
padding: 7px 16px;
position: relative;
transition: .3s;
text-decoration: none;
user-select: none;
.fas {
@ -22,10 +23,21 @@
&:hover {
background: $brand-primary-hover;
color: $color-white;
text-decoration: none;
}
&:active {
background: $brand-primary-press;
color: $color-white;
text-decoration: none;
}
&:focus {
border: $border-focus;
color: $color-white;
outline: 0;
text-decoration: none;
}
&.secondary {
@ -36,11 +48,18 @@
&:hover {
background: $color-concrete;
border: $border-secondary;
color: $color-black;
}
&:active {
background: $color-alto;
border: $border-secondary;
color: $color-black;
}
&:focus {
border: $border-focus;
color: $color-black;
}
}
@ -52,11 +71,18 @@
&:hover {
background: $color-concrete;
border: $border-transparent;
color: $color-black;
}
&:active {
background: $color-alto;
border: $border-transparent;
color: $color-black;
}
&:focus {
border: $border-focus;
color: $color-black;
}
}
@ -71,6 +97,11 @@
&:active {
background: $brand-danger-press;
}
&:focus {
border: $border-focus;
color: $color-white;
}
}
&.icon-btn {
@ -82,15 +113,11 @@
}
}
&:focus {
border: $border-focus;
}
&:disabled {
background: $color-alto;
border: $border-tertiary;
color: $color-silver-chalice;
opacity: .25;
opacity: .5;
&.secondary,
&.tertiary {
@ -99,6 +126,7 @@
&:hover {
background: $color-white;
border: $border-tertiary;
color: $color-silver-chalice;
}
}
@ -118,7 +146,7 @@
float: left;
margin: 0 4px 4px 0;
&:last-of-type {
&:nth-last-child(1) {
margin-right: 0;
}
}

View file

@ -73,6 +73,7 @@ input[type="checkbox"].sci-toggle-checkbox {
background: $color-white;
border: $border-default;
border-left-color: transparent;
color: $color-black;
display: inline-block;
height: 36px;
line-height: 34px;

View file

@ -1,2 +1,108 @@
@import "constants/*";
@import "elements/*";
@import "elements/*";
// Examples
/*
<div class="demo-container" style="background: white; padding: 20px;">
<div class="sci-btn-group">
<button class="sci-btn">Button</button>
<button class="sci-btn secondary">Button</button>
<button class="sci-btn tertiary">Button</button>
<button class="sci-btn sensitive">Button</button>
</div>
<hr>
<div class="sci-btn-group">
<button class="sci-btn"><i class="fas fa-arrow-alt-circle-right"></i>Button</button>
<button class="sci-btn secondary"><i class="fas fa-arrow-alt-circle-right"></i>Button</button>
<button class="sci-btn tertiary"><i class="fas fa-arrow-alt-circle-right"></i>Button</button>
<button class="sci-btn sensitive"><i class="fas fa-arrow-alt-circle-right"></i>Button</button>
</div>
<hr>
<div class="sci-btn-group">
<button class="sci-btn icon-btn"><i class="fas fa-arrow-alt-circle-right"></i></button>
<button class="sci-btn secondary icon-btn"><i class="fas fa-arrow-alt-circle-right"></i></button>
<button class="sci-btn tertiary icon-btn"><i class="fas fa-arrow-alt-circle-right"></i></button>
<button class="sci-btn sensitive icon-btn"><i class="fas fa-arrow-alt-circle-right"></i></button>
</div>
<hr>
<div class="sci-btn-group">
<button class="sci-btn" disabled><i class="fas fa-arrow-alt-circle-right"></i>Button</button>
<button class="sci-btn secondary" disabled><i class="fas fa-arrow-alt-circle-right"></i>Button</button>
<button class="sci-btn tertiary" disabled><i class="fas fa-arrow-alt-circle-right"></i>Button</button>
<button class="sci-btn sensitive" disabled><i class="fas fa-arrow-alt-circle-right"></i>Button</button>
</div>
<hr>
<div>
<input type="checkbox" class="sci-checkbox">
<span class="sci-checkbox-label"></span>
<span style="display: inline-block; width: 20px"></span>
<input type="checkbox" class="sci-checkbox" disabled>
<span class="sci-checkbox-label"></span>
<span style="display: inline-block; width: 20px"></span>
<input type="checkbox" class="sci-checkbox" disabled checked>
<span class="sci-checkbox-label"></span>
</div>
<hr>
<div>
<input type="radio" name="test" class="sci-radio">
<span class="sci-radio-label"></span>
<span style="display: inline-block; width: 20px"></span>
<input type="radio" name="test" class="sci-radio">
<span class="sci-radio-label"></span>
<span style="display: inline-block; width: 20px"></span>
<input type="radio" name="test" class="sci-radio" disabled>
<span class="sci-radio-label"></span>
</div>
<hr>
<div>
<input type="checkbox" class="sci-toggle-checkbox">
<span class="sci-toggle-checkbox-label"></span>
<span style="display: inline-block; width: 20px"></span>
<input type="checkbox" class="sci-toggle-checkbox" disabled>
<span class="sci-toggle-checkbox-label"></span>
</div>
<hr>
<div class="sci-toggles-group">
<input type="radio" name="test1" class="sci-toggle-item">
<span class="sci-toggle-item-label"><i class="fas fa-th-large"></i></span>
<input type="radio" name="test1" class="sci-toggle-item">
<span class="sci-toggle-item-label"><i class="fas fa-th-list"></i></span>
<input type="radio" name="test1" class="sci-toggle-item">
<span class="sci-toggle-item-label"><i class="fas fa-th"></i></span>
</div>
<hr>
<div class="sci-input-container" style="width: 300px">
<input type="text" class="sci-input-field" placeholder="Placeholder"></input>
</div>
<hr>
<div class="sci-input-container left-icon" style="width: 300px">
<input type="text" class="sci-input-field" placeholder="Placeholder"></input>
<i class="fas fa-search"></i>
</div>
<hr>
<div class="sci-input-container right-icon" style="width: 300px">
<label>Right icon</label>
<input type="text" class="sci-input-field" placeholder="Placeholder"></input>
<i class="fas fa-search"></i>
</div>
<hr>
<div class="sci-input-container right-icon success" style="width: 300px">
<label>Success and icon</label>
<input type="text" class="sci-input-field" placeholder="Placeholder"></input>
<i class="fas fa-search"></i>
</div>
<hr>
<div class="sci-input-container error" data-error-text="Error text" style="width: 300px">
<label>Error</label>
<input type="text" class="sci-input-field" placeholder="Placeholder"></input>
</div>
<hr>
<div class="sci-input-container disabled" style="width: 300px">
<label>Disabled</label>
<input type="text" class="sci-input-field" placeholder="Placeholder" disabled></input>
</div>
</div>
*/

View file

@ -42,28 +42,17 @@
.complete-step-btn {
display: inline-block;
line-height: 39px;
button {
display: block;
font-size: 12px;
margin: auto 0;
padding: 3px 10px;
span {
font-size: 15px;
}
}
}
.panel-heading {
height: 39px;
border: 0;
height: 46px;
padding-bottom: 0;
padding-top: 0;
.panel-options {
bottom: 0;
line-height: 39px;
line-height: 46px;
}
span.step-number {
@ -76,19 +65,19 @@
.left-floats {
align-items: center;
display: flex;
height: 39px;
height: 100%;
padding-right: 15px;
.step-name-link {
display: flex;
flex-shrink: 1;
line-height: 39px;
line-height: 100%;
overflow: hidden;
.name-block {
display: flex;
flex-shrink: 1;
height: 39px;
height: 100%;
overflow: hidden;
@media (max-width: 1188px) {

View file

@ -286,8 +286,8 @@ a[data-toggle="tooltip"] {
.navbar-secondary {
background: $color-concrete !important;
margin-left: -280px;
padding-left: 294px;
padding-right: 97px;
padding-left: 280px;
padding-right: 82px;
margin-bottom: 0;
border-color: transparent;
border-bottom: 0;
@ -310,7 +310,7 @@ a[data-toggle="tooltip"] {
#secondary-menu {
background: $color-white;
border-bottom: 1px solid $color-gainsboro;
margin-top: 15px;
padding-top: 15px;
.open > a,
.open > a:hover,
@ -398,7 +398,7 @@ a[data-toggle="tooltip"] {
}
.navbar-without-sidebar{
padding-left: 15px;
padding-left: 0;
margin-left: 0px;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
@ -498,7 +498,7 @@ a[data-toggle="tooltip"] {
margin-bottom: 15px;
}
& > .btn-group {
& > .sci-btn-group {
margin-right: 30px;
}
}
@ -918,13 +918,15 @@ ul.content-activities {
margin-bottom: 5px;
.protocol-button {
margin-bottom: 5px;
.sci-btn-group {
float: left
}
}
.protocol-status-bar {
display: flex;
height: 33px;
margin-bottom: 5px;
height: 40px;
margin-right: 15px;
}
@ -932,7 +934,8 @@ ul.content-activities {
border-color: $color-silver;
box-shadow: none;
display: inline-block;
height: 33px;
height: 36px;
margin-bottom: 5px;
& > .panel-body {
padding: 0 0 0 15px;
@ -944,7 +947,7 @@ ul.content-activities {
.link-button,
.link-toggle {
height: 33px;
height: 36px;
position: relative;
right: -1px;
top: -1px;

View file

@ -25,11 +25,11 @@ module SearchHelper
if search_team != current_team
link_to text,
path,
class: 'btn btn-success',
class: 'sci-btn',
data: { confirm: t('users.settings.changed_team_in_search',
team: search_team.name) }
else
link_to text, path, class: 'btn btn-success'
link_to text, path, class: 'sci-btn'
end
end
end

View file

@ -1,5 +1,5 @@
<span
class="btn btn-default new-marvinjs-upload-button"
class="sci-btn tertiary new-marvinjs-upload-button"
data-object-id="<%= element_id %>"
data-object-type="<%= element_type %>"
data-marvin-url="<%= marvin_js_assets_path %>"

View file

@ -8,9 +8,9 @@
data-can-edit-connections="<%= can_manage_experiment?(@experiment) ? "yes" : "no" %>"
data-unsaved-work-text="<%=t "experiments.canvas.edit.unsaved_work" %>"
>
<%= bootstrap_form_tag url: canvas_experiment_url, method: "post" do |f| %>
<%= bootstrap_form_tag url: canvas_experiment_url, method: "post", html: {class: "canvas-header"} do |f| %>
<% if can_manage_experiment?(@experiment) %>
<%=link_to "", type: "button", class: "btn btn-primary help_tooltips", id: "canvas-new-module",
<%=link_to "", type: "button", class: "sci-btn help_tooltips", id: "canvas-new-module",
data: { tooltiplink: I18n.t('tooltips.link.task.new'),
tooltipcontent: I18n.t('tooltips.text.task.new') } do %>
<span class="hbtn-default">
@ -24,12 +24,12 @@
</span>
<% end %>
<% end %>
<div class="btn-group pull-right" role="group">
<%= link_to canvas_experiment_path(@experiment), type: "button", class: "btn btn-default cancel-edit-canvas" do %>
<div class="sci-btn-group pull-right" role="group">
<%= link_to canvas_experiment_path(@experiment), type: "button", class: "sci-btn secondary cancel-edit-canvas" do %>
<span class="hidden-xs"><%= t("experiments.canvas.edit.cancel") %></span>
<span class="fas fa-times visible-xs" style="height: 16px;margin-top: 4px;">&nbsp;</span>
<% end %>
<%= f.submit class: "btn btn-success", id: "canvas-save" do %>
<%= f.submit class: "sci-btn", id: "canvas-save" do %>
<span class="visibile-xs"><%= t("experiments.canvas.edit.save_short") %></span>
<span class="hidden-xs"><%= t("experiments.canvas.edit.save") %></span>
<% end %>

View file

@ -12,13 +12,13 @@
type: 'button',
id: 'edit-canvas-button',
data: { action: 'edit' },
class: 'ajax btn btn-primary' do %>
class: 'ajax sci-btn' do %>
<span class="fas fa-pencil-alt"></span>
<span class="hidden-xs"><%=t 'experiments.canvas.canvas_edit' %></span>
<% end %>
<!-- experiment actions -->
<span class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" id="exActionsMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span class="dropdown actions-button">
<button class="sci-btn secondary dropdown-toggle" type="button" id="exActionsMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span class="hidden-xs"><%= t'experiments.canvas.actions' %></span>
<span class="visible-xs-inline"><i class="fas fa-sort"></i></span>
<span class="caret"></span>
@ -28,15 +28,18 @@
</span>
<% end %>
<div class="toolbarButtons">
<span class="hidden-xs"><%=t 'experiments.canvas.zoom' %></span>
<div id="zoom-level-buttons" class="btn-group" data-toggle="buttons">
<%=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 %>
<span class="hidden-xs zoom-text"><%=t 'experiments.canvas.zoom' %></span>
<div id="zoom-level-buttons" class="sci-toggles-group change-canvas-view" data-toggle="buttons">
<input type="radio" name="canvas-format" class="sci-toggle-item" checked>
<%=link_to canvas_full_zoom_experiment_path(@experiment), remote: true, type: "button", class: "ajax sci-toggle-item-label", "data-action" => "full_zoom", "data-toggle" => "button", "aria-pressed" => true do %>
<span class="fas fa-th-large" aria-hidden="true" ></span>
<% end %>
<%=link_to canvas_medium_zoom_experiment_path(@experiment), remote: true, type: "button", class: "ajax btn btn-default", "data-action" => "medium_zoom" do %>
<input type="radio" name="canvas-format" class="sci-toggle-item" >
<%=link_to canvas_medium_zoom_experiment_path(@experiment), remote: true, type: "button", class: "ajax sci-toggle-item-label", "data-action" => "medium_zoom" do %>
<span class="fas fa-th-list" aria-hidden="true"></span>
<% end %>
<%=link_to canvas_small_zoom_experiment_path(@experiment), remote: true, type: "button", class: "ajax btn btn-default", "data-action" => "small_zoom" do %>
<input type="radio" name="canvas-format" class="sci-toggle-item" >
<%=link_to canvas_small_zoom_experiment_path(@experiment), remote: true, type: "button", class: "ajax sci-toggle-item-label", "data-action" => "small_zoom" do %>
<span class="fas fa-th" aria-hidden="true"></span>
<% end %>
</div>

View file

@ -1,4 +1,4 @@
<button class="btn btn-toggle">
<span class="fas fa-check"></span>
<button class="sci-btn">
<i class="fas fa-check"></i>
<%= t("my_modules.buttons.complete") %>
</button>

View file

@ -1,4 +1,4 @@
<button class="btn btn-default">
<span class="fas fa-undo-alt"></span>
<button class="sci-btn secondary ">
<i class="fas fa-undo-alt"></i>
<%= t("my_modules.buttons.uncomplete") %>
</button>

View file

@ -15,7 +15,7 @@
<i><%=t "experiments.canvas.full_zoom.modal_manage_users.contact_admins", team: @experiment.project.team.name %></i>
<% end %>
</span>
<button type="button" class="btn btn-default" data-dismiss="modal"><%=t "general.close" %></button>
<button type="button" class="sci-btn secondary" data-dismiss="modal"><%=t "general.close" %></button>
</div>
</div>
</div>

View file

@ -1,6 +1,6 @@
<div class="btn-group protocol-button" role="group" aria-label="">
<div class="btn-group">
<a class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" href="#">
<div class="sci-btn-group">
<a class="sci-btn secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" href="#">
<span class="fas fa-download"></span>
<span class="hidden-xs-custom">&nbsp;<%= t("my_modules.protocols.buttons.load_protocol") %></span>
</a>
@ -25,17 +25,17 @@
<li class="disabled"><a href="#"><span class="fas fa-paperclip"></span>&nbsp;<%= t("my_modules.protocols.buttons.load_protocol_from_file") %></a></li>
<% end %>
</ul>
<% if can_read_experiment?(@my_module.experiment) %>
<%= link_to raw("<span class=\"fas fa-upload\"></span><span class=\"hidden-xs-custom\">&nbsp;" + t('my_modules.protocols.buttons.export') + "</span>"), export_protocols_path(protocol_ids: @protocol.id, my_module_id: @my_module.id), class: "sci-btn secondary", data: { turbolinks: false } %>
<% else %>
<a href="#" class="sci-btn secondary disabled"><span class="fas fa-upload"></span><span class="hidden-xs-custom">&nbsp;<%= t("my_modules.protocols.buttons.export") %></span></a>
<% end %>
<% if can_read_protocol_in_module?(@protocol) && can_create_protocols_in_repository?(@protocol.team) %>
<a id="protocol-copy-to-repository" class="sci-btn secondary" data-action="copy-to-repository" data-hook="protocol-copy-to-repository" data-remote="true" href="<%= copy_to_repository_modal_protocol_path(@protocol, format: :json) %>">
<span class="fas fa-copy"></span><span class="hidden-xs-custom">&nbsp;<%= t("my_modules.protocols.buttons.copy_to_repository") %></span>
</a>
<% else %>
<a href="#" class="sci-btn secondary disabled"><span class="fas fa-copy"></span><span class="hidden-xs-custom">&nbsp;<%= t("my_modules.protocols.buttons.copy_to_repository") %></span></a>
<% end %>
</div>
<% if can_read_experiment?(@my_module.experiment) %>
<%= link_to raw("<span class=\"fas fa-upload\"></span><span class=\"hidden-xs-custom\">&nbsp;" + t('my_modules.protocols.buttons.export') + "</span>"), export_protocols_path(protocol_ids: @protocol.id, my_module_id: @my_module.id), class: "btn btn-default", data: { turbolinks: false } %>
<% else %>
<a href="#" class="btn btn-default disabled"><span class="fas fa-upload"></span><span class="hidden-xs-custom">&nbsp;<%= t("my_modules.protocols.buttons.export") %></span></a>
<% end %>
<% if can_read_protocol_in_module?(@protocol) && can_create_protocols_in_repository?(@protocol.team) %>
<a id="protocol-copy-to-repository" class="btn btn-default" data-action="copy-to-repository" data-hook="protocol-copy-to-repository" data-remote="true" href="<%= copy_to_repository_modal_protocol_path(@protocol, format: :json) %>">
<span class="fas fa-copy"></span><span class="hidden-xs-custom">&nbsp;<%= t("my_modules.protocols.buttons.copy_to_repository") %></span>
</a>
<% else %>
<a href="#" class="btn btn-default disabled"><span class="fas fa-copy"></span><span class="hidden-xs-custom">&nbsp;<%= t("my_modules.protocols.buttons.copy_to_repository") %></span></a>
<% end %>
</div>

View file

@ -6,45 +6,47 @@
<div class="content-pane">
<div id="results-toolbar">
<div class="pull-right">
<button class="btn btn-default" id="results-collapse-btn">
<div class="pull-right sci-btn-group">
<button class="sci-btn secondary" id="results-collapse-btn">
<span class="fas fa-caret-square-up"></span>
<span class="hidden-xs-custom"><%= t'my_modules.results.collapse_label' %></button></span>
<button class="btn btn-default" id="results-expand-btn">
<button class="sci-btn secondary" id="results-expand-btn">
<span class="fas fa-caret-square-down"></span>
<span class="hidden-xs-custom"><%= t'my_modules.results.expand_label' %></button></span>
</div>
<% if can_manage_module?(@my_module) %>
<div class="help_tooltips" style="display:inline-block"
<div class="help_tooltips"
data-tooltiplink="<%= I18n.t('tooltips.link.task.results') %>"
data-tooltipcontent="<%= I18n.t('tooltips.text.task.results') %>">
<span class="hidden-xs"><%= t'my_modules.results.add_label' %></span>
<a class="btn btn-primary"
id="new-result-text"
data-href="<%= new_my_module_result_text_path(my_module_id: @my_module.id) %>"
href="#">
<span class="fas fa-font"></span>
<span class="hidden-xs"><%= t("my_modules.results.new_text_result") %></span>
</a>
<a class="btn btn-primary"
id="new-result-table"
data-href="<%= new_my_module_result_table_path(my_module_id: @my_module.id) %>"
href="#">
<span class="fas fa-table"></span>
<span class="hidden-xs"><%= t("my_modules.results.new_table_result") %></span>
</a>
<a class="btn btn-primary"
id="new-result-asset"
data-href="<%= new_my_module_result_asset_path(my_module_id: @my_module.id) %>"
href="#">
<span class="fas fa-paperclip"></span>
<span class="hidden-xs"><%= t("my_modules.results.new_asset_result") %></span>
</a>
<%= render partial: '/assets/marvinjs/create_marvin_sketch_button.html.erb',
locals: { element_id: @my_module.id, element_type: 'Result', sketch_container: "#results[data-module-id=#{@my_module.id}]" } %>
<%= render partial: "assets/wopi/create_wopi_file_button",
locals: { element_id: @my_module.id, element_type: 'Result' } %>
<span class="hidden-xs add-result-text"><%= t'my_modules.results.add_label' %></span>
<div class="sci-btn-group">
<a class="sci-btn"
id="new-result-text"
data-href="<%= new_my_module_result_text_path(my_module_id: @my_module.id) %>"
href="#">
<span class="fas fa-font"></span>
<span class="hidden-xs"><%= t("my_modules.results.new_text_result") %></span>
</a>
<a class="sci-btn"
id="new-result-table"
data-href="<%= new_my_module_result_table_path(my_module_id: @my_module.id) %>"
href="#">
<span class="fas fa-table"></span>
<span class="hidden-xs"><%= t("my_modules.results.new_table_result") %></span>
</a>
<a class="sci-btn"
id="new-result-asset"
data-href="<%= new_my_module_result_asset_path(my_module_id: @my_module.id) %>"
href="#">
<span class="fas fa-paperclip"></span>
<span class="hidden-xs"><%= t("my_modules.results.new_asset_result") %></span>
</a>
<%= render partial: '/assets/marvinjs/create_marvin_sketch_button.html.erb',
locals: { element_id: @my_module.id, element_type: 'Result', sketch_container: "#results[data-module-id=#{@my_module.id}]" } %>
<%= render partial: "assets/wopi/create_wopi_file_button",
locals: { element_id: @my_module.id, element_type: 'Result' } %>
</div>
</div>
<% end %>
</div>

View file

@ -19,8 +19,8 @@
<%= render partial: "new.html.erb", locals: { form: f, teams: @teams } %>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><%=t "general.cancel" %></button>
<%= f.submit t("projects.index.modal_new_project.create"), class: "btn btn-success help_tooltips",
<button type="button" class="sci-btn secondary" data-dismiss="modal"><%=t "general.cancel" %></button>
<%= f.submit t("projects.index.modal_new_project.create"), class: "sci-btn help_tooltips",
data: {
tooltiplink: I18n.t('tooltips.link.new_project'),
tooltipcontent: I18n.t('tooltips.text.new_project')
@ -43,8 +43,8 @@
<div class="modal-body">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><%=t "general.cancel" %></button>
<button type="button" class="btn btn-success" data-action="submit"><%=t "projects.index.modal_edit_project.submit" %></button>
<button type="button" class="sci-btn secondary" data-dismiss="modal"><%=t "general.cancel" %></button>
<button type="button" class="sci-btn" data-action="submit"><%=t "projects.index.modal_edit_project.submit" %></button>
</div>
</div>
</div>
@ -75,11 +75,11 @@
<div class="modal-body">
</div>
<div class="modal-footer">
<button id="export-projects-modal-close" type="button" class="btn btn-default" data-dismiss="modal"><%=t "general.close" %></button>
<button id="export-projects-modal-cancel" type="button" class="btn btn-default" data-dismiss="modal"><%=t "general.cancel" %></button>
<button id="export-projects-modal-close" type="button" class="sci-btn secondary" data-dismiss="modal"><%=t "general.close" %></button>
<button id="export-projects-modal-cancel" type="button" class="sci-btn secondary" data-dismiss="modal"><%=t "general.cancel" %></button>
<button id="export-projects-modal-submit"
type="button"
class="btn btn-success"
class="sci-btn"
data-export-projects-submit-url="<%= export_projects_team_path(current_team) %>">
<%=t "projects.export_projects.modal_submit" %>
</button>
@ -96,7 +96,7 @@
<% if @teams.exists? && can_create_projects?(current_team) %>
<h2><strong><%=t 'projects.index.no_projects.title' %></strong></h2>
<br />
<a class="btn btn-primary btn-lg new-project-btn">
<a class="sci-btn new-project-btn">
<span class="fas fa-plus"></span>
<span class="hidden-xs"><%= t('projects.index.no_projects.create_new_button') %></span>
</a>
@ -114,7 +114,7 @@
<% if @teams.exists? && can_create_projects?(current_team) %>
<!-- new project button -->
<a class="btn btn-primary new-project-btn">
<a class="sci-btn new-project-btn">
<span class="fas fa-plus" aria-hidden="true"></span>
<span class="hidden-xs"><%=t "projects.index.new" %></span>
</a>
@ -122,7 +122,7 @@
<!-- project sort -->
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" id="sortMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<button class="sci-btn tertiary dropdown-toggle" type="button" id="sortMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<span><%= t("general.sort.#{@current_sort}_html") %></span>
<span class="caret"></span>
</button>
@ -140,7 +140,7 @@
</div>
<!-- export projects button -->
<button type="button" class="btn btn-default pull-right"
<button type="button" class="sci-btn secondary pull-right"
id="export-projects-button"
data-export-projects-modal-url="<%= export_projects_modal_team_path(current_team) %>"
disabled>
@ -169,105 +169,3 @@
<% end %>
<%= javascript_include_tag "projects/index" %>
<!-- remove next part before merge -->
<div class="demo-container" style="background: white; padding: 20px;">
<div class="sci-btn-group">
<button class="sci-btn">Button</button>
<button class="sci-btn secondary">Button</button>
<button class="sci-btn tertiary">Button</button>
<button class="sci-btn sensitive">Button</button>
</div>
<hr>
<div class="sci-btn-group">
<button class="sci-btn"><i class="fas fa-arrow-alt-circle-right"></i>Button</button>
<button class="sci-btn secondary"><i class="fas fa-arrow-alt-circle-right"></i>Button</button>
<button class="sci-btn tertiary"><i class="fas fa-arrow-alt-circle-right"></i>Button</button>
<button class="sci-btn sensitive"><i class="fas fa-arrow-alt-circle-right"></i>Button</button>
</div>
<hr>
<div class="sci-btn-group">
<button class="sci-btn icon-btn"><i class="fas fa-arrow-alt-circle-right"></i></button>
<button class="sci-btn secondary icon-btn"><i class="fas fa-arrow-alt-circle-right"></i></button>
<button class="sci-btn tertiary icon-btn"><i class="fas fa-arrow-alt-circle-right"></i></button>
<button class="sci-btn sensitive icon-btn"><i class="fas fa-arrow-alt-circle-right"></i></button>
</div>
<hr>
<div class="sci-btn-group">
<button class="sci-btn" disabled><i class="fas fa-arrow-alt-circle-right"></i>Button</button>
<button class="sci-btn secondary" disabled><i class="fas fa-arrow-alt-circle-right"></i>Button</button>
<button class="sci-btn tertiary" disabled><i class="fas fa-arrow-alt-circle-right"></i>Button</button>
<button class="sci-btn sensitive" disabled><i class="fas fa-arrow-alt-circle-right"></i>Button</button>
</div>
<hr>
<div>
<input type="checkbox" class="sci-checkbox">
<span class="sci-checkbox-label"></span>
<span style="display: inline-block; width: 20px"></span>
<input type="checkbox" class="sci-checkbox" disabled>
<span class="sci-checkbox-label"></span>
<span style="display: inline-block; width: 20px"></span>
<input type="checkbox" class="sci-checkbox" disabled checked>
<span class="sci-checkbox-label"></span>
</div>
<hr>
<div>
<input type="radio" name="test" class="sci-radio">
<span class="sci-radio-label"></span>
<span style="display: inline-block; width: 20px"></span>
<input type="radio" name="test" class="sci-radio">
<span class="sci-radio-label"></span>
<span style="display: inline-block; width: 20px"></span>
<input type="radio" name="test" class="sci-radio" disabled>
<span class="sci-radio-label"></span>
</div>
<hr>
<div>
<input type="checkbox" class="sci-toggle-checkbox">
<span class="sci-toggle-checkbox-label"></span>
<span style="display: inline-block; width: 20px"></span>
<input type="checkbox" class="sci-toggle-checkbox" disabled>
<span class="sci-toggle-checkbox-label"></span>
</div>
<hr>
<div class="sci-toggles-group">
<input type="radio" name="test1" class="sci-toggle-item">
<span class="sci-toggle-item-label"><i class="fas fa-th-large"></i></span>
<input type="radio" name="test1" class="sci-toggle-item">
<span class="sci-toggle-item-label"><i class="fas fa-th-list"></i></span>
<input type="radio" name="test1" class="sci-toggle-item">
<span class="sci-toggle-item-label"><i class="fas fa-th"></i></span>
</div>
<hr>
<div class="sci-input-container" style="width: 300px">
<input type="text" class="sci-input-field" placeholder="Placeholder"></input>
</div>
<hr>
<div class="sci-input-container left-icon" style="width: 300px">
<input type="text" class="sci-input-field" placeholder="Placeholder"></input>
<i class="fas fa-search"></i>
</div>
<hr>
<div class="sci-input-container right-icon" style="width: 300px">
<label>Right icon</label>
<input type="text" class="sci-input-field" placeholder="Placeholder"></input>
<i class="fas fa-search"></i>
</div>
<hr>
<div class="sci-input-container right-icon success" style="width: 300px">
<label>Success and icon</label>
<input type="text" class="sci-input-field" placeholder="Placeholder"></input>
<i class="fas fa-search"></i>
</div>
<hr>
<div class="sci-input-container error" data-error-text="Error text" style="width: 300px">
<label>Error</label>
<input type="text" class="sci-input-field" placeholder="Placeholder"></input>
</div>
<hr>
<div class="sci-input-container disabled" style="width: 300px">
<label>Disabled</label>
<input type="text" class="sci-input-field" placeholder="Placeholder" disabled></input>
</div>
</div>

View file

@ -2,7 +2,7 @@
<div class="row">
<div class="pull-left" style="margin: 0 0 20px 15px;">
<a href="#"
class="btn btn-primary"
class="sci-btn"
data-action="new-step"
data-href="<%= new_protocol_step_path(protocol_id: @protocol.id, format: :json) %>">
<span class="fas fa-plus" aria-hidden="true"></span>
@ -10,10 +10,10 @@
</a>
</div>
<div class="pull-right expand-all-steps" style="margin: 0 15px 20px 0; display: <%= 'none' if @protocol.steps.empty? %>">
<a class="btn btn-default" data-action="collapse-steps">
<a class="sci-btn secondary" data-action="collapse-steps">
<span class="fas fa-caret-square-up"></span>
<span class="hidden-xs"><%= t("protocols.steps.collapse_label") %></a></span>
<a class="btn btn-default" data-action="expand-steps">
<a class="sci-btn secondary" data-action="expand-steps">
<span class="fas fa-caret-square-down"></span>
<span class="hidden-xs"><%= t("protocols.steps.expand_label") %></a></span>
</div>
@ -28,7 +28,7 @@
<div class="row">
<div class="pull-left" style="margin: 0 0 20px 15px;">
<a href="#"
class="btn btn-primary"
class="sci-btn"
data-action="new-step"
data-href="<%= new_protocol_step_path(protocol_id: @protocol.id, format: :json) %>"
style="<%= @protocol.steps.empty? ? 'display: none;' : '' %>">

View file

@ -28,39 +28,38 @@
<div class="protocols-description">
<%= t(@type == :public ? "protocols.index.public_description" : "protocols.index.private_description") %>
</div>
<div class="btn-group" role="group">
<a class="btn btn-primary" <%= can_create_protocols_in_repository?(@current_team) ? "data-action=create-new" : "disabled=disabled" %> data-url="<%= create_new_modal_protocols_path(team: @current_team, type: @type) %>">
<div class="sci-btn-group" role="group">
<button class="sci-btn" <%= can_create_protocols_in_repository?(@current_team) ? "data-action=create-new" : "disabled" %> data-url="<%= create_new_modal_protocols_path(team: @current_team, type: @type) %>">
<span class="fas fa-plus"></span>
<span class="hidden-xs">&nbsp;<%= t("protocols.index.create_new") %></span>
</a>
<a class="btn btn-default" data-action="edit">
</button>
<button class="sci-btn secondary" data-action="edit" disabled>
<span class="fas fa-pencil-alt"></span>
<span class="hidden-xs">&nbsp;<%= t("protocols.index.edit") %></span>
</a>
<a class="btn btn-default" data-action="clone">
</button>
<button class="sci-btn secondary" data-action="clone" disabled>
<span class="fas fa-copy"></span>
<span class="hidden-xs">&nbsp;<%= t("protocols.index.clone_btn") %></span>
</a>
</button>
<% if @type == :public %>
<a class="btn btn-default" data-action="make-private" data-url="<%= make_private_protocols_path %>">
<button class="sci-btn secondary" data-action="make-private" data-url="<%= make_private_protocols_path %>" disabled>
<span class="fas fa-eye-slash"></span>
<span class="hidden-xs">&nbsp;<%= t("protocols.index.make_private") %></span>
</a>
</button>
<% elsif @type == :private %>
<a class="btn btn-default" data-action="publish" data-url="<%= publish_protocols_path %>">
<button class="sci-btn secondary" data-action="publish" data-url="<%= publish_protocols_path %>" disabled>
<span class="fas fa-eye"></span>
<span class="hidden-xs">&nbsp;<%= t("protocols.index.publish") %></span>
</a>
</button>
<% end %>
</div>
<div id="import-export-protocols" class="btn-group" role="group">
<a class="btn btn-default btn-open-file"
<div id="import-export-protocols" class="sci-btn-group" role="group">
<button class="sci-btn secondary btn-open-file"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
href="#"
<%= 'disabled' unless can_create_protocols_in_repository?(@current_team) %>>
<span class="fas fa-download"></span><span class="hidden-xs">&nbsp;<%= t("protocols.index.import") %></span></a>
<span class="fas fa-download"></span><span class="hidden-xs">&nbsp;<%= t("protocols.index.import") %></span></button>
<% if can_create_protocols_in_repository?(@current_team) %>
<ul class="dropdown-menu">
<li>
@ -81,27 +80,27 @@
</li>
</ul>
<% end %>
<a class="btn btn-default" data-action="export" data-export-url="<%= export_protocols_path() %>">
<button class="sci-btn secondary" data-action="export" data-export-url="<%= export_protocols_path() %>" disabled>
<span class="fas fa-upload"></span>
<span class="hidden-xs">&nbsp;<%= t("protocols.index.export") %></span>
</a>
</button>
</div>
<div class="btn-group" role="group">
<a class="btn btn-default" data-action="archive" data-url="<%= archive_protocols_path %>">
<div class="sci-btn-group" role="group">
<button class="sci-btn secondary" data-action="archive" data-url="<%= archive_protocols_path %>" disabled>
<span class="fas fa-archive"></span>
<span class="hidden-xs">&nbsp;<%= t("protocols.index.archive_action") %></span>
</a>
</button>
</div>
<% elsif @type == :archive %>
<div class="protocols-description">
<%= t("protocols.index.archive.description") %>
</div>
<div class="btn-group" role="group">
<a class="btn btn-default" data-action="restore" data-url="<%= restore_protocols_path %>">
<div class="sci-btn-group" role="group">
<button class="sci-btn secondary" data-action="restore" data-url="<%= restore_protocols_path %>" disabled>
<span class="fas fa-sync-alt"></span>
<span class="hidden-xs">&nbsp;<%= t("protocols.index.restore") %></span>
</a>
</button>
</div>
<% end %>

View file

@ -9,8 +9,8 @@
</div>
<div class="modal-body"></div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal"><%= t("general.cancel") %></button>
<button type="button" class="btn btn-success" data-action="submit"><%= t("protocols.index.create.submit") %></button>
<button type="button" class="sci-btn secondary" data-dismiss="modal"><%= t("general.cancel") %></button>
<button type="button" class="sci-btn" data-action="submit"><%= t("protocols.index.create.submit") %></button>
</div>
</div>
</div>

View file

@ -3,8 +3,8 @@
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h2 class="modal-title" id="protocol-preview-modal-label">
</h2>
<h4 class="modal-title" id="protocol-preview-modal-label">
</h4>
</div>
<div class="modal-body"></div>
<div class="modal-footer"></div>

View file

@ -3,7 +3,7 @@
<div data-role="steps-container">
<div class="row">
<div class="col-xs-8">
<h2><%= t("protocols.steps.subtitle") %></h2>
<h4><%= t("protocols.steps.subtitle") %></h4>
</div>
</div>
<div id="steps">

View file

@ -1,4 +1,4 @@
<button type="button" class="btn btn-default" data-dismiss="modal"><%=t "general.close" %></button>
<button type="button" class="sci-btn secondary" data-dismiss="modal"><%=t "general.close" %></button>
<% if can_manage_protocol_in_repository?(@protocol) %>
<%= route_to_other_team_btn edit_protocol_path(protocol),
protocol.team,

View file

@ -11,11 +11,11 @@
<% end %>
<hr>
<div class="align-right">
<button type="button" class="btn btn-default cancel-edit">
<button type="button" class="sci-btn secondary cancel-edit">
<%= t("general.cancel")%>
</button>
<%= f.submit t("general.save"),
class: 'btn btn-success save-result',
class: 'sci-btn save-result',
onclick: "Results.processResult(event, Results.ResultTypeEnum.FILE);" %>
</div>
<% end %>

View file

@ -22,10 +22,10 @@
<br />
<div class="align-right">
<%= f.submit t('general.cancel'),
class: 'btn btn-default cancel-new',
class: 'sci-btn secondary cancel-new',
onclick: 'DragNDropResults.destroyAll();' %>
<%= f.submit t('result_assets.new.create'),
class: 'btn btn-success save-result',
class: 'sci-btn save-result',
onclick: 'DragNDropResults.processResult(event);',
disabled: true,
data: { href: my_module_result_assets_path(format: :json) } %>

View file

@ -12,11 +12,11 @@
</div>
<hr>
<div class="align-right">
<button type="button" class="btn btn-default cancel-edit">
<button type="button" class="sci-btn secondary cancel-edit">
<%= t("general.cancel")%>
</button>
<%= f.submit t("general.save"),
class: 'btn btn-success save-result',
class: 'sci-btn save-result',
onclick: "Results.processResult(event, Results.ResultTypeEnum.TABLE);" %>
</div>
<% end %>

View file

@ -11,11 +11,11 @@
<% end %>
</div>
<div class="align-right">
<button type="button" class="btn btn-default cancel-new">
<button type="button" class="sci-btn secondary cancel-new">
<%= t("general.cancel")%>
</button>
<%= f.submit t("result_tables.new.create"),
class: 'btn btn-success save-result',
class: 'sci-btn save-result',
onclick: "Results.processResult(event, Results.ResultTypeEnum.TABLE);" %>
</div>
<% end %>

View file

@ -14,11 +14,11 @@
last_updated: @result.updated_at.to_i * 1000 }) %>
<% end %><br />
<div class="align-right">
<button type="button" class="btn btn-default cancel-edit">
<button type="button" class="sci-btn secondary cancel-edit">
<%= t("general.cancel")%>
</button>
<%= f.submit t("general.save"),
class: 'btn btn-success save-result',
class: 'sci-btn save-result',
onclick: "Results.processResult(event, Results.ResultTypeEnum.TEXT);" %>
</div>
<% end %>

View file

@ -13,11 +13,11 @@
last_updated: @result.updated_at.to_i * 1000 }) %>
<% end %><br />
<div class="align-right">
<button type="button" class="btn btn-default cancel-new">
<button type="button" class="sci-btn secondary cancel-new">
<%= t("general.cancel")%>
</button>
<%= f.submit t("result_texts.new.create"),
class: 'btn btn-success save-result',
class: 'sci-btn save-result',
onclick: "Results.processResult(event, Results.ResultTypeEnum.TEXT);" %>
</div>
<% end %>

View file

@ -115,12 +115,12 @@ invite_to_team = type.in?(%w(invite_to_team invite_to_team_with_role))
<div class="modal-footer">
<div data-role="step-form">
<button type="button" class="btn btn-default" data-dismiss="modal">
<button type="button" class="sci-btn secondary" data-dismiss="modal">
<%= t('general.cancel') %>
</button>
<!-- Invite buttons -->
<button type="button" class="btn btn-success help_tooltips"
<button type="button" class="sci-btn help_tooltips"
data-tooltiplink="<%= I18n.t('tooltips.link.invite_to_sci') %>"
data-tooltipcontent="<%= I18n.t('tooltips.text.invite_to_sci') %>"
data-role="invite-btn" data-action="invite"
@ -129,7 +129,7 @@ invite_to_team = type.in?(%w(invite_to_team invite_to_team_with_role))
</button>
<div class="btn-group" data-role="invite-with-role-div">
<button type="button" class="btn btn-success dropdown-toggle help_tooltips"
<button type="button" class="sci-btn dropdown-toggle help_tooltips"
data-tooltiplink="<%= I18n.t('tooltips.link.invite_to_sci') %>"
data-tooltipcontent="<%= I18n.t('tooltips.text.invite_to_sci') %>"
data-toggle="dropdown" data-id="invite-btn" aria-haspopup="true"

View file

@ -3,10 +3,10 @@
<h4><%= t("protocols.steps.edit.edit_step_title") %></h4>
<%= render partial: "empty_step.html.erb", locals: {step: @step, f: f} %>
<div class="align-right">
<a type="button" data-action="cancel-edit" class="btn btn-default" href="<%= step_path(id: @step, format: :json) %>" data-remote="true">
<a type="button" data-action="cancel-edit" class="sci-btn secondary" href="<%= step_path(id: @step, format: :json) %>" data-remote="true">
<%= t("general.cancel")%>
</a>
<%= f.submit t("protocols.steps.edit.edit_step"), class: 'btn btn-success step-save', onclick: "processStep(event, true);" %>
<%= f.submit t("protocols.steps.edit.edit_step"), class: 'sci-btn step-save', onclick: "processStep(event, true);" %>
</div>
<% end %>
</div>

View file

@ -3,10 +3,10 @@
<h4><%= t("protocols.steps.new.add_step_title") %></h4>
<%= render partial: "empty_step.html.erb", locals: {step: @step, f: f} %>
<div class="align-right">
<button type="button" data-action="cancel-new" class="btn btn-default">
<button type="button" data-action="cancel-new" class="sci-btn secondary">
<%= t("general.cancel")%>
</button>
<%= f.submit t("protocols.steps.new.add_step"), class: 'btn btn-success step-save', onclick: "processStep(event, false);" %>
<%= f.submit t("protocols.steps.new.add_step"), class: 'sci-btn step-save', onclick: "processStep(event, false);" %>
</div>
<% end %>
</div>

View file

@ -9,7 +9,7 @@
<div data-action="uncomplete-step"
class="complete-step-btn"
data-link-url="<%= toggle_step_state_step_path(step)%>">
<button class="btn btn-default">
<button class="sci-btn secondary">
<span class="fas fa-times"></span>
<%= t("protocols.steps.options.uncomplete_title") %>
</button>
@ -18,7 +18,7 @@
<div data-action="complete-step"
class="complete-step-btn"
data-link-url="<%= toggle_step_state_step_path(step)%>">
<button class="btn btn-toggle">
<button class="sci-btn secondary">
<span class="fas fa-check"></span>
<%= t("protocols.steps.options.complete_title") %>
</button>

View file

@ -24,7 +24,7 @@
<% end %>
<% if can_create_teams? %>
<span id="new-team-button">
<%= link_to new_team_path, class: "btn btn-primary", style: "margin-left: 30px;" do %>
<%= link_to new_team_path, class: "sci-btn", style: "margin-left: 30px;" do %>
<span class="fas fa-plus"></span>
<span class="hidden-xs">
<%= t("users.settings.teams.index.new_team") %>