fixed styles

This commit is contained in:
daniel 2023-03-24 14:04:38 +01:00
parent be1fb9298b
commit 25ea15fe0f
3 changed files with 66 additions and 64 deletions

View File

@ -367,69 +367,65 @@ $(document).ready (function () {
$("#button-getsize").click(function(event){
event.preventDefault();
if ($('#imagen').attr('src') != '') {
if (parseInt($('#imagen').width()) < 1024){
alert('Default width is '+$('#imagen').width()+'px, smaller than minimum -> 1024px');
$('input[name=width]').val('1024');
$('#preimagew').html(1024);
if (parseInt($('#imagen').width()) < 1024){
alert('Default width is '+$('#imagen').width()+'px, smaller than minimum -> 1024px');
$('input[name=width]').val('1024');
$('#preimagew').html(1024);
} else{
$('input[name=width]').val($('#imagen').width());
$('#preimagew').html($('#imagen').width());
}
if (parseInt($('#imagen').height()) < 768){
alert('Default height is '+$('#imagen').height()+'px, smaller than minimum -> 768px');
$('input[name=height]').val('768');
$('#preimageh').html(768);
} else{
$('input[name=height]').val($('#imagen').height());
$('#preimageh').html($('#imagen').height());
}
} else {
original_image=new Image();
url_hack_metaconsole = metaconsole_url();
original_image.src= url_hack_metaconsole + 'images/console/background/'+$('#background').val();
if (parseInt(original_image.width) < 1024){
alert('Default width is '+original_image.width+'px, smaller than minimum -> 1024px');
$('input[name=width]').val('1024');
$('#preimagew').html(1024);
} else {
$('input[name=width]').val(original_image.height);
$('#preimagew').html(original_image.height);
}
if (parseInt(original_image.height) < 768){
alert('Default height is '+original_image.height+'px, smaller than minimum -> 768px');
$('input[name=height]').val('768');
$('#preimageh').html(768);
} else {
$('input[name=height]').val(original_image.height);
$('#preimageh').html(original_image.height);
}
}
else{
$('input[name=width]').val($('#imagen').width());
$('#preimagew').html($('#imagen').width());
}
if (parseInt($('#imagen').height()) < 768){
alert('Default height is '+$('#imagen').height()+'px, smaller than minimum -> 768px');
$('input[name=height]').val('768');
$('#preimageh').html(768);
}
else{
$('input[name=height]').val($('#imagen').height());
$('#preimageh').html($('#imagen').height());
}
}
else{
original_image=new Image();
url_hack_metaconsole = metaconsole_url();
original_image.src= url_hack_metaconsole + 'images/console/background/'+$('#background').val();
if (parseInt(original_image.width) < 1024){
alert('Default width is '+original_image.width+'px, smaller than minimum -> 1024px');
$('input[name=width]').val('1024');
$('#preimagew').html(1024);
}
else{
$('input[name=width]').val(original_image.height);
$('#preimagew').html(original_image.height);
}
if (parseInt(original_image.height) < 768){
alert('Default height is '+original_image.height+'px, smaller than minimum -> 768px');
$('input[name=height]').val('768');
$('#preimageh').html(768);
}
else{
$('input[name=height]').val(original_image.height);
$('#preimageh').html(original_image.height);
}
}
});
$( "input[type=submit]" ).click(function( event ) {
if (parseInt($('input[name=width]').val()) < 1024){
alert('Default width is '+$('input[name=width]').val()+'px, smaller than minimum -> 1024px');
$('input[name=width]').val('1024');
$('#preimagew').html('1024');
var x = 1;
}
$( "button[type=submit]" ).click(function( event ) {
console.log('aaaaaaaaaaa');
if (parseInt($('input[name=width]').val()) < 1024){
alert('Default width is '+$('input[name=width]').val()+'px, smaller than minimum -> 1024px');
$('input[name=width]').val('1024');
$('#preimagew').html('1024');
var x = 1;
}
if (parseInt($('input[name=height]').val()) < 768){
alert('Default height is '+$('input[name=height]').val()+'px, smaller than minimum -> 768px');
$('input[name=height]').val('768');
$('#preimageh').html('768');
var y = 1;
}
if (x || y){
return false;
}
if (parseInt($('input[name=height]').val()) < 768){
alert('Default height is '+$('input[name=height]').val()+'px, smaller than minimum -> 768px');
$('input[name=height]').val('768');
$('#preimageh').html('768');
var y = 1;
}
if (x || y){
return false;
}
});
//Preload image size and activate auto image size changer when user click over a image in the selector

View File

@ -784,7 +784,7 @@ if (isset($config['vc_refr']) and $config['vc_refr'] != 0) {
$view_refresh = '300';
}
if (!defined('METACONSOLE')) {
if (is_metaconsole() === false) {
$url_base = 'index.php?sec=network&sec2=godmode/reporting/visual_console_builder&action=';
$url_view = 'index.php?sec=network&sec2=operation/visual_console/render_view&id='.$idVisualConsole.'&refr='.$view_refresh;
} else {
@ -841,7 +841,7 @@ $buttons['view'] = [
'text' => '<a href="'.$url_view.'">'.html_print_image('images/enable.svg', true, ['title' => __('View'), 'class' => 'main_menu_icon invert_filter']).'</a>',
];
if ($idVisualConsole === false) {
if (empty($idVisualConsole) === true) {
$buttons = ['data' => $buttons['data']];
// Show only the data tab
// If it is a fail try, reset the values
@ -852,9 +852,8 @@ if ($idVisualConsole === false) {
$buttons[$activeTab]['active'] = true;
$tab_builder = ($activeTab === 'editor') ? 'visual_console_editor_editor_tab' : '';
ui_print_standard_header(
$visualConsoleName,
($visualConsoleName ?? ''),
'images/visual_console.png',
false,
$tab_builder,

View File

@ -118,8 +118,12 @@ if ($aclRead === false && $aclWrite === false && $aclManage === false) {
// Render map.
$options = [];
$baseUrlList = 'index.php?sec=network&sec2=godmode/reporting/map_builder';
if (is_metaconsole() === true) {
$baseUrlList = 'index.php?sec=screen&sec2=screens/screens&action=visualmap';
}
$options['consoles_list']['text'] = '<a href="index.php?sec=network&sec2=godmode/reporting/map_builder">'.html_print_image(
$options['consoles_list']['text'] = '<a href="'.$baseUrlList.'">'.html_print_image(
'images/logs@svg.svg',
true,
[
@ -141,7 +145,10 @@ if ($aclWrite === true || $aclManage === true) {
'edit'
);
$baseUrl = 'index.php?sec=network&sec2=godmode/reporting/visual_console_builder&'.((is_metaconsole() === true) ? 'action2' : 'action').'='.$action;
$baseUrl = 'index.php?sec=network&sec2=godmode/reporting/visual_console_builder&action='.$action;
if (is_metaconsole() === true) {
$baseUrl = 'index.php?operation=edit_visualmap&sec=screen&sec2=screens/screens&action=visualmap&pure='.$pure.'&action2='.$action;
}
$hash = md5($config['dbpass'].$visualConsoleId.$config['id_user']);