mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-06 06:56:54 +08:00
Merge pull request #152 from mlorb/ml_sci_428
fixes responsiveness on mobile phone for sample view [SCI-428]
This commit is contained in:
commit
587369e7a6
4 changed files with 35 additions and 9 deletions
|
@ -9,13 +9,13 @@ var selectedSample;
|
|||
|
||||
table = $("#samples").DataTable({
|
||||
order: [[2, "desc"]],
|
||||
dom: "RB<'row'<'col-sm-9 toolbar'l><'col-sm-3'f>>tpi",
|
||||
dom: "RB<'row'<'col-sm-9-custom toolbar'l><'col-sm-3-custom'f>>tpi",
|
||||
stateSave: true,
|
||||
buttons: [{
|
||||
extend: "colvis",
|
||||
text: function () {
|
||||
return '<span class="glyphicon glyphicon-option-horizontal"></span> ' +
|
||||
'<span class="hidden-xs">' +
|
||||
"<span class='hidden-xs-custom'>" +
|
||||
I18n.t('samples.column_visibility') +
|
||||
'</span>';
|
||||
},
|
||||
|
|
26
app/assets/stylesheets/extend/bootstrap.scss
vendored
26
app/assets/stylesheets/extend/bootstrap.scss
vendored
|
@ -23,3 +23,29 @@
|
|||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1075px) {
|
||||
.col-sm-3-custom {
|
||||
float: left;
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.col-sm-9-custom {
|
||||
float: left;
|
||||
width: 75%;
|
||||
}
|
||||
}
|
||||
|
||||
.col-sm-3-custom {
|
||||
min-height: 1px;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.col-sm-9-custom {
|
||||
min-height: 1px;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
position: relative;
|
||||
}
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
<div class="pull-right">
|
||||
<button class="btn btn-greyed" id="results-collapse-btn">
|
||||
<span class="glyphicon glyphicon-collapse-up"></span>
|
||||
<span class="hidden-xs"><%= t'my_modules.results.collapse_label' %></button></span>
|
||||
<span class="hidden-xs-custom"><%= t'my_modules.results.collapse_label' %></button></span>
|
||||
<button class="btn btn-greyed" id="results-expand-btn">
|
||||
<span class="glyphicon glyphicon-collapse-down"></span>
|
||||
<span class="hidden-xs"><%= t'my_modules.results.expand_label' %></button></span>
|
||||
<span class="hidden-xs-custom"><%= t'my_modules.results.expand_label' %></button></span>
|
||||
</div>
|
||||
|
||||
<% if can_create_result_text_in_module(@my_module) or
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
<div class="dropdown pull-right" style="display: inline;">
|
||||
<button class="btn btn-default dropdown-toggle" type="button" id="addMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" <%= "disabled" unless can_add_sample_related_things_to_organization%>>
|
||||
<span class="glyphicon glyphicon-plus"></span>
|
||||
<span class="hidden-xs">
|
||||
<span class="hidden-xs-custom">
|
||||
<%= t'More' %>
|
||||
<span class="caret"></span>
|
||||
</span>
|
||||
|
@ -92,14 +92,14 @@
|
|||
<div class="toolbarButtons" style="display:none">
|
||||
<button type="button" class="btn btn-default editAdd" id="editSample" onclick="onClickEdit()" disabled>
|
||||
<span class="glyphicon glyphicon-pencil"></span>
|
||||
<span class="hidden-xs"><%= t("samples.edit_sample") %></span>
|
||||
<span class="hidden-xs-custom"><%= t("samples.edit_sample") %></span>
|
||||
</button>
|
||||
|
||||
<% if can_delete_samples(@organization) %>
|
||||
<button type="button" class="btn btn-default"
|
||||
id="deleteSamplesButton" data-target="#deleteSamples" data-toggle="modal" disabled>
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
<span class="hidden-xs"><%= t'samples.delete_samples' %></span>
|
||||
<span class="hidden-xs-custom"><%= t'samples.delete_samples' %></span>
|
||||
<%= submit_tag MyModulesController::DELETE_SAMPLES, :class => "hidden delete_samples_submit" %>
|
||||
</button>
|
||||
<% end %>
|
||||
|
@ -108,7 +108,7 @@
|
|||
<button type="button" class="btn btn-default"
|
||||
id="assignSamples" onclick="$(this).next().click();" disabled>
|
||||
<span class="glyphicon glyphicon-ok-circle"></span>
|
||||
<span class="hidden-xs"><%= t'samples.assign_samples_to_module' %></span>
|
||||
<span class="hidden-xs-custom"><%= t'samples.assign_samples_to_module' %></span>
|
||||
</button>
|
||||
<%= submit_tag MyModulesController::ASSIGN_SAMPLES, :class => "hidden" %>
|
||||
<% end %>
|
||||
|
@ -116,7 +116,7 @@
|
|||
<button type="button" class="btn btn-default"
|
||||
id="unassignSamples" onclick="$(this).next().click();" disabled>
|
||||
<span class="glyphicon glyphicon-ban-circle"></span>
|
||||
<span class="hidden-xs"><%= t'samples.unassign_samples_to_module' %></span>
|
||||
<span class="hidden-xs-custom"><%= t'samples.unassign_samples_to_module' %></span>
|
||||
</button>
|
||||
<%= submit_tag MyModulesController::UNASSIGN_SAMPLES, :class => "hidden" %>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in a new issue