eGroupWare popup: Complete re-style of css and markup (nearly no visible changes but a lot of cleanup). eGWpopup now has a scrollbar for long messages. Changed non-validating color lightgray of idots to its numeric value. Renamed notificationwindow completely to egwpopup.

This commit is contained in:
Christian Binder 2009-02-23 20:45:31 +00:00
parent bdcb10ea2d
commit b3b7487ad1
8 changed files with 163 additions and 83 deletions

View File

@ -109,7 +109,7 @@ class ajaxnotifications {
* *
* @return xajax response * @return xajax response
*/ */
public function get_popup_notifications() { public function get_egwpopup_notifications() {
$session_id = $GLOBALS['egw_info']['user']['sessionid']; $session_id = $GLOBALS['egw_info']['user']['sessionid'];
$message = ''; $message = '';
$rs = $this->db->select(self::_notification_table, $rs = $this->db->select(self::_notification_table,
@ -133,11 +133,11 @@ class ajaxnotifications {
break; break;
case 'high': case 'high':
$this->response->addAlert(lang('eGroupWare has notifications for you')); $this->response->addAlert(lang('eGroupWare has notifications for you'));
$this->response->addScript('notificationwindow_display();'); $this->response->addScript('egwpopup_display();');
break; break;
case 'medium': case 'medium':
default: default:
$this->response->addScript('notificationwindow_display();'); $this->response->addScript('egwpopup_display();');
break; break;
} }
} }

View File

@ -116,7 +116,6 @@ class notifications_popup implements notifications_iface {
$message = $this->render_infos($_subject) $message = $this->render_infos($_subject)
.html::hr() .html::hr()
.$_messages['html'] .$_messages['html']
.html::hr()
.$this->render_links($_links); .$this->render_links($_links);
$this->save( $message, $user_sessions ); $this->save( $message, $user_sessions );
@ -174,7 +173,7 @@ class notifications_popup implements notifications_iface {
} }
if(count($rendered_links) > 0) { if(count($rendered_links) > 0) {
return html::bold(lang('Linked entries:')).$newline.implode($newline,$rendered_links); return html::hr().html::bold(lang('Linked entries:')).$newline.implode($newline,$rendered_links);
} }
} }

View File

@ -16,15 +16,13 @@ $notification_config = config::read('notifications');
if ($notification_config['popup_enable']) { if ($notification_config['popup_enable']) {
$GLOBALS['egw']->translation->add_app('notifications'); $GLOBALS['egw']->translation->add_app('notifications');
echo '<script src="'. $GLOBALS['egw_info']['server']['webserver_url']. '/notifications/js/notificationajaxpopup.js'. '" type="text/javascript"></script>'; echo '<script src="'. $GLOBALS['egw_info']['server']['webserver_url']. '/notifications/js/notificationajaxpopup.js'. '" type="text/javascript"></script>';
echo '<script type="text/javascript">notificationwindow_init();</script>'; echo '<script type="text/javascript">egwpopup_init();</script>';
echo ' echo '
<div id="notificationwindow" style="display: none; z-index: 999;"> <div id="egwpopup" style="display: none; z-index: 999;">
<div id="divAppboxHeader">'. lang('Notification'). '</div> <div id="egwpopup_header">'.lang('Notification').'</div>
<div id="divAppbox"> <div id="egwpopup_message"></div>
<div id="notificationwindow_message"></div> <div id="egwpopup_footer">
<center> <input id="egwpopup_ok_button" type="submit" value="'. lang('ok'). '" onClick="egwpopup_button_ok();">
<input id="notificationwindow_ok_button" type="submit" value="'. lang('ok'). '" onClick="notificationwindow_button_ok();">
</center>
</div> </div>
</div> </div>
'; ';

View File

@ -10,41 +10,41 @@
var notifymessages = new Array(); var notifymessages = new Array();
function notificationwindow_init() { function egwpopup_init() {
window.setTimeout("notificationwindow_refresh();", 1000); window.setTimeout("egwpopup_refresh();", 1000);
} }
function notificationwindow_setTimeout() { function egwpopup_setTimeout() {
window.setTimeout("notificationwindow_refresh();", 60000); window.setTimeout("egwpopup_refresh();", 60000);
} }
function notificationwindow_refresh() { function egwpopup_refresh() {
xajax_doXMLHTTP("notifications.ajaxnotifications.check_mailbox"); xajax_doXMLHTTP("notifications.ajaxnotifications.check_mailbox");
xajax_doXMLHTTP("notifications.ajaxnotifications.get_popup_notifications"); xajax_doXMLHTTP("notifications.ajaxnotifications.get_egwpopup_notifications");
notificationwindow_setTimeout(); egwpopup_setTimeout();
} }
function notificationwindow_display() { function egwpopup_display() {
var notificationwindow; var egwpopup;
var notificationwindow_message; var egwpopup_message;
var Browserwidth; var Browserwidth;
var Browserheight; var Browserheight;
var notificationwindow_ok_button; var egwpopup_ok_button;
notificationwindow_ok_button = document.getElementById("notificationwindow_ok_button"); egwpopup_ok_button = document.getElementById("egwpopup_ok_button");
notificationwindow = document.getElementById("notificationwindow"); egwpopup = document.getElementById("egwpopup");
notificationwindow_message = document.getElementById("notificationwindow_message"); egwpopup_message = document.getElementById("egwpopup_message");
notificationwindow.style.display = "inline"; egwpopup.style.display = "inline";
notificationwindow.style.position = "absolute"; egwpopup.style.position = "absolute";
notificationwindow.style.width = "500px"; egwpopup.style.width = "500px";
Browserwidth = (window.innerWidth || document.body.clientWidth || 640) Browserwidth = (window.innerWidth || document.body.clientWidth || 640)
Browserheight = (window.innerHeight || document.body.clientHeight || 480) Browserheight = (window.innerHeight || document.body.clientHeight || 480)
notificationwindow.style.left = (Browserwidth/2 - 250) + "px"; egwpopup.style.left = (Browserwidth/2 - 250) + "px";
notificationwindow.style.top = (Browserheight/4) + "px"; egwpopup.style.top = (Browserheight/4) + "px";
notificationwindow.style.height = "100%"; egwpopup_message.style.maxHeight = (Browserheight/2) + "px";
notificationwindow_message.innerHTML = notifymessages[0]; egwpopup_message.innerHTML = notifymessages[0];
if(notifymessages.length-1 > 0 ) { if(notifymessages.length-1 > 0 ) {
notificationwindow_ok_button.value = "OK (" + (notifymessages.length-1) + ")"; egwpopup_ok_button.value = "OK (" + (notifymessages.length-1) + ")";
} else { } else {
notificationwindow_ok_button.value = "OK"; egwpopup_ok_button.value = "OK";
} }
} }
@ -59,17 +59,17 @@ function notificationbell_switch(mode) {
} }
} }
function notificationwindow_button_ok() { function egwpopup_button_ok() {
var notificationwindow; var egwpopup;
var notificationwindow_message; var egwpopup_message;
notificationwindow = document.getElementById("notificationwindow"); egwpopup = document.getElementById("egwpopup");
notificationwindow_message = document.getElementById("notificationwindow_message"); egwpopup_message = document.getElementById("egwpopup_message");
notifymessages.shift(); notifymessages.shift();
if(notifymessages.length > 0) { if(notifymessages.length > 0) {
notificationwindow_display(); egwpopup_display();
} else { } else {
notificationwindow.style.display = "none"; egwpopup.style.display = "none";
notificationwindow_message.innerHTML = ""; egwpopup_message.innerHTML = "";
notificationbell_switch("inactive"); notificationbell_switch("inactive");
} }
} }

View File

@ -27,11 +27,11 @@
} }
.textSidebox { .textSidebox {
border-top: 1px solid lightgray; border-top: 1px solid #d3d3d3;
} }
.divSidebox table { .divSidebox table {
border: 1px solid lightgray; border: 1px solid #d3d3d3;
border-top: none; border-top: none;
} }
@ -46,7 +46,7 @@
#divAppbox { #divAppbox {
padding-left: 15px; padding-left: 15px;
padding-right: 10px; padding-right: 10px;
border: 1px solid lightgray; border: 1px solid #d3d3d3;
} }
#divMain { #divMain {
@ -66,7 +66,7 @@
} }
#divUpperTabs li #divUpperTabs li
{ {
border: 1px solid lightgray; border: 1px solid #d3d3d3;
border-top: none; border-top: none;
} }
@ -121,7 +121,7 @@ a:link, a:visited, select, input, textarea {
} }
.divLoginbox { .divLoginbox {
border: 1px solid lightgray; border: 1px solid #d3d3d3;
border-top: none; border-top: none;
} }
.divLoginbox td { .divLoginbox td {

View File

@ -458,26 +458,53 @@ Preferences tabs
padding-right: 15px; padding-right: 15px;
} }
/* /* eGroupWare popup */
notification window #egwpopup {
*/ background-color: #ffffff;
#notificationwindow_message > table border: 1px solid #d3d3d3;
{
font-size: 95%;
} }
#notificationwindow_message hr #egwpopup hr {
{
border: none; border: none;
border-top: 1px solid black; border-top: 1px solid #d3d3d3;
height: 1px; height: 1px;
} }
#notificationwindow_message .link #egwpopup_header {
{ background-image: url(../images/gradient22.png);
height: 18px;
line-height: 18px;
margin: 0;
padding: 0;
font-size:12px;
font-weight: bold;
color: #666666;
text-align: center;
border-bottom: 1px solid #d3d3d3;
}
#egwpopup_message {
margin: 0;
padding: 7px;
overflow: auto;
}
#egwpopup_message > table {
font-size: 95%;
}
#egwpopup_message .link {
cursor: pointer; cursor: pointer;
} }
#egwpopup_footer {
margin: 0;
padding: 7px;
border: none;
border-top: 1px solid #d3d3d3;
text-align: center;
}
.selectbg .selectbg
{ {
position:absolute; position:absolute;

View File

@ -717,22 +717,50 @@ body {
padding-right: 15px; padding-right: 15px;
} }
/* /* eGroupWare popup */
notification window #egwpopup {
*/ background-image: url(../images/bmback2.jpg);
#notificationwindow_message > table background-color: #ffffff;
{ border: 1px solid #9f9f9f;
font-size: 95%; border-top-style: none;
} }
#notificationwindow_message hr #egwpopup hr {
{
border: none; border: none;
border-top: 1px solid black; border-top: 1px solid #9f9f9f;
height: 1px; height: 1px;
} }
#notificationwindow_message .link #egwpopup_header {
{ background-image: url(../images/menuTitleMid-bm.png);
height: 24px;
line-height: 24px;
margin: 0;
padding: 0;
font-size:12px;
font-weight: bold;
color: #666666;
text-align: center;
}
#egwpopup_message {
margin: 0;
padding: 7px;
overflow: auto;
}
#egwpopup_message > table {
font-size: 95%;
}
#egwpopup_message .link {
cursor: pointer; cursor: pointer;
} }
#egwpopup_footer {
margin: 0;
padding: 7px;
border: none;
border-top: 1px solid #9f9f9f;
text-align: center;
}

View File

@ -392,6 +392,7 @@ body {
padding:9px; padding:9px;
padding-top: 0px; /* CHANGED RALF */ padding-top: 0px; /* CHANGED RALF */
border:solid 1px #17202b; border:solid 1px #17202b;
border-bottom-style:none;
} }
#divLogo #divLogo
@ -641,31 +642,58 @@ body {
padding-right: 15px; padding-right: 15px;
} }
/* /* eGroupWare popup */
notification window #egwpopup {
*/ background-color: #fbf8f1;
#notificationwindow_message > table border: 1px solid #17202b;
{
font-size: 95%;
} }
#notificationwindow_message hr #egwpopup hr {
{
border: none; border: none;
border-top: 1px solid black; border-top: 1px solid #17202b;
height: 1px; height: 1px;
} }
#notificationwindow_message .link #egwpopup_header {
{ background-image: url(../images/appTitleBar.png);
height: 18px;
line-height: 18px;
margin: 0;
padding: 0;
font-size:12px;
font-weight: bold;
color: #17202b;
text-align: center;
border-bottom: 1px solid #17202b;
}
#egwpopup_message {
margin: 0;
padding: 7px;
overflow: auto;
}
#egwpopup_message > table {
font-size: 95%;
}
#egwpopup_message .link {
cursor: pointer; cursor: pointer;
} }
#egwpopup_footer {
margin: 0;
padding: 7px;
border: none;
border-top: 1px solid #17202b;
text-align: center;
}
.selectbg .selectbg
{ {
position:absolute; position:absolute;
z-index:10; z-index:10;
overflow:hidden;/ overflow:hidden;
width:250px; width:250px;
} }
.iframeforselectbox .iframeforselectbox