|
Support Incident Tracker GIT4.x
|
Go to the source code of this file.
Functions | |
| function | Activity () |
| function | addActivity (act) |
| function | setClosedDuration (closed) |
| function | formatSeconds (secondsOpen) |
| function | countUp () |
Variables | |
| var | dataArray = new Array() |
| var | count = 0 |
| var | closedDuration = 0 |
| function Activity | ( | ) |
Definition at line 4 of file activity.js.
{
var id;
var start;
}
| function addActivity | ( | act | ) |
| function countUp | ( | ) |
Definition at line 119 of file activity.js.
References closedDuration, dataArray, formatSeconds(), and now.
{
var now = new Date();
var sinceEpoch = Math.round(new Date().getTime()/1000.0);
var closed = closedDuration;
var i = 0;
for(i=0; i < dataArray.length; i++)
{
var secondsOpen = sinceEpoch-dataArray[i].start;
closed += secondsOpen;
var str = formatSeconds(secondsOpen);
$("duration"+dataArray[i].id).innerHTML = "<em>"+str+"</em>";
}
if ($('totalduration') != null)
{
$('totalduration').innerHTML = formatSeconds(closed);
}
}
| function formatSeconds | ( | secondsOpen | ) |
Definition at line 34 of file activity.js.
Referenced by countUp().
{
var str = '';
if (secondsOpen >= 86400)
{ //days
var days = Math.floor(secondsOpen/86400);
if (days < 10)
{
str += "0"+days;
}
else
{
str += days;
}
secondsOpen-=(days*86400);
}
else
{
str += "00";
}
str += ":";
if (secondsOpen >= 3600)
{ //hours
var hours = Math.floor(secondsOpen/3600);
if (hours < 10)
{
str += "0"+hours;
}
else
{
str += hours;
}
secondsOpen-=(hours*3600);
}
else
{
str += "00";
}
str += ":";
if (secondsOpen > 60)
{ //minutes
var minutes = Math.floor(secondsOpen/60);
if (minutes < 10)
{
str += "0"+minutes;
}
else
{
str += minutes;
}
secondsOpen-=(minutes*60);
}
else
{
str +="00";
}
str += ":";
if (secondsOpen > 0)
{ // seconds
if (secondsOpen < 10)
{
str += "0"+secondsOpen;
}
else
{
str += secondsOpen;
}
}
else
{
str += "00";
}
return str;
}
| function setClosedDuration | ( | closed | ) |
| var closedDuration = 0 |
Definition at line 12 of file activity.js.
Referenced by countUp(), and setClosedDuration().
| var count = 0 |
Definition at line 11 of file activity.js.
Referenced by Snoopy::_httprequest(), Snoopy::_httpsrequest(), Snoopy::_prepare_post_body(), addActivity(), wsdl::addComplexType(), array_drop_down(), book_days_when_free(), calculate_working_time(), nusoap_client::checkWSDL(), cmi_create_table(), nusoap_xmlschema::CreateTypeName(), draw_chart(), draw_file_row(), encode_binary(), feedback_html_multioptions(), feedback_html_options(), Snoopy::fetch(), wsdl::fetchWSDL(), getattachmenticon(), nusoap_server_mime::getHTTPBody(), nusoap_client_mime::getHTTPBody(), nusoap_server_mime::getHTTPContentType(), nusoap_client_mime::getHTTPContentType(), nusoap_server_mime::getHTTPContentTypeCharset(), nusoap_client_mime::getHTTPContentTypeCharset(), Mailbox::getNumUnreadEmails(), soap_transport_http::getResponse(), wsdl::getTypeDef(), html_action_links(), is_assoc(), kb_article(), list_tag_icons(), MagpieRSS::normalize(), OriginalChart::numberOfDataElements(), open_activities_for_site(), pagination_array(), wsdl::parametersMatchWrapped(), nusoap_xmlschema::schemaStartElement(), wsdl::serialize(), nusoap_base::serialize_val(), wsdl::serializeComplexTypeElements(), wsdl::serializeParameters(), wsdl::serializeRPCParameters(), nusoap_xmlschema::serializeSchema(), nusoap_xmlschema::serializeTypeDef(), Snoopy::setcookies(), wsdl::start_element(), suggest_reassign_userid(), and nusoap_client::UpdateCookies().
| var dataArray = new Array() |
Definition at line 10 of file activity.js.
Referenced by addActivity(), and countUp().