218 lines
9.2 KiB
HTML
218 lines
9.2 KiB
HTML
<!-- BEGIN: main -->
|
|
<link href="modules/Emails/allListStyle.css" rel="stylesheet" type="text/css">
|
|
<script src="http://code.jquery.com/jquery-latest.js"></script>
|
|
<script href="jscalendar/calendar.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
function showHeaders() {
|
|
var user_id = $("#user_list option:selected").val();
|
|
var date_from = $("#date_from").val();
|
|
var date_to = $("#date_to").val();
|
|
var answered = $("#answered option:selected").val();
|
|
var seen = $("#seen option:selected").val();
|
|
var deleted = $("#deleted option:selected").val();
|
|
var type = $("#type option:selected").val();
|
|
var loader = "<table><tr><td><img src=\"include/javascript/yui/build/assets/skins/sam/ajax-loader.gif\"/></td><td>Trwa ładowanie nagłówków</td></tr></table>";
|
|
|
|
var ioInput = document.getElementById("ioInput");
|
|
|
|
|
|
document.getElementById("header_list_div").innerHTML = loader;
|
|
|
|
var callback = {
|
|
success: function(o) {
|
|
document.getElementById("header_list_div").innerHTML = o.responseText;
|
|
}
|
|
}
|
|
|
|
if (type==0)
|
|
var connectionObject = YAHOO.util.Connect.asyncRequest ("GET", "index.php?module=Emails&action=allList&to_pdf=1&request=showHeaders&user_id="+user_id+"&date_from="+date_from+"&date_to="+date_to+"&answered="+answered+"&seen="+seen+"&deleted="+deleted+"&io="+ioInput.value.trim(), callback);
|
|
|
|
if (type==1)
|
|
var connectionObject = YAHOO.util.Connect.asyncRequest ("GET", "index.php?module=Emails&action=allList&to_pdf=1&request=showHeaders_outbox&user_id="+user_id+"&date_from="+date_from+"&date_to="+date_to+"&deleted="+deleted+"&io="+ioInput.value.trim(), callback);
|
|
|
|
}
|
|
|
|
function showMail(id) {
|
|
document.getElementById("mail").style.visibility = "visible";
|
|
|
|
var user_id = $("#user_list option:selected").val();
|
|
var loader = "<img src=\"include/javascript/yui/build/assets/skins/sam/ajax-loader.gif\"/>Trwa ładowanie treści";
|
|
|
|
document.getElementById("mail").innerHTML = loader;
|
|
|
|
var callback = {
|
|
success: function(o) {
|
|
document.getElementById("mail").innerHTML = o.responseText;
|
|
|
|
}
|
|
}
|
|
|
|
var connectionObject = YAHOO.util.Connect.asyncRequest ("GET", "index.php?module=Emails&action=allList&to_pdf=1&request=showMail&mail_id="+id+"&user_id="+user_id, callback);
|
|
}
|
|
|
|
function showAttachments(id) {
|
|
var user_id = $("#user_list option:selected").val();
|
|
|
|
var callback = {
|
|
success: function(o) {
|
|
document.getElementById("attachments").innerHTML = o.responseText;
|
|
}
|
|
}
|
|
|
|
var connectionObject = YAHOO.util.Connect.asyncRequest ("GET", "index.php?module=Emails&action=allList&to_pdf=1&request=showAttachments&mail_id="+id+"&user_id="+user_id, callback);
|
|
}
|
|
|
|
function changeType(select) {
|
|
var ioInputLabel = document.getElementById("ioInputLabel");
|
|
|
|
switch(parseInt(select.value))
|
|
{
|
|
default:
|
|
case 0:
|
|
ioInputLabel.innerHTML = "Nadawca:";
|
|
break;
|
|
case 1:
|
|
ioInputLabel.innerHTML = "Odbiorca:";
|
|
break;
|
|
}
|
|
}
|
|
|
|
</script>
|
|
|
|
<div id="allList">
|
|
<table>
|
|
<tr>
|
|
<td> </td>
|
|
<td>
|
|
<table id="options_table">
|
|
<tr>
|
|
<td>
|
|
<table>
|
|
<tr>
|
|
<td> </td>
|
|
<td>Format daty yyyy-mm-dd</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Data od:</td>
|
|
<td>
|
|
<input type="text" id="date_from"/>  <img src="themes/default/images/jscalendar.gif" id="calendar_open"/>
|
|
<script type="text/javascript">
|
|
Calendar.setup(
|
|
{
|
|
inputField : "date_from",
|
|
ifFormat : "%Y-%m-%d",
|
|
button : "calendar_open"
|
|
}
|
|
);
|
|
</script>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Data do:</td>
|
|
<td>
|
|
<input type="text" id="date_to"/>  <img src="themes/default/images/jscalendar.gif" id="calendar_open2"/>
|
|
<script type="text/javascript">
|
|
Calendar.setup(
|
|
{
|
|
inputField : "date_to",
|
|
ifFormat : "%Y-%m-%d",
|
|
button : "calendar_open2"
|
|
}
|
|
);
|
|
</script>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<br/>
|
|
<br/>
|
|
</td>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
<table>
|
|
<tr>
|
|
<td colspan="2">Atrybuty wiadomości</td>
|
|
</tr>
|
|
<tr>
|
|
<td><label for="ioInput" id="ioInputLabel">Nadawca:</label></td>
|
|
<td>
|
|
<input type="text" name="ioInput" id="ioInput"/>
|
|
</td>
|
|
</tr>
|
|
<!--
|
|
<tr>
|
|
<td>Usunięte:</td>
|
|
<td>
|
|
<select id="deleted">
|
|
<option value="2"></option>
|
|
<option value="1">Tak</option>
|
|
<option value="0">Nie</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Odpowiedziane:</td>
|
|
<td>
|
|
<select id="answered">
|
|
<option value="2"></option>
|
|
<option value="1">Tak</option>
|
|
<option value="0">Nie</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Przyczytane:</td>
|
|
<td>
|
|
<select id="seen">
|
|
<option value="2"></option>
|
|
<option value="1">Tak</option>
|
|
<option value="0">Nie</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
-->
|
|
</table>
|
|
<br/>
|
|
<br/>
|
|
</td>
|
|
<td width="100">
|
|
 
|
|
</td>
|
|
<td>
|
|
Wiadomości:
|
|
<select id="type" onChange="changeType(this);">
|
|
<option value="0">Odebrane</option>
|
|
<option value="1">Wysłane</option>
|
|
</select>
|
|
</td>
|
|
<td valign="bottom">
|
|
<button type="button" onClick="javascript:showHeaders();">Filtruj</button>
|
|
<br/>
|
|
<br/>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td id="user_list_cell">
|
|
{USER_LIST}
|
|
</td>
|
|
<td>
|
|
<div id="header_list_div"></div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td id="attachments_cell">
|
|
<div id="attachments"></div>
|
|
</td>
|
|
<td>
|
|
<div id="mail"></div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<!-- END: main --> |