1d2c37c1 by Udo Bretz

Improved integration of OTRSServiceInidentState AddOn.

1 parent fac594a5
......@@ -67,6 +67,7 @@
<File Permission="644" Location="scripts/test/Service.t"/>
<File Permission="644" Location="scripts/test/SLA.t"/>
<File Permission="644" Location="var/httpd/htdocs/js/ITSM.Agent.CustomerSearch.js"/>
<File Permission="644" Location="var/httpd/htdocs/js/ITSM.Agent.IncidentState.js"/>
<File Permission="644" Location="var/httpd/htdocs/js/ITSM.Agent.Zoom.js"/>
<File Permission="644" Location="var/httpd/htdocs/skins/Agent/default/css/ITSM.Agent.Default.css"/>
<File Permission="644" Location="var/httpd/htdocs/skins/Agent/default/css/ITSM.Agent.Detail.css"/>
......
......@@ -411,6 +411,7 @@
<Setting>
<Array>
<Item>ITSM.Agent.CustomerSearch.js</Item>
<Item>ITSM.Agent.IncidentState.js</Item>
</Array>
</Setting>
</ConfigItem>
......
// --
// ITSM.Agent.IncidentState.js - provides the special module functions to show the service incident state
// Copyright (C) 2001-2011 OTRS AG, http://otrs.org/\n";
// --
// This software comes with ABSOLUTELY NO WARRANTY. For details, see
// the enclosed file COPYING for license information (AGPL). If you
// did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
// --
"use strict";
var ITSM = ITSM || {};
ITSM.Agent = ITSM.Agent || {};
/**
* @namespace
* @exports TargetNS as ITSM.Agent.IncidentState
* @description
* This namespace contains the special module functions for IncidentState.
*/
ITSM.Agent.IncidentState = (function (TargetNS) {
TargetNS.ShowIncidentState = function (Data) {
Data.Subaction = 'GetServiceIncidentState';
Core.AJAX.FunctionCall( Core.Config.Get('Baselink'), Data, function (Response) {
// if a service was selected and an incident state was found
if (Response.CurInciSignal) {
// set incident signal
$('#ServiceIncidentStateSignal').attr('class', Response.CurInciSignal);
$('#ServiceIncidentStateSignal').attr('title', Response.CurInciState);
// set incident state
$('#ServiceIncidentState').html(Response.CurInciState);
// show service incident signal and state
$('#ServiceIncidentStateContainer')
.show()
.prev()
.show();
}
else {
// hide service incident signal and state
$('#ServiceIncidentStateContainer')
.hide()
.prev()
.hide();
}
});
};
return TargetNS;
}(ITSM.Agent.IncidentState || {}));