Skip to content
Snippets Groups Projects

ENH: Show min-width warning in tour and edit mode

Merged Florian Spreckelsen requested to merge f-min-width-warning into f-boot-tour
1 unresolved thread
2 files
+ 8
6
Compare changes
  • Side-by-side
  • Inline

Files

+ 8
0
@@ -531,6 +531,9 @@ var edit_mode = new function() {
$(target).append(edit_mode_li);
$(".caosdb-f-btn-toggle-edit-mode").click(toggle_function);
var min_width_warning = $('<div class="alert alert-warning caosdb-edit-min-width-warning d-lg-none d-none" role="alert"><strong>Warning</strong> The edit mode is optimized for screens wider than 992px. If you have trouble using it, please try accessing it on a larger screen.</div>');
$(".navbar").append(min_width_warning);
return edit_mode_li[0];
}
@@ -1733,6 +1736,11 @@ var edit_mode = new function() {
//$(".caosdb-f-main").toggleClass("container-fluid").toggleClass("container");
//$(".caosdb-f-main-entities").toggleClass("col-xs-8");
$(".caosdb-f-edit").toggle();//.toggleClass("col-xs-4");
// Somewhat counter-intuitive, but when we're not in edit mode
// and toggle the panel, we're entering and the warning should
// be shown on small screens and vice-versa.
$(".caosdb-edit-min-width-warning").toggleClass("d-none", edit_mode.is_edit_mode());
$(".caosdb-edit-min-width-warning").toggleClass("d-block", !(edit_mode.is_edit_mode()));
}
this.leave_edit_mode_template = function(app) {
Loading