🐞 fix(modals): fix some resizing
This commit is contained in:
parent
0b5f86f29f
commit
c635bc23f2
|
@ -4,7 +4,7 @@
|
||||||
border: 1px solid #aaa;
|
border: 1px solid #aaa;
|
||||||
width: 98%;
|
width: 98%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
word-break: break-all;
|
word-break: break-word;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -339,10 +339,6 @@ div#settings_plugin_klipper div#macros label.control-label {
|
||||||
padding-top: 2px;
|
padding-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#klipper_graph_dialog {
|
|
||||||
width: 90%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#klipper_graph_dialog .full-sized-box {
|
#klipper_graph_dialog .full-sized-box {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
|
|
@ -93,6 +93,7 @@ $(function () {
|
||||||
var dialog = $("#klipper_graph_dialog");
|
var dialog = $("#klipper_graph_dialog");
|
||||||
dialog.modal({
|
dialog.modal({
|
||||||
show: "true",
|
show: "true",
|
||||||
|
width: "90%",
|
||||||
minHeight: "500px",
|
minHeight: "500px",
|
||||||
maxHeight: "600px",
|
maxHeight: "600px",
|
||||||
});
|
});
|
||||||
|
|
|
@ -31,17 +31,13 @@ $(function () {
|
||||||
"cache-control": "no-cache",
|
"cache-control": "no-cache",
|
||||||
});
|
});
|
||||||
|
|
||||||
editordialog.on('shown.bs.modal', function () {
|
$(window).on('resize', function() {
|
||||||
editor.focus();
|
|
||||||
self.setEditorDivSize();
|
|
||||||
$(window).on('resize', function(){
|
|
||||||
self.klipperViewModel.sleep(200).then(
|
self.klipperViewModel.sleep(200).then(
|
||||||
function () {
|
function () {
|
||||||
self.setEditorDivSize();
|
self.setEditorDivSize();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
self.close_selection = function (index) {
|
self.close_selection = function (index) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
|
@ -82,7 +78,7 @@ $(function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
self.addStyleAttribute = function ($element, styleAttribute) {
|
self.addStyleAttribute = function ($element, styleAttribute) {
|
||||||
$element.attr('style', $element.attr('style') + '; ' + styleAttribute);
|
$element.attr('style', styleAttribute);
|
||||||
}
|
}
|
||||||
|
|
||||||
self.setEditorDivSize = function () {
|
self.setEditorDivSize = function () {
|
||||||
|
@ -91,7 +87,6 @@ $(function () {
|
||||||
|
|
||||||
var height = $(window).height() - $('#klipper_editor .modal-header').outerHeight() - $('#klipper_editor .modal-footer').outerHeight() - 118;
|
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_modal_body, 'height: ' + height + 'px !important;');
|
||||||
//self.addStyleAttribute(klipper_config, 'height: ' + height + 'px !important;');
|
|
||||||
klipper_config.css('height', height);
|
klipper_config.css('height', height);
|
||||||
if (editor) {
|
if (editor) {
|
||||||
editor.resize();
|
editor.resize();
|
||||||
|
|
Loading…
Reference in New Issue