Merge branch '93-caja-de-dialogo-de-alertas' into 'develop'

Center alert modal window when is opened - #93

See merge request !247
This commit is contained in:
Enrique Camargo 2017-03-13 13:57:00 +01:00
commit 8d1e8cf49a
7 changed files with 23 additions and 32 deletions

View File

@ -241,6 +241,7 @@ config_check();
if ($check_minor_release_available) {
set_pandora_error_for_header('There are one or more minor releases waiting for update, there are required administrator permissions', 'minor release/s available');
}
echo '<div id="alert_messages" style="display: none"></div>';
if ($config["alert_cnt"] > 0) {
$maintenance_link = 'javascript:';

View File

@ -59,24 +59,14 @@ $(document).ready (function () {
});
$("a.show_systemalert_dialog").click (function () {
$('body').append( "<div id='opacidad' style='position:fixed;background:black;opacity:0.6;z-index:1'></div>" );
jQuery.get ("ajax.php",
{"page": "operation/system_alert"},
function (data, status) {
$("#alert_messages").html(data);
$("#alert_messages").dialog({
resizable: false,
draggable: true,
width: 450,
modal: true,
overlay: {
opacity: 0.5,
background: "black"
},
open: function (event, ui) {
dialog_open = this;
}
});
$("#alert_messages").css('padding','0px');
$("#alert_messages").hide ()
.empty ()
.append (data)
.show ();
},
"html"
);

View File

@ -3595,8 +3595,10 @@ div.simple_value > a > span.text p
border-bottom-left-radius: 5px;
z-index:3;
position:fixed;
width:650px;
top: 30%;
width:750px;
max-width:750px;
min-width:750px;
top: 20%;
background:white;
}
.modalheader{

View File

@ -3219,13 +3219,12 @@ table#policy_modules td * {
-webkit-border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
z-index:2;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%);
z-index:3;
position:fixed;
width:650px;
width:750px;
max-width:750px;
min-width:750px;
top: 20%;
background:white;
}
.modalheader{

View File

@ -3222,13 +3222,12 @@ table#policy_modules td * {
-webkit-border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
z-index:2;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%);
z-index:3;
position:fixed;
width:650px;
width:750px;
max-width:750px;
min-width:750px;
top: 20%;
background:white;
}
.modalheader{

View File

@ -933,7 +933,6 @@ if ($config["pure"] == 0) {
echo '</div>';
}
echo '<div id="alert_messages" style="display: none"></div>';
/// Clippy function
require_once('include/functions_clippy.php');
clippy_start($sec2);

View File

@ -18,7 +18,7 @@ echo "</span>
<img class='modalclosex cerrar' src='".$config['homeurl']."/images/icono_cerrar.png'>
</div>";
echo "<div style='overflow-y:scroll;height:550px;'>";
echo "<div style='overflow-y:auto;height:400px;min-height:400px;max-height:400px;'>";
echo get_pandora_error_for_header();
echo "</div>";
@ -32,7 +32,8 @@ echo "<div class='modalokbutton cerrar'>
<script>
$(".cerrar").click(function(){
$("#alert_messages").dialog('close');
$("#alert_messages").hide();
$( "#opacidad" ).remove();
});
</script>