🐞 fix(modals): fix some resizing

This commit is contained in:
thelastWallE 2021-10-07 13:24:45 +02:00
parent 0b5f86f29f
commit c635bc23f2
3 changed files with 9 additions and 17 deletions

View File

@ -4,7 +4,7 @@
border: 1px solid #aaa;
width: 98%;
text-align: center;
word-break: break-all;
word-break: break-word;
margin: auto;
}
@ -339,10 +339,6 @@ div#settings_plugin_klipper div#macros label.control-label {
padding-top: 2px;
}
#klipper_graph_dialog {
width: 90%;
}
#klipper_graph_dialog .full-sized-box {
width: 100%;
margin: 0 auto;

View File

@ -93,6 +93,7 @@ $(function () {
var dialog = $("#klipper_graph_dialog");
dialog.modal({
show: "true",
width: "90%",
minHeight: "500px",
maxHeight: "600px",
});

View File

@ -31,9 +31,6 @@ $(function () {
"cache-control": "no-cache",
});
editordialog.on('shown.bs.modal', function () {
editor.focus();
self.setEditorDivSize();
$(window).on('resize', function() {
self.klipperViewModel.sleep(200).then(
function () {
@ -41,7 +38,6 @@ $(function () {
}
);
});
});
self.close_selection = function (index) {
switch (index) {
@ -82,7 +78,7 @@ $(function () {
}
self.addStyleAttribute = function ($element, styleAttribute) {
$element.attr('style', $element.attr('style') + '; ' + styleAttribute);
$element.attr('style', styleAttribute);
}
self.setEditorDivSize = function () {
@ -91,7 +87,6 @@ $(function () {
var height = $(window).height() - $('#klipper_editor .modal-header').outerHeight() - $('#klipper_editor .modal-footer').outerHeight() - 118;
self.addStyleAttribute(klipper_modal_body, 'height: ' + height + 'px !important;');
//self.addStyleAttribute(klipper_config, 'height: ' + height + 'px !important;');
klipper_config.css('height', height);
if (editor) {
editor.resize();