Gitlab CSE Unil

Commit 5dee0b9c authored by M. Chardon's avatar M. Chardon
Browse files

migration bootstrap v4 : corrections bug taille canvas et anomalies tools

parent 26641824
......@@ -112,6 +112,7 @@ define([
}
//altSideColPanelGroup.toggleClass("hidden", !show);
sideColPanelGroup.toggleClass("w-50", show);
sideColPanelGroup.toggleClass("w-100", !show);
}
function displayAltColAndLabels(show) {
displayAltCol(show && sharedAnnotationMarkersPanel.find(".collapse").hasClass("show"));
......
......@@ -41,7 +41,6 @@ define([
"bootstrap.colorpicker",
"bootstrap.slider",
"jquery.autoGrowInput",
"bootstrap.spinedit",
"bootstrap.rating",
"FileSaver",
"fontawesome"
......@@ -889,6 +888,7 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export
.prop( "disabled", false )
.click(function(){
var isFill = !($(this).is(".active"));
$(this).toggleClass("active");
attributes.setFill(isFill);
});
}
......@@ -905,32 +905,26 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export
container: "body",
trigger: 'click',
delay: 0,
content: '<div style="width:160px">' +
content: '<div style="width:160px" id="attr-font-div">' +
'<label style="float:left; line-height: 35px" class="small text-muted">Taille: &nbsp;</label>' +
'<div class="input-group" style="width: 70px;">' +
'<input type="text" size="10" class="form-control" name="fontSize" id="attr-font-size">' +
'<input type="number" size="10" class="form-control" name="fontSize" id="attr-font-size"' +
' min="9" max="999" step="1" value="32">' +
'</div>' +
'</div>'
})
.on('shown.bs.popover', function(){
var me = this;
var $pop = $(me).data('bs.popover').$tip;
var input = $pop.find("input[name=fontSize]").focus();
input
.spinedit({
value: attributes.getFontSize(),
minimum: 9,
maximum: 999,
step: 1,
numberOfDecimals: 0
})
.on("valueChanged", function (evt) {
attributes.setFontSize(parseInt(evt.value, 10));
//var me = this;
//var $pop = $(me).data('bs.popover').$tip;
var $pop = $("#attr-font-div").parent().parent();
var input = $("#attr-font-size").focus();
input.val(attributes.getFontSize());
input.on("change", function(){
attributes.setFontSize(parseInt(input.val(), 10));
});
var checkInside = function(evt){
var isInside = ( evt.target === me ) ||
( $(evt.target).closest(".popover").get(0) === $pop.get(0) );
var isInside = $.contains( $pop.get(0), evt.target );
if (!isInside) {
closePopover();
}
......@@ -938,6 +932,7 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export
var closePopover = function() {
$(document).off('click', checkInside);
$("#attr-font").popover('hide');
$("#attr-font").toggleClass('active');
};
$pop.find(".close").on('click', closePopover);
......@@ -1729,7 +1724,8 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export
var w = _$w.width();
var h = _$w.height();
var maxW = w - _reservedWidth;
var maxW = _canvasCtnr.outerWidth();
//var maxW = w - _reservedWidth;
var minW = 320;
var maxH = h - _reservedHeight;
var minH = 240;
......
......@@ -451,7 +451,7 @@ if (t === "light") {
{% endcomment %}
{% endblock alt-side-col-panel-group %}
<div class="p-1" id="side-col-panel-group">
<div class="p-1 w-100" id="side-col-panel-group">
{% block side-col-panel-group %}
{# ----- Annotation Sharing Panel ----- #}
{% block publication-panel %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment