Make dialog window appearance more consistent

This commit is contained in:
bergware
2023-10-25 18:50:51 +02:00
parent 8d43fc8aa5
commit 6d20bdc430
9 changed files with 53 additions and 60 deletions

View File

@@ -374,6 +374,13 @@ function getVal(el, name) {
}
}
function dialogStyle() {
$('.ui-dialog-titlebar-close').css({'display':'none'});
$('.ui-dialog-title').css({'text-align':'center','width':'100%','font-size':'1.8rem'});
$('.ui-dialog-content').css({'padding-top':'15px','vertical-align':'bottom'});
$('.ui-button-text').css({'padding':'0px 5px'});
}
function addConfigPopup() {
var title = "_(Add Configuration)_";
var popup = $("#dialogAddConfig");
@@ -391,8 +398,8 @@ function addConfigPopup() {
// Start Dialog section
popup.dialog({
title: title,
width: 900,
resizable: false,
width: 800,
modal: true,
buttons: {
"_(Add)_": function() {
@@ -425,10 +432,7 @@ function addConfigPopup() {
}
}
});
$('.ui-dialog-titlebar-close').css({'display':'none'});
$('.ui-dialog-title').css({'text-align':'center','width':'100%','font-size':'1.8rem'});
$('.ui-dialog-content').css({'padding-top':'15px','vertical-align':'bottom'});
$('.ui-button-text').css({'padding':'0px 5px'});
dialogStyle();
}
function editConfigPopup(num,disabled) {
@@ -462,8 +466,8 @@ function editConfigPopup(num,disabled) {
popup.find(".switch-button-background").css("margin-top", "6px");
popup.dialog({
title: title,
width: 900,
resizable: false,
width: 800,
modal: true,
buttons: {
"_(Save)_": function() {
@@ -505,10 +509,7 @@ function editConfigPopup(num,disabled) {
}
}
});
$('.ui-dialog-titlebar-close').css({'display':'none'});
$('.ui-dialog-title').css({'text-align':'center','width':'100%','font-size':'1.8rem'});
$('.ui-dialog-content').css({'padding-top':'15px','vertical-align':'bottom'});
$('.ui-button-text').css({'padding':'0px 5px'});
dialogStyle();
$('.desc_readmore').readmore({maxHeight:10});
}

View File

@@ -61,15 +61,15 @@ function popupWithIframe(title, cmd, reload, func) {
$('#iframe-popup').dialog({
autoOpen:true,
title:title,
height: 600,
width: 900,
draggable:true,
width: Math.min(Math.max(window.innerWidth/2,900),1600),
height: Math.max(window.innerHeight*3/5,600),
resizable:true,
modal:true,
open:function(ev, ui) {
open:function(ev, ui){
$('#myIframe').attr('src', cmd);
},
close:function(event, ui) {
close:function(event, ui){
if (reload && !$('#myIframe').contents().find('#canvas').length) {
if (func) setTimeout(func+'()',0); else location = window.location.href;
} else {
@@ -77,13 +77,13 @@ function popupWithIframe(title, cmd, reload, func) {
}
}
});
$(".ui-dialog .ui-dialog-titlebar").addClass('menu');
$('.ui-dialog .ui-dialog-titlebar-close').text('X').prop('title',_('Close'));
$(".ui-dialog .ui-dialog-title").css({'text-align':'center','width':'100%'});
$(".ui-dialog .ui-dialog-content").css({'padding-top':'15px','vertical-align':'bottom'});
$('.ui-dialog-titlebar-close').css({'display':'none'});
$('.ui-dialog-title').css({'text-align':'center','width':'100%','font-size':'1.8rem'});
$('.ui-dialog-content').css({'padding-top':'15px','vertical-align':'bottom'});
$('.ui-button-text').css({'padding':'0px 5px'});
}
function execUpContainer(container) {
var title = _('Updating the container')+': '+container;
var title = _('Updating the container TEST')+': '+container;
var cmd = '/plugins/dynamix.docker.manager/include/CreateDocker.php?updateContainer=true&ct[]='+encodeURIComponent(container);
popupWithIframe(title, cmd, true, 'loadlist');
}

View File

@@ -159,7 +159,6 @@ function getisoimageboth(uuid,dev,bus,file,dev2,bus2,file2){
});
box.dialog({
title: "_(Select ISOs for CDROMs)_",
height: 600,
width: 600,
resizable: false,
modal: true,
@@ -197,7 +196,6 @@ function getisoimage(uuid,dev,bus,file){
});
box.dialog({
title: "_(Select ISO)_",
height: 600,
width: 600,
resizable: false,
modal: true,
@@ -228,7 +226,6 @@ function VMClone(uuid, name){
document.getElementById("Overwrite").checked = true;
box.dialog({
title: "_(VM Clone)_",
height: 330,
width: 600,
resizable: false,
modal: true,
@@ -275,7 +272,6 @@ function selectsnapshot(uuid, name ,snaps, opt, getlist,state){
document.getElementById("targetsnapfspc").checked = true;
box.dialog({
title: optiontext,
height: 330,
width: 600,
resizable: false,
modal: true,
@@ -348,7 +344,6 @@ function selectblock(uuid, name, snaps, opt, getlist, state){
}
box.dialog({
title: optiontext,
height: 330,
width: 600,
resizable: false,
modal: true,

View File

@@ -449,9 +449,9 @@ function doAction(action,title,id) {
dialogClass: 'ui-dfm',
autoOpen: true,
title: title,
resizable: false,
width: 900,
height: dfm.height,
width: 900,
resizable: false,
modal: true,
buttons: {
"_(Start)_": function(){
@@ -728,9 +728,9 @@ function doActions(action,title) {
dialogClass: 'ui-dfm',
autoOpen: true,
title: title,
resizable: false,
width: 900,
height: dfm.height,
width: 900,
resizable: false,
modal: true,
buttons: {
"_(Start)_": function(){

View File

@@ -248,9 +248,9 @@ function dfm_makeDialog(open) {
dialogClass: 'ui-dfm',
autoOpen: open||dfm.dialog,
title: dfm_read.title,
resizable: false,
width: 900,
height: dfm.height,
width: 900,
resizable: false,
modal: true,
buttons: {
"_(Start)_": function(){

View File

@@ -56,6 +56,12 @@ function validate(poolname) {
}
return true;
}
function dialogStyle() {
$('.ui-dialog-titlebar-close').css({'display':'none'});
$('.ui-dialog-title').css({'text-align':'center','width':'100%','font-size':'1.8rem'});
$('.ui-dialog-content').css({'padding-top':'15px','vertical-align':'bottom'});
$('.ui-button-text').css({'padding':'0px 5px'});
}
function addPoolPopup() {
var popup = $('#dialogAddPool');
// Load popup with the template info
@@ -63,8 +69,8 @@ function addPoolPopup() {
// Start Dialog section
popup.dialog({
title: "_(Add Pool)_",
resizable: false,
width: 600,
resizable: false,
modal: true,
buttons: {
"_(Add)_": function() {
@@ -78,10 +84,7 @@ function addPoolPopup() {
}
}
});
$('.ui-dialog .ui-dialog-titlebar-close').css({'display':'none'});
$('.ui-dialog-title').css({'text-align':'center','width':'100%','font-size':'1.8rem'});
$(".ui-dialog .ui-dialog-content").css({'padding-top':'15px','vertical-align':'bottom'});
$(".ui-button-text").css({'padding':'0px 5px'});
dialogStyle();
}
function removeOption(inputString,value) {
// Define a regular expression to match <option>...</option> substrings
@@ -112,8 +115,8 @@ function addSubpoolPopup(poolname,currentsubpools) {
// Start Dialog section
popup.dialog({
title: "_(Add ZFS Subpool)_",
resizable: false,
width: 600,
resizable: false,
modal: true,
buttons: {
"_(Add)_": function() {
@@ -127,10 +130,7 @@ function addSubpoolPopup(poolname,currentsubpools) {
}
}
});
$('.ui-dialog-titlebar-close').css({'display':'none'});
$('.ui-dialog-title').css({'text-align':'center','width':'100%','font-size':'1.8rem'});
$('.ui-dialog-content').css({'padding-top':'15px','vertical-align':'bottom'});
$('.ui-button-text').css({'padding':'0px 5px'});
dialogStyle();
}
<?if (_var($var,'fsState')=="Started"):?>

View File

@@ -1278,18 +1278,11 @@ function dismiss(button) {
inactive.push(tbody.attr('sort'));
$.cookie('inactive_content',inactive.join(';'),{expires:3650});
}
function dialogStyle() {
$('.ui-dialog-titlebar-close').css({'display':'none'});
$('.ui-dialog-title').css({'text-align':'center','width':'100%','font-size':'1.8rem'});
$('.ui-dialog-content').css({'padding-top':'15px','vertical-align':'bottom'});
$('.ui-button-text').css({'padding':'0px 5px'});
}
function contentMgmt() {
box = $("#iframe-popup");
box.html($("#templateContentMgmt").html().build());
box.dialog({
title: "_(Tile Management)_",
height: 330,
width: 900,
resizable: false,
modal: true,
@@ -1329,7 +1322,6 @@ function VMClone(uuid, name){
document.getElementById("Overwrite").checked = true;
box.dialog({
title: "_(VM Clone)_",
height: 330,
width: 600,
resizable: false,
modal: true,
@@ -1371,7 +1363,6 @@ function selectsnapshot(uuid, name ,snaps, opt, getlist){
document.getElementById("targetsnapfspc").checked = true;
box.dialog({
title: optiontext,
height: 330,
width: 600,
resizable: false,
modal: true,

View File

@@ -105,7 +105,7 @@ $next = $i<$end ? $sheets[$i+1] : $sheets[0];
$text = isPool($name) ? _('This will ERASE content of ALL devices in the pool') : _('This will ERASE ALL device content');
?>
<link type="text/css" rel="stylesheet" href="<?autov("/webGui/styles/jquery.ui.css")?>">
<link type="text/css" rel="stylesheet" href="<?autov("/plugins/dynamix.docker.manager/styles/style-{$display['theme']}.css")?>">
<link type="text/css" rel="stylesheet" href="<?autov("/plugins/dynamix.docker.manager/styles/style-$theme.css")?>">
<script>
if ($.cookie('deletepool')) {
@@ -471,6 +471,12 @@ function validate(poolname) {
}
return true;
}
function dialogStyle() {
$('.ui-dialog-titlebar-close').css({'display':'none'});
$('.ui-dialog-title').css({'text-align':'center','width':'100%','font-size':'1.8rem'});
$('.ui-dialog-content').css({'padding-top':'15px','vertical-align':'bottom'});
$('.ui-button-text').css({'padding':'0px 5px'});
}
function renamePoolPopup() {
var popup = $('#dialogRenamePool');
// Load popup with the template info
@@ -478,8 +484,8 @@ function renamePoolPopup() {
// Start Dialog section
popup.dialog({
title: "_(Rename Pool)_",
resizable: false,
width: 600,
resizable: false,
modal: true,
buttons: {
"_(Rename)_": function() {
@@ -493,10 +499,7 @@ function renamePoolPopup() {
}
}
});
$('.ui-dialog-titlebar-close').css({'display':'none'});
$('.ui-dialog-title').css({'text-align':'center','width':'100%','font-size':'1.8rem'});
$('.ui-dialog-content').css({'padding-top':'15px','vertical-align':'bottom'});
$('.ui-button-text').css({'padding':'0px 5px'});
dialogStyle();
}
function deletePool() {
$.cookie('deletepool','deletepool');

View File

@@ -122,14 +122,20 @@ function logSize() {
setTimeout(logSize,3000);
});
}
function dialogStyle() {
$('.ui-dialog-titlebar-close').css({'display':'none'});
$('.ui-dialog-title').css({'text-align':'center','width':'100%','font-size':'1.8rem'});
$('.ui-dialog-content').css({'padding-top':'15px','vertical-align':'bottom'});
$('.ui-button-text').css({'padding':'0px 5px'});
}
function PHPinfo() {
box = $("#dialogWindow");
box.html($("#templateWindow").html().build());
box.dialog({
title: "_(PHP Information)_",
resizable: false,
height: Math.min(window.innerHeight-80,800),
width: Math.min(window.innerWidth,1200),
resizable: false,
modal: true,
buttons: {
"_(Done)_": function(){
@@ -137,10 +143,7 @@ function PHPinfo() {
}
}
});
$('.ui-dialog-titlebar-close').css({'display':'none'});
$('.ui-dialog-title').css({'text-align':'center','width':'100%','font-size':'1.8rem'});
$('.ui-dialog-content').css({'padding-top':'15px','vertical-align':'bottom'});
$('.ui-button-text').css({'padding':'0px 5px'});
dialogStyle();
}
function preset(form) {
// reset to default settings