summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a93f31e)
raw | patch | inline | side by side (parent: a93f31e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 19 Sep 2007 12:05:45 +0000 (12:05 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 19 Sep 2007 12:05:45 +0000 (12:05 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7327 594d385d-05f5-0310-b6e9-bd551577e9d8
html/include/focus.js | patch | blob | history | |
html/main.php | patch | blob | history | |
ihtml/themes/default/msg_dialog.tpl | patch | blob | history | |
include/class_msg_dialog.inc | patch | blob | history |
diff --git a/html/include/focus.js b/html/include/focus.js
index 57fbf000662ec386b7803bafe4101ce9274cc6ea..3f832476f01a8aa053991af8b7c134c9f59fc9d2 100644 (file)
--- a/html/include/focus.js
+++ b/html/include/focus.js
var cur_id = document.getElementById('current_msg_dialogs').value;
if(cur_id != ""){
hide('e_layer2' + cur_id);
+ document.getElementById('closed_msg_dialogs').value += "," + cur_id;
+ document.getElementById('current_msg_dialogs').value= "";
}
}
ele.style.display= 'block' ;
document.getElementById('pending_msg_dialogs').value= tmp;
document.getElementById('current_msg_dialogs').value= i_id;
+
}
}
}
diff --git a/html/main.php b/html/main.php
index 1481915cc44dd099f1e3168ab897ad27046d59da..f95af8a5a5cadbc6fa57652cc15030dee7c128d1 100644 (file)
--- a/html/main.php
+++ b/html/main.php
/* Print_out last ErrorMessage repeated string. */
-#msg_dialog::display("Error" ,"Kann datei nicht schreiben, bla",ERROR_DIALOG);
-#msg_dialog::display("Warning" ,"Kann datei nicht schreiben, bla",WARNING_DIALOG);
-#msg_dialog::display("Info" ,"Kann datei nicht schreiben, bla",INFO_DIALOG);
-#msg_dialog::display("Confirm" ,"Kann datei nicht schreiben, bla",CONFIRM_DIALOG);
+if(isset($_GET['add'])){
+msg_dialog::display("Error" ,"Kann datei nicht schreiben, bla",ERROR_DIALOG);
+msg_dialog::display("Warning" ,"Kann datei nicht schreiben, bla",WARNING_DIALOG);
+msg_dialog::display("Info" ,"Kann datei nicht schreiben, bla",INFO_DIALOG);
+msg_dialog::display("Confirm" ,"Kann datei nicht schreiben, bla",CONFIRM_DIALOG);
+}
$smarty->assign("msg_dialogs", msg_dialog::get_dialogs());
$smarty->assign("contents", $display);
$focus.= 'document.forms[0].error_accept.focus();';
$focus.= '</script>';
}
+
+ $focus= '<script language="JavaScript" type="text/javascript">';
+ $focus.= 'next_msg_dialog();';
+ $focus.= '</script>';
+
+
$smarty->assign("focus", $focus);
$display= $header.$smarty->fetch(get_template_path('framework.tpl'));
index 57c1a7ff3282d654b7ef5a16ede761b24cc860aa..85246df893b2608eba427fe880d349d9b8b5bf11 100644 (file)
<img src='images/error.png' alt='{t}Error{/t}'>
{elseif $i_Type == WARNING_DIALOG}
<img src='images/warning.png' alt='{t}Warning{/t}'>
-{elseif $i_Type == INFO_DIALOG}
+{elseif $i_Type == INFO_DIALOG || $i_Type == CONFIRM_DIALOG}
<img src='images/info.png' alt='{t}Information{/t}'>
{/if}
</td>
index 08b536c087407109a927cfb6753adab0824db0d0..8561304962b674f39e64f6c6ded33c63bce4aaf9 100644 (file)
public static function get_dialogs()
{
$return ="";
- $dialog_ids= "";
+ $dialog_ids= "";
+
+ $seen = "";
+ if(isset($_POST['closed_msg_dialogs'])){
+ $seen = $_POST['closed_msg_dialogs'];
+ }
+
if(isset($_SESSION['msg_dialogs']) && is_array($_SESSION['msg_dialogs'])){
+
foreach($_SESSION['msg_dialogs'] as $key => $dialog){
- $return.= $dialog->execute();
- $dialog_ids= $dialog->get_ID().",".$dialog_ids;
+
+ if(preg_match("/".$dialog->get_ID()."/",$seen)){
+ unset($_SESSION['msg_dialogs'][$key]);
+ }else{
+ $return.= $dialog->execute();
+ $dialog_ids= $dialog->get_ID().",".$dialog_ids;
+ }
}
}
- unset($_SESSION['msg_dialogs']);
$dialog_ids = preg_replace("/,$/","",$dialog_ids);
- $return .="<input type='text' style='width:400px;' name='pending_msg_dialogs' id='pending_msg_dialogs' value='".$dialog_ids."'>";
- $return .="<input type='text' style='width:400px;' name='current_msg_dialogs' id='current_msg_dialogs' value=''>";
+ $return .="<input type='hidden' style='width:400px;' name='pending_msg_dialogs' id='pending_msg_dialogs' value='".$dialog_ids."'>";
+ $return .="<input type='hidden' style='width:400px;' name='closed_msg_dialogs' id='closed_msg_dialogs' value=''>";
+ $return .="<input type='hidden' style='width:400px;' name='current_msg_dialogs' id='current_msg_dialogs' value=''>";
return($return);
}
}