diff --git a/App_Code/ClsOIEventos.vb b/App_Code/ClsOIEventos.vb
index d717980dc..a6056e0b2 100644
--- a/App_Code/ClsOIEventos.vb
+++ b/App_Code/ClsOIEventos.vb
@@ -16,6 +16,37 @@ Public Enum OITipoEventos
Soporte = 9
Gastos_Mes = 10
End Enum
+
+Public Class ObjEventosCorreo
+ Public Sub New(AsuntoCorreo As String, mailPara As String, ListPara As List(Of String), Folio As Integer, Link As String, Asunto As String, Descripcion As String, Fechai As String, Fechaf As String, Prioridad As String, Tema As String, Actividad As String, Estatus As String)
+ Me.AsuntoCorreo = AsuntoCorreo
+ Me.Folio = Folio
+ Me.Link = Link
+ Me.Asunto = Asunto
+ Me.Descripcion = Descripcion
+ Me.Fechai = Fechai
+ Me.Fechaf = Fechaf
+ Me.Prioridad = Prioridad
+ Me.Tema = Tema
+ Me.Actividad = Actividad
+ Me.Estatus = Estatus
+ Me.ListPara = ListPara
+ Me.mailPara = mailPara
+ End Sub
+ Public Property AsuntoCorreo As String
+ Public Property Folio As Integer
+ Public Property Link As String
+ Public Property Asunto As String
+ Public Property Descripcion As String
+ Public Property Fechai As String
+ Public Property Fechaf As String
+ Public Property Prioridad As String
+ Public Property Tema As String
+ Public Property Actividad As String
+ Public Property Estatus As String
+ Public Property mailPara As String
+ Public Property ListPara As List(Of String)
+End Class
Public Class ClsOIEventos
Implements IDisposable
@@ -144,11 +175,11 @@ Public Class ClsOIEventos
DataAdapter("PA_Sis_RegistrarConexion")
With SqlAdapter.SelectCommand.Parameters
.Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name
- .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString)
+ .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString(), HttpContext.Current.Request.QueryString.ToString())
.Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output
End With
SqlAdapter.Fill(Data)
- CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero
+ CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString().ToEntero()
Catch ex As Exception
OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
@@ -184,338 +215,10 @@ Public Class ClsOIEventos
Private Function GetDominio() As String
Return HttpContext.Current.Request.Url.ToString().Replace(HttpContext.Current.Request.Url.PathAndQuery, "")
End Function
- Private Function MailgetBodyNuevatarea(Folio As Integer, Link As String, Asunto As String, Descripcion As String, Fechai As String, Fechaf As String, Prioridad As String, Tema As String) As String
-
- Dim strSQL As New StringBuilder
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
SIG Notificaciones
")
- strSQL.AppendLine("
")
- strSQL.AppendLine(" NUEVA TAREA ASIGNADA")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Asunto ")
- strSQL.AppendLine(" @Asunto@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Descripción ")
- strSQL.AppendLine(" @Descripcion@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Fecha Inicio ")
- strSQL.AppendLine(" @Fechai@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Fecha Fin ")
- strSQL.AppendLine(" @Fechaf@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Prioridad ")
- strSQL.AppendLine(" @Prioridad@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Tema ")
- strSQL.AppendLine(" @Tema@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
SIG Notificaciones
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- Return strSQL.ToString().Replace("@Folio@", Folio.ToString()).Replace("@Link@", Link).Replace("@Asunto@", Asunto).Replace("@Descripcion@", Descripcion).Replace("@Fechai@", Fechai).Replace("@Fechaf@", Fechaf).Replace("@Prioridad@", Prioridad).Replace("@Tema@", Tema)
- End Function
-
- Private Function MailgetBodyActualizartarea(Folio As Integer, Link As String, Asunto As String, Descripcion As String, Fechai As String, Fechaf As String, Prioridad As String, Tema As String) As String
-
- Dim strSQL As New StringBuilder
- strSQL.AppendLine("")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
SIG Notificaciones
")
- strSQL.AppendLine("
")
- strSQL.AppendLine(" TAREA ACTUALIZADA")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Asunto ")
- strSQL.AppendLine(" @Asunto@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Descripción ")
- strSQL.AppendLine(" @Descripcion@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Fecha Inicio ")
- strSQL.AppendLine(" @Fechai@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Fecha Fin ")
- strSQL.AppendLine(" @Fechaf@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Prioridad ")
- strSQL.AppendLine(" @Prioridad@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Tema ")
- strSQL.AppendLine(" @Tema@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
SIG Notificaciones
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- Return strSQL.ToString().Replace("@Folio@", Folio.ToString()).Replace("@Link@", Link).Replace("@Asunto@", Asunto).Replace("@Descripcion@", Descripcion).Replace("@Fechai@", Fechai).Replace("@Fechaf@", Fechaf).Replace("@Prioridad@", Prioridad).Replace("@Tema@", Tema)
- End Function
-
- Private Function MailgetBodyActualizararchivo(Folio As Integer, Link As String, Asunto As String, Descripcion As String, Fechai As String, Fechaf As String, Prioridad As String, Tema As String) As String
-
- Dim strSQL As New StringBuilder
- strSQL.AppendLine("")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
SIG Notificaciones
")
- strSQL.AppendLine("
")
- strSQL.AppendLine(" TAREA ACTUALIZADA(Nuevo Archivo)")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Asunto ")
- strSQL.AppendLine(" @Asunto@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Descripción ")
- strSQL.AppendLine(" @Descripcion@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Fecha Inicio ")
- strSQL.AppendLine(" @Fechai@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Fecha Fin ")
- strSQL.AppendLine(" @Fechaf@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Prioridad ")
- strSQL.AppendLine(" @Prioridad@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Tema ")
- strSQL.AppendLine(" @Tema@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
SIG Notificaciones
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- Return strSQL.ToString().Replace("@Folio@", Folio.ToString()).Replace("@Link@", Link).Replace("@Asunto@", Asunto).Replace("@Descripcion@", Descripcion).Replace("@Fechai@", Fechai).Replace("@Fechaf@", Fechaf).Replace("@Prioridad@", Prioridad).Replace("@Tema@", Tema)
- End Function
-
- Private Function MailgetBodyActualizarAvance(Folio As Integer, Link As String, Asunto As String, Descripcion As String, Fechai As String, Fechaf As String, Prioridad As String, Tema As String) As String
-
- Dim strSQL As New StringBuilder
- strSQL.AppendLine("")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
SIG Notificaciones
")
- strSQL.AppendLine("
")
- strSQL.AppendLine(" TAREA ACTUALIZADA(Avance)")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Asunto ")
- strSQL.AppendLine(" @Asunto@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Descripción ")
- strSQL.AppendLine(" @Descripcion@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Fecha Inicio ")
- strSQL.AppendLine(" @Fechai@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Fecha Fin ")
- strSQL.AppendLine(" @Fechaf@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Prioridad ")
- strSQL.AppendLine(" @Prioridad@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Tema ")
- strSQL.AppendLine(" @Tema@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
SIG Notificaciones
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- Return strSQL.ToString().Replace("@Folio@", Folio.ToString()).Replace("@Link@", Link).Replace("@Asunto@", Asunto).Replace("@Descripcion@", Descripcion).Replace("@Fechai@", Fechai).Replace("@Fechaf@", Fechaf).Replace("@Prioridad@", Prioridad).Replace("@Tema@", Tema)
- End Function
-
- Private Function MailgetBodyTareaComentario(Folio As Integer, Link As String, Asunto As String, Descripcion As String, Fechai As String, Fechaf As String, Prioridad As String, Tema As String) As String
-
- Dim strSQL As New StringBuilder
- strSQL.AppendLine("")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
SIG Notificaciones
")
- strSQL.AppendLine("
")
- strSQL.AppendLine(" NUEVO COMENTARIO EN TAREA")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Asunto ")
- strSQL.AppendLine(" @Asunto@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Descripción ")
- strSQL.AppendLine(" @Descripcion@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Fecha Inicio ")
- strSQL.AppendLine(" @Fechai@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Fecha Fin ")
- strSQL.AppendLine(" @Fechaf@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Prioridad ")
- strSQL.AppendLine(" @Prioridad@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Tema ")
- strSQL.AppendLine(" @Tema@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
SIG Notificaciones
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- Return strSQL.ToString().Replace("@Folio@", Folio.ToString()).Replace("@Link@", Link).Replace("@Asunto@", Asunto).Replace("@Descripcion@", Descripcion).Replace("@Fechai@", Fechai).Replace("@Fechaf@", Fechaf).Replace("@Prioridad@", Prioridad).Replace("@Tema@", Tema)
- End Function
-
- Private Function MailgetBodyTareaCheckList(Actividad As String, Folio As Integer, Link As String, Asunto As String, Descripcion As String, Fechai As String, Fechaf As String, Prioridad As String, Tema As String) As String
-
- Dim strSQL As New StringBuilder
- strSQL.AppendLine("")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
SIG Notificaciones
")
- strSQL.AppendLine("
")
- strSQL.AppendLine(" TAREA (@Actividad@)")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Asunto ")
- strSQL.AppendLine(" @Asunto@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Descripción ")
- strSQL.AppendLine(" @Descripcion@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Fecha Inicio ")
- strSQL.AppendLine(" @Fechai@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Fecha Fin ")
- strSQL.AppendLine(" @Fechaf@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Prioridad ")
- strSQL.AppendLine(" @Prioridad@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Tema ")
- strSQL.AppendLine(" @Tema@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
SIG Notificaciones
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- Return strSQL.ToString().Replace("@Actividad@", Actividad).Replace("@Folio@", Folio.ToString()).Replace("@Link@", Link).Replace("@Asunto@", Asunto).Replace("@Descripcion@", Descripcion).Replace("@Fechai@", Fechai).Replace("@Fechaf@", Fechaf).Replace("@Prioridad@", Prioridad).Replace("@Tema@", Tema)
- End Function
-
- Private Function MailgetBodyActualizarEstado(Estatus As String, Folio As Integer, Link As String, Asunto As String, Descripcion As String, Fechai As String, Fechaf As String, Prioridad As String, Tema As String) As String
-
- Dim strSQL As New StringBuilder
- strSQL.AppendLine("")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
SIG Notificaciones
")
- strSQL.AppendLine("
")
- strSQL.AppendLine(" TAREA NUEVO ESTADO (@Estatus@)")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Asunto ")
- strSQL.AppendLine(" @Asunto@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Descripción ")
- strSQL.AppendLine(" @Descripcion@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Fecha Inicio ")
- strSQL.AppendLine(" @Fechai@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Fecha Fin ")
- strSQL.AppendLine(" @Fechaf@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Prioridad ")
- strSQL.AppendLine(" @Prioridad@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine(" Tema ")
- strSQL.AppendLine(" @Tema@ ")
- strSQL.AppendLine(" ")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
SIG Notificaciones
")
- strSQL.AppendLine("
")
- strSQL.AppendLine("
")
- Return strSQL.ToString().Replace("@Estatus@", Estatus).Replace("@Folio@", Folio.ToString()).Replace("@Link@", Link).Replace("@Asunto@", Asunto).Replace("@Descripcion@", Descripcion).Replace("@Fechai@", Fechai).Replace("@Fechaf@", Fechaf).Replace("@Prioridad@", Prioridad).Replace("@Tema@", Tema)
- End Function
+ Public Property objCorreo As ObjEventosCorreo
#End Region
- Public Sub EnviarCorreo(ByVal ObjEmpresa As Empresa, Asunto As String, body As String, Para As String, ArrayCC As String)
-
- Dim a As String = String.Format("{0} -- {1} --- {2}", Asunto, Para, ArrayCC)
- a.GuardaLog()
-
- Dim Mail As New ClsSisMail()
- Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
- Dim itemMail As New ClsSisMail.ArchivoMail
-
- 'With itemMail
- ' itemMail.ArchivoBinario = ArchivoBinario
- ' itemMail.NombreArchivo = NombreArchivo
-
- 'End With
-
- 'LSRutasMail.Add(itemMail)
-
-
- Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, body, ArrayCC, LSRutasMail)
- Mail = Nothing
- End Sub
-
#Region "oieventos2.0"
Public Function GetEventosUsuario2(CveEvento As Integer, CveEmpresa As Integer) As Boolean
@@ -551,9 +254,25 @@ Public Class ClsOIEventos
End Try
Return Retorno
End Function
- Public Function GetEventos2(cveEvento As Int32, CveEmpresa As Integer) As Boolean
+ Public Function GetEventos2(cveEvento As Int32, CveEmpresa As Integer, Optional CveEventoPadre As Integer = -1) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_OI_Eventos2Get", CommandType.StoredProcedure)
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveEvento", SqlDbType.Int).Value = cveEvento
+ .Add("@CveEventoPadre", SqlDbType.Int).Value = CveEventoPadre
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+ Try
+ SqlAdapter.Fill(Data)
+ retorno = True
+ Catch ex As Exception
+ OnError("Ocurrió un error al obtener el Catálogo de Eventos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+ Return retorno
+ End Function
+ Public Function GetTareaConHijos(cveEvento As Int32, CveEmpresa As Integer) As Boolean
+ Dim retorno As Boolean = False
+ DataAdapter("PA_OI_GetTareaConHijos", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEvento", SqlDbType.Int).Value = cveEvento
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
@@ -567,23 +286,32 @@ Public Class ClsOIEventos
Return retorno
End Function
+ Public Function AddEventoMinuta2(Asunto As String, Descripcion As String, Acuerdos As String, CveUsuarioDe As Integer, CveUsuarioPara As Integer, FechaInicio As DateTime, Archivo As String, Lmiembros As List(Of Integer), chkList As List(Of String), CveUsuarioIng As Integer, CveEmpresa As Integer) As Boolean
+ Dim Retorno As Boolean = False
+ Retorno = AddOI_Eventos2(OITipoEventos.Minuta, Asunto, Descripcion, 3, -1, -1, String.Format("{0:yyyy/MM/dd HH:mm}", FechaInicio), "1900/01/01 00:00", -1, Archivo, Lmiembros, chkList, CveUsuarioIng, CveEmpresa, -1, Acuerdos)
+ 'Retorno = AddEvento(5, -1, Asunto, Descripcion, 1, -1, -1, FechaInicio, ("01/01/1799").ToDate, -1, -1, "-1", CveUsuarioIng, CveEmpresa, -1, -1, -1, -1, -1, -1, -1, -1)
+
+ Return Retorno
+ End Function
Public Function AddOI_Eventos2(cveTipoEvento As OITipoEventos, asunto As String, descripcion As String, prioridad As Int32, cveUsuarioDe As Int32, cveUsuarioPara As Int32,
fechaInicio As String, fechaFin As String, cveRevision As Int32, archivo As String, Lmiembros As List(Of Integer), chkList As List(Of String),
- cveUsuarioIng As Int32, cveEmpresa As Int32, oempresa As Empresa, Optional CveEventoPadre As Integer = -1) As Boolean
+ cveUsuarioIng As Int32, cveEmpresa As Int32, Optional CveEventoPadre As Integer = -1, Optional Acuerdos As String = Nothing, Optional CveAgendaTipo As Integer = -1) As Boolean
Dim retorno As Boolean = False
Dim xmlMiembros As System.Xml.Linq.XDocument = Nothing
'xmlMiembros = New System.Xml.Linq.XDocument(New System.Xml.Linq.XElement("CCPara", Lmiembros.Select(x >= New System.Xml.Linq.XElement("CveUsuario", x)))
- If Lmiembros IsNot Nothing AndAlso Lmiembros.Count > 0 Then
- If Not cveUsuarioPara.Contiene(Lmiembros.ToArray()) Then
- Lmiembros.Add(cveUsuarioPara)
- End If
- If Not cveUsuarioDe.Contiene(Lmiembros.ToArray()) Then
- Lmiembros.Add(cveUsuarioDe)
- End If
- xmlMiembros = New System.Xml.Linq.XDocument(New System.Xml.Linq.XElement("CCPara", Lmiembros.[Select](Function(x) New System.Xml.Linq.XElement("CveUsuario", x))))
+ If Lmiembros Is Nothing Then
+ Lmiembros = New List(Of Integer)
End If
+ If Not cveUsuarioPara.Contiene(Lmiembros.ToArray()) Then
+ Lmiembros.Add(cveUsuarioPara)
+ End If
+ If Not cveUsuarioDe.Contiene(Lmiembros.ToArray()) Then
+ Lmiembros.Add(cveUsuarioDe)
+ End If
+ xmlMiembros = New System.Xml.Linq.XDocument(New System.Xml.Linq.XElement("CCPara", Lmiembros.[Select](Function(x) New System.Xml.Linq.XElement("CveUsuario", x))))
+
Dim xmlChkList As System.Xml.Linq.XDocument = Nothing
If chkList IsNot Nothing AndAlso chkList.Count > 0 Then
xmlChkList = New System.Xml.Linq.XDocument(New System.Xml.Linq.XElement("CheckList", chkList.[Select](Function(x) New System.Xml.Linq.XElement("Actividad", x))))
@@ -609,6 +337,8 @@ Public Class ClsOIEventos
.Add("@xmlChkList", SqlDbType.Xml).Value = If(xmlChkList Is Nothing, DBNull.Value, DirectCast(xmlChkList.ToString(), Object))
.Add("@cveEmpresa", SqlDbType.Int).Value = cveEmpresa
.Add("@CveEventoPadre", SqlDbType.Int).Value = CveEventoPadre
+ .Add("@Acuerdos", SqlDbType.VarChar).Value = If(Acuerdos Is Nothing, DBNull.Value, DirectCast(Acuerdos, Object))
+ .Add("@CveAgendaTipo", SqlDbType.Int).Value = CveAgendaTipo
'.Add("@mailPara", SqlDbType.VarChar).Direction = ParameterDirection.Output
'.Add("@mailBody", SqlDbType.Xml).Direction = ParameterDirection.Output
End With
@@ -647,11 +377,12 @@ Public Class ClsOIEventos
End Try
Try
If retorno AndAlso lPara.Count > 0 AndAlso drow IsNot Nothing Then
- Notificaciones.AlertaVentana(String.Format("Folio :{1} ", GetDominio(), Folio, CveEvento), lPara, "NUEVA TAREA ASIGNADA")
- mailbody = MailgetBodyNuevatarea(Folio, String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), CveEvento), asunto, descripcion, String.Format("{0:dd/MM/yyyy HH:mm}", fechaInicio.ToDateTime()), String.Format("{0:dd/MM/yyyy HH:mm}", fechaFin.ToDateTime()), drow("Prioridad").ToString(), drow("Tema").ToString())
- Dim mailAsunto As String = "Nueva Tarea asignada" ',cveUsuarioPara
- Dim mailArrayCC As String = ""
- EnviarCorreo(oempresa, mailAsunto, mailbody, mailPara, mailArrayCC)
+ 'Notificaciones.AlertaVentana(String.Format("Folio :{1} ", GetDominio(), Folio, CveEvento), lPara, "NUEVA TAREA ASIGNADA")
+ objCorreo = New ObjEventosCorreo("Nueva Tarea asignada", mailPara, lPara, Folio, String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), CveEvento), asunto, descripcion, String.Format("{0:dd/MM/yyyy HH:mm}", fechaInicio.ToDateTime()), String.Format("{0:dd/MM/yyyy HH:mm}", fechaFin.ToDateTime()), drow("Prioridad").ToString(), drow("Tema").ToString(), "", "")
+ 'mailbody = MailgetBodyNuevatarea(Folio, String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), CveEvento), asunto, descripcion, String.Format("{0:dd/MM/yyyy HH:mm}", fechaInicio.ToDateTime()), String.Format("{0:dd/MM/yyyy HH:mm}", fechaFin.ToDateTime()), drow("Prioridad").ToString(), drow("Tema").ToString())
+ 'Dim mailAsunto As String = "Nueva Tarea asignada" ',cveUsuarioPara
+ 'Dim mailArrayCC As String = ""
+ 'EnviarCorreo(oempresa, mailAsunto, mailbody, mailPara, mailArrayCC)
End If
Catch ex As Exception
@@ -661,7 +392,7 @@ Public Class ClsOIEventos
Public Function UP_Eventos2(CveEvento As Integer, asunto As String, descripcion As String, prioridad As Int32, fechaInicio As String, fechaFin As String,
- cveRevision As Int32, cveUsuarioIng As Int32, cveEmpresa As Int32, oempresa As Empresa) As Boolean
+ cveRevision As Int32, cveUsuarioIng As Int32, cveEmpresa As Int32) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_OI_Eventos2Up", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
@@ -705,17 +436,18 @@ Public Class ClsOIEventos
End Try
If retorno AndAlso lPara.Count > 0 AndAlso drow IsNot Nothing Then
- Notificaciones.AlertaVentana(String.Format("Folio :{1} ", GetDominio(), Folio, CveEvento), lPara, "TAREA ACTUALIZADA")
- mailbody = MailgetBodyActualizartarea(Folio, String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), CveEvento), asunto, descripcion, String.Format("{0:dd/MM/yyyy HH:mm}", fechaInicio.ToDateTime()), String.Format("{0:dd/MM/yyyy HH:mm}", fechaFin.ToDateTime()), drow("Prioridad").ToString(), drow("Tema").ToString())
- Dim mailAsunto As String = "Tarea Actualizada" ',cveUsuarioPara
- Dim mailArrayCC As String = ""
- EnviarCorreo(oempresa, mailAsunto, mailbody, mailPara, mailArrayCC)
+ objCorreo = New ObjEventosCorreo("Tarea Actualizada", mailPara, lPara, Folio, String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), CveEvento), asunto, descripcion, String.Format("{0:dd/MM/yyyy HH:mm}", fechaInicio.ToDateTime()), String.Format("{0:dd/MM/yyyy HH:mm}", fechaFin.ToDateTime()), drow("Prioridad").ToString(), drow("Tema").ToString(), "", "")
+ 'Notificaciones.AlertaVentana(String.Format("Folio :{1} ", GetDominio(), Folio, CveEvento), lPara, "TAREA ACTUALIZADA")
+ 'mailbody = MailgetBodyActualizartarea(Folio, String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), CveEvento), asunto, descripcion, String.Format("{0:dd/MM/yyyy HH:mm}", fechaInicio.ToDateTime()), String.Format("{0:dd/MM/yyyy HH:mm}", fechaFin.ToDateTime()), drow("Prioridad").ToString(), drow("Tema").ToString())
+ 'Dim mailAsunto As String = "Tarea Actualizada" ',cveUsuarioPara
+ 'Dim mailArrayCC As String = ""
+ 'EnviarCorreo(oempresa, mailAsunto, mailbody, mailPara, mailArrayCC)
End If
Return retorno
End Function
- Public Function UpdateEstatusEvento2(CveEventoEstatus As Integer, CveComentario As Integer, CveEvento As Integer, CveUsuario As Integer, cveEmpresa As Int32, oempresa As Empresa) As Boolean
+ Public Function UpdateEstatusEvento2(CveEventoEstatus As Integer, CveComentario As Integer, CveEvento As Integer, CveUsuario As Integer, cveEmpresa As Int32) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_OI_EventosEstatusUpdate2")
@@ -756,11 +488,12 @@ Public Class ClsOIEventos
End Try
If Retorno AndAlso lPara.Count > 0 AndAlso drow IsNot Nothing Then
- Notificaciones.AlertaVentana(String.Format("Folio :{1} ", GetDominio(), drow("Folio").ToString().ToEntero(), CveEvento), lPara, String.Format("CAMBIÓ ESTADO EN TAREA A '{0}'", drow("Estatus")))
- mailbody = MailgetBodyActualizarEstado(drow("Estatus").ToString(), drow("Folio").ToString().ToEntero(), String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), CveEvento), drow("Asunto").ToString(), drow("Descripcion").ToString(), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaInicio")), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaFin")), drow("Prioridad").ToString(), drow("Tema").ToString())
- Dim mailAsunto As String = "Tarea Cambio de estatus" ',cveUsuarioPara
- Dim mailArrayCC As String = ""
- EnviarCorreo(oempresa, mailAsunto, mailbody, mailPara, mailArrayCC)
+ objCorreo = New ObjEventosCorreo("Tarea Cambio de estatus", mailPara, lPara, drow("Folio").ToString().ToEntero(), String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), CveEvento), drow("Asunto").ToString(), drow("Descripcion").ToString(), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaInicio")), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaFin")), drow("Prioridad").ToString(), drow("Tema").ToString(), "", drow("Estatus").ToString())
+ 'Notificaciones.AlertaVentana(String.Format("Folio :{1} ", GetDominio(), drow("Folio").ToString().ToEntero(), CveEvento), lPara, String.Format("CAMBIÓ ESTADO EN TAREA A '{0}'", drow("Estatus")))
+ 'mailbody = MailgetBodyActualizarEstado(drow("Estatus").ToString(), drow("Folio").ToString().ToEntero(), String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), CveEvento), drow("Asunto").ToString(), drow("Descripcion").ToString(), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaInicio")), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaFin")), drow("Prioridad").ToString(), drow("Tema").ToString())
+ 'Dim mailAsunto As String = "Tarea Cambio de estatus" ',cveUsuarioPara
+ 'Dim mailArrayCC As String = ""
+ 'EnviarCorreo(oempresa, mailAsunto, mailbody, mailPara, mailArrayCC)
End If
Return Retorno
End Function
@@ -798,7 +531,7 @@ Public Class ClsOIEventos
End Try
Return retorno
End Function
- Public Function Upcheklist(cveEventoCheckList As Int32, cveEvento As Int32, eventoComentario As String, estatus As Boolean, cveUsuario As Int32, CveEmpresa As Int32, oempresa As Empresa) As Boolean
+ Public Function Upcheklist(cveEventoCheckList As Int32, cveEvento As Int32, eventoComentario As String, estatus As Boolean, cveUsuario As Int32, CveEmpresa As Int32) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_OI_cheklistUp", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
@@ -841,11 +574,12 @@ Public Class ClsOIEventos
If retorno AndAlso lPara.Count > 0 AndAlso drow IsNot Nothing Then
- Notificaciones.AlertaVentana(String.Format("Folio :{1} ", GetDominio(), drow("Folio").ToString().ToEntero(), cveEvento), lPara, "TAREA ACTUALIZADA(Nuevo Archivo)")
- mailbody = MailgetBodyTareaCheckList(String.Format("Actividad {0}", If(estatus, "Terminada", "Pendiente")), drow("Folio").ToString().ToEntero(), String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), cveEvento), drow("Asunto").ToString(), drow("Descripcion").ToString(), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaInicio")), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaFin")), drow("Prioridad").ToString(), drow("Tema").ToString())
- Dim mailAsunto As String = String.Format("Actividad {0}", If(estatus, "Terminada", "Pendiente"))
- Dim mailArrayCC As String = ""
- EnviarCorreo(oempresa, mailAsunto, mailbody, mailPara, mailArrayCC)
+ objCorreo = New ObjEventosCorreo(String.Format("Actividad {0}", If(estatus, "Terminada", "Pendiente")), mailPara, lPara, drow("Folio").ToString().ToEntero(), String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), cveEvento), drow("Asunto").ToString(), drow("Descripcion").ToString(), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaInicio")), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaFin")), drow("Prioridad").ToString(), drow("Tema").ToString(), String.Format("Actividad {0}", If(estatus, "Terminada", "Pendiente")), "")
+ 'Notificaciones.AlertaVentana(String.Format("Folio :{1} ", GetDominio(), drow("Folio").ToString().ToEntero(), cveEvento), lPara, "TAREA ACTUALIZADA(Nuevo Archivo)")
+ 'mailbody = MailgetBodyTareaCheckList(String.Format("Actividad {0}", If(estatus, "Terminada", "Pendiente")), drow("Folio").ToString().ToEntero(), String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), cveEvento), drow("Asunto").ToString(), drow("Descripcion").ToString(), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaInicio")), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaFin")), drow("Prioridad").ToString(), drow("Tema").ToString())
+ 'Dim mailAsunto As String = String.Format("Actividad {0}", If(estatus, "Terminada", "Pendiente"))
+ 'Dim mailArrayCC As String = ""
+ 'EnviarCorreo(oempresa, mailAsunto, mailbody, mailPara, mailArrayCC)
End If
Return retorno
End Function
@@ -867,7 +601,7 @@ Public Class ClsOIEventos
End Function
#End Region
- Public Function AddUPEventoArchivo(CveEvento As Integer, Archivo As String, CveUsuario As Integer, cveEmpresa As Int32, oempresa As Empresa) As Boolean
+ Public Function AddUPEventoArchivo(CveEvento As Integer, Archivo As String, CveUsuario As Integer, cveEmpresa As Int32) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_OI_EventosArchivoAddUP")
With SqlAdapter.SelectCommand.Parameters
@@ -910,15 +644,16 @@ Public Class ClsOIEventos
End Try
If Retorno AndAlso lPara.Count > 0 AndAlso drow IsNot Nothing Then
- Notificaciones.AlertaVentana(String.Format("Folio :{1} ", GetDominio(), drow("Folio").ToString().ToEntero(), CveEvento), lPara, "TAREA ACTUALIZADA(Nuevo Archivo)")
- mailbody = MailgetBodyActualizararchivo(drow("Folio").ToString().ToEntero(), String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), CveEvento), drow("Asunto").ToString(), drow("Descripcion").ToString(), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaInicio")), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaFin")), drow("Prioridad").ToString(), drow("Tema").ToString())
- Dim mailAsunto As String = "Tarea Archivo actualizado" ',cveUsuarioPara
- Dim mailArrayCC As String = ""
- EnviarCorreo(oempresa, mailAsunto, mailbody, mailPara, mailArrayCC)
+ objCorreo = New ObjEventosCorreo("Tarea Archivo actualizado", mailPara, lPara, drow("Folio").ToString().ToEntero(), String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), CveEvento), drow("Asunto").ToString(), drow("Descripcion").ToString(), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaInicio")), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaFin")), drow("Prioridad").ToString(), drow("Tema").ToString(), "", "")
+ 'Notificaciones.AlertaVentana(String.Format("Folio :{1} ", GetDominio(), drow("Folio").ToString().ToEntero(), CveEvento), lPara, "TAREA ACTUALIZADA(Nuevo Archivo)")
+ 'mailbody = MailgetBodyActualizararchivo(drow("Folio").ToString().ToEntero(), String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), CveEvento), drow("Asunto").ToString(), drow("Descripcion").ToString(), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaInicio")), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaFin")), drow("Prioridad").ToString(), drow("Tema").ToString())
+ 'Dim mailAsunto As String = "Tarea Archivo actualizado" ',cveUsuarioPara
+ 'Dim mailArrayCC As String = ""
+ 'EnviarCorreo(oempresa, mailAsunto, mailbody, mailPara, mailArrayCC)
End If
Return Retorno
End Function
- Public Function UPEventoAAvance(CveEvento As Integer, Avance As Decimal, CveUsuario As Integer, cveEmpresa As Int32, oempresa As Empresa) As Boolean
+ Public Function UPEventoAAvance(CveEvento As Integer, Avance As Decimal, CveUsuario As Integer, cveEmpresa As Int32) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_OI_EventosAvanceUP")
With SqlAdapter.SelectCommand.Parameters
@@ -963,17 +698,18 @@ Public Class ClsOIEventos
End Try
If Retorno AndAlso lPara.Count > 0 AndAlso drow IsNot Nothing Then
- Notificaciones.AlertaVentana(String.Format("Folio :{1} ", GetDominio(), drow("Folio").ToString().ToEntero(), CveEvento), lPara, "TAREA ACTUALIZADA(Nuevo Archivo)")
- mailbody = MailgetBodyActualizarAvance(drow("Folio").ToString().ToEntero(), String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), CveEvento), drow("Asunto").ToString(), drow("Descripcion").ToString(), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaInicio")), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaFin")), drow("Prioridad").ToString(), drow("Tema").ToString())
- Dim mailAsunto As String = "Tarea cambio Avance" ',cveUsuarioPara
- Dim mailArrayCC As String = ""
- EnviarCorreo(oempresa, mailAsunto, mailbody, mailPara, mailArrayCC)
+ objCorreo = New ObjEventosCorreo("Tarea cambio Avance", mailPara, lPara, drow("Folio").ToString().ToEntero(), String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), CveEvento), drow("Asunto").ToString(), drow("Descripcion").ToString(), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaInicio")), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaFin")), drow("Prioridad").ToString(), drow("Tema").ToString(), "", "")
+ 'Notificaciones.AlertaVentana(String.Format("Folio :{1} ", GetDominio(), drow("Folio").ToString().ToEntero(), CveEvento), lPara, "TAREA ACTUALIZADA(Nuevo Archivo)")
+ 'mailbody = MailgetBodyActualizarAvance(drow("Folio").ToString().ToEntero(), String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), CveEvento), drow("Asunto").ToString(), drow("Descripcion").ToString(), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaInicio")), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaFin")), drow("Prioridad").ToString(), drow("Tema").ToString())
+ 'Dim mailAsunto As String = "Tarea cambio Avance" ',cveUsuarioPara
+ 'Dim mailArrayCC As String = ""
+ 'EnviarCorreo(oempresa, mailAsunto, mailbody, mailPara, mailArrayCC)
End If
Return Retorno
End Function
- Public Function AddEventoComentario2(CveEvento As Integer, Comentario As String, Archivo As String, CveUsuario As Integer, CveEmpresa As Integer, oempresa As Empresa) As Integer
+ Public Function AddEventoComentario2(CveEvento As Integer, Comentario As String, Archivo As String, CveUsuario As Integer, CveEmpresa As Integer) As Integer
Dim Retorno As Integer = -1
DataAdapter("PA_OI_EventosComentarios2Add")
With SqlAdapter.SelectCommand.Parameters
@@ -992,9 +728,6 @@ Public Class ClsOIEventos
Dim ds As New DataSet()
Dim drow As DataRow = Nothing
Try
- SqlAdapter.Fill(Data)
- CveEventoComentario = SqlAdapter.SelectCommand.Parameters("@CveEventoComentario").Value.ToString.ToEntero
- Retorno = CveEventoComentario
SqlAdapter.Fill(ds)
@@ -1004,6 +737,9 @@ Public Class ClsOIEventos
If ds.Tables.Count > 1 AndAlso ds.Tables(1).Rows.Count > 0 Then
drow = ds.Tables(1).Rows(0)
End If
+
+ CveEventoComentario = SqlAdapter.SelectCommand.Parameters("@CveEventoComentario").Value.ToString().ToEntero()
+ Retorno = CveEventoComentario
If DtResultados.Rows.Count > 0 Then
For Each item As DataRow In DtResultados.Rows
lPara.Add(item("CveUsuario").ToString())
@@ -1019,11 +755,12 @@ Public Class ClsOIEventos
End Try
If Retorno > 0 AndAlso lPara.Count > 0 AndAlso drow IsNot Nothing Then
- Notificaciones.AlertaVentana(String.Format("Folio :{1} ", GetDominio(), drow("Folio").ToString().ToEntero(), CveEvento), lPara, "TAREA ACTUALIZADA(Nuevo Archivo)")
- mailbody = MailgetBodyTareaComentario(drow("Folio").ToString().ToEntero(), String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), CveEvento), drow("Asunto").ToString(), drow("Descripcion").ToString(), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaInicio")), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaFin")), drow("Prioridad").ToString(), drow("Tema").ToString())
- Dim mailAsunto As String = "Nuevo comentario en tarea" ',cveUsuarioPara
- Dim mailArrayCC As String = ""
- EnviarCorreo(oempresa, mailAsunto, mailbody, mailPara, mailArrayCC)
+ objCorreo = New ObjEventosCorreo("Nuevo comentario en tarea", mailPara, lPara, drow("Folio").ToString().ToEntero(), String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), CveEvento), drow("Asunto").ToString(), drow("Descripcion").ToString(), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaInicio")), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaFin")), drow("Prioridad").ToString(), drow("Tema").ToString(), "", "")
+ 'Notificaciones.AlertaVentana(String.Format("Folio :{1} ", GetDominio(), drow("Folio").ToString().ToEntero(), CveEvento), lPara, "TAREA ACTUALIZADA(Nuevo Archivo)")
+ 'mailbody = MailgetBodyTareaComentario(drow("Folio").ToString().ToEntero(), String.Format("{0}OI/TareaDetalle.aspx?CveEvento={1}", GetDominio(), CveEvento), drow("Asunto").ToString(), drow("Descripcion").ToString(), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaInicio")), String.Format("{0:dd/MM/yyyy HH:mm}", drow("FechaFin")), drow("Prioridad").ToString(), drow("Tema").ToString())
+ 'Dim mailAsunto As String = "Nuevo comentario en tarea" ',cveUsuarioPara
+ 'Dim mailArrayCC As String = ""
+ 'EnviarCorreo(oempresa, mailAsunto, mailbody, mailPara, mailArrayCC)
End If
Return Retorno
End Function
@@ -1181,65 +918,65 @@ Public Class ClsOIEventos
'If CveEvento > 0 AndAlso Data IsNot Nothing AndAlso Data.Rows.Count > 0 Then
If Data.Rows.Count > 0 Then
- Me.CveEvento = Data.Rows(0)("CveEvento").ToString.ToEntero
- Me.CveTipoEvento = Data.Rows(0)("CveTipoEvento").ToString.ToEntero
- Me.Folio = Data.Rows(0)("Folio").ToString.ToEntero
- Me.CveAgendaTipo = Data.Rows(0)("CveAgendaTipo").ToString.ToEntero
- Me.TipoEvento = Data.Rows(0)("TipoEvento").ToString
- Me.Asunto = Data.Rows(0)("Asunto").ToString
- Me.Descripcion = Data.Rows(0)("Descripcion").ToString
- Me.Prioridad = Data.Rows(0)("Prioridad").ToString
- Me.CvePrioridad = Data.Rows(0)("CvePrioridad").ToString.ToEntero
- Me.CveUsuarioDe = Data.Rows(0)("CveUsuarioDe").ToString.ToEntero
- Me.CorreoDe = Data.Rows(0)("CorreoDe").ToString
- Me.UsuarioDe = Data.Rows(0)("UsuarioDe").ToString
- Me.CveUsuarioPara = Data.Rows(0)("CveUsuarioPara").ToString.ToEntero
- Me.UsuarioPara = Data.Rows(0)("UsuarioPara").ToString
- Me.CorreoPara = Data.Rows(0)("CorreoPara").ToString
- Me.CveEventoEstatus = Data.Rows(0)("CveEventoEstatus").ToString.ToEntero
- Me.EventoEstatus = Data.Rows(0)("EventoEstatus").ToString
- Me.FechaInicio = Data.Rows(0)("FechaInicio").ToString.ToDate
- Me.FechaFin = Data.Rows(0)("FechaFin").ToString.ToDate
- Me.FechaRealTermino = Data.Rows(0)("FechaRealTermino").ToString.ToDate
- Me.CveEventoPadre = Data.Rows(0)("CveEventoPadre").ToString.ToEntero
- Me.Orden = Data.Rows(0)("Orden").ToString.ToDouble
- Me.CveRevision = Data.Rows(0)("CveRevision").ToString.ToEntero
- Me.Acuerdos = Data.Rows(0)("Acuerdos").ToString
- Me.Revision = Data.Rows(0)("Revision").ToString
- 'Me.TipoReferencia = Data.Rows(0)("TipoReferencia").ToString
- 'Me.Referencia = Data.Rows(0)("Referencia").ToString
- Me.Archivo = Data.Rows(0)("Archivo").ToString
- 'Me.CveSeguimiento = Data.Rows(0)("CveSeguimiento").ToString.ToEntero
- Me.CveOC = Data.Rows(0)("CveOC").ToString.ToEntero
- Me.CveUsuarioIng = Data.Rows(0)("CveUsuarioIng").ToString.ToEntero
- Me.UsuarioIng = Data.Rows(0)("UsuarioIng").ToString
- Me.RolIngreso = Data.Rows(0)("RolIngreso").ToString.ToEntero
- Me.FechaIng = Data.Rows(0)("FechaIng").ToString.ToDate
- Me.CveEmpresa = Data.Rows(0)("CveEmpresa").ToString.ToEntero
- Me.Modificada = CBool(Data.Rows(0)("Modificado").ToString)
- Me.CveCompra = Data.Rows(0)("CveCompra").ToString.ToEntero
- Me.CveVenta = Data.Rows(0)("CveVenta").ToString.ToEntero
+ Me.CveEvento = Data.Rows(0)("CveEvento").ToString().ToEntero()
+ Me.CveTipoEvento = Data.Rows(0)("CveTipoEvento").ToString().ToEntero()
+ Me.Folio = Data.Rows(0)("Folio").ToString().ToEntero()
+ Me.CveAgendaTipo = Data.Rows(0)("CveAgendaTipo").ToString().ToEntero()
+ Me.TipoEvento = Data.Rows(0)("TipoEvento").ToString()
+ Me.Asunto = Data.Rows(0)("Asunto").ToString()
+ Me.Descripcion = Data.Rows(0)("Descripcion").ToString()
+ Me.Prioridad = Data.Rows(0)("Prioridad").ToString()
+ Me.CvePrioridad = Data.Rows(0)("CvePrioridad").ToString().ToEntero()
+ Me.CveUsuarioDe = Data.Rows(0)("CveUsuarioDe").ToString().ToEntero()
+ Me.CorreoDe = Data.Rows(0)("CorreoDe").ToString()
+ Me.UsuarioDe = Data.Rows(0)("UsuarioDe").ToString()
+ Me.CveUsuarioPara = Data.Rows(0)("CveUsuarioPara").ToString().ToEntero()
+ Me.UsuarioPara = Data.Rows(0)("UsuarioPara").ToString()
+ Me.CorreoPara = Data.Rows(0)("CorreoPara").ToString()
+ Me.CveEventoEstatus = Data.Rows(0)("CveEventoEstatus").ToString().ToEntero()
+ Me.EventoEstatus = Data.Rows(0)("EventoEstatus").ToString()
+ Me.FechaInicio = Data.Rows(0)("FechaInicio").ToString().ToDate
+ Me.FechaFin = Data.Rows(0)("FechaFin").ToString().ToDate
+ Me.FechaRealTermino = Data.Rows(0)("FechaRealTermino").ToString().ToDate
+ Me.CveEventoPadre = Data.Rows(0)("CveEventoPadre").ToString().ToEntero()
+ Me.Orden = Data.Rows(0)("Orden").ToString().ToDouble
+ Me.CveRevision = Data.Rows(0)("CveRevision").ToString().ToEntero()
+ Me.Acuerdos = Data.Rows(0)("Acuerdos").ToString()
+ Me.Revision = Data.Rows(0)("Revision").ToString()
+ 'Me.TipoReferencia = Data.Rows(0)("TipoReferencia").ToString()
+ 'Me.Referencia = Data.Rows(0)("Referencia").ToString()
+ Me.Archivo = Data.Rows(0)("Archivo").ToString()
+ 'Me.CveSeguimiento = Data.Rows(0)("CveSeguimiento").ToString().ToEntero()
+ Me.CveOC = Data.Rows(0)("CveOC").ToString().ToEntero()
+ Me.CveUsuarioIng = Data.Rows(0)("CveUsuarioIng").ToString().ToEntero()
+ Me.UsuarioIng = Data.Rows(0)("UsuarioIng").ToString()
+ Me.RolIngreso = Data.Rows(0)("RolIngreso").ToString().ToEntero()
+ Me.FechaIng = Data.Rows(0)("FechaIng").ToString().ToDate
+ Me.CveEmpresa = Data.Rows(0)("CveEmpresa").ToString().ToEntero()
+ Me.Modificada = CBool(Data.Rows(0)("Modificado").ToString())
+ Me.CveCompra = Data.Rows(0)("CveCompra").ToString().ToEntero()
+ Me.CveVenta = Data.Rows(0)("CveVenta").ToString().ToEntero()
- Me.CveUsuarioSop = Data.Rows(0)("CveUsuarioSop").ToString.ToEntero
- Me.Persona = Data.Rows(0)("Persona").ToString
- Me.Telefono = Data.Rows(0)("Telefono").ToString
- Me.Extension = Data.Rows(0)("Extension").ToString
- Me.Clasificacion = Data.Rows(0)("Clasificacion").ToString.ToEntero
- Me.Email = Data.Rows(0)("Email").ToString
- Me.EmpresaSop = Data.Rows(0)("EmpresaSop").ToString
- Me.Modulo = Data.Rows(0)("Modulo").ToString
- Me.Datos = Data.Rows(0)("Datos").ToString
- If Data.Rows(0)("Desarrollo").ToString.Length > 0 Then
- Me.Desarrollo = If(Boolean.Parse(Data.Rows(0)("Desarrollo").ToString), 1, 0)
+ Me.CveUsuarioSop = Data.Rows(0)("CveUsuarioSop").ToString().ToEntero()
+ Me.Persona = Data.Rows(0)("Persona").ToString()
+ Me.Telefono = Data.Rows(0)("Telefono").ToString()
+ Me.Extension = Data.Rows(0)("Extension").ToString()
+ Me.Clasificacion = Data.Rows(0)("Clasificacion").ToString().ToEntero()
+ Me.Email = Data.Rows(0)("Email").ToString()
+ Me.EmpresaSop = Data.Rows(0)("EmpresaSop").ToString()
+ Me.Modulo = Data.Rows(0)("Modulo").ToString()
+ Me.Datos = Data.Rows(0)("Datos").ToString()
+ If Data.Rows(0)("Desarrollo").ToString().Length > 0 Then
+ Me.Desarrollo = If(Boolean.Parse(Data.Rows(0)("Desarrollo").ToString()), 1, 0)
Else
Me.Desarrollo = 0
End If
- Me.CveEmpresaSop = Data.Rows(0)("CveEmpresaSop").ToString.ToEntero
- Me.CveModulo = Data.Rows(0)("CveModulo").ToString.ToEntero
+ Me.CveEmpresaSop = Data.Rows(0)("CveEmpresaSop").ToString().ToEntero()
+ Me.CveModulo = Data.Rows(0)("CveModulo").ToString().ToEntero()
- Me.Importe = Data.Rows(0)("Importe").ToString.ToDouble
+ Me.Importe = Data.Rows(0)("Importe").ToString().ToDouble
End If
Retorno = True
@@ -1335,7 +1072,7 @@ Public Class ClsOIEventos
Try
SqlAdapter.Fill(Data)
- CveEvento = SqlAdapter.SelectCommand.Parameters("@CveEvento").Value.ToString.ToEntero
+ CveEvento = SqlAdapter.SelectCommand.Parameters("@CveEvento").Value.ToString().ToEntero()
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al Guardar el Evento", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
@@ -1603,12 +1340,12 @@ Public Class ClsOIEventos
SqlAdapter.Fill(Data)
If CveSeguimiento > 0 AndAlso Data IsNot Nothing AndAlso Data.Rows.Count > 0 Then
- Me.CveSeguimiento = Data.Rows(0)("CveEventoComentario").ToString.ToEntero
- Me.CveEvento = Data.Rows(0)("CveEvento").ToString.ToEntero
- Me.Comentario = Data.Rows(0)("EventoComentario").ToString
- Me.Archivo = Data.Rows(0)("Archivo").ToString
- Me.FechaIng = Data.Rows(0)("FechaIng").ToString.ToDate
- Me.UsuarioDe = Data.Rows(0)("Usuario").ToString
+ Me.CveSeguimiento = Data.Rows(0)("CveEventoComentario").ToString().ToEntero()
+ Me.CveEvento = Data.Rows(0)("CveEvento").ToString().ToEntero()
+ Me.Comentario = Data.Rows(0)("EventoComentario").ToString()
+ Me.Archivo = Data.Rows(0)("Archivo").ToString()
+ Me.FechaIng = Data.Rows(0)("FechaIng").ToString().ToDate
+ Me.UsuarioDe = Data.Rows(0)("Usuario").ToString()
End If
Retorno = True
@@ -1636,7 +1373,7 @@ Public Class ClsOIEventos
Try
SqlAdapter.Fill(Data)
- CveEventoComentario = SqlAdapter.SelectCommand.Parameters("@CveEventoComentario").Value.ToString.ToEntero
+ CveEventoComentario = SqlAdapter.SelectCommand.Parameters("@CveEventoComentario").Value.ToString().ToEntero()
Retorno = CveEventoComentario
Catch Ex1 As SqlException
@@ -1873,36 +1610,36 @@ Public Class ClsOIEventos
If Data.Rows.Count > 0 Then
- Me.CveEvento = Data.Rows(0)("CveEvento").ToString.ToEntero
- Me.CveTipoEvento = Data.Rows(0)("CveTipoEvento").ToString.ToEntero
- 'Me.CveAgendaTipo = Data.Rows(0)("CveAgendaTipo").ToString.ToEntero
- 'Me.TipoEvento = Data.Rows(0)("EventoTipo").ToString
- Me.Asunto = Data.Rows(0)("Asunto").ToString
- Me.Descripcion = Data.Rows(0)("Descripcion").ToString
- Me.Prioridad = Data.Rows(0)("Prioridad").ToString
- Me.CvePrioridad = Data.Rows(0)("CvePrioridad").ToString.ToEntero
- Me.CveUsuarioDe = Data.Rows(0)("CveUsuarioDe").ToString.ToEntero
- 'Me.CorreoDe = Data.Rows(0)("CorreoDe").ToString
- Me.UsuarioDe = Data.Rows(0)("UsuarioDe").ToString
- Me.CveUsuarioPara = Data.Rows(0)("CveUsuarioPara").ToString.ToEntero
- Me.UsuarioPara = Data.Rows(0)("UsuarioPara").ToString
- 'Me.CorreoPara = Data.Rows(0)("CorreoPara").ToString
- Me.CveEventoEstatus = Data.Rows(0)("CveEventoEstatus").ToString.ToEntero
- Me.EventoEstatus = Data.Rows(0)("EventoEstatus").ToString
- Me.FechaInicio = Data.Rows(0)("FechaInicio").ToString.ToDate
- Me.FechaFin = Data.Rows(0)("FechaFin").ToString.ToDate
- Me.FechaRealTermino = Data.Rows(0)("FechaRealTermino").ToString.ToDate
- Me.CveEventoPadre = Data.Rows(0)("CveEventoPadre").ToString.ToEntero
- 'Me.Orden = Data.Rows(0)("Orden").ToString.ToEntero
- Me.CveRevision = Data.Rows(0)("CveRevision").ToString.ToEntero
- Me.Acuerdos = Data.Rows(0)("Acuerdos").ToString
- 'Me.Revision = Data.Rows(0)("Revision").ToString
- 'Me.TipoReferencia = Data.Rows(0)("TipoReferencia").ToString
- 'Me.Referencia = Data.Rows(0)("Referencia").ToString
- 'Me.Archivo = Data.Rows(0)("Archivo").ToString
- 'Me.CveSeguimiento = Data.Rows(0)("CveSeguimiento").ToString.ToEntero
- Me.FechaIng = Data.Rows(0)("FechaIng").ToString.ToDate
- Me.CveEmpresa = Data.Rows(0)("CveEmpresa").ToString.ToEntero
+ Me.CveEvento = Data.Rows(0)("CveEvento").ToString().ToEntero()
+ Me.CveTipoEvento = Data.Rows(0)("CveTipoEvento").ToString().ToEntero()
+ 'Me.CveAgendaTipo = Data.Rows(0)("CveAgendaTipo").ToString().ToEntero()
+ 'Me.TipoEvento = Data.Rows(0)("EventoTipo").ToString()
+ Me.Asunto = Data.Rows(0)("Asunto").ToString()
+ Me.Descripcion = Data.Rows(0)("Descripcion").ToString()
+ Me.Prioridad = Data.Rows(0)("Prioridad").ToString()
+ Me.CvePrioridad = Data.Rows(0)("CvePrioridad").ToString().ToEntero()
+ Me.CveUsuarioDe = Data.Rows(0)("CveUsuarioDe").ToString().ToEntero()
+ 'Me.CorreoDe = Data.Rows(0)("CorreoDe").ToString()
+ Me.UsuarioDe = Data.Rows(0)("UsuarioDe").ToString()
+ Me.CveUsuarioPara = Data.Rows(0)("CveUsuarioPara").ToString().ToEntero()
+ Me.UsuarioPara = Data.Rows(0)("UsuarioPara").ToString()
+ 'Me.CorreoPara = Data.Rows(0)("CorreoPara").ToString()
+ Me.CveEventoEstatus = Data.Rows(0)("CveEventoEstatus").ToString().ToEntero()
+ Me.EventoEstatus = Data.Rows(0)("EventoEstatus").ToString()
+ Me.FechaInicio = Data.Rows(0)("FechaInicio").ToString().ToDate
+ Me.FechaFin = Data.Rows(0)("FechaFin").ToString().ToDate
+ Me.FechaRealTermino = Data.Rows(0)("FechaRealTermino").ToString().ToDate
+ Me.CveEventoPadre = Data.Rows(0)("CveEventoPadre").ToString().ToEntero()
+ 'Me.Orden = Data.Rows(0)("Orden").ToString().ToEntero()
+ Me.CveRevision = Data.Rows(0)("CveRevision").ToString().ToEntero()
+ Me.Acuerdos = Data.Rows(0)("Acuerdos").ToString()
+ 'Me.Revision = Data.Rows(0)("Revision").ToString()
+ 'Me.TipoReferencia = Data.Rows(0)("TipoReferencia").ToString()
+ 'Me.Referencia = Data.Rows(0)("Referencia").ToString()
+ 'Me.Archivo = Data.Rows(0)("Archivo").ToString()
+ 'Me.CveSeguimiento = Data.Rows(0)("CveSeguimiento").ToString().ToEntero()
+ Me.FechaIng = Data.Rows(0)("FechaIng").ToString().ToDate
+ Me.CveEmpresa = Data.Rows(0)("CveEmpresa").ToString().ToEntero()
End If
@@ -1962,36 +1699,36 @@ Public Class ClsOIEventos
'If CveEvento > 0 AndAlso Data IsNot Nothing AndAlso Data.Rows.Count > 0 Then
If Data.Rows.Count > 0 Then
- Me.CveEvento = Data.Rows(0)("CveEvento").ToString.ToEntero
- Me.CveTipoEvento = Data.Rows(0)("CveTipoEvento").ToString.ToEntero
- Me.CveAgendaTipo = Data.Rows(0)("CveAgendaTipo").ToString.ToEntero
- Me.TipoEvento = Data.Rows(0)("TipoEvento").ToString
- Me.Asunto = Data.Rows(0)("Asunto").ToString
- Me.Descripcion = Data.Rows(0)("Descripcion").ToString
- Me.Prioridad = Data.Rows(0)("Prioridad").ToString
- Me.CvePrioridad = Data.Rows(0)("CvePrioridad").ToString.ToEntero
- Me.CveUsuarioDe = Data.Rows(0)("CveUsuarioDe").ToString.ToEntero
- Me.CorreoDe = Data.Rows(0)("CorreoDe").ToString
- Me.UsuarioDe = Data.Rows(0)("UsuarioDe").ToString
- Me.CveUsuarioPara = Data.Rows(0)("CveUsuarioPara").ToString.ToEntero
- Me.UsuarioPara = Data.Rows(0)("UsuarioPara").ToString
- Me.CorreoPara = Data.Rows(0)("CorreoPara").ToString
- Me.CveEventoEstatus = Data.Rows(0)("CveEventoEstatus").ToString.ToEntero
- Me.EventoEstatus = Data.Rows(0)("EventoEstatus").ToString
- Me.FechaInicio = Data.Rows(0)("FechaInicio").ToString.ToDate
- Me.FechaFin = Data.Rows(0)("FechaFin").ToString.ToDate
- Me.FechaRealTermino = Data.Rows(0)("FechaRealTermino").ToString.ToDate
- Me.CveEventoPadre = Data.Rows(0)("CveEventoPadre").ToString.ToEntero
- Me.Orden = Data.Rows(0)("Orden").ToString.ToEntero
- Me.CveRevision = Data.Rows(0)("CveRevision").ToString.ToEntero
- Me.Acuerdos = Data.Rows(0)("Acuerdos").ToString
- Me.Revision = Data.Rows(0)("Revision").ToString
- 'Me.TipoReferencia = Data.Rows(0)("TipoReferencia").ToString
- 'Me.Referencia = Data.Rows(0)("Referencia").ToString
- Me.Archivo = Data.Rows(0)("Archivo").ToString
- 'Me.CveSeguimiento = Data.Rows(0)("CveSeguimiento").ToString.ToEntero
- Me.FechaIng = Data.Rows(0)("FechaIng").ToString.ToDate
- Me.CveEmpresa = Data.Rows(0)("CveEmpresa").ToString.ToEntero
+ Me.CveEvento = Data.Rows(0)("CveEvento").ToString().ToEntero()
+ Me.CveTipoEvento = Data.Rows(0)("CveTipoEvento").ToString().ToEntero()
+ Me.CveAgendaTipo = Data.Rows(0)("CveAgendaTipo").ToString().ToEntero()
+ Me.TipoEvento = Data.Rows(0)("TipoEvento").ToString()
+ Me.Asunto = Data.Rows(0)("Asunto").ToString()
+ Me.Descripcion = Data.Rows(0)("Descripcion").ToString()
+ Me.Prioridad = Data.Rows(0)("Prioridad").ToString()
+ Me.CvePrioridad = Data.Rows(0)("CvePrioridad").ToString().ToEntero()
+ Me.CveUsuarioDe = Data.Rows(0)("CveUsuarioDe").ToString().ToEntero()
+ Me.CorreoDe = Data.Rows(0)("CorreoDe").ToString()
+ Me.UsuarioDe = Data.Rows(0)("UsuarioDe").ToString()
+ Me.CveUsuarioPara = Data.Rows(0)("CveUsuarioPara").ToString().ToEntero()
+ Me.UsuarioPara = Data.Rows(0)("UsuarioPara").ToString()
+ Me.CorreoPara = Data.Rows(0)("CorreoPara").ToString()
+ Me.CveEventoEstatus = Data.Rows(0)("CveEventoEstatus").ToString().ToEntero()
+ Me.EventoEstatus = Data.Rows(0)("EventoEstatus").ToString()
+ Me.FechaInicio = Data.Rows(0)("FechaInicio").ToString().ToDate
+ Me.FechaFin = Data.Rows(0)("FechaFin").ToString().ToDate
+ Me.FechaRealTermino = Data.Rows(0)("FechaRealTermino").ToString().ToDate
+ Me.CveEventoPadre = Data.Rows(0)("CveEventoPadre").ToString().ToEntero()
+ Me.Orden = Data.Rows(0)("Orden").ToString().ToEntero()
+ Me.CveRevision = Data.Rows(0)("CveRevision").ToString().ToEntero()
+ Me.Acuerdos = Data.Rows(0)("Acuerdos").ToString()
+ Me.Revision = Data.Rows(0)("Revision").ToString()
+ 'Me.TipoReferencia = Data.Rows(0)("TipoReferencia").ToString()
+ 'Me.Referencia = Data.Rows(0)("Referencia").ToString()
+ Me.Archivo = Data.Rows(0)("Archivo").ToString()
+ 'Me.CveSeguimiento = Data.Rows(0)("CveSeguimiento").ToString().ToEntero()
+ Me.FechaIng = Data.Rows(0)("FechaIng").ToString().ToDate
+ Me.CveEmpresa = Data.Rows(0)("CveEmpresa").ToString().ToEntero()
End If
Retorno = True
@@ -2243,8 +1980,8 @@ Public Class ClsOIEventos
Public Function GetCircular(CveEmpresa As Integer, Optional CveCircular As Integer = -1, Optional FechaI As String = "-1", Optional FechaF As String = "-1",
Optional CveUsuario As Integer = -1) As Boolean
- FechaI = If(FechaI = "-1", Today.AddYears(-1).ToString, FechaI)
- FechaF = If(FechaF = "-1", Today.AddYears(1).ToString, FechaF)
+ FechaI = If(FechaI = "-1", Today.AddYears(-1).ToString(), FechaI)
+ FechaF = If(FechaF = "-1", Today.AddYears(1).ToString(), FechaF)
Dim Retorno As Boolean = False
@@ -2291,7 +2028,7 @@ Public Class ClsOIEventos
Try
SqlAdapter.Fill(Data)
- Retorno = SqlAdapter.SelectCommand.Parameters("@CveCircular").Value.ToString.ToEntero
+ Retorno = SqlAdapter.SelectCommand.Parameters("@CveCircular").Value.ToString().ToEntero()
Catch ex As Exception
OnError("Ocurrió un error al agregar el Circular.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index e5f944455..0c2e6a30c 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -3561,6 +3561,8 @@ Public Class ClsPaginas
PaginaDict.Add("/Default2.aspx".ToUpper(), -1)
PaginaDict.Add("/CargaCuentas.aspx".ToUpper(), -1)
PaginaDict.Add("/OI/Tareas.aspx".ToUpper(), -1)
+ PaginaDict.Add("/OI/RepProyectos.aspx".ToUpper(), -1)
+ PaginaDict.Add("/OI/Proyecto.aspx".ToUpper(), -1)
PaginaDict.Add("/AdSistemasTeam/ProcedimientosAlmacenados.aspx".ToUpper(), -1)
PaginaDict.Add("/OS/CatOrdenesServiciosCaracteristicas.aspx".ToUpper(), -1)
PaginaDict.Add("/OS/CatOSCaracteristicasOpciones.aspx".ToUpper(), -1)
diff --git a/Metronic/assets/global/plugins/GantJS/jsgantt.css b/Metronic/assets/global/plugins/GantJS/jsgantt.css
new file mode 100644
index 000000000..7ee316032
--- /dev/null
+++ b/Metronic/assets/global/plugins/GantJS/jsgantt.css
@@ -0,0 +1,973 @@
+/* Sample CSS for jsGanttImproved v1.8.0 */
+
+div.gantt {
+ font-family: tahoma, arial, verdana, Sans-serif;
+ font-size: 10px;
+ color: #656565;
+}
+
+.gantt table {
+ border-collapse: collapse;
+}
+
+.gantt td {
+ padding: 0px;
+}
+
+/* cell defaults */
+.headweekends div {
+ font-size: 8px;
+ width: 100% !important;
+ margin: 0;
+}
+
+.gmajorheading,
+.gminorheading,
+.gminorheadingwkend,
+.gtaskcell,
+.gtaskcellwkend {
+ height: 19px;
+ font-size: 12px;
+ border: #efefef 1px solid;
+ text-align: center;
+ cursor: default
+}
+
+
+.gtasklist {
+ height: 19px;
+ min-width: 5px;
+ max-width: 5px;
+ width: 5px;
+ border: #efefef 1px solid;
+ border-right: none;
+}
+
+/* all three width values set just to make sure - helps resizing code */
+
+/* Additional values for some cell elements */
+
+.gtaskheading,
+.gmajorheading,
+.gminorheading {
+ background-color: #ffffff;
+ font-weight: bold;
+ font-size: 9px;
+ white-space: nowrap;
+}
+
+.gtaskcellwkend,
+.gminorheadingwkend {
+ background-color: #f7f7f7;
+ font-weight: bold;
+ font-size: 9px;
+ white-space: nowrap;
+}
+
+td.gtaskcell {
+ text-align: left
+}
+
+td.gspanning {
+ border-left: none;
+ border-right: none;
+}
+
+.gtaskcelldiv {
+ position: relative;
+}
+
+/* Task list defaults */
+
+.gtaskheading,
+.gname,
+.gtaskname,
+.gresource,
+.gduration,
+.gpccomplete,
+.gstartdate,
+.gplanstartdate,
+.gplanenddate,
+.gcost,
+.genddate {
+ height: 18px;
+ white-space: nowrap;
+ border: #efefef 1px solid;
+}
+
+.gtaskheading div,
+.gname div,
+.gtaskname div,
+.gresource div,
+.gduration div,
+.gpccomplete div,
+.gstartdate div,
+.gplanstartdate div,
+.gplanenddate div,
+.gcost div,
+.genddate div {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.gtaskbarcontainer.gplan {
+ position: absolute !important;
+ top: 0px;
+ opacity: 0.3;
+ background: white;
+ z-index: 10000;
+ border: 1px solid black;
+}
+
+/* Additional values for some task list elements */
+
+/* needed for IE8 */
+
+.gstartdate div,
+.gplanstartdate,
+.gplanenddate,
+.gstartdate,
+.genddate {
+ text-align: center;
+ min-width: 105px;
+ width: 105px;
+ max-width: 105px;
+ font-size: 10px;
+}
+
+.gtaskheading {
+ text-align: center;
+}
+
+.gtaskname div,
+/* needed for IE8 */
+
+.gtaskname {
+ min-width: 170px;
+ max-width: 170px;
+ width: 170px;
+ font-size: 9px;
+ border-left: none;
+}
+
+.gtaskheading,
+.gtaskname {
+ text-overflow: ellipsis;
+ overflow: hidden;
+}
+
+.gtaskname.gtaskeditable div,
+.gtaskname.gtaskeditable {
+ overflow: unset;
+}
+
+.gselector {
+ text-align: left;
+ white-space: nowrap;
+ min-width: 170px;
+ max-width: 170px;
+ width: 170px;
+}
+
+.gformlabel {
+ position: relative;
+ top: 0px;
+ cursor: pointer;
+ border: #ffffff 1px solid;
+ margin-left: 2px;
+ padding-left: 2px;
+ padding-right: 2px;
+}
+
+span.gformlabel:hover,
+span.gselected {
+ background-color: #dbecff;
+ border: #cccccc 1px solid;
+}
+
+span.gfoldercollapse {
+ color: #000000;
+ cursor: pointer;
+ font-weight: bold;
+ font-size: 12px;
+ font-family: Courier, "Courier New", monospace;
+}
+
+.gtasktableh,
+.gtasktable {
+ border-right: #efefef 1px solid;
+ width: 100%;
+}
+
+.gcharttableh,
+.gtasktableh,
+.gtasktable,
+.gcharttable {
+ border-collapse: collapse;
+}
+
+.gcharttable,
+.gcharttableh {
+ table-layout: fixed;
+}
+
+.gcharttable {
+ border: #efefef 1px solid;
+}
+
+/* for some reason firefox needs this */
+
+/* Differentiate Group, Milestone and Ordinary task items (applied to row) */
+
+.ggroupitem {
+ background-color: #fbfbfb;
+ font-weight: bold;
+}
+
+.gmileitem,
+.glineitem {
+ background-color: #ffffff;
+}
+
+/* highlight row (applied to row) */
+
+.gitemhighlight td {
+ background-image: none;
+ background-color: #fffde5;
+}
+
+/* task bar caption text styles */
+
+.gmilecaption,
+.ggroupcaption,
+.gcaption {
+ font-weight: normal;
+ font-size: 9px;
+ text-align: left;
+ white-space: nowrap;
+ top: 1px;
+ position: absolute;
+ top: 2px;
+}
+
+.ggroupcaption,
+.gcaption {
+ right: -126px;
+}
+
+/* Task complete %age bar shared attributes */
+
+.gtaskcomplete {
+ float: left;
+ overflow: hidden;
+}
+
+/* Task complete %age bar */
+
+.gtaskcomplete {
+ height: 5px;
+ background-color: #000000;
+ margin-top: 4px;
+ opacity: 0.4;
+ filter: alpha(opacity=40);
+}
+
+/* Milestones */
+
+.gmilestone {
+ font-size: 14px;
+ position: absolute;
+ top: -2px;
+}
+
+.gmdtop {
+ top: 2px;
+ overflow: hidden;
+ width: 0px;
+ height: 0px;
+ border-bottom: 5px solid black;
+ border-left: 5px solid transparent;
+ border-top: 5px solid transparent;
+ border-right: 5px solid transparent;
+}
+
+.gmdbottom {
+ top: 2px;
+ overflow: hidden;
+ width: 0px;
+ height: 0px;
+ border-top: 5px solid black;
+ border-left: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-right: 5px solid transparent;
+}
+
+/* Task bar shared attributes */
+
+.ggroupblack,
+.gtaskblue,
+.gtaskred,
+.gtaskgreen,
+.gtaskyellow,
+.gtaskpurple,
+.gtaskpink {
+ height: 13px;
+ filter: alpha(opacity=90);
+ opacity: 0.9;
+ margin-top: 1px;
+}
+
+/* Task bars - ggroupblack is set as the default class on the task if it is undefined */
+
+.ggroupblack {
+ height: 7px;
+ background: #000000;
+ margin-top: 2px;
+}
+
+.ggroupblackendpointleft {
+ overflow: hidden;
+ width: 0px;
+ height: 0px;
+ top: 2px;
+ border-top: 4px solid black;
+ border-left: 4px solid transparent;
+ border-bottom: 4px solid transparent;
+ border-right: 4px solid transparent;
+ float: left;
+}
+
+.ggroupblackendpointright {
+ overflow: hidden;
+ width: 0px;
+ height: 0px;
+ top: 2px;
+ border-top: 4px solid black;
+ border-left: 4px solid transparent;
+ border-bottom: 4px solid transparent;
+ border-right: 4px solid transparent;
+ float: right;
+}
+
+.ggroupblackcomplete {
+ float: left;
+ overflow: hidden;
+ height: 3px;
+ filter: alpha(opacity=80);
+ opacity: 0.8;
+ background-color: #777777;
+ margin-top: 2px;
+ margin-bottom: 2px;
+}
+
+.gtaskblue {
+ background: rgb(58, 132, 195);
+ /* Old browsers */
+ background: linear-gradient(to bottom, rgba(58, 132, 195, 1) 0%, rgba(65, 154, 214, 1) 20%, rgba(75, 184, 240, 1) 40%, rgba(58, 139, 194, 1) 70%, rgba(38, 85, 139, 1) 100%);
+ /* W3C */
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#4bb8f0', endColorstr='#3a84c3', GradientType=0);
+ /* IE6-9 */
+}
+
+.gtaskred {
+ background: rgb(196, 58, 58);
+ /* Old browsers */
+ background: linear-gradient(to bottom, rgba(196, 58, 58, 1) 0%, rgba(211, 65, 65, 1) 20%, rgba(239, 76, 76, 1) 40%, rgba(196, 58, 58, 1) 70%, rgba(135, 37, 37, 1) 100%);
+ /* W3C */
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ef4c4c', endColorstr='#c43a3a', GradientType=0);
+ /* IE6-9 */
+}
+
+.gtaskgreen {
+ background: rgb(80, 193, 58);
+ /* Old browsers */
+ background: linear-gradient(to bottom, rgba(80, 193, 58, 1) 0%, rgba(88, 209, 64, 1) 20%, rgba(102, 237, 75, 1) 40%, rgba(80, 193, 58, 1) 70%, rgba(53, 132, 37, 1) 100%);
+ /* W3C */
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#66ED4B', endColorstr='#50c13a', GradientType=0);
+ /* IE6-9 */
+}
+
+.gtaskyellow {
+ background: rgb(247, 228, 56);
+ /* Old browsers */
+ background: linear-gradient(to bottom, rgba(247, 228, 56, 1) 0%, rgba(239, 239, 55, 1) 20%, rgba(255, 255, 58, 1) 40%, rgba(242, 236, 55, 1) 70%, rgba(241, 218, 54, 1) 100%);
+ /* W3C */
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff3a', endColorstr='#f7e438', GradientType=0);
+ /* IE6-9 */
+}
+
+.gtaskpurple {
+ background: rgb(193, 58, 193);
+ /* Old browsers */
+ background: linear-gradient(to bottom, rgba(193, 58, 193, 1) 0%, rgba(211, 65, 211, 1) 20%, rgba(239, 76, 239, 1) 40%, rgba(193, 58, 193, 1) 70%, rgba(137, 38, 137, 1) 100%);
+ /* W3C */
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ef4cef', endColorstr='#892689', GradientType=0);
+ /* IE6-9 */
+}
+
+.gtaskpink {
+ background: rgb(249, 177, 245);
+ /* Old browsers */
+ background: linear-gradient(to bottom, rgba(249, 177, 245, 1) 0%, rgba(247, 192, 243, 1) 20%, rgba(247, 202, 244, 1) 40%, rgba(249, 192, 246, 1) 70%, rgba(252, 174, 247, 1) 100%);
+ /* W3C */
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f7caf4', endColorstr='#fcaef7', GradientType=0);
+ /* IE6-9 */
+}
+
+.gtaskbluecomplete,
+.gtaskredcomplete,
+.gtaskgreencomplete,
+.gtaskyellowcomplete,
+.gtaskpurplecomplete,
+.gtaskpinkcomplete {
+ float: left;
+ overflow: hidden;
+ height: 5px;
+ filter: alpha(opacity=40);
+ opacity: 0.4;
+ background-color: #000000;
+ margin-top: 4px;
+}
+
+/* END Task bar styles */
+
+.glinev {
+ border-left: 1px solid;
+ width: 0px;
+}
+
+.glineh {
+ border-top: 1px solid;
+ height: 0px;
+}
+
+.gDepFS,
+.gDepSS,
+.gDepSF,
+.gDepFF {
+ border-color: #ff0000;
+}
+
+.gDepFSArw,
+.gDepSSArw {
+ overflow: hidden;
+ width: 0px;
+ height: 0px;
+ border-bottom: 4px solid transparent;
+ border-left: 4px solid #ff0000;
+ border-top: 4px solid transparent;
+ border-right: 4px solid transparent;
+}
+
+.gDepFFArw,
+.gDepSFArw {
+ overflow: hidden;
+ width: 0px;
+ height: 0px;
+ border-bottom: 4px solid transparent;
+ border-left: 4px solid transparent;
+ border-top: 4px solid transparent;
+ border-right: 4px solid #ff0000;
+}
+
+.gCurDate {
+ border-color: #0000ff;
+}
+
+div.gtaskbarcontainer {
+ z-index: 1;
+ position: absolute;
+ top: 0px
+}
+
+.textbar {
+ word-break: break-all;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ width: 40%;
+ display: inline-block;
+}
+
+.JSGanttToolTip {
+ position: absolute;
+ display: block;
+ z-index: 2;
+}
+
+.JSGanttToolTipcont {
+ font-family: tahoma, arial, verdana;
+ font-size: 10px;
+ display: block;
+ background: #ffffff;
+ color: #656565
+}
+
+.gTaskInfo {
+ background: #dbecff;
+ width: 400px;
+ border: #656565 1px solid;
+ border-radius: 10px;
+ padding: 4px 6px 4px 6px;
+ float: left;
+}
+
+.gTtTitle {
+ display: block;
+ font-size: 12px;
+ font-weight: bold;
+ color: #404040;
+ margin-left: 4px;
+ margin-bottom: 1em;
+}
+
+.gTaskLabel {
+ font-size: 11px;
+ font-weight: bold;
+ color: #656565;
+ margin-left: 4px;
+}
+
+.gTaskText {
+ position: absolute;
+ left: 90px;
+ padding-top: 1px;
+ font-size: 10px;
+ font-weight: normal;
+ color: #656565;
+}
+
+.gTaskNotes {
+ font-size: 11px;
+ font-weight: normal;
+ color: #323232;
+ padding: 0 15px;
+ display: block;
+}
+
+.gTIn {
+ padding-top: 10px;
+}
+
+.gantt {
+ min-width: 632px;
+ /* 2x LC width */
+}
+
+.gchartcontainer {
+ /* padding-left: 532px; LC width */
+ line-height: 1;
+ /* Overrides inherited CSS (e.g. from Bootstrap) */
+ display: flex;
+}
+
+.gcontainercol {
+ position: relative;
+}
+
+/* Add a max-height value here if wanted */
+
+.glistgrid {
+ min-width: 132px;
+ /* LC width */
+ float: left;
+ /* LC width */
+ padding-right: 0px;
+ padding-left: 0px;
+ padding-bottom: 0px;
+ padding-top: 0px;
+ background-color: #ffffff;
+ overflow: hidden;
+}
+
+.glistlbl {
+ min-width: 132px;
+ /* LC width */
+ float: left;
+ /* LC width */
+ padding-right: 0px;
+ padding-left: 0px;
+ padding-bottom: 0px;
+ padding-top: 0px;
+ background-color: #ffffff;
+ overflow: hidden;
+ flex: none;
+}
+
+.glistlbl,
+.gchartgrid {
+ display: flex;
+ flex-direction: column;
+}
+
+.glabelfooter {
+ clear: both;
+}
+
+.ggridfooter {
+ clear: both;
+}
+
+.rhscrpad {
+ width: 150px;
+ position: absolute;
+ top: 0px;
+ height: 1px;
+}
+
+.gchartgrid {
+ padding-right: 0px;
+ padding-left: 0px;
+ padding-bottom: 0px;
+ padding-top: 0px;
+ background-color: #ffffff;
+ position: relative;
+ /* overflow: auto; */
+ overflow: unset;
+ overflow-y: auto;
+ min-height: 0%;
+}
+
+.gchartlbl {
+ padding-right: 0px;
+ padding-left: 0px;
+ padding-bottom: 0px;
+ padding-top: 0px;
+ background-color: #ffffff;
+ position: relative;
+ overflow: hidden;
+ flex: none;
+}
+
+/* Old Internet Explorer version hacks */
+
+.gantt {
+ _height: 100%
+}
+
+/* otherwise the chart disappears! */
+
+div .gantt {
+ /* _width: 1064px; ie6 fixed width */
+}
+
+div.gchartlbl,
+div.gchartgrid {
+ /* _width: 532px; */
+}
+
+/* ie6 fixed width */
+
+div.glistlbl,
+div.glistgrid {
+ *right: 0px;
+ /* ie7 pulls the content too far left with the negative margin */
+ _right: 532px;
+ /* but ie6 fixed width needs this */
+ _margin-left: -532px;
+ /* ie6 fixed width */
+ float: left;
+}
+
+div.gchartgrid {
+ *padding-bottom: 20px;
+ *overflow-y: hidden;
+}
+
+/* variable height design, no need for vertical scroll */
+
+td.gmajorheading div {
+ *overflow: hidden;
+}
+
+/* stops resizing fixed width columns if the text is too wide */
+
+td.gspanning div {
+ *overflow: hidden;
+}
+
+/* stops resizing fixed width columns if the text is too wide */
+
+/* border transparency tricks */
+
+.ggroupblackendpointleft {
+ _border-top: 4px solid black;
+ _border-left: 4px solid pink;
+ _border-bottom: 4px solid pink;
+ _border-right: 4px solid pink;
+ _filter: chroma(color=pink);
+}
+
+.ggroupblackendpointright {
+ _border-top: 4px solid black;
+ _border-left: 4px solid pink;
+ _border-bottom: 4px solid pink;
+ _border-right: 4px solid pink;
+ _filter: chroma(color=pink);
+}
+
+.gmdtop {
+ _border-left: 5px solid pink;
+ _border-top: 5px solid pink;
+ _border-right: 5px solid pink;
+ _filter: chroma(color=pink);
+}
+
+.gmdbottom {
+ _border-left: 5px solid pink;
+ _border-bottom: 5px solid pink;
+ _border-right: 5px solid pink;
+ _filter: chroma(color=pink);
+}
+
+.gDepFSArw,
+.gDepSSArw {
+ _border-bottom: 4px solid pink;
+ _border-top: 4px solid pink;
+ _border-right: 4px solid pink;
+ _filter: chroma(color=pink);
+}
+
+.gDepFFArw,
+.gDepSFArw {
+ _border-bottom: 4px solid pink;
+ _border-left: 4px solid pink;
+ _border-top: 4px solid pink;
+ _filter: chroma(color=pink);
+}
+
+/* Workaround for odd bug in old versions of Opera - no other browser needs this */
+
+.glinediv {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ z-index: 1px;
+}
+
+.gantt-inputtable {
+ max-width: 100%;
+ max-height: 16px;
+}
+
+.gadditional {
+ border: #efefef 1px solid;
+}
+
+.gadditional,
+.gresource,
+.gduration,
+.gpccomplete,
+.gcost {
+ text-align: center;
+ width: 70px;
+ max-width: 70px;
+ min-width: 70px;
+ font-size: 10px;
+}
+
+@media print {
+
+ /* All your print styles go here */
+ html,
+ .gchartgrid {
+ overflow: unset !important;
+ }
+
+ .glistgrid {
+ float: none !important;
+ }
+}
+
+/* if using setUseSingleCell(1) the following is a suggested set of CSS3 styles to recreate the table grid - won't work on old browsers
+.ggrouphour td,
+.gmilehour td,
+.gitemhour td { background-size: 19px 1px; background-image: linear-gradient(to left, #efefef, transparent 1px, transparent 18px); width: 100%; height: 19px; }
+.ggroupday td,
+.gmileday td,
+.gitemday td { background-size: 19px 1px, 133px 1px; background-image: linear-gradient(to left, #efefef, transparent 1px, transparent 18px), linear-gradient(to left, #f7f7f7 39px, transparent 1px, transparent 92px); width: 100%; height: 19px; }
+.ggroupweek td,
+.gmileweek td,
+.gitemweek td { background-size: 37px 1px; background-image: linear-gradient(to left, #efefef, transparent 1px, transparent 36px); width: 100%; height: 19px; }
+.ggroupmonth td,
+.gmilemonth td,
+.gitemmonth td { background-size: 37px 1px; background-image: linear-gradient(to left, #efefef, transparent 1px, transparent 36px); width: 100%; height: 19px; }
+.ggroupquarter td,
+.gmilequarter td,
+.gitemquarter td { background-size: 19px 1px; background-image: linear-gradient(to left, #efefef, transparent 1px, transparent 18px); width: 100%; height: 19px; }
+*/
+
+.gmain {
+ height: 100%;
+
+ display: flex;
+ flex-direction: column;
+}
+
+.gmainright {
+ overflow: hidden;
+ flex: auto;
+}
+
+.gmainleft {
+ overflow: hidden;
+ flex: 0 0 50%;
+}
+
+.gtasktableh tr,
+.gcharttable tr,
+.gcharttableh tr,
+.gtasktable tr {
+ height: 22px !important;
+}
+
+.gtasktableouterwrapper {
+ overflow: hidden;
+}
+
+.gtasktablewrapper {
+ overflow-y: scroll;
+ flex: auto;
+ height: 100%;
+}
+
+.chartgrid {
+ overflow: auto;
+ flex: auto;
+}
+
+/* .gtasktable {
+ margin-bottom: 14px;
+} */
+
+/* Printer friendly styles - we could use these all the time but they are not as pretty! */
+
+/* note that "@media print" is not supported in IE6 or 7. Fully patched IE8 should be OK */
+
+@media print {
+ .ggroupblack {
+ height: 0px;
+ border-top: 7px solid;
+ border-color: #000000;
+ }
+
+ .gtaskblue {
+ height: 0px;
+ border-top: 13px solid;
+ border-color: rgb(58, 132, 195);
+ }
+
+ .gtaskred {
+ height: 0px;
+ border-top: 13px solid;
+ border-color: rgb(196, 58, 58);
+ }
+
+ .gtaskgreen {
+ height: 0px;
+ border-top: 13px solid;
+ border-color: rgb(80, 193, 58);
+ }
+
+ .gtaskyellow {
+ height: 0px;
+ border-top: 13px solid;
+ border-color: rgb(247, 228, 56);
+ }
+
+ .gtaskpurple {
+ height: 0px;
+ border-top: 13px solid;
+ border-color: rgb(193, 58, 193);
+ }
+
+ .gtaskpink {
+ height: 0px;
+ border-top: 13px solid;
+ border-color: rgb(249, 177, 245);
+ }
+
+ .gtaskbluecomplete,
+ .gtaskredcomplete,
+ .gtaskgreencomplete,
+ .gtaskyellowcomplete,
+ .gtaskpurplecomplete,
+ .gtaskpinkcomplete {
+ height: 0px;
+ filter: alpha(opacity=40);
+ opacity: 0.4;
+ margin-top: -9px;
+ border-top: 5px solid;
+ border-color: #000000;
+ }
+
+ .ggroupblackcomplete {
+ height: 0px;
+ filter: alpha(opacity=80);
+ opacity: 0.8;
+ margin-top: -5px;
+ border-top: 3px solid;
+ border-color: #777777;
+ }
+
+ .gmainright,
+ .gmainleft {
+ overflow: hidden;
+ width: auto;
+ }
+
+ table {
+ page-break-after: auto
+ }
+
+ tr {
+ page-break-inside: avoid;
+ page-break-after: auto
+ }
+
+ td {
+ page-break-inside: avoid;
+ page-break-after: auto
+ }
+
+ thead {
+ display: table-header-group
+ }
+
+ tfoot {
+ display: table-footer-group
+ }
+}
+
+/* Fix for OSx trackpad hiding the scroll bars*/
+.frame::-webkit-scrollbar {
+ -webkit-appearance: none;
+}
+
+.frame::-webkit-scrollbar:vertical {
+ width: 11px;
+}
+
+.frame::-webkit-scrollbar:horizontal {
+ height: 11px;
+}
+
+.frame::-webkit-scrollbar-thumb {
+ border-radius: 8px;
+ border: 2px solid white;
+ /* should match background, can't be transparent */
+ background-color: rgba(0, 0, 0, .5);
+}
+
+.frame::-webkit-scrollbar-track {
+ background-color: #fff;
+ border-radius: 8px;
+}
+
+.gscrollbar-calculation-container {
+ visibility: hidden;
+ overflow: scroll;
+ -ms-overflow-style: scrollbar;
+ display: block;
+}
\ No newline at end of file
diff --git a/Metronic/assets/global/plugins/GantJS/jsgantt.js b/Metronic/assets/global/plugins/GantJS/jsgantt.js
new file mode 100644
index 000000000..70ee6804d
--- /dev/null
+++ b/Metronic/assets/global/plugins/GantJS/jsgantt.js
@@ -0,0 +1,5129 @@
+(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.JSGantt = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i 0) {
+ // Process all tasks, reset parent date and completion % if task list has altered
+ if (this.vProcessNeeded)
+ task_1.processRows(this.vTaskList, 0, -1, 1, 1, this.getUseSort(), this.vDebug);
+ this.vProcessNeeded = false;
+ // get overall min/max dates plus padding
+ vMinDate = date_utils_1.getMinDate(this.vTaskList, this.vFormat, this.getMinDate() && date_utils_1.coerceDate(this.getMinDate()));
+ vMaxDate = date_utils_1.getMaxDate(this.vTaskList, this.vFormat, this.getMaxDate() && date_utils_1.coerceDate(this.getMaxDate()));
+ // Calculate chart width variables.
+ if (this.vFormat == 'day')
+ vColWidth = this.vDayColWidth;
+ else if (this.vFormat == 'week')
+ vColWidth = this.vWeekColWidth;
+ else if (this.vFormat == 'month')
+ vColWidth = this.vMonthColWidth;
+ else if (this.vFormat == 'quarter')
+ vColWidth = this.vQuarterColWidth;
+ else if (this.vFormat == 'hour')
+ vColWidth = this.vHourColWidth;
+ // DRAW the Left-side of the chart (names, resources, comp%)
+ var vLeftHeader = document.createDocumentFragment();
+ /**
+ * LIST HEAD
+ *
+ *
+ *
+ * HEADINGS
+ */
+ var vTmpDiv = draw_utils_1.newNode(vLeftHeader, 'div', this.vDivId + 'glisthead', 'glistlbl gcontainercol');
+ var gListLbl = vTmpDiv;
+ this.setListBody(vTmpDiv);
+ var vTmpTab = draw_utils_1.newNode(vTmpDiv, 'table', null, 'gtasktableh');
+ var vTmpTBody = draw_utils_1.newNode(vTmpTab, 'tbody');
+ var vTmpRow_1 = draw_utils_1.newNode(vTmpTBody, 'tr');
+ draw_utils_1.newNode(vTmpRow_1, 'td', null, 'gtasklist', '\u00A0');
+ var vTmpCell = draw_utils_1.newNode(vTmpRow_1, 'td', null, 'gspanning gtaskname', null, null, null, null, this.getColumnOrder().length + 1);
+ vTmpCell.appendChild(this.drawSelector('top'));
+ vTmpRow_1 = draw_utils_1.newNode(vTmpTBody, 'tr');
+ draw_utils_1.newNode(vTmpRow_1, 'td', null, 'gtasklist', '\u00A0');
+ draw_utils_1.newNode(vTmpRow_1, 'td', null, 'gtaskname', '\u00A0');
+ this.getColumnOrder().forEach(function (column) {
+ if (_this[column] == 1 || column === 'vAdditionalHeaders') {
+ draw_columns_1.draw_task_headings(column, vTmpRow_1, _this.vLangs, _this.vLang, _this.vAdditionalHeaders);
+ }
+ });
+ /**
+ * LIST BODY
+ *
+ *
+ */
+ var vTmpDiv2 = void 0;
+ var vTmpContentTabOuterWrapper = draw_utils_1.newNode(vLeftHeader, 'div', null, 'gtasktableouterwrapper');
+ var vTmpContentTabWrapper = draw_utils_1.newNode(vTmpContentTabOuterWrapper, 'div', null, 'gtasktablewrapper');
+ vTmpContentTabWrapper.style.width = "calc(100% + " + general_utils_1.getScrollbarWidth() + "px)";
+ var vTmpContentTab = draw_utils_1.newNode(vTmpContentTabWrapper, 'table', null, 'gtasktable');
+ var vTmpContentTBody = draw_utils_1.newNode(vTmpContentTab, 'tbody');
+ var _loop_1 = function (i_1) {
+ var vBGColor = void 0;
+ if (this_1.vTaskList[i_1].getGroup() == 1)
+ vBGColor = 'ggroupitem';
+ else
+ vBGColor = 'glineitem';
+ vID = this_1.vTaskList[i_1].getID();
+ if ((!(this_1.vTaskList[i_1].getParItem() && this_1.vTaskList[i_1].getParItem().getGroup() == 2)) || this_1.vTaskList[i_1].getGroup() == 2) {
+ if (this_1.vTaskList[i_1].getVisible() == 0)
+ vTmpRow_1 = draw_utils_1.newNode(vTmpContentTBody, 'tr', this_1.vDivId + 'child_' + vID, 'gname ' + vBGColor, null, null, null, 'none');
+ else
+ vTmpRow_1 = draw_utils_1.newNode(vTmpContentTBody, 'tr', this_1.vDivId + 'child_' + vID, 'gname ' + vBGColor);
+ this_1.vTaskList[i_1].setListChildRow(vTmpRow_1);
+ draw_utils_1.newNode(vTmpRow_1, 'td', null, 'gtasklist', '\u00A0');
+ var editableClass = this_1.vEditable ? 'gtaskname gtaskeditable' : 'gtaskname';
+ vTmpCell = draw_utils_1.newNode(vTmpRow_1, 'td', null, editableClass);
+ var vCellContents = '';
+ for (var j_1 = 1; j_1 < this_1.vTaskList[i_1].getLevel(); j_1++) {
+ vCellContents += '\u00A0\u00A0\u00A0\u00A0';
+ }
+ var task_2 = this_1.vTaskList[i_1];
+ var vEventClickRow_1 = this_1.vEventClickRow;
+ events_1.addListener('click', function (e) {
+ if (e.target.classList.contains('gfoldercollapse') === false &&
+ vEventClickRow_1 && typeof vEventClickRow_1 === "function") {
+ vEventClickRow_1(task_2);
+ }
+ }, vTmpRow_1);
+ if (this_1.vTaskList[i_1].getGroup() == 1) {
+ vTmpDiv = draw_utils_1.newNode(vTmpCell, 'div', null, null, vCellContents);
+ var vTmpSpan = draw_utils_1.newNode(vTmpDiv, 'span', this_1.vDivId + 'group_' + vID, 'gfoldercollapse', (this_1.vTaskList[i_1].getOpen() == 1) ? '-' : '+');
+ this_1.vTaskList[i_1].setGroupSpan(vTmpSpan);
+ events_1.addFolderListeners(this_1, vTmpSpan, vID);
+ var divTask = document.createElement('span');
+ divTask.innerHTML = '\u00A0' + this_1.vTaskList[i_1].getName();
+ vTmpDiv.appendChild(divTask);
+ // const text = makeInput(this.vTaskList[i].getName(), this.vEditable, 'text');
+ // vTmpDiv.appendChild(document.createNode(text));
+ var callback = function (task, e) { return task.setName(e.target.value); };
+ events_1.addListenerInputCell(vTmpCell, this_1.vEventsChange, callback, this_1.vTaskList[i_1], 'taskname', this_1.Draw.bind(this_1));
+ events_1.addListenerClickCell(vTmpDiv, this_1.vEvents, this_1.vTaskList[i_1], 'taskname');
+ }
+ else {
+ vCellContents += '\u00A0\u00A0\u00A0\u00A0';
+ var text = draw_utils_1.makeInput(this_1.vTaskList[i_1].getName(), this_1.vEditable, 'text');
+ vTmpDiv = draw_utils_1.newNode(vTmpCell, 'div', null, null, vCellContents + text);
+ var callback = function (task, e) { return task.setName(e.target.value); };
+ events_1.addListenerInputCell(vTmpCell, this_1.vEventsChange, callback, this_1.vTaskList[i_1], 'taskname', this_1.Draw.bind(this_1));
+ events_1.addListenerClickCell(vTmpCell, this_1.vEvents, this_1.vTaskList[i_1], 'taskname');
+ }
+ this_1.getColumnOrder().forEach(function (column) {
+ if (_this[column] == 1 || column === 'vAdditionalHeaders') {
+ draw_columns_1.draw_header(column, i_1, vTmpRow_1, _this.vTaskList, _this.vEditable, _this.vEventsChange, _this.vEvents, _this.vDateTaskTableDisplayFormat, _this.vAdditionalHeaders, _this.vFormat, _this.vLangs, _this.vLang, _this.vResources, _this.Draw);
+ }
+ });
+ vNumRows++;
+ }
+ };
+ var this_1 = this;
+ for (var i_1 = 0; i_1 < this.vTaskList.length; i_1++) {
+ _loop_1(i_1);
+ }
+ // DRAW the date format selector at bottom left.
+ vTmpRow_1 = draw_utils_1.newNode(vTmpContentTBody, 'tr');
+ draw_utils_1.newNode(vTmpRow_1, 'td', null, 'gtasklist', '\u00A0');
+ vTmpCell = draw_utils_1.newNode(vTmpRow_1, 'td', null, 'gspanning gtaskname');
+ vTmpCell.appendChild(this.drawSelector('bottom'));
+ this.getColumnOrder().forEach(function (column) {
+ if (_this[column] == 1 || column === 'vAdditionalHeaders') {
+ draw_columns_1.draw_bottom(column, vTmpRow_1, _this.vAdditionalHeaders);
+ }
+ });
+ // Add some white space so the vertical scroll distance should always be greater
+ // than for the right pane (keep to a minimum as it is seen in unconstrained height designs)
+ // newNode(vTmpDiv2, 'br');
+ // newNode(vTmpDiv2, 'br');
+ /**
+ * CHART HEAD
+ *
+ *
+ * HEADINGS
+ */
+ var vRightHeader = document.createDocumentFragment();
+ vTmpDiv = draw_utils_1.newNode(vRightHeader, 'div', this.vDivId + 'gcharthead', 'gchartlbl gcontainercol');
+ var gChartLbl = vTmpDiv;
+ this.setChartHead(vTmpDiv);
+ vTmpTab = draw_utils_1.newNode(vTmpDiv, 'table', this.vDivId + 'chartTableh', 'gcharttableh');
+ vTmpTBody = draw_utils_1.newNode(vTmpTab, 'tbody');
+ vTmpRow_1 = draw_utils_1.newNode(vTmpTBody, 'tr');
+ vTmpDate.setFullYear(vMinDate.getFullYear(), vMinDate.getMonth(), vMinDate.getDate());
+ if (this.vFormat == 'hour')
+ vTmpDate.setHours(vMinDate.getHours());
+ else
+ vTmpDate.setHours(0);
+ vTmpDate.setMinutes(0);
+ vTmpDate.setSeconds(0);
+ vTmpDate.setMilliseconds(0);
+ var vColSpan = 1;
+ // Major Date Header
+ while (vTmpDate.getTime() <= vMaxDate.getTime()) {
+ var vHeaderCellClass = 'gmajorheading';
+ var vCellContents = '';
+ if (this.vFormat == 'day') {
+ var colspan = 7;
+ if (!this.vShowWeekends) {
+ vHeaderCellClass += ' headweekends';
+ colspan = 5;
+ }
+ vTmpCell = draw_utils_1.newNode(vTmpRow_1, 'td', null, vHeaderCellClass, null, null, null, null, colspan);
+ vCellContents += date_utils_1.formatDateStr(vTmpDate, this.vDayMajorDateDisplayFormat, this.vLangs[this.vLang]);
+ vTmpDate.setDate(vTmpDate.getDate() + 6);
+ if (this.vShowEndWeekDate == 1)
+ vCellContents += ' - ' + date_utils_1.formatDateStr(vTmpDate, this.vDayMajorDateDisplayFormat, this.vLangs[this.vLang]);
+ draw_utils_1.newNode(vTmpCell, 'div', null, null, vCellContents, vColWidth * colspan);
+ vTmpDate.setDate(vTmpDate.getDate() + 1);
+ }
+ else if (this.vFormat == 'week') {
+ vTmpCell = draw_utils_1.newNode(vTmpRow_1, 'td', null, vHeaderCellClass, null, vColWidth);
+ draw_utils_1.newNode(vTmpCell, 'div', null, null, date_utils_1.formatDateStr(vTmpDate, this.vWeekMajorDateDisplayFormat, this.vLangs[this.vLang]), vColWidth);
+ vTmpDate.setDate(vTmpDate.getDate() + 7);
+ }
+ else if (this.vFormat == 'month') {
+ vColSpan = (12 - vTmpDate.getMonth());
+ if (vTmpDate.getFullYear() == vMaxDate.getFullYear())
+ vColSpan -= (11 - vMaxDate.getMonth());
+ vTmpCell = draw_utils_1.newNode(vTmpRow_1, 'td', null, vHeaderCellClass, null, null, null, null, vColSpan);
+ draw_utils_1.newNode(vTmpCell, 'div', null, null, date_utils_1.formatDateStr(vTmpDate, this.vMonthMajorDateDisplayFormat, this.vLangs[this.vLang]), vColWidth * vColSpan);
+ vTmpDate.setFullYear(vTmpDate.getFullYear() + 1, 0, 1);
+ }
+ else if (this.vFormat == 'quarter') {
+ vColSpan = (4 - Math.floor(vTmpDate.getMonth() / 3));
+ if (vTmpDate.getFullYear() == vMaxDate.getFullYear())
+ vColSpan -= (3 - Math.floor(vMaxDate.getMonth() / 3));
+ vTmpCell = draw_utils_1.newNode(vTmpRow_1, 'td', null, vHeaderCellClass, null, null, null, null, vColSpan);
+ draw_utils_1.newNode(vTmpCell, 'div', null, null, date_utils_1.formatDateStr(vTmpDate, this.vQuarterMajorDateDisplayFormat, this.vLangs[this.vLang]), vColWidth * vColSpan);
+ vTmpDate.setFullYear(vTmpDate.getFullYear() + 1, 0, 1);
+ }
+ else if (this.vFormat == 'hour') {
+ vColSpan = (24 - vTmpDate.getHours());
+ if (vTmpDate.getFullYear() == vMaxDate.getFullYear() &&
+ vTmpDate.getMonth() == vMaxDate.getMonth() &&
+ vTmpDate.getDate() == vMaxDate.getDate())
+ vColSpan -= (23 - vMaxDate.getHours());
+ vTmpCell = draw_utils_1.newNode(vTmpRow_1, 'td', null, vHeaderCellClass, null, null, null, null, vColSpan);
+ draw_utils_1.newNode(vTmpCell, 'div', null, null, date_utils_1.formatDateStr(vTmpDate, this.vHourMajorDateDisplayFormat, this.vLangs[this.vLang]), vColWidth * vColSpan);
+ vTmpDate.setHours(0);
+ vTmpDate.setDate(vTmpDate.getDate() + 1);
+ }
+ }
+ vTmpRow_1 = draw_utils_1.newNode(vTmpTBody, 'tr');
+ // Minor Date header and Cell Rows
+ vTmpDate.setFullYear(vMinDate.getFullYear(), vMinDate.getMonth(), vMinDate.getDate()); // , vMinDate.getHours()
+ if (this.vFormat == 'hour')
+ vTmpDate.setHours(vMinDate.getHours());
+ vNumCols = 0;
+ while (vTmpDate.getTime() <= vMaxDate.getTime()) {
+ var vHeaderCellClass = 'gminorheading';
+ if (this.vFormat == 'day') {
+ if (vTmpDate.getDay() % 6 == 0) {
+ if (!this.vShowWeekends) {
+ vTmpDate.setDate(vTmpDate.getDate() + 1);
+ continue;
+ }
+ vHeaderCellClass += 'wkend';
+ }
+ if (vTmpDate <= vMaxDate) {
+ vTmpCell = draw_utils_1.newNode(vTmpRow_1, 'td', null, vHeaderCellClass);
+ draw_utils_1.newNode(vTmpCell, 'div', null, null, date_utils_1.formatDateStr(vTmpDate, this.vDayMinorDateDisplayFormat, this.vLangs[this.vLang]), vColWidth);
+ vNumCols++;
+ }
+ vTmpDate.setDate(vTmpDate.getDate() + 1);
+ }
+ else if (this.vFormat == 'week') {
+ if (vTmpDate <= vMaxDate) {
+ vTmpCell = draw_utils_1.newNode(vTmpRow_1, 'td', null, vHeaderCellClass);
+ draw_utils_1.newNode(vTmpCell, 'div', null, null, date_utils_1.formatDateStr(vTmpDate, this.vWeekMinorDateDisplayFormat, this.vLangs[this.vLang]), vColWidth);
+ vNumCols++;
+ }
+ vTmpDate.setDate(vTmpDate.getDate() + 7);
+ }
+ else if (this.vFormat == 'month') {
+ if (vTmpDate <= vMaxDate) {
+ vTmpCell = draw_utils_1.newNode(vTmpRow_1, 'td', null, vHeaderCellClass);
+ draw_utils_1.newNode(vTmpCell, 'div', null, null, date_utils_1.formatDateStr(vTmpDate, this.vMonthMinorDateDisplayFormat, this.vLangs[this.vLang]), vColWidth);
+ vNumCols++;
+ }
+ vTmpDate.setDate(vTmpDate.getDate() + 1);
+ while (vTmpDate.getDate() > 1) {
+ vTmpDate.setDate(vTmpDate.getDate() + 1);
+ }
+ }
+ else if (this.vFormat == 'quarter') {
+ if (vTmpDate <= vMaxDate) {
+ vTmpCell = draw_utils_1.newNode(vTmpRow_1, 'td', null, vHeaderCellClass);
+ draw_utils_1.newNode(vTmpCell, 'div', null, null, date_utils_1.formatDateStr(vTmpDate, this.vQuarterMinorDateDisplayFormat, this.vLangs[this.vLang]), vColWidth);
+ vNumCols++;
+ }
+ vTmpDate.setDate(vTmpDate.getDate() + 81);
+ while (vTmpDate.getDate() > 1)
+ vTmpDate.setDate(vTmpDate.getDate() + 1);
+ }
+ else if (this.vFormat == 'hour') {
+ for (var i_2 = vTmpDate.getHours(); i_2 < 24; i_2++) {
+ vTmpDate.setHours(i_2); //works around daylight savings but may look a little odd on days where the clock goes forward
+ if (vTmpDate <= vMaxDate) {
+ vTmpCell = draw_utils_1.newNode(vTmpRow_1, 'td', null, vHeaderCellClass);
+ draw_utils_1.newNode(vTmpCell, 'div', null, null, date_utils_1.formatDateStr(vTmpDate, this.vHourMinorDateDisplayFormat, this.vLangs[this.vLang]), vColWidth);
+ vNumCols++;
+ }
+ }
+ vTmpDate.setHours(0);
+ vTmpDate.setDate(vTmpDate.getDate() + 1);
+ }
+ }
+ vDateRow = vTmpRow_1;
+ // Calculate size of grids : Plus 3 because 1 border left + 2 of paddings
+ vTaskLeftPx = (vNumCols * (vColWidth + 3)) + 1;
+ // Fix a small space at the end for day
+ if (this.vFormat === 'day') {
+ vTaskLeftPx += 2;
+ }
+ vTmpTab.style.width = vTaskLeftPx + 'px'; // Ensure that the headings has exactly the same width as the chart grid
+ vTaskPlanLeftPx = (vNumCols * (vColWidth + 3)) + 1;
+ if (this.vUseSingleCell != 0 && this.vUseSingleCell < (vNumCols * vNumRows))
+ vSingleCell = true;
+ draw_utils_1.newNode(vTmpDiv, 'div', null, 'rhscrpad', null, null, vTaskLeftPx + 1);
+ vTmpDiv = draw_utils_1.newNode(vRightHeader, 'div', null, 'glabelfooter');
+ /**
+ * CHART GRID
+ *
+ *
+ *
+ */
+ var vRightTable = document.createDocumentFragment();
+ vTmpDiv = draw_utils_1.newNode(vRightTable, 'div', this.vDivId + 'gchartbody', 'gchartgrid gcontainercol');
+ this.setChartBody(vTmpDiv);
+ vTmpTab = draw_utils_1.newNode(vTmpDiv, 'table', this.vDivId + 'chartTable', 'gcharttable', null, vTaskLeftPx);
+ this.setChartTable(vTmpTab);
+ draw_utils_1.newNode(vTmpDiv, 'div', null, 'rhscrpad', null, null, vTaskLeftPx + 1);
+ vTmpTBody = draw_utils_1.newNode(vTmpTab, 'tbody');
+ events_1.syncScroll([vTmpContentTabWrapper, vTmpDiv], 'scrollTop');
+ events_1.syncScroll([gChartLbl, vTmpDiv], 'scrollLeft');
+ events_1.syncScroll([vTmpContentTabWrapper, gListLbl], 'scrollLeft');
+ // Draw each row
+ var i = 0;
+ var j = 0;
+ var bd_1;
+ if (this.vDebug) {
+ bd_1 = new Date();
+ console.log('before tasks loop', bd_1);
+ }
+ for (i = 0; i < this.vTaskList.length; i++) {
+ var curTaskStart = this.vTaskList[i].getStart() ? this.vTaskList[i].getStart() : this.vTaskList[i].getPlanStart();
+ var curTaskEnd = this.vTaskList[i].getEnd() ? this.vTaskList[i].getEnd() : this.vTaskList[i].getPlanEnd();
+ vTaskLeftPx = general_utils_1.getOffset(vMinDate, curTaskStart, vColWidth, this.vFormat, this.vShowWeekends);
+ vTaskRightPx = general_utils_1.getOffset(curTaskStart, curTaskEnd, vColWidth, this.vFormat, this.vShowWeekends);
+ var curTaskPlanStart = void 0, curTaskPlanEnd = void 0;
+ curTaskPlanStart = this.vTaskList[i].getPlanStart();
+ curTaskPlanEnd = this.vTaskList[i].getPlanEnd();
+ if (curTaskPlanStart && curTaskPlanEnd) {
+ vTaskPlanLeftPx = general_utils_1.getOffset(vMinDate, curTaskPlanStart, vColWidth, this.vFormat, this.vShowWeekends);
+ vTaskPlanRightPx = general_utils_1.getOffset(curTaskPlanStart, curTaskPlanEnd, vColWidth, this.vFormat, this.vShowWeekends);
+ }
+ else {
+ vTaskPlanLeftPx = vTaskPlanRightPx = 0;
+ }
+ vID = this.vTaskList[i].getID();
+ var vComb = (this.vTaskList[i].getParItem() && this.vTaskList[i].getParItem().getGroup() == 2);
+ var vCellFormat = '';
+ var vTmpItem = this.vTaskList[i];
+ var vCaptClass = null;
+ // set cell width only for first row because of table-layout:fixed
+ var taskCellWidth = i === 0 ? vColWidth : null;
+ if (this.vTaskList[i].getMile() && !vComb) {
+ vTmpRow_1 = draw_utils_1.newNode(vTmpTBody, 'tr', this.vDivId + 'childrow_' + vID, 'gmileitem gmile' + this.vFormat, null, null, null, ((this.vTaskList[i].getVisible() == 0) ? 'none' : null));
+ this.vTaskList[i].setChildRow(vTmpRow_1);
+ events_1.addThisRowListeners(this, this.vTaskList[i].getListChildRow(), vTmpRow_1);
+ vTmpCell = draw_utils_1.newNode(vTmpRow_1, 'td', null, 'gtaskcell', null, taskCellWidth);
+ vTmpDiv = draw_utils_1.newNode(vTmpCell, 'div', null, 'gtaskcelldiv', '\u00A0\u00A0');
+ vTmpDiv = draw_utils_1.newNode(vTmpDiv, 'div', this.vDivId + 'bardiv_' + vID, 'gtaskbarcontainer', null, 12, vTaskLeftPx + vTaskRightPx - 6);
+ this.vTaskList[i].setBarDiv(vTmpDiv);
+ vTmpDiv2 = draw_utils_1.newNode(vTmpDiv, 'div', this.vDivId + 'taskbar_' + vID, this.vTaskList[i].getClass(), null, 12);
+ this.vTaskList[i].setTaskDiv(vTmpDiv2);
+ if (this.vTaskList[i].getCompVal() < 100)
+ vTmpDiv2.appendChild(document.createTextNode('\u25CA'));
+ else {
+ vTmpDiv2 = draw_utils_1.newNode(vTmpDiv2, 'div', null, 'gmilediamond');
+ draw_utils_1.newNode(vTmpDiv2, 'div', null, 'gmdtop');
+ draw_utils_1.newNode(vTmpDiv2, 'div', null, 'gmdbottom');
+ }
+ vCaptClass = 'gmilecaption';
+ if (!vSingleCell && !vComb) {
+ vCellFormat = '';
+ for (j = 0; j < vNumCols - 1; j++) {
+ if (this.vShowWeekends !== false && this.vFormat == 'day' && ((j % 7 == 4) || (j % 7 == 5)))
+ vCellFormat = 'gtaskcellwkend';
+ else
+ vCellFormat = 'gtaskcell';
+ draw_utils_1.newNode(vTmpRow_1, 'td', null, vCellFormat, '\u00A0\u00A0', taskCellWidth);
+ }
+ }
+ }
+ else {
+ vTaskWidth = vTaskRightPx;
+ // Draw Group Bar which has outer div with inner group div
+ // and several small divs to left and right to create angled-end indicators
+ if (this.vTaskList[i].getGroup()) {
+ vTaskWidth = (vTaskWidth > this.vMinGpLen && vTaskWidth < this.vMinGpLen * 2) ? this.vMinGpLen * 2 : vTaskWidth; // Expand to show two end points
+ vTaskWidth = (vTaskWidth < this.vMinGpLen) ? this.vMinGpLen : vTaskWidth; // expand to show one end point
+ vTmpRow_1 = draw_utils_1.newNode(vTmpTBody, 'tr', this.vDivId + 'childrow_' + vID, ((this.vTaskList[i].getGroup() == 2) ? 'glineitem gitem' : 'ggroupitem ggroup') + this.vFormat, null, null, null, ((this.vTaskList[i].getVisible() == 0) ? 'none' : null));
+ this.vTaskList[i].setChildRow(vTmpRow_1);
+ events_1.addThisRowListeners(this, this.vTaskList[i].getListChildRow(), vTmpRow_1);
+ vTmpCell = draw_utils_1.newNode(vTmpRow_1, 'td', null, 'gtaskcell', null, taskCellWidth);
+ vTmpDiv = draw_utils_1.newNode(vTmpCell, 'div', null, 'gtaskcelldiv', '\u00A0\u00A0');
+ this.vTaskList[i].setCellDiv(vTmpDiv);
+ if (this.vTaskList[i].getGroup() == 1) {
+ vTmpDiv = draw_utils_1.newNode(vTmpDiv, 'div', this.vDivId + 'bardiv_' + vID, 'gtaskbarcontainer', null, vTaskWidth, vTaskLeftPx);
+ this.vTaskList[i].setBarDiv(vTmpDiv);
+ vTmpDiv2 = draw_utils_1.newNode(vTmpDiv, 'div', this.vDivId + 'taskbar_' + vID, this.vTaskList[i].getClass(), null, vTaskWidth);
+ this.vTaskList[i].setTaskDiv(vTmpDiv2);
+ draw_utils_1.newNode(vTmpDiv2, 'div', this.vDivId + 'complete_' + vID, this.vTaskList[i].getClass() + 'complete', null, this.vTaskList[i].getCompStr());
+ draw_utils_1.newNode(vTmpDiv, 'div', null, this.vTaskList[i].getClass() + 'endpointleft');
+ if (vTaskWidth >= this.vMinGpLen * 2)
+ draw_utils_1.newNode(vTmpDiv, 'div', null, this.vTaskList[i].getClass() + 'endpointright');
+ vCaptClass = 'ggroupcaption';
+ }
+ if (!vSingleCell && !vComb) {
+ vCellFormat = '';
+ for (j = 0; j < vNumCols - 1; j++) {
+ if (this.vShowWeekends !== false && this.vFormat == 'day' && ((j % 7 == 4) || (j % 7 == 5)))
+ vCellFormat = 'gtaskcellwkend';
+ else
+ vCellFormat = 'gtaskcell';
+ draw_utils_1.newNode(vTmpRow_1, 'td', null, vCellFormat, '\u00A0\u00A0', taskCellWidth);
+ }
+ }
+ }
+ else {
+ vTaskWidth = (vTaskWidth <= 0) ? 1 : vTaskWidth;
+ /**
+ * DRAW THE BOXES FOR GANTT
+ */
+ var vTmpDivCell = void 0;
+ if (vComb) {
+ vTmpDivCell = vTmpDiv = this.vTaskList[i].getParItem().getCellDiv();
+ }
+ else {
+ // Draw Task Bar which has colored bar div
+ vTmpRow_1 = draw_utils_1.newNode(vTmpTBody, 'tr', this.vDivId + 'childrow_' + vID, 'glineitem gitem' + this.vFormat, null, null, null, ((this.vTaskList[i].getVisible() == 0) ? 'none' : null));
+ this.vTaskList[i].setChildRow(vTmpRow_1);
+ events_1.addThisRowListeners(this, this.vTaskList[i].getListChildRow(), vTmpRow_1);
+ vTmpCell = draw_utils_1.newNode(vTmpRow_1, 'td', null, 'gtaskcell', null, taskCellWidth);
+ vTmpDivCell = vTmpDiv = draw_utils_1.newNode(vTmpCell, 'div', null, 'gtaskcelldiv', '\u00A0\u00A0');
+ }
+ // DRAW TASK BAR
+ vTmpDiv = draw_utils_1.newNode(vTmpDiv, 'div', this.vDivId + 'bardiv_' + vID, 'gtaskbarcontainer', null, vTaskWidth, vTaskLeftPx);
+ this.vTaskList[i].setBarDiv(vTmpDiv);
+ if (this.vTaskList[i].getStartVar()) {
+ // textbar
+ vTmpDiv2 = draw_utils_1.newNode(vTmpDiv, 'div', this.vDivId + 'taskbar_' + vID, this.vTaskList[i].getClass(), null, vTaskWidth);
+ if (this.vTaskList[i].getBarText()) {
+ draw_utils_1.newNode(vTmpDiv2, 'span', this.vDivId + 'tasktextbar_' + vID, 'textbar', this.vTaskList[i].getBarText(), this.vTaskList[i].getCompRestStr());
+ }
+ this.vTaskList[i].setTaskDiv(vTmpDiv2);
+ }
+ // PLANNED
+ // If they are different, show plan bar... show if there is no real vStart as well (just plan dates)
+ if (vTaskPlanLeftPx && (vTaskPlanLeftPx != vTaskLeftPx || !this.vTaskList[i].getStartVar())) {
+ var vTmpPlanDiv = draw_utils_1.newNode(vTmpDivCell, 'div', this.vDivId + 'bardiv_' + vID, 'gtaskbarcontainer gplan', null, vTaskPlanRightPx, vTaskPlanLeftPx);
+ var vTmpPlanDiv2 = draw_utils_1.newNode(vTmpPlanDiv, 'div', this.vDivId + 'taskbar_' + vID, this.vTaskList[i].getClass() + ' gplan', null, vTaskPlanRightPx);
+ this.vTaskList[i].setPlanTaskDiv(vTmpPlanDiv2);
+ }
+ // and opaque completion div
+ draw_utils_1.newNode(vTmpDiv2, 'div', this.vDivId + 'complete_' + vID, this.vTaskList[i].getClass() + 'complete', null, this.vTaskList[i].getCompStr());
+ // caption
+ if (vComb)
+ vTmpItem = this.vTaskList[i].getParItem();
+ if (!vComb || (vComb && this.vTaskList[i].getParItem().getEnd() == this.vTaskList[i].getEnd()))
+ vCaptClass = 'gcaption';
+ // Background cells
+ if (!vSingleCell && !vComb) {
+ vCellFormat = '';
+ for (j = 0; j < vNumCols - 1; j++) {
+ if (this.vShowWeekends !== false && this.vFormat == 'day' && ((j % 7 == 4) || (j % 7 == 5)))
+ vCellFormat = 'gtaskcellwkend';
+ else
+ vCellFormat = 'gtaskcell';
+ draw_utils_1.newNode(vTmpRow_1, 'td', null, vCellFormat, '\u00A0\u00A0');
+ }
+ }
+ }
+ }
+ if (this.getCaptionType() && vCaptClass !== null) {
+ var vCaptionStr = void 0;
+ switch (this.getCaptionType()) {
+ case 'Caption':
+ vCaptionStr = vTmpItem.getCaption();
+ break;
+ case 'Resource':
+ vCaptionStr = vTmpItem.getResource();
+ break;
+ case 'Duration':
+ vCaptionStr = vTmpItem.getDuration(this.vFormat, this.vLangs[this.vLang]);
+ break;
+ case 'Complete':
+ vCaptionStr = vTmpItem.getCompStr();
+ break;
+ }
+ draw_utils_1.newNode(vTmpDiv, 'div', null, vCaptClass, vCaptionStr, 120, (vCaptClass == 'gmilecaption') ? 12 : 0);
+ }
+ // Add Task Info div for tooltip
+ if (this.vTaskList[i].getTaskDiv() && vTmpDiv) {
+ vTmpDiv2 = draw_utils_1.newNode(vTmpDiv, 'div', this.vDivId + 'tt' + vID, null, null, null, null, 'none');
+ var _a = this.createTaskInfo(this.vTaskList[i], this.vTooltipTemplate), component = _a.component, callback = _a.callback;
+ vTmpDiv2.appendChild(component);
+ events_1.addTooltipListeners(this, this.vTaskList[i].getTaskDiv(), vTmpDiv2, callback);
+ }
+ // Add Plan Task Info div for tooltip
+ if (this.vTaskList[i].getPlanTaskDiv() && vTmpDiv) {
+ vTmpDiv2 = draw_utils_1.newNode(vTmpDiv, 'div', this.vDivId + 'tt' + vID, null, null, null, null, 'none');
+ var _b = this.createTaskInfo(this.vTaskList[i], this.vTooltipTemplate), component = _b.component, callback = _b.callback;
+ vTmpDiv2.appendChild(component);
+ events_1.addTooltipListeners(this, this.vTaskList[i].getPlanTaskDiv(), vTmpDiv2, callback);
+ }
+ }
+ if (this.vDebug) {
+ var ad = new Date();
+ console.log('after tasks loop', ad, (ad.getTime() - bd_1.getTime()));
+ }
+ if (!vSingleCell) {
+ vTmpTBody.appendChild(vDateRow.cloneNode(true));
+ }
+ else if (this.vFormat == 'day') {
+ vTmpTBody.appendChild(document.createElement('tr'));
+ }
+ // MAIN VIEW: Appending all generated components to main view
+ while (this.vDiv.hasChildNodes())
+ this.vDiv.removeChild(this.vDiv.firstChild);
+ vTmpDiv = draw_utils_1.newNode(this.vDiv, 'div', null, 'gchartcontainer');
+ vTmpDiv.style.height = this.vTotalHeight;
+ var leftvTmpDiv = draw_utils_1.newNode(vTmpDiv, 'div', null, 'gmain gmainleft');
+ leftvTmpDiv.appendChild(vLeftHeader);
+ // leftvTmpDiv.appendChild(vLeftTable);
+ var rightvTmpDiv = draw_utils_1.newNode(vTmpDiv, 'div', null, 'gmain gmainright');
+ rightvTmpDiv.appendChild(vRightHeader);
+ rightvTmpDiv.appendChild(vRightTable);
+ vTmpDiv.appendChild(leftvTmpDiv);
+ vTmpDiv.appendChild(rightvTmpDiv);
+ draw_utils_1.newNode(vTmpDiv, 'div', null, 'ggridfooter');
+ vTmpDiv2 = draw_utils_1.newNode(this.getChartBody(), 'div', this.vDivId + 'Lines', 'glinediv');
+ if (this.vEvents.onLineContainerHover && typeof this.vEvents.onLineContainerHover === 'function') {
+ events_1.addListener('mouseover', this.vEvents.onLineContainerHover, vTmpDiv2);
+ events_1.addListener('mouseout', this.vEvents.onLineContainerHover, vTmpDiv2);
+ }
+ vTmpDiv2.style.visibility = 'hidden';
+ this.setLines(vTmpDiv2);
+ /* Quick hack to show the generated HTML on older browsers - add a '/' to the begining of this line to activate
+ let tmpGenSrc=document.createElement('textarea');
+ tmpGenSrc.appendChild(document.createTextNode(vTmpDiv.innerHTML));
+ vDiv.appendChild(tmpGenSrc);
+ //*/
+ // LISTENERS: Now all the content exists, register scroll listeners
+ events_1.addScrollListeners(this);
+ // now check if we are actually scrolling the pane
+ if (this.vScrollTo != '') {
+ var vScrollDate = new Date(vMinDate.getTime());
+ var vScrollPx = 0;
+ if (this.vScrollTo.substr && this.vScrollTo.substr(0, 2) == 'px') {
+ vScrollPx = parseInt(this.vScrollTo.substr(2));
+ }
+ else {
+ if (this.vScrollTo === 'today') {
+ vScrollDate = new Date();
+ }
+ else if (this.vScrollTo instanceof Date) {
+ vScrollDate = this.vScrollTo;
+ }
+ else {
+ vScrollDate = date_utils_1.parseDateStr(this.vScrollTo, this.getDateInputFormat());
+ }
+ if (this.vFormat == 'hour')
+ vScrollDate.setMinutes(0, 0, 0);
+ else
+ vScrollDate.setHours(0, 0, 0, 0);
+ vScrollPx = general_utils_1.getOffset(vMinDate, vScrollDate, vColWidth, this.vFormat, this.vShowWeekends) - 30;
+ }
+ this.getChartBody().scrollLeft = vScrollPx;
+ }
+ if (vMinDate.getTime() <= (new Date()).getTime() && vMaxDate.getTime() >= (new Date()).getTime())
+ this.vTodayPx = general_utils_1.getOffset(vMinDate, new Date(), vColWidth, this.vFormat, this.vShowWeekends);
+ else
+ this.vTodayPx = -1;
+ // Dependencies
+ var bdd = void 0;
+ if (this.vDebug) {
+ bdd = new Date();
+ console.log('before DrawDependencies', bdd);
+ }
+ if (this.vEvents && typeof this.vEvents.beforeLineDraw === 'function') {
+ this.vEvents.beforeLineDraw();
+ }
+ this.DrawDependencies(this.vDebug);
+ events_1.addListenerDependencies(this.vLineOptions);
+ if (this.vEvents && typeof this.vEvents.afterLineDraw === 'function') {
+ this.vEvents.afterLineDraw();
+ }
+ if (this.vDebug) {
+ var ad = new Date();
+ console.log('after DrawDependencies', ad, (ad.getTime() - bdd.getTime()));
+ }
+ }
+ if (this.vDebug) {
+ var ad = new Date();
+ console.log('after draw', ad, (ad.getTime() - bd.getTime()));
+ }
+ events_1.updateGridHeaderWidth(this);
+ this.chartRowDateToX = function (date) {
+ return general_utils_1.getOffset(vMinDate, date, vColWidth, this.vFormat, this.vShowWeekends);
+ };
+ if (this.vEvents && this.vEvents.afterDraw) {
+ this.vEvents.afterDraw();
+ }
+ }; //this.draw
+ if (this.vDiv && this.vDiv.nodeName.toLowerCase() == 'div')
+ this.vDivId = this.vDiv.id;
+}; //GanttChart
+
+},{"./draw_columns":3,"./draw_dependencies":4,"./events":5,"./lang":8,"./options":9,"./task":10,"./utils/date_utils":11,"./utils/draw_utils":12,"./utils/general_utils":13,"./xml":14}],3:[function(require,module,exports){
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var date_utils_1 = require("./utils/date_utils");
+var task_1 = require("./task");
+var events_1 = require("./events");
+var draw_utils_1 = require("./utils/draw_utils");
+exports.COLUMN_ORDER = [
+ 'vShowRes',
+ 'vShowDur',
+ 'vShowComp',
+ 'vShowStartDate',
+ 'vShowEndDate',
+ 'vShowPlanStartDate',
+ 'vShowPlanEndDate',
+ 'vShowCost',
+ 'vAdditionalHeaders',
+ 'vShowAddEntries'
+];
+exports.draw_header = function (column, i, vTmpRow, vTaskList, vEditable, vEventsChange, vEvents, vDateTaskTableDisplayFormat, vAdditionalHeaders, vFormat, vLangs, vLang, vResources, Draw) {
+ var vTmpCell, vTmpDiv;
+ if ('vShowRes' == column) {
+ vTmpCell = draw_utils_1.newNode(vTmpRow, 'td', null, 'gresource');
+ var text = draw_utils_1.makeInput(vTaskList[i].getResource(), vEditable, 'resource', vTaskList[i].getResource(), vResources);
+ vTmpDiv = draw_utils_1.newNode(vTmpCell, 'div', null, null, text);
+ var callback = function (task, e) { return task.setResource(e.target.value); };
+ events_1.addListenerInputCell(vTmpCell, vEventsChange, callback, vTaskList[i], 'res', Draw, 'change');
+ events_1.addListenerClickCell(vTmpCell, vEvents, vTaskList[i], 'res');
+ }
+ if ('vShowDur' == column) {
+ vTmpCell = draw_utils_1.newNode(vTmpRow, 'td', null, 'gduration');
+ var text = draw_utils_1.makeInput(vTaskList[i].getDuration(vFormat, vLangs[vLang]), vEditable, 'text', vTaskList[i].getDuration());
+ vTmpDiv = draw_utils_1.newNode(vTmpCell, 'div', null, null, text);
+ var callback = function (task, e) { return task.setDuration(e.target.value); };
+ events_1.addListenerInputCell(vTmpCell, vEventsChange, callback, vTaskList[i], 'dur', Draw);
+ events_1.addListenerClickCell(vTmpCell, vEvents, vTaskList[i], 'dur');
+ }
+ if ('vShowComp' == column) {
+ vTmpCell = draw_utils_1.newNode(vTmpRow, 'td', null, 'gpccomplete');
+ var text = draw_utils_1.makeInput(vTaskList[i].getCompStr(), vEditable, 'percentage', vTaskList[i].getCompVal());
+ vTmpDiv = draw_utils_1.newNode(vTmpCell, 'div', null, null, text);
+ var callback = function (task, e) { task.setComp(e.target.value); task.setCompVal(e.target.value); };
+ events_1.addListenerInputCell(vTmpCell, vEventsChange, callback, vTaskList[i], 'comp', Draw);
+ events_1.addListenerClickCell(vTmpCell, vEvents, vTaskList[i], 'comp');
+ }
+ if ('vShowStartDate' == column) {
+ vTmpCell = draw_utils_1.newNode(vTmpRow, 'td', null, 'gstartdate');
+ var v = date_utils_1.formatDateStr(vTaskList[i].getStart(), vDateTaskTableDisplayFormat, vLangs[vLang]);
+ var text = draw_utils_1.makeInput(v, vEditable, 'date', vTaskList[i].getStart());
+ vTmpDiv = draw_utils_1.newNode(vTmpCell, 'div', null, null, text);
+ var callback = function (task, e) { return task.setStart(e.target.value); };
+ events_1.addListenerInputCell(vTmpCell, vEventsChange, callback, vTaskList[i], 'start', Draw);
+ events_1.addListenerClickCell(vTmpCell, vEvents, vTaskList[i], 'start');
+ }
+ if ('vShowEndDate' == column) {
+ vTmpCell = draw_utils_1.newNode(vTmpRow, 'td', null, 'genddate');
+ var v = date_utils_1.formatDateStr(vTaskList[i].getEnd(), vDateTaskTableDisplayFormat, vLangs[vLang]);
+ var text = draw_utils_1.makeInput(v, vEditable, 'date', vTaskList[i].getEnd());
+ vTmpDiv = draw_utils_1.newNode(vTmpCell, 'div', null, null, text);
+ var callback = function (task, e) { return task.setEnd(e.target.value); };
+ events_1.addListenerInputCell(vTmpCell, vEventsChange, callback, vTaskList[i], 'end', Draw);
+ events_1.addListenerClickCell(vTmpCell, vEvents, vTaskList[i], 'end');
+ }
+ if ('vShowPlanStartDate' == column) {
+ vTmpCell = draw_utils_1.newNode(vTmpRow, 'td', null, 'gplanstartdate');
+ var v = vTaskList[i].getPlanStart() ? date_utils_1.formatDateStr(vTaskList[i].getPlanStart(), vDateTaskTableDisplayFormat, vLangs[vLang]) : '';
+ var text = draw_utils_1.makeInput(v, vEditable, 'date', vTaskList[i].getPlanStart());
+ vTmpDiv = draw_utils_1.newNode(vTmpCell, 'div', null, null, text);
+ var callback = function (task, e) { return task.setPlanStart(e.target.value); };
+ events_1.addListenerInputCell(vTmpCell, vEventsChange, callback, vTaskList[i], 'planstart', Draw);
+ events_1.addListenerClickCell(vTmpCell, vEvents, vTaskList[i], 'planstart');
+ }
+ if ('vShowPlanEndDate' == column) {
+ vTmpCell = draw_utils_1.newNode(vTmpRow, 'td', null, 'gplanenddate');
+ var v = vTaskList[i].getPlanEnd() ? date_utils_1.formatDateStr(vTaskList[i].getPlanEnd(), vDateTaskTableDisplayFormat, vLangs[vLang]) : '';
+ var text = draw_utils_1.makeInput(v, vEditable, 'date', vTaskList[i].getPlanEnd());
+ vTmpDiv = draw_utils_1.newNode(vTmpCell, 'div', null, null, text);
+ var callback = function (task, e) { return task.setPlanEnd(e.target.value); };
+ events_1.addListenerInputCell(vTmpCell, vEventsChange, callback, vTaskList[i], 'planend', Draw);
+ events_1.addListenerClickCell(vTmpCell, vEvents, vTaskList[i], 'planend');
+ }
+ if ('vShowCost' == column) {
+ vTmpCell = draw_utils_1.newNode(vTmpRow, 'td', null, 'gcost');
+ var text = draw_utils_1.makeInput(vTaskList[i].getCost(), vEditable, 'cost');
+ vTmpDiv = draw_utils_1.newNode(vTmpCell, 'div', null, null, text);
+ var callback = function (task, e) { return task.setCost(e.target.value); };
+ events_1.addListenerInputCell(vTmpCell, vEventsChange, callback, vTaskList[i], 'cost', Draw);
+ events_1.addListenerClickCell(vTmpCell, vEvents, vTaskList[i], 'cost');
+ }
+ if ('vAdditionalHeaders' == column && vAdditionalHeaders) {
+ for (var key in vAdditionalHeaders) {
+ var header = vAdditionalHeaders[key];
+ var css = header.class ? header.class : "gadditional-" + key;
+ var data = vTaskList[i].getDataObject();
+ vTmpCell = draw_utils_1.newNode(vTmpRow, 'td', null, "gadditional " + css);
+ // const callback = (task, e) => task.setCost(e.target.value);
+ // addListenerInputCell(vTmpCell, vEventsChange, callback, vTaskList[i], 'costdate');
+ vTmpDiv = draw_utils_1.newNode(vTmpCell, 'div', null, null, data ? data[key] : '');
+ }
+ }
+ if ('vShowAddEntries' == column) {
+ vTmpCell = draw_utils_1.newNode(vTmpRow, 'td', null, 'gaddentries');
+ var button = "+ ";
+ vTmpDiv = draw_utils_1.newNode(vTmpCell, 'div', null, null, button);
+ var callback = function (task, e) {
+ task_1.AddTaskItemObject({
+ vParent: task.getParent()
+ });
+ };
+ events_1.addListenerInputCell(vTmpCell, vEventsChange, callback, vTaskList[i], 'addentries', Draw.bind(this));
+ events_1.addListenerClickCell(vTmpCell, vEvents, vTaskList[i], 'addentries');
+ }
+};
+exports.draw_bottom = function (column, vTmpRow, vAdditionalHeaders) {
+ if ('vShowRes' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gresource', '\u00A0');
+ if ('vShowDur' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gduration', '\u00A0');
+ if ('vShowComp' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gpccomplete', '\u00A0');
+ if ('vShowStartDate' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gstartdate', '\u00A0');
+ if ('vShowEndDate' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning genddate', '\u00A0');
+ if ('vShowPlanStartDate' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gplanstartdate', '\u00A0');
+ if ('vShowPlanEndDate' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gplanenddate', '\u00A0');
+ if ('vShowCost' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gcost', '\u00A0');
+ if ('vAdditionalHeaders' == column && vAdditionalHeaders) {
+ for (var key in vAdditionalHeaders) {
+ var header = vAdditionalHeaders[key];
+ var css = header.class ? header.class : "gadditional-" + key;
+ draw_utils_1.newNode(vTmpRow, 'td', null, "gspanning gadditional " + css, '\u00A0');
+ }
+ }
+ if ('vShowAddEntries' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gaddentries', '\u00A0');
+};
+exports.draw_list_headings = function (column, vTmpRow, vAdditionalHeaders) {
+ if ('vShowRes' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gresource', '\u00A0');
+ if ('vShowDur' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gduration', '\u00A0');
+ if ('vShowComp' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gpccomplete', '\u00A0');
+ if ('vShowStartDate' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gstartdate', '\u00A0');
+ if ('vShowEndDate' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning genddate', '\u00A0');
+ if ('vShowPlanStartDate' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gstartdate', '\u00A0');
+ if ('vShowPlanEndDate' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gplanenddate', '\u00A0');
+ if ('vShowCost' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gcost', '\u00A0');
+ if ('vAdditionalHeaders' == column && vAdditionalHeaders) {
+ for (var key in vAdditionalHeaders) {
+ var header = vAdditionalHeaders[key];
+ var css = header.class ? header.class : "gadditional-" + key;
+ draw_utils_1.newNode(vTmpRow, 'td', null, "gspanning gadditional " + css, '\u00A0');
+ }
+ }
+ if ('vShowAddEntries' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gspanning gaddentries', '\u00A0');
+};
+exports.draw_task_headings = function (column, vTmpRow, vLangs, vLang, vAdditionalHeaders) {
+ if ('vShowRes' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gtaskheading gresource', vLangs[vLang]['resource']);
+ if ('vShowDur' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gtaskheading gduration', vLangs[vLang]['duration']);
+ if ('vShowComp' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gtaskheading gpccomplete', vLangs[vLang]['comp']);
+ if ('vShowStartDate' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gtaskheading gstartdate', vLangs[vLang]['startdate']);
+ if ('vShowEndDate' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gtaskheading genddate', vLangs[vLang]['enddate']);
+ if ('vShowPlanStartDate' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gtaskheading gplanstartdate', vLangs[vLang]['planstartdate']);
+ if ('vShowPlanEndDate' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gtaskheading gplanenddate', vLangs[vLang]['planenddate']);
+ if ('vShowCost' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gtaskheading gcost', vLangs[vLang]['cost']);
+ if ('vAdditionalHeaders' == column && vAdditionalHeaders) {
+ for (var key in vAdditionalHeaders) {
+ var header = vAdditionalHeaders[key];
+ var text = header.translate ? vLangs[vLang][header.translate] : header.title;
+ var css = header.class ? header.class : "gadditional-" + key;
+ draw_utils_1.newNode(vTmpRow, 'td', null, "gtaskheading gadditional " + css, text);
+ }
+ }
+ if ('vShowAddEntries' == column)
+ draw_utils_1.newNode(vTmpRow, 'td', null, 'gtaskheading gaddentries', vLangs[vLang]['addentries']);
+};
+
+},{"./events":5,"./task":10,"./utils/date_utils":11,"./utils/draw_utils":12}],4:[function(require,module,exports){
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.drawDependency = function (x1, y1, x2, y2, pType, pClass) {
+ var vDir = 1;
+ var vBend = false;
+ var vShort = 4;
+ var vRow = Math.floor(this.getRowHeight() / 2);
+ if (y2 < y1)
+ vRow *= -1;
+ switch (pType) {
+ case 'SF':
+ vShort *= -1;
+ if (x1 - 10 <= x2 && y1 != y2)
+ vBend = true;
+ vDir = -1;
+ break;
+ case 'SS':
+ if (x1 < x2)
+ vShort *= -1;
+ else
+ vShort = x2 - x1 - (2 * vShort);
+ break;
+ case 'FF':
+ if (x1 <= x2)
+ vShort = x2 - x1 + (2 * vShort);
+ vDir = -1;
+ break;
+ default:
+ if (x1 + 10 >= x2 && y1 != y2)
+ vBend = true;
+ break;
+ }
+ if (vBend) {
+ this.sLine(x1, y1, x1 + vShort, y1, pClass);
+ this.sLine(x1 + vShort, y1, x1 + vShort, y2 - vRow, pClass);
+ this.sLine(x1 + vShort, y2 - vRow, x2 - (vShort * 2), y2 - vRow, pClass);
+ this.sLine(x2 - (vShort * 2), y2 - vRow, x2 - (vShort * 2), y2, pClass);
+ this.sLine(x2 - (vShort * 2), y2, x2 - (1 * vDir), y2, pClass);
+ }
+ else if (y1 != y2) {
+ this.sLine(x1, y1, x1 + vShort, y1, pClass);
+ this.sLine(x1 + vShort, y1, x1 + vShort, y2, pClass);
+ this.sLine(x1 + vShort, y2, x2 - (1 * vDir), y2, pClass);
+ }
+ else
+ this.sLine(x1, y1, x2 - (1 * vDir), y2, pClass);
+ var vTmpDiv = this.sLine(x2, y2, x2 - 3 - ((vDir < 0) ? 1 : 0), y2 - 3 - ((vDir < 0) ? 1 : 0), pClass + "Arw");
+ vTmpDiv.style.width = '0px';
+ vTmpDiv.style.height = '0px';
+};
+exports.DrawDependencies = function (vDebug) {
+ if (vDebug === void 0) { vDebug = false; }
+ if (this.getShowDeps() == 1) {
+ this.CalcTaskXY(); //First recalculate the x,y
+ this.clearDependencies();
+ var vList = this.getList();
+ for (var i = 0; i < vList.length; i++) {
+ var vDepend = vList[i].getDepend();
+ var vDependType = vList[i].getDepType();
+ var n = vDepend.length;
+ if (n > 0 && vList[i].getVisible() == 1) {
+ for (var k = 0; k < n; k++) {
+ var vTask = this.getArrayLocationByID(vDepend[k]);
+ if (vTask >= 0 && vList[vTask].getGroup() != 2) {
+ if (vList[vTask].getVisible() == 1) {
+ if (vDebug) {
+ console.log("init drawDependency ", vList[vTask].getID(), new Date());
+ }
+ var cssClass = 'gDepId' + vList[vTask].getID() +
+ ' ' + 'gDepNextId' + vList[i].getID();
+ var dependedData = vList[vTask].getDataObject();
+ var nextDependedData = vList[i].getDataObject();
+ if (dependedData && dependedData.pID && nextDependedData && nextDependedData.pID) {
+ cssClass += ' gDepDataId' + dependedData.pID + ' ' + 'gDepNextDataId' + nextDependedData.pID;
+ }
+ if (vDependType[k] == 'SS')
+ this.drawDependency(vList[vTask].getStartX() - 1, vList[vTask].getStartY(), vList[i].getStartX() - 1, vList[i].getStartY(), 'SS', cssClass + ' gDepSS');
+ else if (vDependType[k] == 'FF')
+ this.drawDependency(vList[vTask].getEndX(), vList[vTask].getEndY(), vList[i].getEndX(), vList[i].getEndY(), 'FF', cssClass + ' gDepFF');
+ else if (vDependType[k] == 'SF')
+ this.drawDependency(vList[vTask].getStartX() - 1, vList[vTask].getStartY(), vList[i].getEndX(), vList[i].getEndY(), 'SF', cssClass + ' gDepSF');
+ else if (vDependType[k] == 'FS')
+ this.drawDependency(vList[vTask].getEndX(), vList[vTask].getEndY(), vList[i].getStartX() - 1, vList[i].getStartY(), 'FS', cssClass + ' gDepFS');
+ }
+ }
+ }
+ }
+ }
+ }
+ // draw the current date line
+ if (this.vTodayPx >= 0)
+ this.sLine(this.vTodayPx, 0, this.vTodayPx, this.getChartTable().offsetHeight - 1, 'gCurDate');
+};
+
+},{}],5:[function(require,module,exports){
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var general_utils_1 = require("./utils/general_utils");
+// Function to open/close and hide/show children of specified task
+exports.folder = function (pID, ganttObj) {
+ var vList = ganttObj.getList();
+ ganttObj.clearDependencies(); // clear these first so slow rendering doesn't look odd
+ for (var i = 0; i < vList.length; i++) {
+ if (vList[i].getID() == pID) {
+ if (vList[i].getOpen() == 1) {
+ vList[i].setOpen(0);
+ exports.hide(pID, ganttObj);
+ if (general_utils_1.isIE())
+ vList[i].getGroupSpan().innerText = '+';
+ else
+ vList[i].getGroupSpan().textContent = '+';
+ }
+ else {
+ vList[i].setOpen(1);
+ exports.show(pID, 1, ganttObj);
+ if (general_utils_1.isIE())
+ vList[i].getGroupSpan().innerText = '-';
+ else
+ vList[i].getGroupSpan().textContent = '-';
+ }
+ }
+ }
+ var bd;
+ if (this.vDebug) {
+ bd = new Date();
+ console.log('after drawDependency', bd);
+ }
+ ganttObj.DrawDependencies(this.vDebug);
+ if (this.vDebug) {
+ var ad = new Date();
+ console.log('after drawDependency', ad, (ad.getTime() - bd.getTime()));
+ }
+};
+exports.hide = function (pID, ganttObj) {
+ var vList = ganttObj.getList();
+ var vID = 0;
+ for (var i = 0; i < vList.length; i++) {
+ if (vList[i].getParent() == pID) {
+ vID = vList[i].getID();
+ // it's unlikely but if the task list has been updated since
+ // the chart was drawn some of the rows may not exist
+ if (vList[i].getListChildRow())
+ vList[i].getListChildRow().style.display = 'none';
+ if (vList[i].getChildRow())
+ vList[i].getChildRow().style.display = 'none';
+ vList[i].setVisible(0);
+ if (vList[i].getGroup())
+ exports.hide(vID, ganttObj);
+ }
+ }
+};
+// Function to show children of specified task
+exports.show = function (pID, pTop, ganttObj) {
+ var vList = ganttObj.getList();
+ var vID = 0;
+ var vState = '';
+ for (var i = 0; i < vList.length; i++) {
+ if (vList[i].getParent() == pID) {
+ if (!vList[i].getParItem()) {
+ console.error("Cant find parent on who event (maybe problems with Task ID and Parent Id mixes?)");
+ }
+ if (vList[i].getParItem().getGroupSpan()) {
+ if (general_utils_1.isIE())
+ vState = vList[i].getParItem().getGroupSpan().innerText;
+ else
+ vState = vList[i].getParItem().getGroupSpan().textContent;
+ }
+ i = vList.length;
+ }
+ }
+ for (var i = 0; i < vList.length; i++) {
+ if (vList[i].getParent() == pID) {
+ var vChgState = false;
+ vID = vList[i].getID();
+ if (pTop == 1 && vState == '+')
+ vChgState = true;
+ else if (vState == '-')
+ vChgState = true;
+ else if (vList[i].getParItem() && vList[i].getParItem().getGroup() == 2)
+ vList[i].setVisible(1);
+ if (vChgState) {
+ if (vList[i].getListChildRow())
+ vList[i].getListChildRow().style.display = '';
+ if (vList[i].getChildRow())
+ vList[i].getChildRow().style.display = '';
+ vList[i].setVisible(1);
+ }
+ if (vList[i].getGroup())
+ exports.show(vID, 0, ganttObj);
+ }
+ }
+};
+exports.mouseOver = function (pObj1, pObj2) {
+ if (this.getUseRowHlt()) {
+ pObj1.className += ' gitemhighlight';
+ pObj2.className += ' gitemhighlight';
+ }
+};
+exports.mouseOut = function (pObj1, pObj2) {
+ if (this.getUseRowHlt()) {
+ pObj1.className = pObj1.className.replace(/(?:^|\s)gitemhighlight(?!\S)/g, '');
+ pObj2.className = pObj2.className.replace(/(?:^|\s)gitemhighlight(?!\S)/g, '');
+ }
+};
+exports.showToolTip = function (pGanttChartObj, e, pContents, pWidth, pTimer) {
+ var vTtDivId = pGanttChartObj.getDivId() + 'JSGanttToolTip';
+ var vMaxW = 500;
+ var vMaxAlpha = 100;
+ var vShowing = pContents.id;
+ if (pGanttChartObj.getUseToolTip()) {
+ if (pGanttChartObj.vTool == null) {
+ pGanttChartObj.vTool = document.createElement('div');
+ pGanttChartObj.vTool.id = vTtDivId;
+ pGanttChartObj.vTool.className = 'JSGanttToolTip';
+ pGanttChartObj.vTool.vToolCont = document.createElement('div');
+ pGanttChartObj.vTool.vToolCont.id = vTtDivId + 'cont';
+ pGanttChartObj.vTool.vToolCont.className = 'JSGanttToolTipcont';
+ pGanttChartObj.vTool.vToolCont.setAttribute('showing', '');
+ pGanttChartObj.vTool.appendChild(pGanttChartObj.vTool.vToolCont);
+ document.body.appendChild(pGanttChartObj.vTool);
+ pGanttChartObj.vTool.style.opacity = 0;
+ pGanttChartObj.vTool.setAttribute('currentOpacity', 0);
+ pGanttChartObj.vTool.setAttribute('fadeIncrement', 10);
+ pGanttChartObj.vTool.setAttribute('moveSpeed', 10);
+ pGanttChartObj.vTool.style.filter = 'alpha(opacity=0)';
+ pGanttChartObj.vTool.style.visibility = 'hidden';
+ pGanttChartObj.vTool.style.left = Math.floor(((e) ? e.clientX : window.event.clientX) / 2) + 'px';
+ pGanttChartObj.vTool.style.top = Math.floor(((e) ? e.clientY : window.event.clientY) / 2) + 'px';
+ this.addListener('mouseover', function () { clearTimeout(pGanttChartObj.vTool.delayTimeout); }, pGanttChartObj.vTool);
+ this.addListener('mouseout', function () { general_utils_1.delayedHide(pGanttChartObj, pGanttChartObj.vTool, pTimer); }, pGanttChartObj.vTool);
+ }
+ clearTimeout(pGanttChartObj.vTool.delayTimeout);
+ var newHTML = pContents.innerHTML;
+ if (pGanttChartObj.vTool.vToolCont.getAttribute("content") !== newHTML) {
+ pGanttChartObj.vTool.vToolCont.innerHTML = pContents.innerHTML;
+ // as we are allowing arbitrary HTML we should remove any tag ids to prevent duplication
+ general_utils_1.stripIds(pGanttChartObj.vTool.vToolCont);
+ pGanttChartObj.vTool.vToolCont.setAttribute("content", newHTML);
+ }
+ if (pGanttChartObj.vTool.vToolCont.getAttribute('showing') != vShowing || pGanttChartObj.vTool.style.visibility != 'visible') {
+ if (pGanttChartObj.vTool.vToolCont.getAttribute('showing') != vShowing) {
+ pGanttChartObj.vTool.vToolCont.setAttribute('showing', vShowing);
+ }
+ pGanttChartObj.vTool.style.visibility = 'visible';
+ // Rather than follow the mouse just have it stay put
+ general_utils_1.updateFlyingObj(e, pGanttChartObj, pTimer);
+ pGanttChartObj.vTool.style.width = (pWidth) ? pWidth + 'px' : 'auto';
+ if (!pWidth && general_utils_1.isIE()) {
+ pGanttChartObj.vTool.style.width = pGanttChartObj.vTool.offsetWidth;
+ }
+ if (pGanttChartObj.vTool.offsetWidth > vMaxW) {
+ pGanttChartObj.vTool.style.width = vMaxW + 'px';
+ }
+ }
+ if (pGanttChartObj.getUseFade()) {
+ clearInterval(pGanttChartObj.vTool.fadeInterval);
+ pGanttChartObj.vTool.fadeInterval = setInterval(function () { general_utils_1.fadeToolTip(1, pGanttChartObj.vTool, vMaxAlpha); }, pTimer);
+ }
+ else {
+ pGanttChartObj.vTool.style.opacity = vMaxAlpha * 0.01;
+ pGanttChartObj.vTool.style.filter = 'alpha(opacity=' + vMaxAlpha + ')';
+ }
+ }
+};
+exports.addListener = function (eventName, handler, control) {
+ // Check if control is a string
+ if (control === String(control))
+ control = general_utils_1.findObj(control);
+ if (control.addEventListener) //Standard W3C
+ {
+ return control.addEventListener(eventName, handler, false);
+ }
+ else if (control.attachEvent) //IExplore
+ {
+ return control.attachEvent('on' + eventName, handler);
+ }
+ else {
+ return false;
+ }
+};
+exports.removeListener = function (eventName, handler, control) {
+ // Check if control is a string
+ if (control === String(control))
+ control = general_utils_1.findObj(control);
+ if (control.removeEventListener) {
+ //Standard W3C
+ return control.removeEventListener(eventName, handler, false);
+ }
+ else if (control.detachEvent) {
+ //IExplore
+ return control.attachEvent('on' + eventName, handler);
+ }
+ else {
+ return false;
+ }
+};
+exports.syncScroll = function (elements, attrName) {
+ var syncFlags = new Map(elements.map(function (e) { return [e, false]; }));
+ function scrollEvent(e) {
+ if (!syncFlags.get(e.target)) {
+ for (var _i = 0, elements_2 = elements; _i < elements_2.length; _i++) {
+ var el = elements_2[_i];
+ if (el !== e.target) {
+ syncFlags.set(el, true);
+ el[attrName] = e.target[attrName];
+ }
+ }
+ }
+ syncFlags.set(e.target, false);
+ }
+ for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
+ var el = elements_1[_i];
+ el.addEventListener('scroll', scrollEvent);
+ }
+};
+exports.addTooltipListeners = function (pGanttChart, pObj1, pObj2, callback) {
+ var isShowingTooltip = false;
+ exports.addListener('mouseover', function (e) {
+ if (isShowingTooltip || !callback) {
+ exports.showToolTip(pGanttChart, e, pObj2, null, pGanttChart.getTimer());
+ }
+ else if (callback) {
+ isShowingTooltip = true;
+ var promise = callback();
+ exports.showToolTip(pGanttChart, e, pObj2, null, pGanttChart.getTimer());
+ if (promise && promise.then) {
+ promise.then(function () {
+ if (pGanttChart.vTool.vToolCont.getAttribute('showing') === pObj2.id &&
+ pGanttChart.vTool.style.visibility === 'visible') {
+ exports.showToolTip(pGanttChart, e, pObj2, null, pGanttChart.getTimer());
+ }
+ });
+ }
+ }
+ }, pObj1);
+ exports.addListener('mouseout', function (e) {
+ var outTo = e.relatedTarget;
+ if (general_utils_1.isParentElementOrSelf(outTo, pObj1) || (pGanttChart.vTool && general_utils_1.isParentElementOrSelf(outTo, pGanttChart.vTool))) {
+ // not actually out
+ }
+ else {
+ isShowingTooltip = false;
+ }
+ general_utils_1.delayedHide(pGanttChart, pGanttChart.vTool, pGanttChart.getTimer());
+ }, pObj1);
+};
+exports.addThisRowListeners = function (pGanttChart, pObj1, pObj2) {
+ exports.addListener('mouseover', function () { pGanttChart.mouseOver(pObj1, pObj2); }, pObj1);
+ exports.addListener('mouseover', function () { pGanttChart.mouseOver(pObj1, pObj2); }, pObj2);
+ exports.addListener('mouseout', function () { pGanttChart.mouseOut(pObj1, pObj2); }, pObj1);
+ exports.addListener('mouseout', function () { pGanttChart.mouseOut(pObj1, pObj2); }, pObj2);
+};
+exports.updateGridHeaderWidth = function (pGanttChart) {
+ var head = pGanttChart.getChartHead();
+ var body = pGanttChart.getChartBody();
+ if (!head || !body)
+ return;
+ var isScrollVisible = body.scrollHeight > body.clientHeight;
+ if (isScrollVisible) {
+ head.style.width = "calc(100% - " + general_utils_1.getScrollbarWidth() + "px)";
+ }
+ else {
+ head.style.width = '100%';
+ }
+};
+exports.addFolderListeners = function (pGanttChart, pObj, pID) {
+ exports.addListener('click', function () {
+ exports.folder(pID, pGanttChart);
+ exports.updateGridHeaderWidth(pGanttChart);
+ }, pObj);
+};
+exports.addFormatListeners = function (pGanttChart, pFormat, pObj) {
+ exports.addListener('click', function () { general_utils_1.changeFormat(pFormat, pGanttChart); }, pObj);
+};
+exports.addScrollListeners = function (pGanttChart) {
+ exports.addListener('resize', function () { pGanttChart.getChartHead().scrollLeft = pGanttChart.getChartBody().scrollLeft; }, window);
+ exports.addListener('resize', function () {
+ pGanttChart.getListBody().scrollTop = pGanttChart.getChartBody().scrollTop;
+ }, window);
+};
+exports.addListenerClickCell = function (vTmpCell, vEvents, task, column) {
+ exports.addListener('click', function (e) {
+ if (e.target.classList.contains('gfoldercollapse') === false &&
+ vEvents[column] && typeof vEvents[column] === 'function') {
+ vEvents[column](task, e, vTmpCell);
+ }
+ }, vTmpCell);
+};
+exports.addListenerInputCell = function (vTmpCell, vEventsChange, callback, task, column, draw, event) {
+ if (draw === void 0) { draw = null; }
+ if (event === void 0) { event = 'blur'; }
+ if (vTmpCell.children[0] && vTmpCell.children[0].children && vTmpCell.children[0].children[0]) {
+ var tagName = vTmpCell.children[0].children[0].tagName;
+ var selectInputOrButton = tagName === 'SELECT' || tagName === 'INPUT' || tagName === 'BUTTON';
+ if (selectInputOrButton) {
+ exports.addListener(event, function (e) {
+ if (callback) {
+ callback(task, e);
+ }
+ if (vEventsChange[column] && typeof vEventsChange[column] === 'function') {
+ var q = vEventsChange[column](task, e, vTmpCell, vColumnsNames[column]);
+ if (q && q.then) {
+ q.then(function (e) { return draw(); });
+ }
+ else {
+ draw();
+ }
+ }
+ else {
+ draw();
+ }
+ }, vTmpCell.children[0].children[0]);
+ }
+ }
+};
+exports.addListenerDependencies = function (vLineOptions) {
+ var elements = document.querySelectorAll('.gtaskbarcontainer');
+ for (var i = 0; i < elements.length; i++) {
+ var taskDiv = elements[i];
+ taskDiv.addEventListener('mouseover', function (e) {
+ toggleDependencies(e, vLineOptions);
+ });
+ taskDiv.addEventListener('mouseout', function (e) {
+ toggleDependencies(e, vLineOptions);
+ });
+ }
+};
+var toggleDependencies = function (e, vLineOptions) {
+ var target = e.currentTarget;
+ var ids = target.getAttribute('id').split('_');
+ var style = vLineOptions && vLineOptions.borderStyleHover !== undefined ? vLineOptions.hoverStyle : 'groove';
+ if (e.type === 'mouseout') {
+ style = '';
+ }
+ if (ids.length > 1) {
+ var frameZones = Array.from(document.querySelectorAll(".gDepId" + ids[1]));
+ frameZones.forEach(function (c) {
+ c.style.borderStyle = style;
+ });
+ // document.querySelectorAll(`.gDepId${ids[1]}`).forEach((c: any) => {
+ // c.style.borderStyle = style;
+ // });
+ }
+};
+// "pID": 122
+var vColumnsNames = {
+ taskname: 'pName',
+ res: 'pRes',
+ dur: '',
+ comp: 'pComp',
+ start: 'pStart',
+ end: 'pEnd',
+ planstart: 'pPlanStart',
+ planend: 'pPlanEnd',
+ link: 'pLink',
+ cost: 'pCost',
+ mile: 'pMile',
+ group: 'pGroup',
+ parent: 'pParent',
+ open: 'pOpen',
+ depend: 'pDepend',
+ caption: 'pCaption',
+ note: 'pNotes'
+};
+
+},{"./utils/general_utils":13}],6:[function(require,module,exports){
+"use strict";
+/*
+ * Copyright (c) 2013-2018, Paul Geldart, Eduardo Rodrigues, Ricardo Cardoso and Mario Mol.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of AUTHORS nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL AUTHORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This project is based on jsGantt 1.2, (which can be obtained from
+ https://code.google.com/p/jsgantt/) and remains under the original BSD license.
+ Copyright (c) 2009, Shlomy Gantz BlueBrick Inc.
+*/
+Object.defineProperty(exports, "__esModule", { value: true });
+var events_1 = require("./events");
+var general_utils_1 = require("./utils/general_utils");
+var xml_1 = require("./xml");
+var task_1 = require("./task");
+var draw_1 = require("./draw");
+var json_1 = require("./json");
+var date_utils_1 = require("./utils/date_utils");
+if (!exports.JSGantt)
+ exports.JSGantt = {};
+exports.JSGantt.isIE = general_utils_1.isIE;
+exports.JSGantt.TaskItem = task_1.TaskItem;
+exports.JSGantt.GanttChart = draw_1.GanttChart;
+exports.JSGantt.updateFlyingObj = general_utils_1.updateFlyingObj;
+exports.JSGantt.showToolTip = events_1.showToolTip;
+exports.JSGantt.stripIds = general_utils_1.stripIds;
+exports.JSGantt.stripUnwanted = general_utils_1.stripUnwanted;
+exports.JSGantt.delayedHide = general_utils_1.delayedHide;
+exports.JSGantt.hideToolTip = general_utils_1.hideToolTip;
+exports.JSGantt.fadeToolTip = general_utils_1.fadeToolTip;
+exports.JSGantt.moveToolTip = general_utils_1.moveToolTip;
+exports.JSGantt.getZoomFactor = general_utils_1.getZoomFactor;
+exports.JSGantt.getOffset = general_utils_1.getOffset;
+exports.JSGantt.getScrollPositions = general_utils_1.getScrollPositions;
+exports.JSGantt.processRows = task_1.processRows;
+exports.JSGantt.sortTasks = task_1.sortTasks;
+// Used to determine the minimum date of all tasks and set lower bound based on format
+exports.JSGantt.getMinDate = date_utils_1.getMinDate;
+// Used to determine the maximum date of all tasks and set upper bound based on format
+exports.JSGantt.getMaxDate = date_utils_1.getMaxDate;
+// This function finds the document id of the specified object
+exports.JSGantt.findObj = general_utils_1.findObj;
+exports.JSGantt.changeFormat = general_utils_1.changeFormat;
+// Tasks
+exports.JSGantt.folder = events_1.folder;
+exports.JSGantt.hide = events_1.hide;
+exports.JSGantt.show = events_1.show;
+exports.JSGantt.taskLink = task_1.taskLink;
+exports.JSGantt.parseDateStr = date_utils_1.parseDateStr;
+exports.JSGantt.formatDateStr = date_utils_1.formatDateStr;
+exports.JSGantt.parseDateFormatStr = date_utils_1.parseDateFormatStr;
+// XML
+exports.JSGantt.parseXML = xml_1.parseXML;
+exports.JSGantt.parseXMLString = xml_1.parseXMLString;
+exports.JSGantt.findXMLNode = xml_1.findXMLNode;
+exports.JSGantt.getXMLNodeValue = xml_1.getXMLNodeValue;
+exports.JSGantt.AddXMLTask = xml_1.AddXMLTask;
+// JSON
+exports.JSGantt.parseJSON = json_1.parseJSON;
+exports.JSGantt.parseJSONString = json_1.parseJSONString;
+exports.JSGantt.addJSONTask = json_1.addJSONTask;
+exports.JSGantt.benchMark = general_utils_1.benchMark;
+exports.JSGantt.getIsoWeek = date_utils_1.getIsoWeek;
+exports.JSGantt.addListener = events_1.addListener;
+exports.JSGantt.addTooltipListeners = events_1.addTooltipListeners;
+exports.JSGantt.addThisRowListeners = events_1.addThisRowListeners;
+exports.JSGantt.addFolderListeners = events_1.addFolderListeners;
+exports.JSGantt.addFormatListeners = events_1.addFormatListeners;
+exports.JSGantt.addScrollListeners = events_1.addScrollListeners;
+exports.JSGantt.criticalPath = general_utils_1.criticalPath;
+
+},{"./draw":2,"./events":5,"./json":7,"./task":10,"./utils/date_utils":11,"./utils/general_utils":13,"./xml":14}],7:[function(require,module,exports){
+"use strict";
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+var __generator = (this && this.__generator) || function (thisArg, body) {
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
+ function verb(n) { return function (v) { return step([n, v]); }; }
+ function step(op) {
+ if (f) throw new TypeError("Generator is already executing.");
+ while (_) try {
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
+ if (y = 0, t) op = [op[0] & 2, t.value];
+ switch (op[0]) {
+ case 0: case 1: t = op; break;
+ case 4: _.label++; return { value: op[1], done: false };
+ case 5: _.label++; y = op[1]; op = [0]; continue;
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
+ default:
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
+ if (t[2]) _.ops.pop();
+ _.trys.pop(); continue;
+ }
+ op = body.call(thisArg, _);
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
+ }
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var task_1 = require("./task");
+var general_utils_1 = require("./utils/general_utils");
+/**
+ *
+ * @param pFile
+ * @param pGanttlet
+ */
+exports.parseJSON = function (pFile, pGanttVar, vDebug, redrawAfter) {
+ if (vDebug === void 0) { vDebug = false; }
+ if (redrawAfter === void 0) { redrawAfter = true; }
+ return __awaiter(this, void 0, void 0, function () {
+ var jsonObj, bd, ad;
+ return __generator(this, function (_a) {
+ switch (_a.label) {
+ case 0: return [4 /*yield*/, general_utils_1.makeRequest(pFile, true, true)];
+ case 1:
+ jsonObj = _a.sent();
+ if (vDebug) {
+ bd = new Date();
+ console.log('before jsonparse', bd);
+ }
+ exports.addJSONTask(pGanttVar, jsonObj);
+ if (this.vDebug) {
+ ad = new Date();
+ console.log('after addJSONTask', ad, (ad.getTime() - bd.getTime()));
+ }
+ if (redrawAfter) {
+ pGanttVar.Draw();
+ }
+ return [2 /*return*/, jsonObj];
+ }
+ });
+ });
+};
+exports.parseJSONString = function (pStr, pGanttVar) {
+ exports.addJSONTask(pGanttVar, JSON.parse(pStr));
+};
+exports.addJSONTask = function (pGanttVar, pJsonObj) {
+ for (var index = 0; index < pJsonObj.length; index++) {
+ var id = void 0;
+ var name_1 = void 0;
+ var start = void 0;
+ var end = void 0;
+ var planstart = void 0;
+ var planend = void 0;
+ var itemClass = void 0;
+ var link = '';
+ var milestone = 0;
+ var resourceName = '';
+ var completion = void 0;
+ var group = 0;
+ var parent_1 = void 0;
+ var open_1 = void 0;
+ var dependsOn = '';
+ var caption = '';
+ var notes = '';
+ var cost = void 0;
+ var duration = '';
+ var bartext = '';
+ var additionalObject = {};
+ for (var prop in pJsonObj[index]) {
+ var property = prop;
+ var value = pJsonObj[index][property];
+ switch (property.toLowerCase()) {
+ case 'pid':
+ case 'id':
+ id = value;
+ break;
+ case 'pname':
+ case 'name':
+ name_1 = value;
+ break;
+ case 'pstart':
+ case 'start':
+ start = value;
+ break;
+ case 'pend':
+ case 'end':
+ end = value;
+ break;
+ case 'pplanstart':
+ case 'planstart':
+ planstart = value;
+ break;
+ case 'pplanend':
+ case 'planend':
+ planend = value;
+ break;
+ case 'pclass':
+ case 'class':
+ itemClass = value;
+ break;
+ case 'plink':
+ case 'link':
+ link = value;
+ break;
+ case 'pmile':
+ case 'mile':
+ milestone = value;
+ break;
+ case 'pres':
+ case 'res':
+ resourceName = value;
+ break;
+ case 'pcomp':
+ case 'comp':
+ completion = value;
+ break;
+ case 'pgroup':
+ case 'group':
+ group = value;
+ break;
+ case 'pparent':
+ case 'parent':
+ parent_1 = value;
+ break;
+ case 'popen':
+ case 'open':
+ open_1 = value;
+ break;
+ case 'pdepend':
+ case 'depend':
+ dependsOn = value;
+ break;
+ case 'pcaption':
+ case 'caption':
+ caption = value;
+ break;
+ case 'pnotes':
+ case 'notes':
+ notes = value;
+ break;
+ case 'pcost':
+ case 'cost':
+ cost = value;
+ break;
+ case 'duration':
+ case 'pduration':
+ duration = value;
+ break;
+ case 'bartext':
+ case 'pbartext':
+ bartext = value;
+ break;
+ default:
+ additionalObject[property.toLowerCase()] = value;
+ }
+ }
+ //if (id != undefined && !isNaN(parseInt(id)) && isFinite(id) && name && start && end && itemClass && completion != undefined && !isNaN(parseFloat(completion)) && isFinite(completion) && !isNaN(parseInt(parent)) && isFinite(parent)) {
+ pGanttVar.AddTaskItem(new task_1.TaskItem(id, name_1, start, end, itemClass, link, milestone, resourceName, completion, group, parent_1, open_1, dependsOn, caption, notes, pGanttVar, cost, planstart, planend, duration, bartext, additionalObject));
+ //}
+ }
+};
+
+},{"./task":10,"./utils/general_utils":13}],8:[function(require,module,exports){
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var es = {
+ 'january': 'Enero',
+ 'february': 'Febrero',
+ 'march': 'Marzo',
+ 'april': 'Abril',
+ 'maylong': 'Mayo',
+ 'june': 'Junio',
+ 'july': 'Julio',
+ 'august': 'Agosto',
+ 'september': 'Septiembre',
+ 'october': 'Octubre',
+ 'november': 'Noviembre',
+ 'december': 'Diciembre',
+ 'jan': 'Ene',
+ 'feb': 'Feb',
+ 'mar': 'Mar',
+ 'apr': 'Abr',
+ 'may': 'May',
+ 'jun': 'Jun',
+ 'jul': 'Jul',
+ 'aug': 'Ago',
+ 'sep': 'Sep',
+ 'oct': 'Oct',
+ 'nov': 'Nov',
+ 'dec': 'Dic',
+ 'sunday': 'Domingo',
+ 'monday': 'Lunes',
+ 'tuesday': 'Martes',
+ 'wednesday': 'Miércoles',
+ 'thursday': 'Jueves',
+ 'friday': 'Viernes',
+ 'saturday': 'Sábado',
+ 'sun': ' Dom',
+ 'mon': ' Lun',
+ 'tue': ' Mar',
+ 'wed': ' Mie',
+ 'thu': ' Jue',
+ 'fri': ' Vie',
+ 'sat': ' Sab',
+ 'resource': 'Recurso',
+ 'duration': 'Duración',
+ 'comp': '% Compl.',
+ 'completion': 'Completado',
+ 'startdate': 'Inicio',
+ 'planstartdate': 'Inicio Planificado',
+ 'cost': 'Coste',
+ 'enddate': 'Fin',
+ 'planenddate': 'Fin Planificado',
+ 'moreinfo': 'Más Información',
+ 'notes': 'Notas',
+ 'format': 'Formato',
+ 'hour': 'Hora',
+ 'day': 'Día',
+ 'week': 'Semana',
+ 'month': 'Mes',
+ 'quarter': 'Trimestre',
+ 'hours': 'Horas',
+ 'days': 'Días',
+ 'weeks': 'Semanas',
+ 'months': 'Meses',
+ 'quarters': 'Trimestres',
+ 'hr': 'h',
+ 'dy': 'Día',
+ 'wk': 'Sem.',
+ 'mth': 'Mes',
+ 'qtr': 'Trim.',
+ 'hrs': 'h',
+ 'dys': 'Días',
+ 'wks': 'Sem.',
+ 'mths': 'Meses',
+ 'qtrs': 'Trim.',
+ 'tooltipLoading': 'Cargando...'
+};
+exports.es = es;
+var en = {
+ 'format': 'Format',
+ 'hour': 'Hour',
+ 'day': 'Day',
+ 'week': 'Week',
+ 'month': 'Month',
+ 'quarter': 'Quarter',
+ 'hours': 'Hours',
+ 'days': 'Days',
+ 'weeks': 'Weeks',
+ 'months': 'Months',
+ 'quarters': 'Quarters',
+ 'hr': 'Hr',
+ 'dy': 'Day',
+ 'wk': 'Wk',
+ 'mth': 'Mth',
+ 'qtr': 'Qtr',
+ 'hrs': 'Hrs',
+ 'dys': 'Days',
+ 'wks': 'Wks',
+ 'mths': 'Mths',
+ 'qtrs': 'Qtrs',
+ 'resource': 'Resource',
+ 'duration': 'Duration',
+ 'comp': '% Comp.',
+ 'completion': 'Completion',
+ 'startdate': 'Start Date',
+ 'planstartdate': 'Plan Start Date',
+ 'enddate': 'End Date',
+ 'planenddate': 'Plan End Date',
+ 'cost': 'Cost',
+ 'moreinfo': 'More Information',
+ 'notes': 'Notes',
+ 'january': 'January',
+ 'february': 'February',
+ 'march': 'March',
+ 'april': 'April',
+ 'maylong': 'May',
+ 'june': 'June',
+ 'july': 'July',
+ 'august': 'August',
+ 'september': 'September',
+ 'october': 'October',
+ 'november': 'November',
+ 'december': 'December',
+ 'jan': 'Jan',
+ 'feb': 'Feb',
+ 'mar': 'Mar',
+ 'apr': 'Apr',
+ 'may': 'May',
+ 'jun': 'Jun',
+ 'jul': 'Jul',
+ 'aug': 'Aug',
+ 'sep': 'Sep',
+ 'oct': 'Oct',
+ 'nov': 'Nov',
+ 'dec': 'Dec',
+ 'sunday': 'Sunday',
+ 'monday': 'Monday',
+ 'tuesday': 'Tuesday',
+ 'wednesday': 'Wednesday',
+ 'thursday': 'Thursday',
+ 'friday': 'Friday',
+ 'saturday': 'Saturday',
+ 'sun': 'Sun',
+ 'mon': 'Mon',
+ 'tue': 'Tue',
+ 'wed': 'Wed',
+ 'thu': 'Thu',
+ 'fri': 'Fri',
+ 'sat': 'Sat',
+ 'tooltipLoading': 'Loading...'
+};
+exports.en = en;
+var de = {
+ 'format': 'Ansicht',
+ 'hour': 'Stunde',
+ 'day': 'Tag',
+ 'week': 'Woche',
+ 'month': 'Monat',
+ 'quarter': 'Quartal',
+ 'hours': 'Stunden',
+ 'days': 'Tage',
+ 'weeks': 'Wochen',
+ 'months': 'Monate',
+ 'quarters': 'Quartale',
+ 'hr': 'h',
+ 'dy': 'T',
+ 'wk': 'W',
+ 'mth': 'M',
+ 'qtr': 'Q',
+ 'hrs': 'Std',
+ 'dys': 'Tage',
+ 'wks': 'Wochen',
+ 'mths': 'Monate',
+ 'qtrs': 'Quartal',
+ 'resource': 'Resource',
+ 'duration': 'Dauer',
+ 'comp': '%Fertig',
+ 'completion': 'Fertigstellung',
+ 'startdate': 'Erste Buchu',
+ 'planstartdate': 'Erste Buchu Plan',
+ 'enddate': 'Letzte Buchung',
+ 'planenddate': 'Plan Letzte Buchung',
+ 'cost': 'Cost',
+ 'moreinfo': 'Weitere Infos',
+ 'notes': 'Anmerkung',
+ 'january': 'Jänner',
+ 'february': 'Februar',
+ 'march': 'März',
+ 'april': 'April',
+ 'maylong': 'Mai',
+ 'june': 'Juni',
+ 'july': 'Juli',
+ 'august': 'August',
+ 'september': 'September',
+ 'october': 'Oktober',
+ 'november': 'November',
+ 'december': 'Dezember',
+ 'jan': 'Jan',
+ 'feb': 'Feb',
+ 'mar': 'Mar',
+ 'apr': 'Apr',
+ 'may': 'Mai',
+ 'jun': 'Jun',
+ 'jul': 'Jul',
+ 'aug': 'Aug',
+ 'sep': 'Sep',
+ 'oct': 'Okt',
+ 'nov': 'Nov',
+ 'dec': 'Dez',
+ 'sunday': 'Sonntag',
+ 'monday': 'Montag',
+ 'tuesday': 'Dienstag',
+ 'wednesday': 'Mittwoch',
+ 'thursday': 'Donnerstag',
+ 'friday': 'Freitag',
+ 'saturday': 'Samstag',
+ 'sun': 'So',
+ 'mon': 'Mo', 'tue': 'Di', 'wed': 'Mi', 'thu': 'Do', 'fri': 'Fr', 'sat': 'Sa'
+};
+exports.de = de;
+var pt = {
+ 'hours': 'Horas',
+ 'days': 'Dias',
+ 'weeks': 'Weeks',
+ 'months': 'Months',
+ 'quarters': 'Quarters',
+ 'format': 'Formato',
+ 'hour': 'Hora',
+ 'day': 'Dia',
+ 'week': 'Semana',
+ 'month': 'Mês',
+ 'quarter': 'Trimestre',
+ 'hr': 'hr',
+ 'dy': 'dia',
+ 'wk': 'sem.',
+ 'mth': 'mês',
+ 'qtr': 'qtr',
+ 'hrs': 'hrs',
+ 'dys': 'dias',
+ 'wks': 'sem.',
+ 'mths': 'meses',
+ 'qtrs': 'qtrs',
+ 'completion': 'Terminado',
+ 'comp': '% Completado',
+ 'moreinfo': 'Mais informações',
+ 'notes': 'Notas',
+ 'resource': 'Responsável',
+ 'duration': 'Duração',
+ 'startdate': 'Data inicial',
+ 'planstartdate': 'Plan Data inicial',
+ 'enddate': 'Data final',
+ 'planenddate': 'Plan Data final',
+ 'cost': 'Custo',
+ 'jan': 'Jan',
+ 'feb': 'Fev',
+ 'mar': 'Mar',
+ 'apr': 'Abr',
+ 'may': 'Mai',
+ 'jun': 'Jun',
+ 'jul': 'Jul',
+ 'aug': 'Ago',
+ 'sep': 'Set',
+ 'oct': 'Out',
+ 'nov': 'Nov',
+ 'dec': 'Dez',
+ 'january': 'Janeiro',
+ 'february': 'Fevereiro',
+ 'march': 'Março',
+ 'april': 'Abril',
+ 'maylong': 'Maio',
+ 'june': 'Junho',
+ 'july': 'Julho',
+ 'august': 'Agosto',
+ 'september': 'Setembro',
+ 'october': 'Outubro',
+ 'november': 'Novembro',
+ 'december': 'Dezembro',
+ 'sun': 'Dom',
+ 'mon': 'Seg',
+ 'tue': 'Ter',
+ 'wed': 'Qua',
+ 'thu': 'Qui',
+ 'fri': 'Sex',
+ 'sat': 'Sab'
+};
+exports.pt = pt;
+var ru = {
+ 'january': 'Январь',
+ 'february': 'Февраль',
+ 'march': 'Март',
+ 'april': 'Апрель',
+ 'maylong': 'Май',
+ 'june': 'Июнь',
+ 'july': 'Июль',
+ 'august': 'Август', 'september': 'Сентябрь',
+ 'october': 'Октябрь',
+ 'november': 'Ноябрь',
+ 'december': 'Декабрь',
+ 'jan': 'Янв',
+ 'feb': 'Фев',
+ 'mar': 'Мар',
+ 'apr': 'Апр',
+ 'may': 'Май',
+ 'jun': 'Июн',
+ 'jul': 'Июл',
+ 'aug': 'Авг',
+ 'sep': 'Сен',
+ 'oct': 'Окт',
+ 'nov': 'Ноя',
+ 'dec': 'Дек',
+ 'sunday': 'Воскресенье',
+ 'monday': 'Понедельник',
+ 'tuesday': 'Вторник',
+ 'wednesday': 'Среда',
+ 'thursday': 'Четверг',
+ 'friday': 'Пятница',
+ 'saturday': 'Суббота',
+ 'sun': ' Вс',
+ 'mon': ' Пн',
+ 'tue': ' Вт',
+ 'wed': ' Ср',
+ 'thu': ' Чт',
+ 'fri': ' Пт',
+ 'sat': ' Сб',
+ 'resource': 'Ресурс',
+ 'duration': 'Длительность',
+ 'comp': '% выполнения',
+ 'completion': 'Выполнено',
+ 'startdate': 'Нач. дата',
+ 'planstartdate': 'Plan Нач. дата',
+ 'enddate': 'Кон. дата',
+ 'planenddate': 'Plan Кон. дата',
+ 'cost': 'Cost',
+ 'moreinfo': 'Детали',
+ 'notes': 'Заметки',
+ 'format': 'Формат',
+ 'hour': 'Час',
+ 'day': 'День',
+ 'week': 'Неделя',
+ 'month': 'Месяц',
+ 'quarter': 'Кварт',
+ 'hours': 'Часов',
+ 'days': 'Дней',
+ 'weeks': 'Недель',
+ 'months': 'Месяцев',
+ 'quarters': 'Кварталов',
+ 'hr': 'ч.',
+ 'dy': 'дн.',
+ 'wk': 'нед.',
+ 'mth': 'мес.',
+ 'qtr': 'кв.',
+ 'hrs': 'ч.',
+ 'dys': 'дн.',
+ 'wks': 'нед.',
+ 'mths': 'мес.',
+ 'qtrs': 'кв.',
+ 'tooltipLoading': 'Загрузка...'
+};
+exports.ru = ru;
+var fr = {
+ // Mois : http://bdl.oqlf.gouv.qc.ca/bdl/gabarit_bdl.asp?id=3619
+ // Jours : http://bdl.oqlf.gouv.qc.ca/bdl/gabarit_bdl.asp?id=3617
+ 'january': 'Janvier',
+ 'february': 'Février',
+ 'march': 'Mars',
+ 'april': 'Avril',
+ 'maylong': 'Mai',
+ 'june': 'Juin',
+ 'july': 'Juillet',
+ 'august': 'Août',
+ 'september': 'Septembre',
+ 'october': 'Octobre',
+ 'november': 'Novembre',
+ 'december': 'Décembre',
+ 'jan': 'Janv',
+ 'feb': 'Févr',
+ 'mar': 'Mars',
+ 'apr': 'Avr',
+ 'may': 'Mai',
+ 'jun': 'Juin',
+ 'jul': 'Juil',
+ 'aug': 'Août',
+ 'sep': 'Sept',
+ 'oct': 'Oct',
+ 'nov': 'Nov',
+ 'dec': 'Déc',
+ 'sunday': 'Dimanche',
+ 'monday': 'Lundi',
+ 'tuesday': 'Mardi',
+ 'wednesday': 'Mercredi',
+ 'thursday': 'Jeudi',
+ 'friday': 'Vendredi',
+ 'saturday': 'Samedi',
+ 'sun': 'Dim',
+ 'mon': 'Lun',
+ 'tue': 'Mar',
+ 'wed': 'Mer',
+ 'thu': 'Jeu',
+ 'fri': 'Ven',
+ 'sat': 'Sam',
+ 'resource': 'Ressource',
+ 'duration': 'Durée',
+ 'comp': '% Term.',
+ 'completion': 'Terminé',
+ 'startdate': 'Début',
+ 'planstartdate': 'Plan Début',
+ 'enddate': 'Fin',
+ 'planenddate': 'Plan Fin',
+ 'cost': 'Cost',
+ 'moreinfo': "Plus d'informations",
+ 'notes': 'Notes',
+ 'format': 'Format',
+ 'hour': 'Heure',
+ 'day': 'Jour',
+ 'week': 'Semaine',
+ 'month': 'Mois',
+ 'quarter': 'Trimestre',
+ 'hours': 'Heures',
+ 'days': 'Jours',
+ 'weeks': 'Semaines',
+ 'months': 'Mois',
+ 'quarters': 'Trimestres',
+ 'hr': 'h',
+ 'dy': 'j',
+ 'wk': 'sem',
+ 'mth': 'mois',
+ 'qtr': 'tri',
+ 'hrs': 'h',
+ 'dys': 'j',
+ 'wks': 'sem',
+ 'mths': 'mois',
+ 'qtrs': 'tri'
+};
+exports.fr = fr;
+var cn = {
+ 'january': '一月',
+ 'february': '二月',
+ 'march': '三月',
+ 'april': '四月',
+ 'maylong': '五月',
+ 'june': '六月',
+ 'july': '七月',
+ 'august': '八月',
+ 'september': '九月',
+ 'october': '十月',
+ 'november': '十一月',
+ 'december': '十二月',
+ 'jan': '一月',
+ 'feb': '二月',
+ 'mar': '三月',
+ 'apr': '四月',
+ 'may': '五月',
+ 'jun': '六月',
+ 'jul': '七月',
+ 'aug': '八月',
+ 'sep': '九月',
+ 'oct': '十月',
+ 'nov': '十一月',
+ 'dec': '十二月',
+ 'sunday': '星期日',
+ 'monday': '星期一',
+ 'tuesday': '星期二',
+ 'wednesday': '星期三',
+ 'thursday': '星期四',
+ 'friday': '星期五',
+ 'saturday': '星期六',
+ 'sun': '星期日',
+ 'mon': '星期一',
+ 'tue': '星期二',
+ 'wed': '星期三',
+ 'thu': '星期四',
+ 'fri': '星期五',
+ 'sat': '星期六',
+ 'resource': '資源',
+ 'duration': '時程',
+ 'comp': '達成率',
+ 'completion': '達成',
+ 'startdate': '起始日期',
+ 'planstartdate': '計劃起始日期',
+ 'enddate': '截止日期',
+ 'planenddate': '計劃截止日期',
+ 'cost': '成本',
+ 'moreinfo': "更多資訊",
+ 'notes': '備註',
+ 'format': '格式',
+ 'hour': '時',
+ 'day': '日',
+ 'week': '星期',
+ 'month': '月',
+ 'quarter': '季',
+ 'hours': '小時',
+ 'days': '天',
+ 'weeks': '週',
+ 'months': '月',
+ 'quarters': '季',
+ 'hr': '小時',
+ 'dy': '天',
+ 'wk': '週',
+ 'mth': '月',
+ 'qtr': '季',
+ 'hrs': '小時',
+ 'dys': '天',
+ 'wks': '週',
+ 'mths': '月',
+ 'qtrs': '季'
+};
+exports.cn = cn;
+var sv = {
+ 'format': 'Filter',
+ 'hour': 'Timme',
+ 'day': 'Dag',
+ 'week': 'Vecka',
+ 'month': 'Månad',
+ 'quarter': 'Kvartal',
+ 'hours': 'Timmar',
+ 'days': 'Dagar',
+ 'weeks': 'Veckor',
+ 'months': 'Månader',
+ 'quarters': 'Kvartal',
+ 'hr': 'Timme',
+ 'dy': 'Dag',
+ 'wk': 'Vecka',
+ 'mth': 'Månad',
+ 'qtr': 'Q',
+ 'hrs': 'Timmar',
+ 'dys': 'Dagar',
+ 'wks': 'Veckor',
+ 'mths': 'Månader',
+ 'qtrs': 'Q',
+ 'resource': 'Resurs',
+ 'duration': 'Tidsåtgång',
+ 'comp': '% klart',
+ 'completion': 'Klart',
+ 'startdate': 'Startdatum',
+ 'planstartdate': 'Planerad startdatum',
+ 'enddate': 'Slutdatum',
+ 'planenddate': 'Planerad slutdatum',
+ 'cost': 'Kostnad',
+ 'moreinfo': 'Mer Information',
+ 'notes': 'Notes',
+ 'january': 'januari',
+ 'february': 'februari',
+ 'march': 'mars',
+ 'april': 'april',
+ 'maylong': 'maj',
+ 'june': 'juni',
+ 'july': 'juli',
+ 'august': 'augusti',
+ 'september': 'september',
+ 'october': 'oktober',
+ 'november': 'november',
+ 'december': 'december',
+ 'jan': 'jan',
+ 'feb': 'feb',
+ 'mar': 'mar',
+ 'apr': 'apr',
+ 'may': 'maj',
+ 'jun': 'jun',
+ 'jul': 'jul',
+ 'aug': 'aug',
+ 'sep': 'sep',
+ 'oct': 'okt',
+ 'nov': 'nov',
+ 'dec': 'dec',
+ 'sunday': 'söndag',
+ 'monday': 'måndag',
+ 'tuesday': 'tisdag',
+ 'wednesday': 'onsdag',
+ 'thursday': 'torsdag',
+ 'friday': 'fredag',
+ 'saturday': 'lördag',
+ 'sun': 'sön',
+ 'mon': 'mån',
+ 'tue': 'tis',
+ 'wed': 'ons',
+ 'thu': 'tor',
+ 'fri': 'fre',
+ 'sat': 'lör'
+};
+exports.sv = sv;
+var nl = {
+ 'format': 'Format',
+ 'hour': 'Uur',
+ 'day': 'Dag',
+ 'week': 'Week',
+ 'month': 'Maand',
+ 'quarter': 'Kwartaal',
+ 'hours': 'Uren',
+ 'days': 'Dagen',
+ 'weeks': 'Weken',
+ 'months': 'Maanden',
+ 'quarters': 'Kwartalen',
+ 'hr': 'uur',
+ 'dy': 'dag',
+ 'wk': 'wk',
+ 'mth': 'mnd',
+ 'qtr': 'kw',
+ 'hrs': 'uren',
+ 'dys': 'dagen',
+ 'wks': 'weken',
+ 'mths': 'maanden',
+ 'qtrs': 'kwartalen',
+ 'resource': 'Resource',
+ 'duration': 'Doorlooptijd',
+ 'comp': '% gereed',
+ 'completion': 'Gereed',
+ 'startdate': 'Startdatum',
+ 'planstartdate': 'Geplande startdatum',
+ 'enddate': 'Einddatum',
+ 'planenddate': 'Geplande einddatum',
+ 'cost': 'Kosten',
+ 'moreinfo': 'Meer informatie',
+ 'notes': 'Notities',
+ 'january': 'januari',
+ 'february': 'februari',
+ 'march': 'maart',
+ 'april': 'april',
+ 'maylong': 'mei',
+ 'june': 'juni',
+ 'july': 'juli',
+ 'august': 'augustus',
+ 'september': 'september',
+ 'october': 'oktober',
+ 'november': 'november',
+ 'december': 'december',
+ 'jan': 'jan',
+ 'feb': 'feb',
+ 'mar': 'mrt',
+ 'apr': 'apr',
+ 'may': 'mei',
+ 'jun': 'jun',
+ 'jul': 'jul',
+ 'aug': 'aug',
+ 'sep': 'sep',
+ 'oct': 'okt',
+ 'nov': 'nov',
+ 'dec': 'dec',
+ 'sunday': 'zondag',
+ 'monday': 'maandag',
+ 'tuesday': 'dinsdag',
+ 'wednesday': 'woensdag',
+ 'thursday': 'donderdag',
+ 'friday': 'vrijdag',
+ 'saturday': 'zaterdag',
+ 'sun': 'zo',
+ 'mon': 'ma',
+ 'tue': 'di',
+ 'wed': 'wo',
+ 'thu': 'do',
+ 'fri': 'vr',
+ 'sat': 'za'
+};
+exports.nl = nl;
+var id = {
+ 'format': 'Format',
+ 'hour': 'Jam',
+ 'day': 'Hari',
+ 'week': 'Minggu',
+ 'month': 'Bulan',
+ 'quarter': 'Kuartal',
+ 'hours': 'Jam',
+ 'days': 'Hari',
+ 'weeks': 'Minggu',
+ 'months': 'Bulan',
+ 'quarters': 'Kuartal',
+ 'hr': 'Jam',
+ 'dy': 'Hari',
+ 'wk': 'Min',
+ 'mth': 'Bln',
+ 'qtr': 'Krtl',
+ 'hrs': 'Jam',
+ 'dys': 'Hari',
+ 'wks': 'Min',
+ 'mths': 'Bln',
+ 'qtrs': 'Krtl',
+ 'resource': 'Sumber Daya',
+ 'duration': 'Durasi',
+ 'comp': '% Penyelesaian',
+ 'completion': 'Penyelesaian',
+ 'startdate': 'Tanggal Mulai',
+ 'planstartdate': 'Perencanaan Tanggal Mulai',
+ 'enddate': 'Tanggal Akhir',
+ 'planenddate': 'Perencanaan Tanggal Akhir',
+ 'cost': 'Biaya',
+ 'moreinfo': 'Informasi Lebih Lanjut',
+ 'notes': 'Catatan',
+ 'january': 'Januari',
+ 'february': 'Februari',
+ 'march': 'Maret',
+ 'april': 'April',
+ 'maylong': 'Mei',
+ 'june': 'Juni',
+ 'july': 'Juli',
+ 'august': 'Agustus',
+ 'september': 'September',
+ 'october': 'Oktober',
+ 'november': 'November',
+ 'december': 'Desember',
+ 'jan': 'Jan',
+ 'feb': 'Feb',
+ 'mar': 'Mar',
+ 'apr': 'Apr',
+ 'may': 'Mei',
+ 'jun': 'Jun',
+ 'jul': 'Jul',
+ 'aug': 'Agu',
+ 'sep': 'Sep',
+ 'oct': 'Okt',
+ 'nov': 'Nov',
+ 'dec': 'Des',
+ 'sunday': 'Minggu',
+ 'monday': 'Senin',
+ 'tuesday': 'Selasa',
+ 'wednesday': 'Rabu',
+ 'thursday': 'Kamis',
+ 'friday': 'Jumat',
+ 'saturday': 'Sabtu',
+ 'sun': 'Min',
+ 'mon': 'Sen',
+ 'tue': 'Sel',
+ 'wed': 'Rab',
+ 'thu': 'Kam',
+ 'fri': 'Jum',
+ 'sat': 'Sab'
+};
+exports.id = id;
+var tr = {
+ 'format': 'Biçim',
+ 'hour': 'Saat',
+ 'day': 'Gün',
+ 'week': 'Hafta',
+ 'month': 'Ay',
+ 'quarter': 'Çeyrek Yıl',
+ 'hours': 'Saat',
+ 'days': 'Gün',
+ 'weeks': 'Hafta',
+ 'months': 'Ay',
+ 'quarters': 'Çeyrek Yıl',
+ 'hr': 'Saat',
+ 'dy': 'Gün',
+ 'wk': 'Hft',
+ 'mth': 'Ay',
+ 'qtr': 'Çyrk',
+ 'hrs': 'Saat',
+ 'dys': 'Gün',
+ 'wks': 'Hft',
+ 'mths': 'Ay',
+ 'qtrs': 'Çyrk',
+ 'resource': 'Kaynak',
+ 'duration': 'Süre',
+ 'comp': '% Tamamlanma.',
+ 'completion': 'Tamamlanma',
+ 'startdate': 'Başlangıç Tarihi',
+ 'planstartdate': 'Plan Başlama Tarihi',
+ 'enddate': 'Bitiş Tarihi',
+ 'planenddate': 'Plan Bitiş Tarihi',
+ 'cost': 'Tutar',
+ 'moreinfo': 'Daha Fazla Bilgi',
+ 'notes': 'Notlar',
+ 'january': 'Ocak',
+ 'february': 'Şubat',
+ 'march': 'Mart',
+ 'april': 'Nisan',
+ 'maylong': 'Mayıs',
+ 'june': 'Haziran',
+ 'july': 'Temmuz',
+ 'august': 'Ağustos',
+ 'september': 'Eylül',
+ 'october': 'Ekim',
+ 'november': 'Kasım',
+ 'december': 'Aralık',
+ 'jan': 'Oca',
+ 'feb': 'Şub',
+ 'mar': 'Mar',
+ 'apr': 'Nis',
+ 'may': 'May',
+ 'jun': 'Haz',
+ 'jul': 'Tem',
+ 'aug': 'Ağu',
+ 'sep': 'Eyl',
+ 'oct': 'Eki',
+ 'nov': 'Kas',
+ 'dec': 'Ara',
+ 'sunday': 'Pazar',
+ 'monday': 'Pazartesi',
+ 'tuesday': 'Salı',
+ 'wednesday': 'Çarşamba',
+ 'thursday': 'Perşembe',
+ 'friday': 'Cuma',
+ 'saturday': 'Cumartesi',
+ 'sun': 'Paz',
+ 'mon': 'Pzt',
+ 'tue': 'Sal',
+ 'wed': 'Çrş',
+ 'thu': 'Prş',
+ 'fri': 'Cum',
+ 'sat': 'Cmt'
+};
+exports.tr = tr;
+var ja = {
+ 'format': 'タイムライン表示',
+ 'hour': '時',
+ 'day': '日',
+ 'week': '週',
+ 'month': '月',
+ 'quarter': '四半期',
+ 'hours': '時間',
+ 'days': '日間',
+ 'weeks': '週間',
+ 'months': '月間',
+ 'quarters': '四半期',
+ 'hr': '時',
+ 'dy': '日',
+ 'wk': '週',
+ 'mth': '月',
+ 'qtr': '四',
+ 'hrs': '時間',
+ 'dys': '日間',
+ 'wks': '週間',
+ 'mths': '月間',
+ 'qtrs': '四半期',
+ 'resource': 'リソース',
+ 'duration': '期間',
+ 'comp': '進捗率',
+ 'completion': '進捗率',
+ 'startdate': '開始日',
+ 'planstartdate': '予定開始日',
+ 'enddate': '期日',
+ 'planenddate': '予定期日',
+ 'cost': 'コスト',
+ 'moreinfo': '詳細',
+ 'notes': 'ノート',
+ 'january': '1月',
+ 'february': '2月',
+ 'march': '3月',
+ 'april': '4月',
+ 'maylong': '5月',
+ 'june': '6月',
+ 'july': '7月',
+ 'august': '8月',
+ 'september': '9月',
+ 'october': '10月',
+ 'november': '11月',
+ 'december': '12月',
+ 'jan': '1月',
+ 'feb': '2月',
+ 'mar': '3月',
+ 'apr': '4月',
+ 'may': '5月',
+ 'jun': '6月',
+ 'jul': '7月',
+ 'aug': '8月',
+ 'sep': '9月',
+ 'oct': '10月',
+ 'nov': '11月',
+ 'dec': '12月',
+ 'sunday': '日曜日',
+ 'monday': '月曜日',
+ 'tuesday': '火曜日',
+ 'wednesday': '水曜日',
+ 'thursday': '木曜日',
+ 'friday': '金曜日',
+ 'saturday': '土曜日',
+ 'sun': '日',
+ 'mon': '月',
+ 'tue': '火',
+ 'wed': '水',
+ 'thu': '木',
+ 'fri': '金',
+ 'sat': '土',
+ 'tooltipLoading': 'ローディング中...'
+};
+exports.ja = ja;
+var cs = {
+ 'format': 'Zobrazení',
+ 'hour': 'Hodina',
+ 'day': 'Den',
+ 'week': 'Týden',
+ 'month': 'Měsíc',
+ 'quarter': 'Kvartál',
+ 'hours': 'Hodiny',
+ 'days': 'Dni',
+ 'weeks': 'Týdny',
+ 'months': 'Měsíce',
+ 'quarters': 'Kvartály',
+ 'hr': 'Ho',
+ 'dy': 'Den',
+ 'wk': 'Tyd',
+ 'mth': 'Měs',
+ 'qtr': 'Kvar',
+ 'hrs': 'Ho',
+ 'dys': 'Dni',
+ 'wks': 'Tyd',
+ 'mths': 'Měs',
+ 'qtrs': 'Kvar',
+ 'resource': 'Přiřazeno',
+ 'duration': 'Trvání',
+ 'comp': '% Hotovo',
+ 'completion': 'Hotovo',
+ 'startdate': 'Start',
+ 'planstartdate': 'Plánovaný start',
+ 'enddate': 'Konec',
+ 'planenddate': 'Plánovaný konec',
+ 'cost': 'Náklady',
+ 'moreinfo': 'Více informací',
+ 'notes': 'Poznámky',
+ 'january': 'Leden',
+ 'february': 'Únor',
+ 'march': 'Březen',
+ 'april': 'Duben',
+ 'maylong': 'Květen',
+ 'june': 'Červen',
+ 'july': 'Červenec',
+ 'august': 'Srpen',
+ 'september': 'Září',
+ 'october': 'Říjen',
+ 'november': 'Listopad',
+ 'december': 'Prosinec',
+ 'jan': 'Led',
+ 'feb': 'Úno',
+ 'mar': 'Bře',
+ 'apr': 'Dub',
+ 'may': 'Kvě',
+ 'jun': 'Čer',
+ 'jul': 'Čvc',
+ 'aug': 'Srp',
+ 'sep': 'Zář',
+ 'oct': 'Říj',
+ 'nov': 'Lis',
+ 'dec': 'Pro',
+ 'sunday': 'Neděle',
+ 'monday': 'Pondělí',
+ 'tuesday': 'Úterý',
+ 'wednesday': 'Středa',
+ 'thursday': 'Čtvrtek',
+ 'friday': 'Pátek',
+ 'saturday': 'Sobota',
+ 'sun': 'Ne',
+ 'mon': 'Po',
+ 'tue': 'Út',
+ 'wed': 'St',
+ 'thu': 'Čt',
+ 'fri': 'Pa',
+ 'sat': 'So',
+ 'tooltipLoading': 'Nahrávám...'
+};
+exports.cs = cs;
+var hu = {
+ 'format': 'Formátum',
+ 'hour': 'Óra',
+ 'day': 'Nap',
+ 'week': 'Hét',
+ 'month': 'Hónap',
+ 'quarter': 'Negyedév ',
+ 'hours': 'Órák',
+ 'days': 'Nap',
+ 'weeks': 'Hét',
+ 'months': 'Hónap',
+ 'quarters': 'Negyedév',
+ 'hr': 'Ó',
+ 'dy': 'Nap',
+ 'wk': 'Hét',
+ 'mth': 'Hó',
+ 'qtr': 'NÉ',
+ 'hrs': 'Óra',
+ 'dys': 'Nap',
+ 'wks': 'Hét',
+ 'mths': 'Hó',
+ 'qtrs': 'NÉ',
+ 'resource': 'Erőforrás',
+ 'duration': 'Időtartam',
+ 'comp': '% Kész',
+ 'completion': 'Elkészült',
+ 'startdate': 'Kezdés',
+ 'planstartdate': 'Tervezett kezdés',
+ 'enddate': 'Befejezés',
+ 'planenddate': 'Tervezett befejezés',
+ 'cost': 'Költség',
+ 'moreinfo': 'További információ',
+ 'notes': 'Jegyzetek',
+ 'january': 'Január',
+ 'february': 'Február',
+ 'march': 'Március',
+ 'april': 'Április',
+ 'maylong': 'Május',
+ 'june': 'Június',
+ 'july': 'Július',
+ 'august': 'Augusztus',
+ 'september': 'Szeptember',
+ 'october': 'Október',
+ 'november': 'November',
+ 'december': 'December',
+ 'jan': 'Jan',
+ 'feb': 'Feb',
+ 'mar': 'Már',
+ 'apr': 'Ápr',
+ 'may': 'Máj',
+ 'jun': 'Jún',
+ 'jul': 'Júl',
+ 'aug': 'Aug',
+ 'sep': 'Szep',
+ 'oct': 'Okt',
+ 'nov': 'Nov',
+ 'dec': 'Dec',
+ 'sunday': 'Vasárnap',
+ 'monday': 'Hétfő',
+ 'tuesday': 'Kedd',
+ 'wednesday': 'Szerda',
+ 'thursday': 'Csütörtök',
+ 'friday': 'Péntek',
+ 'saturday': 'Szombat',
+ 'sun': 'Vas',
+ 'mon': 'Hé',
+ 'tue': 'Ke',
+ 'wed': 'Sze',
+ 'thu': 'Csü',
+ 'fri': 'Pén',
+ 'sat': 'Szo',
+ 'tooltipLoading': 'Belöltés...'
+};
+exports.hu = hu;
+
+},{}],9:[function(require,module,exports){
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var date_utils_1 = require("./utils/date_utils");
+var draw_columns_1 = require("./draw_columns");
+exports.includeGetSet = function () {
+ /**
+ * SETTERS
+ */
+ this.setOptions = function (options) {
+ var keys = Object.keys(options);
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ var val = options[key];
+ if (key === 'vResources' || key === 'vColumnOrder') {
+ // ev = `this.set${key.substr(1)}(val)`;
+ this['set' + key.substr(1)](val);
+ }
+ else if (val instanceof Array) {
+ // ev = `this.set${key.substr(1)}(...val)`;
+ this['set' + key.substr(1)].apply(this, val);
+ }
+ else {
+ // ev = `this.set${key.substr(1)}(val)`;
+ this['set' + key.substr(1)](val);
+ }
+ }
+ };
+ this.setUseFade = function (pVal) { this.vUseFade = pVal; };
+ this.setUseMove = function (pVal) { this.vUseMove = pVal; };
+ this.setUseRowHlt = function (pVal) { this.vUseRowHlt = pVal; };
+ this.setUseToolTip = function (pVal) { this.vUseToolTip = pVal; };
+ this.setUseSort = function (pVal) { this.vUseSort = pVal; };
+ this.setUseSingleCell = function (pVal) { this.vUseSingleCell = pVal * 1; };
+ this.setFormatArr = function () {
+ var vValidFormats = 'hour day week month quarter';
+ this.vFormatArr = new Array();
+ for (var i = 0, j = 0; i < arguments.length; i++) {
+ if (vValidFormats.indexOf(arguments[i].toLowerCase()) != -1 && arguments[i].length > 1) {
+ this.vFormatArr[j++] = arguments[i].toLowerCase();
+ var vRegExp = new RegExp('(?:^|\s)' + arguments[i] + '(?!\S)', 'g');
+ vValidFormats = vValidFormats.replace(vRegExp, '');
+ }
+ }
+ };
+ this.setShowRes = function (pVal) { this.vShowRes = pVal; };
+ this.setShowDur = function (pVal) { this.vShowDur = pVal; };
+ this.setShowComp = function (pVal) { this.vShowComp = pVal; };
+ this.setShowStartDate = function (pVal) { this.vShowStartDate = pVal; };
+ this.setShowEndDate = function (pVal) { this.vShowEndDate = pVal; };
+ this.setShowPlanStartDate = function (pVal) { this.vShowPlanStartDate = pVal; };
+ this.setShowPlanEndDate = function (pVal) { this.vShowPlanEndDate = pVal; };
+ this.setShowCost = function (pVal) { this.vShowCost = pVal; };
+ this.setShowAddEntries = function (pVal) { this.vShowAddEntries = pVal; };
+ this.setShowTaskInfoRes = function (pVal) { this.vShowTaskInfoRes = pVal; };
+ this.setShowTaskInfoDur = function (pVal) { this.vShowTaskInfoDur = pVal; };
+ this.setShowTaskInfoComp = function (pVal) { this.vShowTaskInfoComp = pVal; };
+ this.setShowTaskInfoStartDate = function (pVal) { this.vShowTaskInfoStartDate = pVal; };
+ this.setShowTaskInfoEndDate = function (pVal) { this.vShowTaskInfoEndDate = pVal; };
+ this.setShowTaskInfoNotes = function (pVal) { this.vShowTaskInfoNotes = pVal; };
+ this.setShowTaskInfoLink = function (pVal) { this.vShowTaskInfoLink = pVal; };
+ this.setShowEndWeekDate = function (pVal) { this.vShowEndWeekDate = pVal; };
+ this.setShowWeekends = function (pVal) { this.vShowWeekends = pVal; };
+ this.setShowSelector = function () {
+ var vValidSelectors = 'top bottom';
+ this.vShowSelector = new Array();
+ for (var i = 0, j = 0; i < arguments.length; i++) {
+ if (vValidSelectors.indexOf(arguments[i].toLowerCase()) != -1 && arguments[i].length > 1) {
+ this.vShowSelector[j++] = arguments[i].toLowerCase();
+ var vRegExp = new RegExp('(?:^|\s)' + arguments[i] + '(?!\S)', 'g');
+ vValidSelectors = vValidSelectors.replace(vRegExp, '');
+ }
+ }
+ };
+ this.setShowDeps = function (pVal) { this.vShowDeps = pVal; };
+ this.setDateInputFormat = function (pVal) { this.vDateInputFormat = pVal; };
+ this.setDateTaskTableDisplayFormat = function (pVal) { this.vDateTaskTableDisplayFormat = date_utils_1.parseDateFormatStr(pVal); };
+ this.setDateTaskDisplayFormat = function (pVal) { this.vDateTaskDisplayFormat = date_utils_1.parseDateFormatStr(pVal); };
+ this.setHourMajorDateDisplayFormat = function (pVal) { this.vHourMajorDateDisplayFormat = date_utils_1.parseDateFormatStr(pVal); };
+ this.setHourMinorDateDisplayFormat = function (pVal) { this.vHourMinorDateDisplayFormat = date_utils_1.parseDateFormatStr(pVal); };
+ this.setDayMajorDateDisplayFormat = function (pVal) { this.vDayMajorDateDisplayFormat = date_utils_1.parseDateFormatStr(pVal); };
+ this.setDayMinorDateDisplayFormat = function (pVal) { this.vDayMinorDateDisplayFormat = date_utils_1.parseDateFormatStr(pVal); };
+ this.setWeekMajorDateDisplayFormat = function (pVal) { this.vWeekMajorDateDisplayFormat = date_utils_1.parseDateFormatStr(pVal); };
+ this.setWeekMinorDateDisplayFormat = function (pVal) { this.vWeekMinorDateDisplayFormat = date_utils_1.parseDateFormatStr(pVal); };
+ this.setMonthMajorDateDisplayFormat = function (pVal) { this.vMonthMajorDateDisplayFormat = date_utils_1.parseDateFormatStr(pVal); };
+ this.setMonthMinorDateDisplayFormat = function (pVal) { this.vMonthMinorDateDisplayFormat = date_utils_1.parseDateFormatStr(pVal); };
+ this.setQuarterMajorDateDisplayFormat = function (pVal) { this.vQuarterMajorDateDisplayFormat = date_utils_1.parseDateFormatStr(pVal); };
+ this.setQuarterMinorDateDisplayFormat = function (pVal) { this.vQuarterMinorDateDisplayFormat = date_utils_1.parseDateFormatStr(pVal); };
+ this.setCaptionType = function (pType) { this.vCaptionType = pType; };
+ this.setFormat = function (pFormat) {
+ this.vFormat = pFormat;
+ this.Draw();
+ };
+ this.setWorkingDays = function (workingDays) { this.vWorkingDays = workingDays; };
+ this.setMinGpLen = function (pMinGpLen) { this.vMinGpLen = pMinGpLen; };
+ this.setScrollTo = function (pDate) { this.vScrollTo = pDate; };
+ this.setHourColWidth = function (pWidth) { this.vHourColWidth = pWidth; };
+ this.setDayColWidth = function (pWidth) { this.vDayColWidth = pWidth; };
+ this.setWeekColWidth = function (pWidth) { this.vWeekColWidth = pWidth; };
+ this.setMonthColWidth = function (pWidth) { this.vMonthColWidth = pWidth; };
+ this.setQuarterColWidth = function (pWidth) { this.vQuarterColWidth = pWidth; };
+ this.setRowHeight = function (pHeight) { this.vRowHeight = pHeight; };
+ this.setLang = function (pLang) { if (this.vLangs[pLang])
+ this.vLang = pLang; };
+ this.setChartBody = function (pDiv) { if (typeof HTMLDivElement !== 'function' || pDiv instanceof HTMLDivElement)
+ this.vChartBody = pDiv; };
+ this.setChartHead = function (pDiv) { if (typeof HTMLDivElement !== 'function' || pDiv instanceof HTMLDivElement)
+ this.vChartHead = pDiv; };
+ this.setListBody = function (pDiv) { if (typeof HTMLDivElement !== 'function' || pDiv instanceof HTMLDivElement)
+ this.vListBody = pDiv; };
+ this.setChartTable = function (pTable) { if (typeof HTMLTableElement !== 'function' || pTable instanceof HTMLTableElement)
+ this.vChartTable = pTable; };
+ this.setLines = function (pDiv) { if (typeof HTMLDivElement !== 'function' || pDiv instanceof HTMLDivElement)
+ this.vLines = pDiv; };
+ this.setLineOptions = function (lineOptions) { this.vLineOptions = lineOptions; };
+ this.setTimer = function (pVal) { this.vTimer = pVal * 1; };
+ this.setTooltipDelay = function (pVal) { this.vTooltipDelay = pVal * 1; };
+ this.setTooltipTemplate = function (pVal) { this.vTooltipTemplate = pVal; };
+ this.setMinDate = function (pVal) { this.vMinDate = pVal; };
+ this.setMaxDate = function (pVal) { this.vMaxDate = pVal; };
+ this.addLang = function (pLang, pVals) {
+ if (!this.vLangs[pLang]) {
+ this.vLangs[pLang] = new Object();
+ for (var vKey in this.vLangs['en'])
+ this.vLangs[pLang][vKey] = (pVals[vKey]) ? document.createTextNode(pVals[vKey]).data : this.vLangs['en'][vKey];
+ }
+ };
+ this.setTotalHeight = function (pVal) { this.vTotalHeight = pVal; };
+ this.setEvents = function (pEvents) { this.vEvents = pEvents; };
+ this.setEventsChange = function (pEventsChange) { this.vEventsChange = pEventsChange; };
+ this.setEventClickRow = function (fn) { this.vEventClickRow = fn; };
+ this.setResources = function (resources) { this.vResources = resources; };
+ this.setAdditionalHeaders = function (headers) { this.vAdditionalHeaders = headers; };
+ this.setColumnOrder = function (order) { this.vColumnOrder = order; };
+ this.setEditable = function (editable) { this.vEditable = editable; };
+ this.setDebug = function (debug) { this.vDebug = debug; };
+ /**
+ * GETTERS
+ */
+ this.getDivId = function () { return this.vDivId; };
+ this.getUseFade = function () { return this.vUseFade; };
+ this.getUseMove = function () { return this.vUseMove; };
+ this.getUseRowHlt = function () { return this.vUseRowHlt; };
+ this.getUseToolTip = function () { return this.vUseToolTip; };
+ this.getUseSort = function () { return this.vUseSort; };
+ this.getUseSingleCell = function () { return this.vUseSingleCell; };
+ this.getFormatArr = function () { return this.vFormatArr; };
+ this.getShowRes = function () { return this.vShowRes; };
+ this.getShowDur = function () { return this.vShowDur; };
+ this.getShowComp = function () { return this.vShowComp; };
+ this.getShowStartDate = function () { return this.vShowStartDate; };
+ this.getShowEndDate = function () { return this.vShowEndDate; };
+ this.getShowPlanStartDate = function () { return this.vShowPlanStartDate; };
+ this.getShowPlanEndDate = function () { return this.vShowPlanEndDate; };
+ this.getShowCost = function () { return this.vShowCost; };
+ this.getShowAddEntries = function () { return this.vShowAddEntries; };
+ this.getShowTaskInfoRes = function () { return this.vShowTaskInfoRes; };
+ this.getShowTaskInfoDur = function () { return this.vShowTaskInfoDur; };
+ this.getShowTaskInfoComp = function () { return this.vShowTaskInfoComp; };
+ this.getShowTaskInfoStartDate = function () { return this.vShowTaskInfoStartDate; };
+ this.getShowTaskInfoEndDate = function () { return this.vShowTaskInfoEndDate; };
+ this.getShowTaskInfoNotes = function () { return this.vShowTaskInfoNotes; };
+ this.getShowTaskInfoLink = function () { return this.vShowTaskInfoLink; };
+ this.getShowEndWeekDate = function () { return this.vShowEndWeekDate; };
+ this.getShowWeekends = function () { return this.vShowWeekends; };
+ this.getShowSelector = function () { return this.vShowSelector; };
+ this.getShowDeps = function () { return this.vShowDeps; };
+ this.getDateInputFormat = function () { return this.vDateInputFormat; };
+ this.getDateTaskTableDisplayFormat = function () { return this.vDateTaskTableDisplayFormat; };
+ this.getDateTaskDisplayFormat = function () { return this.vDateTaskDisplayFormat; };
+ this.getHourMajorDateDisplayFormat = function () { return this.vHourMajorDateDisplayFormat; };
+ this.getHourMinorDateDisplayFormat = function () { return this.vHourMinorDateDisplayFormat; };
+ this.getDayMajorDateDisplayFormat = function () { return this.vDayMajorDateDisplayFormat; };
+ this.getDayMinorDateDisplayFormat = function () { return this.vDayMinorDateDisplayFormat; };
+ this.getWeekMajorDateDisplayFormat = function () { return this.vWeekMajorDateDisplayFormat; };
+ this.getWeekMinorDateDisplayFormat = function () { return this.vWeekMinorDateDisplayFormat; };
+ this.getMonthMajorDateDisplayFormat = function () { return this.vMonthMajorDateDisplayFormat; };
+ this.getMonthMinorDateDisplayFormat = function () { return this.vMonthMinorDateDisplayFormat; };
+ this.getQuarterMajorDateDisplayFormat = function () { return this.vQuarterMajorDateDisplayFormat; };
+ this.getQuarterMinorDateDisplayFormat = function () { return this.vQuarterMinorDateDisplayFormat; };
+ this.getCaptionType = function () { return this.vCaptionType; };
+ this.getMinGpLen = function () { return this.vMinGpLen; };
+ this.getScrollTo = function () { return this.vScrollTo; };
+ this.getHourColWidth = function () { return this.vHourColWidth; };
+ this.getDayColWidth = function () { return this.vDayColWidth; };
+ this.getWeekColWidth = function () { return this.vWeekColWidth; };
+ this.getMonthColWidth = function () { return this.vMonthColWidth; };
+ this.getQuarterColWidth = function () { return this.vQuarterColWidth; };
+ this.getRowHeight = function () { return this.vRowHeight; };
+ this.getChartBody = function () { return this.vChartBody; };
+ this.getChartHead = function () { return this.vChartHead; };
+ this.getListBody = function () { return this.vListBody; };
+ this.getChartTable = function () { return this.vChartTable; };
+ this.getLines = function () { return this.vLines; };
+ this.getTimer = function () { return this.vTimer; };
+ this.getMinDate = function () { return this.vMinDate; };
+ this.getMaxDate = function () { return this.vMaxDate; };
+ this.getTooltipDelay = function () { return this.vTooltipDelay; };
+ this.getList = function () { return this.vTaskList; };
+ this.getEventsClickCell = function () { return this.vEvents; };
+ this.getEventsChange = function () { return this.vEventsChange; };
+ this.getEventClickRow = function () { return this.vEventClickRow; };
+ this.getResources = function () { return this.vResources; };
+ this.getAdditionalHeaders = function () { return this.vAdditionalHeaders; };
+ this.getColumnOrder = function () { return this.vColumnOrder || draw_columns_1.COLUMN_ORDER; };
+};
+
+},{"./draw_columns":3,"./utils/date_utils":11}],10:[function(require,module,exports){
+"use strict";
+var __assign = (this && this.__assign) || function () {
+ __assign = Object.assign || function(t) {
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
+ s = arguments[i];
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
+ t[p] = s[p];
+ }
+ return t;
+ };
+ return __assign.apply(this, arguments);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+var general_utils_1 = require("./utils/general_utils");
+var draw_utils_1 = require("./utils/draw_utils");
+var date_utils_1 = require("./utils/date_utils");
+// function to open window to display task link
+exports.taskLink = function (pRef, pWidth, pHeight) {
+ var vWidth, vHeight;
+ if (pWidth)
+ vWidth = pWidth;
+ else
+ vWidth = 400;
+ if (pHeight)
+ vHeight = pHeight;
+ else
+ vHeight = 400;
+ window.open(pRef, 'newwin', 'height=' + vHeight + ',width=' + vWidth); // let OpenWindow =
+};
+exports.sortTasks = function (pList, pID, pIdx) {
+ if (pList.length < 2) {
+ return pIdx;
+ }
+ var sortIdx = pIdx;
+ var sortArr = new Array();
+ for (var i = 0; i < pList.length; i++) {
+ if (pList[i].getParent() == pID)
+ sortArr.push(pList[i]);
+ }
+ if (sortArr.length > 0) {
+ sortArr.sort(function (a, b) {
+ var i = a.getStart().getTime() - b.getStart().getTime();
+ if (i == 0)
+ i = a.getEnd().getTime() - b.getEnd().getTime();
+ if (i == 0)
+ return a.getID() - b.getID();
+ else
+ return i;
+ });
+ }
+ for (var j = 0; j < sortArr.length; j++) {
+ for (var i = 0; i < pList.length; i++) {
+ if (pList[i].getID() == sortArr[j].getID()) {
+ pList[i].setSortIdx(sortIdx++);
+ sortIdx = exports.sortTasks(pList, pList[i].getID(), sortIdx);
+ }
+ }
+ }
+ return sortIdx;
+};
+exports.TaskItemObject = function (object) {
+ var pDataObject = __assign({}, object);
+ general_utils_1.internalProperties.forEach(function (property) {
+ delete pDataObject[property];
+ });
+ return new exports.TaskItem(object.pID, object.pName, object.pStart, object.pEnd, object.pClass, object.pLink, object.pMile, object.pRes, object.pComp, object.pGroup, object.pParent, object.pOpen, object.pDepend, object.pCaption, object.pNotes, object.pGantt, object.pCost, object.pPlanStart, object.pPlanEnd, object.pDuration, object.pBarText, object);
+};
+exports.TaskItem = function (pID, pName, pStart, pEnd, pClass, pLink, pMile, pRes, pComp, pGroup, pParent, pOpen, pDepend, pCaption, pNotes, pGantt, pCost, pPlanStart, pPlanEnd, pDuration, pBarText, pDataObject) {
+ if (pCost === void 0) { pCost = null; }
+ if (pPlanStart === void 0) { pPlanStart = null; }
+ if (pPlanEnd === void 0) { pPlanEnd = null; }
+ if (pDuration === void 0) { pDuration = null; }
+ if (pBarText === void 0) { pBarText = null; }
+ if (pDataObject === void 0) { pDataObject = null; }
+ var vGantt = pGantt ? pGantt : this;
+ var _id = document.createTextNode(pID).data;
+ var vID = general_utils_1.hashKey(document.createTextNode(pID).data);
+ var vName = document.createTextNode(pName).data;
+ var vStart = null;
+ var vEnd = null;
+ var vPlanStart = null;
+ var vPlanEnd = null;
+ var vGroupMinStart = null;
+ var vGroupMinEnd = null;
+ var vClass = document.createTextNode(pClass).data;
+ var vLink = document.createTextNode(pLink).data;
+ var vMile = parseInt(document.createTextNode(pMile).data);
+ var vRes = document.createTextNode(pRes).data;
+ var vComp = parseFloat(document.createTextNode(pComp).data);
+ var vCost = parseInt(document.createTextNode(pCost).data);
+ var vGroup = parseInt(document.createTextNode(pGroup).data);
+ var vDataObject = pDataObject;
+ var vCompVal;
+ var parent = document.createTextNode(pParent).data;
+ if (parent && parent !== '0') {
+ parent = general_utils_1.hashKey(parent).toString();
+ }
+ var vParent = parent;
+ var vOpen = (vGroup == 2) ? 1 : parseInt(document.createTextNode(pOpen).data);
+ var vDepend = new Array();
+ var vDependType = new Array();
+ var vCaption = document.createTextNode(pCaption).data;
+ var vDuration = pDuration || '';
+ var vBarText = pBarText || '';
+ var vLevel = 0;
+ var vNumKid = 0;
+ var vWeight = 0;
+ var vVisible = 1;
+ var vSortIdx = 0;
+ var vToDelete = false;
+ var x1, y1, x2, y2;
+ var vNotes;
+ var vParItem = null;
+ var vCellDiv = null;
+ var vBarDiv = null;
+ var vTaskDiv = null;
+ var vPlanTaskDiv = null;
+ var vListChildRow = null;
+ var vChildRow = null;
+ var vGroupSpan = null;
+ vNotes = document.createElement('span');
+ vNotes.className = 'gTaskNotes';
+ if (pNotes != null) {
+ vNotes.innerHTML = pNotes;
+ general_utils_1.stripUnwanted(vNotes);
+ }
+ if (pStart != null && pStart != '') {
+ vStart = (pStart instanceof Date) ? pStart : date_utils_1.parseDateStr(document.createTextNode(pStart).data, vGantt.getDateInputFormat());
+ vGroupMinStart = vStart;
+ }
+ if (pEnd != null && pEnd != '') {
+ vEnd = (pEnd instanceof Date) ? pEnd : date_utils_1.parseDateStr(document.createTextNode(pEnd).data, vGantt.getDateInputFormat());
+ vGroupMinEnd = vEnd;
+ }
+ if (pPlanStart != null && pPlanStart != '') {
+ vPlanStart = (pPlanStart instanceof Date) ? pPlanStart : date_utils_1.parseDateStr(document.createTextNode(pPlanStart).data, vGantt.getDateInputFormat());
+ vGroupMinStart = vPlanStart;
+ }
+ if (pPlanEnd != null && pPlanEnd != '') {
+ vPlanEnd = (pPlanEnd instanceof Date) ? pPlanEnd : date_utils_1.parseDateStr(document.createTextNode(pPlanEnd).data, vGantt.getDateInputFormat());
+ vGroupMinEnd = vPlanEnd;
+ }
+ if (pDepend != null) {
+ var vDependStr = pDepend + '';
+ var vDepList = vDependStr.split(',');
+ var n = vDepList.length;
+ for (var k = 0; k < n; k++) {
+ if (vDepList[k].toUpperCase().endsWith('SS')) {
+ vDepend[k] = vDepList[k].substring(0, vDepList[k].length - 2);
+ vDependType[k] = 'SS';
+ }
+ else if (vDepList[k].toUpperCase().endsWith('FF')) {
+ vDepend[k] = vDepList[k].substring(0, vDepList[k].length - 2);
+ vDependType[k] = 'FF';
+ }
+ else if (vDepList[k].toUpperCase().endsWith('SF')) {
+ vDepend[k] = vDepList[k].substring(0, vDepList[k].length - 2);
+ vDependType[k] = 'SF';
+ }
+ else if (vDepList[k].toUpperCase().endsWith('FS')) {
+ vDepend[k] = vDepList[k].substring(0, vDepList[k].length - 2);
+ vDependType[k] = 'FS';
+ }
+ else {
+ vDepend[k] = vDepList[k];
+ vDependType[k] = 'FS';
+ }
+ if (vDepend[k]) {
+ vDepend[k] = general_utils_1.hashKey(vDepend[k]).toString();
+ }
+ }
+ }
+ this.getID = function () { return vID; };
+ this.getOriginalID = function () { return _id; };
+ this.getGantt = function () { return vGantt; };
+ this.getName = function () { return vName; };
+ this.getStart = function () {
+ if (vStart)
+ return vStart;
+ else if (vPlanStart)
+ return vPlanStart;
+ else
+ return new Date();
+ };
+ this.getStartVar = function () {
+ return vStart;
+ };
+ this.getEnd = function () {
+ if (vEnd)
+ return vEnd;
+ else if (vPlanEnd)
+ return vPlanEnd;
+ else if (vStart && vDuration) {
+ var date = new Date(vStart);
+ var vUnits = vDuration.split(' ');
+ var value = parseInt(vUnits[0]);
+ switch (vUnits[1]) {
+ case 'hour':
+ date.setMinutes(date.getMinutes() + (value * 60));
+ break;
+ case 'day':
+ date.setMinutes(date.getMinutes() + (value * 60 * 24));
+ break;
+ case 'week':
+ date.setMinutes(date.getMinutes() + (value * 60 * 24 * 7));
+ break;
+ case 'month':
+ date.setMonth(date.getMonth() + (value));
+ break;
+ case 'quarter':
+ date.setMonth(date.getMonth() + (value * 3));
+ break;
+ }
+ return date;
+ }
+ else
+ return new Date();
+ };
+ this.getPlanStart = function () { return vPlanStart ? vPlanStart : vStart; };
+ this.getPlanEnd = function () { return vPlanEnd ? vPlanEnd : vEnd; };
+ this.getCost = function () { return vCost; };
+ this.getGroupMinStart = function () { return vGroupMinStart; };
+ this.getGroupMinEnd = function () { return vGroupMinEnd; };
+ this.getClass = function () { return vClass; };
+ this.getLink = function () { return vLink; };
+ this.getMile = function () { return vMile; };
+ this.getDepend = function () {
+ if (vDepend)
+ return vDepend;
+ else
+ return null;
+ };
+ this.getDataObject = function () { return vDataObject; };
+ this.getDepType = function () { if (vDependType)
+ return vDependType;
+ else
+ return null; };
+ this.getCaption = function () { if (vCaption)
+ return vCaption;
+ else
+ return ''; };
+ this.getResource = function () { if (vRes)
+ return vRes;
+ else
+ return '\u00A0'; };
+ this.getCompVal = function () { if (vComp)
+ return vComp;
+ else if (vCompVal)
+ return vCompVal;
+ else
+ return 0; };
+ this.getCompStr = function () { if (vComp)
+ return vComp + '%';
+ else if (vCompVal)
+ return vCompVal + '%';
+ else
+ return ''; };
+ this.getCompRestStr = function () { if (vComp)
+ return (100 - vComp) + '%';
+ else if (vCompVal)
+ return (100 - vCompVal) + '%';
+ else
+ return ''; };
+ this.getNotes = function () { return vNotes; };
+ this.getSortIdx = function () { return vSortIdx; };
+ this.getToDelete = function () { return vToDelete; };
+ this.getDuration = function (pFormat, pLang) {
+ if (vMile) {
+ vDuration = '-';
+ }
+ else if (!vEnd && vDuration) {
+ return vDuration;
+ }
+ else {
+ var vUnits = null;
+ switch (pFormat) {
+ case 'week':
+ vUnits = 'day';
+ break;
+ case 'month':
+ vUnits = 'week';
+ break;
+ case 'quarter':
+ vUnits = 'month';
+ break;
+ default:
+ vUnits = pFormat;
+ break;
+ }
+ // let vTaskEnd = new Date(this.getEnd().getTime());
+ // if ((vTaskEnd.getTime() - (vTaskEnd.getTimezoneOffset() * 60000)) % (86400000) == 0) {
+ // vTaskEnd = new Date(vTaskEnd.getFullYear(), vTaskEnd.getMonth(), vTaskEnd.getDate() + 1, vTaskEnd.getHours(), vTaskEnd.getMinutes(), vTaskEnd.getSeconds());
+ // }
+ // let tmpPer = (getOffset(this.getStart(), vTaskEnd, 999, vUnits)) / 1000;
+ var hours = (this.getEnd().getTime() - this.getStart().getTime()) / 1000 / 60 / 60;
+ var tmpPer = void 0;
+ switch (vUnits) {
+ case 'hour':
+ tmpPer = Math.round(hours);
+ vDuration = tmpPer + ' ' + ((tmpPer != 1) ? pLang['hrs'] : pLang['hr']);
+ break;
+ case 'day':
+ tmpPer = Math.round(hours / 24);
+ vDuration = tmpPer + ' ' + ((tmpPer != 1) ? pLang['dys'] : pLang['dy']);
+ break;
+ case 'week':
+ tmpPer = Math.round(hours / 24 / 7);
+ vDuration = tmpPer + ' ' + ((tmpPer != 1) ? pLang['wks'] : pLang['wk']);
+ break;
+ case 'month':
+ tmpPer = Math.round(hours / 24 / 7 / 30);
+ vDuration = tmpPer + ' ' + ((tmpPer != 1) ? pLang['mths'] : pLang['mth']);
+ break;
+ case 'quarter':
+ tmpPer = Math.round(hours / 24 / 7 / 30 / 3);
+ vDuration = tmpPer + ' ' + ((tmpPer != 1) ? pLang['qtrs'] : pLang['qtr']);
+ break;
+ }
+ }
+ return vDuration;
+ };
+ this.getBarText = function () { return vBarText; };
+ this.getParent = function () { return vParent; };
+ this.getGroup = function () { return vGroup; };
+ this.getOpen = function () { return vOpen; };
+ this.getLevel = function () { return vLevel; };
+ this.getNumKids = function () { return vNumKid; };
+ this.getWeight = function () { return vWeight; };
+ this.getStartX = function () { return x1; };
+ this.getStartY = function () { return y1; };
+ this.getEndX = function () { return x2; };
+ this.getEndY = function () { return y2; };
+ this.getVisible = function () { return vVisible; };
+ this.getParItem = function () { return vParItem; };
+ this.getCellDiv = function () { return vCellDiv; };
+ this.getBarDiv = function () { return vBarDiv; };
+ this.getTaskDiv = function () { return vTaskDiv; };
+ this.getPlanTaskDiv = function () { return vPlanTaskDiv; };
+ this.getChildRow = function () { return vChildRow; };
+ this.getListChildRow = function () { return vListChildRow; };
+ this.getGroupSpan = function () { return vGroupSpan; };
+ this.setName = function (pName) { vName = pName; };
+ this.setNotes = function (pNotes) { vNotes = pNotes; };
+ this.setClass = function (pClass) { vClass = pClass; };
+ this.setCost = function (pCost) { vCost = pCost; };
+ this.setResource = function (pRes) { vRes = pRes; };
+ this.setDuration = function (pDuration) { vDuration = pDuration; };
+ this.setDataObject = function (pDataObject) { vDataObject = pDataObject; };
+ this.setStart = function (pStart) {
+ if (pStart instanceof Date) {
+ vStart = pStart;
+ }
+ else {
+ var temp = new Date(pStart);
+ if (temp instanceof Date && !isNaN(temp.valueOf())) {
+ vStart = temp;
+ }
+ }
+ };
+ this.setEnd = function (pEnd) {
+ if (pEnd instanceof Date) {
+ vEnd = pEnd;
+ }
+ else {
+ var temp = new Date(pEnd);
+ if (temp instanceof Date && !isNaN(temp.valueOf())) {
+ vEnd = temp;
+ }
+ }
+ };
+ this.setPlanStart = function (pPlanStart) {
+ if (pPlanStart instanceof Date)
+ vPlanStart = pPlanStart;
+ else
+ vPlanStart = new Date(pPlanStart);
+ };
+ this.setPlanEnd = function (pPlanEnd) {
+ if (pPlanEnd instanceof Date)
+ vPlanEnd = pPlanEnd;
+ else
+ vPlanEnd = new Date(pPlanEnd);
+ };
+ this.setGroupMinStart = function (pStart) { if (pStart instanceof Date)
+ vGroupMinStart = pStart; };
+ this.setGroupMinEnd = function (pEnd) { if (pEnd instanceof Date)
+ vGroupMinEnd = pEnd; };
+ this.setLevel = function (pLevel) { vLevel = parseInt(document.createTextNode(pLevel).data); };
+ this.setNumKid = function (pNumKid) { vNumKid = parseInt(document.createTextNode(pNumKid).data); };
+ this.setWeight = function (pWeight) { vWeight = parseInt(document.createTextNode(pWeight).data); };
+ this.setCompVal = function (pCompVal) { vCompVal = parseFloat(document.createTextNode(pCompVal).data); };
+ this.setComp = function (pComp) {
+ vComp = parseInt(document.createTextNode(pComp).data);
+ };
+ this.setStartX = function (pX) { x1 = parseInt(document.createTextNode(pX).data); };
+ this.setStartY = function (pY) { y1 = parseInt(document.createTextNode(pY).data); };
+ this.setEndX = function (pX) { x2 = parseInt(document.createTextNode(pX).data); };
+ this.setEndY = function (pY) { y2 = parseInt(document.createTextNode(pY).data); };
+ this.setOpen = function (pOpen) { vOpen = parseInt(document.createTextNode(pOpen).data); };
+ this.setVisible = function (pVisible) { vVisible = parseInt(document.createTextNode(pVisible).data); };
+ this.setSortIdx = function (pSortIdx) { vSortIdx = parseInt(document.createTextNode(pSortIdx).data); };
+ this.setToDelete = function (pToDelete) { if (pToDelete)
+ vToDelete = true;
+ else
+ vToDelete = false; };
+ this.setParItem = function (pParItem) { if (pParItem)
+ vParItem = pParItem; };
+ this.setCellDiv = function (pCellDiv) { if (typeof HTMLDivElement !== 'function' || pCellDiv instanceof HTMLDivElement)
+ vCellDiv = pCellDiv; }; //"typeof HTMLDivElement !== 'function'" to play nice with ie6 and 7
+ this.setGroup = function (pGroup) {
+ if (pGroup === true || pGroup === 'true') {
+ vGroup = 1;
+ }
+ else if (pGroup === false || pGroup === 'false') {
+ vGroup = 0;
+ }
+ else {
+ vGroup = parseInt(document.createTextNode(pGroup).data);
+ }
+ };
+ this.setBarText = function (pBarText) { if (pBarText)
+ vBarText = pBarText; };
+ this.setBarDiv = function (pDiv) { if (typeof HTMLDivElement !== 'function' || pDiv instanceof HTMLDivElement)
+ vBarDiv = pDiv; };
+ this.setTaskDiv = function (pDiv) { if (typeof HTMLDivElement !== 'function' || pDiv instanceof HTMLDivElement)
+ vTaskDiv = pDiv; };
+ this.setPlanTaskDiv = function (pDiv) { if (typeof HTMLDivElement !== 'function' || pDiv instanceof HTMLDivElement)
+ vPlanTaskDiv = pDiv; };
+ this.setChildRow = function (pRow) { if (typeof HTMLTableRowElement !== 'function' || pRow instanceof HTMLTableRowElement)
+ vChildRow = pRow; };
+ this.setListChildRow = function (pRow) { if (typeof HTMLTableRowElement !== 'function' || pRow instanceof HTMLTableRowElement)
+ vListChildRow = pRow; };
+ this.setGroupSpan = function (pSpan) { if (typeof HTMLSpanElement !== 'function' || pSpan instanceof HTMLSpanElement)
+ vGroupSpan = pSpan; };
+ this.getAllData = function () {
+ return {
+ pID: vID,
+ pName: vName,
+ pStart: vStart,
+ pEnd: vEnd,
+ pPlanStart: vPlanStart,
+ pPlanEnd: vPlanEnd,
+ pGroupMinStart: vGroupMinStart,
+ pGroupMinEnd: vGroupMinEnd,
+ pClass: vClass,
+ pLink: vLink,
+ pMile: vMile,
+ pRes: vRes,
+ pComp: vComp,
+ pCost: vCost,
+ pGroup: vGroup,
+ pDataObjec: vDataObject
+ };
+ };
+};
+/**
+ * @param pTask
+ * @param templateStrOrFn template string or function(task). In any case parameters in template string are substituted.
+ * If string - just a static template.
+ * If function(task): string - per task template. Can return null|undefined to fallback to default template.
+ * If function(task): Promise) - async per task template. Tooltip will show 'Loading...' if promise is not yet complete.
+ * Otherwise returned template will be handled in the same manner as in other cases.
+ */
+exports.createTaskInfo = function (pTask, templateStrOrFn) {
+ var _this = this;
+ if (templateStrOrFn === void 0) { templateStrOrFn = null; }
+ var vTmpDiv;
+ var vTaskInfoBox = document.createDocumentFragment();
+ var vTaskInfo = draw_utils_1.newNode(vTaskInfoBox, 'div', null, 'gTaskInfo');
+ var setupTemplate = function (template) {
+ vTaskInfo.innerHTML = "";
+ if (template) {
+ var allData_1 = pTask.getAllData();
+ general_utils_1.internalProperties.forEach(function (key) {
+ var lang;
+ if (general_utils_1.internalPropertiesLang[key]) {
+ lang = _this.vLangs[_this.vLang][general_utils_1.internalPropertiesLang[key]];
+ }
+ if (!lang) {
+ lang = key;
+ }
+ var val = allData_1[key];
+ template = template.replace("{{" + key + "}}", val);
+ if (lang) {
+ template = template.replace("{{Lang:" + key + "}}", lang);
+ }
+ else {
+ template = template.replace("{{Lang:" + key + "}}", key);
+ }
+ });
+ draw_utils_1.newNode(vTaskInfo, 'span', null, 'gTtTemplate', template);
+ }
+ else {
+ draw_utils_1.newNode(vTaskInfo, 'span', null, 'gTtTitle', pTask.getName());
+ if (_this.vShowTaskInfoStartDate == 1) {
+ vTmpDiv = draw_utils_1.newNode(vTaskInfo, 'div', null, 'gTILine gTIsd');
+ draw_utils_1.newNode(vTmpDiv, 'span', null, 'gTaskLabel', _this.vLangs[_this.vLang]['startdate'] + ': ');
+ draw_utils_1.newNode(vTmpDiv, 'span', null, 'gTaskText', date_utils_1.formatDateStr(pTask.getStart(), _this.vDateTaskDisplayFormat, _this.vLangs[_this.vLang]));
+ }
+ if (_this.vShowTaskInfoEndDate == 1) {
+ vTmpDiv = draw_utils_1.newNode(vTaskInfo, 'div', null, 'gTILine gTIed');
+ draw_utils_1.newNode(vTmpDiv, 'span', null, 'gTaskLabel', _this.vLangs[_this.vLang]['enddate'] + ': ');
+ draw_utils_1.newNode(vTmpDiv, 'span', null, 'gTaskText', date_utils_1.formatDateStr(pTask.getEnd(), _this.vDateTaskDisplayFormat, _this.vLangs[_this.vLang]));
+ }
+ if (_this.vShowTaskInfoDur == 1 && !pTask.getMile()) {
+ vTmpDiv = draw_utils_1.newNode(vTaskInfo, 'div', null, 'gTILine gTId');
+ draw_utils_1.newNode(vTmpDiv, 'span', null, 'gTaskLabel', _this.vLangs[_this.vLang]['duration'] + ': ');
+ draw_utils_1.newNode(vTmpDiv, 'span', null, 'gTaskText', pTask.getDuration(_this.vFormat, _this.vLangs[_this.vLang]));
+ }
+ if (_this.vShowTaskInfoComp == 1) {
+ vTmpDiv = draw_utils_1.newNode(vTaskInfo, 'div', null, 'gTILine gTIc');
+ draw_utils_1.newNode(vTmpDiv, 'span', null, 'gTaskLabel', _this.vLangs[_this.vLang]['completion'] + ': ');
+ draw_utils_1.newNode(vTmpDiv, 'span', null, 'gTaskText', pTask.getCompStr());
+ }
+ if (_this.vShowTaskInfoRes == 1) {
+ vTmpDiv = draw_utils_1.newNode(vTaskInfo, 'div', null, 'gTILine gTIr');
+ draw_utils_1.newNode(vTmpDiv, 'span', null, 'gTaskLabel', _this.vLangs[_this.vLang]['resource'] + ': ');
+ draw_utils_1.newNode(vTmpDiv, 'span', null, 'gTaskText', pTask.getResource());
+ }
+ if (_this.vShowTaskInfoLink == 1 && pTask.getLink() != '') {
+ vTmpDiv = draw_utils_1.newNode(vTaskInfo, 'div', null, 'gTILine gTIl');
+ var vTmpNode = draw_utils_1.newNode(vTmpDiv, 'span', null, 'gTaskLabel');
+ vTmpNode = draw_utils_1.newNode(vTmpNode, 'a', null, 'gTaskText', _this.vLangs[_this.vLang]['moreinfo']);
+ vTmpNode.setAttribute('href', pTask.getLink());
+ }
+ if (_this.vShowTaskInfoNotes == 1) {
+ vTmpDiv = draw_utils_1.newNode(vTaskInfo, 'div', null, 'gTILine gTIn');
+ draw_utils_1.newNode(vTmpDiv, 'span', null, 'gTaskLabel', _this.vLangs[_this.vLang]['notes'] + ': ');
+ if (pTask.getNotes())
+ vTmpDiv.appendChild(pTask.getNotes());
+ }
+ }
+ };
+ var callback;
+ if (typeof templateStrOrFn === 'function') {
+ callback = function () {
+ var strOrPromise = templateStrOrFn(pTask);
+ if (!strOrPromise || typeof strOrPromise === 'string') {
+ setupTemplate(strOrPromise);
+ }
+ else if (strOrPromise.then) {
+ setupTemplate(_this.vLangs[_this.vLang]['tooltipLoading'] || _this.vLangs['en']['tooltipLoading']);
+ return strOrPromise.then(setupTemplate);
+ }
+ };
+ }
+ else {
+ setupTemplate(templateStrOrFn);
+ }
+ return { component: vTaskInfoBox, callback: callback };
+};
+exports.AddTaskItem = function (value) {
+ var vExists = false;
+ for (var i = 0; i < this.vTaskList.length; i++) {
+ if (this.vTaskList[i].getID() == value.getID()) {
+ i = this.vTaskList.length;
+ vExists = true;
+ }
+ }
+ if (!vExists) {
+ this.vTaskList.push(value);
+ this.vProcessNeeded = true;
+ }
+};
+exports.AddTaskItemObject = function (object) {
+ if (!object.pGantt) {
+ object.pGantt = this;
+ }
+ return this.AddTaskItem(exports.TaskItemObject(object));
+};
+exports.RemoveTaskItem = function (pID) {
+ // simply mark the task for removal at this point - actually remove it next time we re-draw the chart
+ for (var i = 0; i < this.vTaskList.length; i++) {
+ if (this.vTaskList[i].getID() == pID)
+ this.vTaskList[i].setToDelete(true);
+ else if (this.vTaskList[i].getParent() == pID)
+ this.RemoveTaskItem(this.vTaskList[i].getID());
+ }
+ this.vProcessNeeded = true;
+};
+exports.ClearTasks = function () {
+ var _this = this;
+ this.vTaskList.map(function (task) { return _this.RemoveTaskItem(task.getID()); });
+ this.vProcessNeeded = true;
+};
+// Recursively process task tree ... set min, max dates of parent tasks and identfy task level.
+exports.processRows = function (pList, pID, pRow, pLevel, pOpen, pUseSort, vDebug) {
+ if (vDebug === void 0) { vDebug = false; }
+ var vMinDate = new Date();
+ var vMaxDate = new Date();
+ var vVisible = pOpen;
+ var vCurItem = null;
+ var vCompSum = 0;
+ var vMinSet = 0;
+ var vMaxSet = 0;
+ var vNumKid = 0;
+ var vWeight = 0;
+ var vLevel = pLevel;
+ var vList = pList;
+ var vComb = false;
+ var i = 0;
+ for (i = 0; i < pList.length; i++) {
+ if (pList[i].getToDelete()) {
+ pList.splice(i, 1);
+ i--;
+ }
+ if (i >= 0 && pList[i].getID() == pID)
+ vCurItem = pList[i];
+ }
+ for (i = 0; i < pList.length; i++) {
+ if (pList[i].getParent() == pID) {
+ vVisible = pOpen;
+ pList[i].setParItem(vCurItem);
+ pList[i].setVisible(vVisible);
+ if (vVisible == 1 && pList[i].getOpen() == 0)
+ vVisible = 0;
+ if (pList[i].getMile() && pList[i].getParItem() && pList[i].getParItem().getGroup() == 2) { //remove milestones owned by combined groups
+ pList.splice(i, 1);
+ i--;
+ continue;
+ }
+ pList[i].setLevel(vLevel);
+ if (pList[i].getGroup()) {
+ if (pList[i].getParItem() && pList[i].getParItem().getGroup() == 2)
+ pList[i].setGroup(2);
+ exports.processRows(vList, pList[i].getID(), i, vLevel + 1, vVisible, 0);
+ }
+ if (vMinSet == 0 || pList[i].getStart() < vMinDate) {
+ vMinDate = pList[i].getStart();
+ vMinSet = 1;
+ }
+ if (vMaxSet == 0 || pList[i].getEnd() > vMaxDate) {
+ vMaxDate = pList[i].getEnd();
+ vMaxSet = 1;
+ }
+ vNumKid++;
+ vWeight += pList[i].getEnd() - pList[i].getStart() + 1;
+ vCompSum += pList[i].getCompVal() * (pList[i].getEnd() - pList[i].getStart() + 1);
+ pList[i].setSortIdx(i * pList.length);
+ }
+ }
+ if (pRow >= 0) {
+ if (pList[pRow].getGroupMinStart() != null && pList[pRow].getGroupMinStart() < vMinDate) {
+ vMinDate = pList[pRow].getGroupMinStart();
+ }
+ if (pList[pRow].getGroupMinEnd() != null && pList[pRow].getGroupMinEnd() > vMaxDate) {
+ vMaxDate = pList[pRow].getGroupMinEnd();
+ }
+ pList[pRow].setStart(vMinDate);
+ pList[pRow].setEnd(vMaxDate);
+ pList[pRow].setNumKid(vNumKid);
+ pList[pRow].setWeight(vWeight);
+ pList[pRow].setCompVal(Math.ceil(vCompSum / vWeight));
+ }
+ if (pID == 0 && pUseSort == 1) {
+ var bd = void 0;
+ if (vDebug) {
+ bd = new Date();
+ console.log('before afterTasks', bd);
+ }
+ exports.sortTasks(pList, 0, 0);
+ if (vDebug) {
+ var ad = new Date();
+ console.log('after afterTasks', ad, (ad.getTime() - bd.getTime()));
+ }
+ pList.sort(function (a, b) { return a.getSortIdx() - b.getSortIdx(); });
+ }
+ if (pID == 0 && pUseSort != 1) // Need to sort combined tasks regardless
+ {
+ for (i = 0; i < pList.length; i++) {
+ if (pList[i].getGroup() == 2) {
+ vComb = true;
+ var bd = void 0;
+ if (vDebug) {
+ bd = new Date();
+ console.log('before sortTasks', bd);
+ }
+ exports.sortTasks(pList, pList[i].getID(), pList[i].getSortIdx() + 1);
+ if (vDebug) {
+ var ad = new Date();
+ console.log('after sortTasks', ad, (ad.getTime() - bd.getTime()));
+ }
+ }
+ }
+ if (vComb == true)
+ pList.sort(function (a, b) { return a.getSortIdx() - b.getSortIdx(); });
+ }
+};
+
+},{"./utils/date_utils":11,"./utils/draw_utils":12,"./utils/general_utils":13}],11:[function(require,module,exports){
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+/**
+ * DATES
+ */
+exports.getMinDate = function (pList, pFormat, pMinDate) {
+ var vDate = new Date();
+ if (pList.length <= 0)
+ return pMinDate || vDate;
+ vDate.setTime((pMinDate && pMinDate.getTime()) || pList[0].getStart().getTime());
+ // Parse all Task Start dates to find min
+ for (var i = 0; i < pList.length; i++) {
+ if (pList[i].getStart().getTime() < vDate.getTime())
+ vDate.setTime(pList[i].getStart().getTime());
+ }
+ // Adjust min date to specific format boundaries (first of week or first of month)
+ if (pFormat == 'day') {
+ vDate.setDate(vDate.getDate() - 1);
+ while (vDate.getDay() % 7 != 1)
+ vDate.setDate(vDate.getDate() - 1);
+ }
+ else if (pFormat == 'week') {
+ vDate.setDate(vDate.getDate() - 1);
+ while (vDate.getDay() % 7 != 1)
+ vDate.setDate(vDate.getDate() - 1);
+ }
+ else if (pFormat == 'month') {
+ vDate.setDate(vDate.getDate() - 15);
+ while (vDate.getDate() > 1)
+ vDate.setDate(vDate.getDate() - 1);
+ }
+ else if (pFormat == 'quarter') {
+ vDate.setDate(vDate.getDate() - 31);
+ if (vDate.getMonth() == 0 || vDate.getMonth() == 1 || vDate.getMonth() == 2)
+ vDate.setFullYear(vDate.getFullYear(), 0, 1);
+ else if (vDate.getMonth() == 3 || vDate.getMonth() == 4 || vDate.getMonth() == 5)
+ vDate.setFullYear(vDate.getFullYear(), 3, 1);
+ else if (vDate.getMonth() == 6 || vDate.getMonth() == 7 || vDate.getMonth() == 8)
+ vDate.setFullYear(vDate.getFullYear(), 6, 1);
+ else if (vDate.getMonth() == 9 || vDate.getMonth() == 10 || vDate.getMonth() == 11)
+ vDate.setFullYear(vDate.getFullYear(), 9, 1);
+ }
+ else if (pFormat == 'hour') {
+ vDate.setHours(vDate.getHours() - 1);
+ while (vDate.getHours() % 6 != 0)
+ vDate.setHours(vDate.getHours() - 1);
+ }
+ if (pFormat == 'hour')
+ vDate.setMinutes(0, 0);
+ else
+ vDate.setHours(0, 0, 0);
+ return (vDate);
+};
+exports.getMaxDate = function (pList, pFormat, pMaxDate) {
+ var vDate = new Date();
+ if (pList.length <= 0)
+ return pMaxDate || vDate;
+ vDate.setTime((pMaxDate && pMaxDate.getTime()) || pList[0].getEnd().getTime());
+ // Parse all Task End dates to find max
+ for (var i = 0; i < pList.length; i++) {
+ if (pList[i].getEnd().getTime() > vDate.getTime())
+ vDate.setTime(pList[i].getEnd().getTime());
+ }
+ // Adjust max date to specific format boundaries (end of week or end of month)
+ if (pFormat == 'day') {
+ vDate.setDate(vDate.getDate() + 1);
+ while (vDate.getDay() % 7 != 0)
+ vDate.setDate(vDate.getDate() + 1);
+ }
+ else if (pFormat == 'week') {
+ //For weeks, what is the last logical boundary?
+ vDate.setDate(vDate.getDate() + 1);
+ while (vDate.getDay() % 7 != 0)
+ vDate.setDate(vDate.getDate() + 1);
+ }
+ else if (pFormat == 'month') {
+ // Set to last day of current Month
+ while (vDate.getDate() > 1)
+ vDate.setDate(vDate.getDate() + 1);
+ vDate.setDate(vDate.getDate() - 1);
+ }
+ else if (pFormat == 'quarter') {
+ // Set to last day of current Quarter
+ if (vDate.getMonth() == 0 || vDate.getMonth() == 1 || vDate.getMonth() == 2)
+ vDate.setFullYear(vDate.getFullYear(), 2, 31);
+ else if (vDate.getMonth() == 3 || vDate.getMonth() == 4 || vDate.getMonth() == 5)
+ vDate.setFullYear(vDate.getFullYear(), 5, 30);
+ else if (vDate.getMonth() == 6 || vDate.getMonth() == 7 || vDate.getMonth() == 8)
+ vDate.setFullYear(vDate.getFullYear(), 8, 30);
+ else if (vDate.getMonth() == 9 || vDate.getMonth() == 10 || vDate.getMonth() == 11)
+ vDate.setFullYear(vDate.getFullYear(), 11, 31);
+ }
+ else if (pFormat == 'hour') {
+ if (vDate.getHours() == 0)
+ vDate.setDate(vDate.getDate() + 1);
+ vDate.setHours(vDate.getHours() + 1);
+ while (vDate.getHours() % 6 != 5)
+ vDate.setHours(vDate.getHours() + 1);
+ }
+ return (vDate);
+};
+exports.coerceDate = function (date) {
+ if (date instanceof Date) {
+ return date;
+ }
+ else {
+ var temp = new Date(date);
+ if (temp instanceof Date && !isNaN(temp.valueOf())) {
+ return temp;
+ }
+ }
+};
+exports.parseDateStr = function (pDateStr, pFormatStr) {
+ var vDate = new Date();
+ var vDateParts = pDateStr.split(/[^0-9]/);
+ if (pDateStr.length >= 10 && vDateParts.length >= 3) {
+ while (vDateParts.length < 5)
+ vDateParts.push(0);
+ switch (pFormatStr) {
+ case 'mm/dd/yyyy':
+ vDate = new Date(vDateParts[2], vDateParts[0] - 1, vDateParts[1], vDateParts[3], vDateParts[4]);
+ break;
+ case 'dd/mm/yyyy':
+ vDate = new Date(vDateParts[2], vDateParts[1] - 1, vDateParts[0], vDateParts[3], vDateParts[4]);
+ break;
+ case 'yyyy-mm-dd':
+ vDate = new Date(vDateParts[0], vDateParts[1] - 1, vDateParts[2], vDateParts[3], vDateParts[4]);
+ break;
+ }
+ }
+ return (vDate);
+};
+exports.formatDateStr = function (pDate, pDateFormatArr, pL) {
+ var vDateStr = '';
+ var vYear2Str = pDate.getFullYear().toString().substring(2, 4);
+ var vMonthStr = (pDate.getMonth() + 1) + '';
+ var vMonthArr = new Array(pL['january'], pL['february'], pL['march'], pL['april'], pL['maylong'], pL['june'], pL['july'], pL['august'], pL['september'], pL['october'], pL['november'], pL['december']);
+ var vDayArr = new Array(pL['sunday'], pL['monday'], pL['tuesday'], pL['wednesday'], pL['thursday'], pL['friday'], pL['saturday']);
+ var vMthArr = new Array(pL['jan'], pL['feb'], pL['mar'], pL['apr'], pL['may'], pL['jun'], pL['jul'], pL['aug'], pL['sep'], pL['oct'], pL['nov'], pL['dec']);
+ var vDyArr = new Array(pL['sun'], pL['mon'], pL['tue'], pL['wed'], pL['thu'], pL['fri'], pL['sat']);
+ for (var i = 0; i < pDateFormatArr.length; i++) {
+ switch (pDateFormatArr[i]) {
+ case 'dd':
+ if (pDate.getDate() < 10)
+ vDateStr += '0'; // now fall through
+ case 'd':
+ vDateStr += pDate.getDate();
+ break;
+ case 'day':
+ vDateStr += vDyArr[pDate.getDay()];
+ break;
+ case 'DAY':
+ vDateStr += vDayArr[pDate.getDay()];
+ break;
+ case 'mm':
+ if (parseInt(vMonthStr, 10) < 10)
+ vDateStr += '0'; // now fall through
+ case 'm':
+ vDateStr += vMonthStr;
+ break;
+ case 'mon':
+ vDateStr += vMthArr[pDate.getMonth()];
+ break;
+ case 'month':
+ vDateStr += vMonthArr[pDate.getMonth()];
+ break;
+ case 'yyyy':
+ vDateStr += pDate.getFullYear();
+ break;
+ case 'yy':
+ vDateStr += vYear2Str;
+ break;
+ case 'qq':
+ vDateStr += pL['qtr']; // now fall through
+ case 'q':
+ vDateStr += Math.floor(pDate.getMonth() / 3) + 1;
+ break;
+ case 'hh':
+ if ((((pDate.getHours() % 12) == 0) ? 12 : pDate.getHours() % 12) < 10)
+ vDateStr += '0'; // now fall through
+ case 'h':
+ vDateStr += ((pDate.getHours() % 12) == 0) ? 12 : pDate.getHours() % 12;
+ break;
+ case 'HH':
+ if ((pDate.getHours()) < 10)
+ vDateStr += '0'; // now fall through
+ case 'H':
+ vDateStr += (pDate.getHours());
+ break;
+ case 'MI':
+ if (pDate.getMinutes() < 10)
+ vDateStr += '0'; // now fall through
+ case 'mi':
+ vDateStr += pDate.getMinutes();
+ break;
+ case 'pm':
+ vDateStr += ((pDate.getHours()) < 12) ? 'am' : 'pm';
+ break;
+ case 'PM':
+ vDateStr += ((pDate.getHours()) < 12) ? 'AM' : 'PM';
+ break;
+ case 'ww':
+ if (exports.getIsoWeek(pDate) < 10)
+ vDateStr += '0'; // now fall through
+ case 'w':
+ vDateStr += exports.getIsoWeek(pDate);
+ break;
+ case 'week':
+ var vWeekNum = exports.getIsoWeek(pDate);
+ var vYear = pDate.getFullYear();
+ var vDayOfWeek = (pDate.getDay() == 0) ? 7 : pDate.getDay();
+ if (vWeekNum >= 52 && parseInt(vMonthStr, 10) === 1)
+ vYear--;
+ if (vWeekNum == 1 && parseInt(vMonthStr, 10) === 12)
+ vYear++;
+ if (vWeekNum < 10)
+ vWeekNum = parseInt('0' + vWeekNum, 10);
+ vDateStr += vYear + '-W' + vWeekNum + '-' + vDayOfWeek;
+ break;
+ default:
+ if (pL[pDateFormatArr[i].toLowerCase()])
+ vDateStr += pL[pDateFormatArr[i].toLowerCase()];
+ else
+ vDateStr += pDateFormatArr[i];
+ break;
+ }
+ }
+ return vDateStr;
+};
+exports.parseDateFormatStr = function (pFormatStr) {
+ var vComponantStr = '';
+ var vCurrChar = '';
+ var vSeparators = new RegExp('[\/\\ -.,\'":]');
+ var vDateFormatArray = new Array();
+ for (var i = 0; i < pFormatStr.length; i++) {
+ vCurrChar = pFormatStr.charAt(i);
+ if ((vCurrChar.match(vSeparators)) || (i + 1 == pFormatStr.length)) // separator or end of string
+ {
+ if ((i + 1 == pFormatStr.length) && (!(vCurrChar.match(vSeparators)))) // at end of string add any non-separator chars to the current component
+ {
+ vComponantStr += vCurrChar;
+ }
+ vDateFormatArray.push(vComponantStr);
+ if (vCurrChar.match(vSeparators))
+ vDateFormatArray.push(vCurrChar);
+ vComponantStr = '';
+ }
+ else {
+ vComponantStr += vCurrChar;
+ }
+ }
+ return vDateFormatArray;
+};
+exports.getIsoWeek = function (pDate) {
+ // We have to compare against the monday of the first week of the year containing 04 jan *not* 01/01
+ // 60*60*24*1000=86400000
+ var dayMiliseconds = 86400000;
+ var keyDay = new Date(pDate.getFullYear(), 0, 4, 0, 0, 0);
+ var keyDayOfWeek = (keyDay.getDay() == 0) ? 6 : keyDay.getDay() - 1; // define monday as 0
+ var firstMondayYearTime = keyDay.getTime() - (keyDayOfWeek * dayMiliseconds);
+ var thisDate = new Date(pDate.getFullYear(), pDate.getMonth(), pDate.getDate(), 0, 0, 0); // This at 00:00:00
+ var thisTime = thisDate.getTime();
+ var daysFromFirstMonday = Math.round(((thisTime - firstMondayYearTime) / dayMiliseconds));
+ var lastWeek = 99;
+ var thisWeek = 99;
+ var firstMondayYear = new Date(firstMondayYearTime);
+ thisWeek = Math.ceil((daysFromFirstMonday + 1) / 7);
+ if (thisWeek <= 0)
+ thisWeek = exports.getIsoWeek(new Date(pDate.getFullYear() - 1, 11, 31, 0, 0, 0));
+ else if (thisWeek == 53 && (new Date(pDate.getFullYear(), 0, 1, 0, 0, 0)).getDay() != 4 && (new Date(pDate.getFullYear(), 11, 31, 0, 0, 0)).getDay() != 4)
+ thisWeek = 1;
+ return thisWeek;
+};
+
+},{}],12:[function(require,module,exports){
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var events_1 = require("../events");
+exports.makeInput = function (formattedValue, editable, type, value, choices) {
+ if (type === void 0) { type = 'text'; }
+ if (value === void 0) { value = null; }
+ if (choices === void 0) { choices = null; }
+ if (!value) {
+ value = formattedValue;
+ }
+ if (editable) {
+ switch (type) {
+ case 'date':
+ // Take timezone into account before converting to ISO String
+ value = value ? new Date(value.getTime() - (value.getTimezoneOffset() * 60000)).toISOString().split('T')[0] : '';
+ return " ";
+ case 'resource':
+ if (choices) {
+ var found = choices.filter(function (c) { return c.id == value || c.name == value; });
+ if (found && found.length > 0) {
+ value = found[0].id;
+ }
+ else {
+ choices.push({ id: value, name: value });
+ }
+ return "" + choices.map(function (c) { return "" + c.name + " "; }).join('') + " ";
+ }
+ else {
+ return " ";
+ }
+ case 'cost':
+ return " ";
+ default:
+ return " ";
+ }
+ }
+ else {
+ return formattedValue;
+ }
+};
+exports.newNode = function (pParent, pNodeType, pId, pClass, pText, pWidth, pLeft, pDisplay, pColspan, pAttribs) {
+ if (pId === void 0) { pId = null; }
+ if (pClass === void 0) { pClass = null; }
+ if (pText === void 0) { pText = null; }
+ if (pWidth === void 0) { pWidth = null; }
+ if (pLeft === void 0) { pLeft = null; }
+ if (pDisplay === void 0) { pDisplay = null; }
+ if (pColspan === void 0) { pColspan = null; }
+ if (pAttribs === void 0) { pAttribs = null; }
+ var vNewNode = pParent.appendChild(document.createElement(pNodeType));
+ if (pAttribs) {
+ for (var i = 0; i + 1 < pAttribs.length; i += 2) {
+ vNewNode.setAttribute(pAttribs[i], pAttribs[i + 1]);
+ }
+ }
+ if (pId)
+ vNewNode.id = pId; // I wish I could do this with setAttribute but older IEs don't play nice
+ if (pClass)
+ vNewNode.className = pClass;
+ if (pWidth)
+ vNewNode.style.width = (isNaN(pWidth * 1)) ? pWidth : pWidth + 'px';
+ if (pLeft)
+ vNewNode.style.left = (isNaN(pLeft * 1)) ? pLeft : pLeft + 'px';
+ if (pText) {
+ if (pText.indexOf && pText.indexOf('<') === -1) {
+ vNewNode.appendChild(document.createTextNode(pText));
+ }
+ else {
+ vNewNode.insertAdjacentHTML('beforeend', pText);
+ }
+ }
+ if (pDisplay)
+ vNewNode.style.display = pDisplay;
+ if (pColspan)
+ vNewNode.colSpan = pColspan;
+ return vNewNode;
+};
+exports.getArrayLocationByID = function (pId) {
+ var vList = this.getList();
+ for (var i = 0; i < vList.length; i++) {
+ if (vList[i].getID() == pId)
+ return i;
+ }
+ return -1;
+};
+exports.CalcTaskXY = function () {
+ var vID;
+ var vList = this.getList();
+ var vBarDiv;
+ var vTaskDiv;
+ var vParDiv;
+ var vLeft, vTop, vWidth;
+ var vHeight = Math.floor((this.getRowHeight() / 2));
+ for (var i = 0; i < vList.length; i++) {
+ vID = vList[i].getID();
+ vBarDiv = vList[i].getBarDiv();
+ vTaskDiv = vList[i].getTaskDiv();
+ if ((vList[i].getParItem() && vList[i].getParItem().getGroup() == 2)) {
+ vParDiv = vList[i].getParItem().getChildRow();
+ }
+ else
+ vParDiv = vList[i].getChildRow();
+ if (vBarDiv) {
+ vList[i].setStartX(vBarDiv.offsetLeft + 1);
+ vList[i].setStartY(vParDiv.offsetTop + vBarDiv.offsetTop + vHeight - 1);
+ vList[i].setEndX(vBarDiv.offsetLeft + vBarDiv.offsetWidth + 1);
+ vList[i].setEndY(vParDiv.offsetTop + vBarDiv.offsetTop + vHeight - 1);
+ }
+ }
+};
+exports.sLine = function (x1, y1, x2, y2, pClass) {
+ var vLeft = Math.min(x1, x2);
+ var vTop = Math.min(y1, y2);
+ var vWid = Math.abs(x2 - x1) + 1;
+ var vHgt = Math.abs(y2 - y1) + 1;
+ var vTmpDiv = document.createElement('div');
+ vTmpDiv.id = this.vDivId + 'line' + this.vDepId++;
+ vTmpDiv.style.position = 'absolute';
+ vTmpDiv.style.overflow = 'hidden';
+ vTmpDiv.style.zIndex = '0';
+ vTmpDiv.style.left = vLeft + 'px';
+ vTmpDiv.style.top = vTop + 'px';
+ vTmpDiv.style.width = vWid + 'px';
+ vTmpDiv.style.height = vHgt + 'px';
+ vTmpDiv.style.visibility = 'visible';
+ if (vWid == 1)
+ vTmpDiv.className = 'glinev';
+ else
+ vTmpDiv.className = 'glineh';
+ if (pClass)
+ vTmpDiv.className += ' ' + pClass;
+ this.getLines().appendChild(vTmpDiv);
+ if (this.vEvents.onLineDraw && typeof this.vEvents.onLineDraw === 'function') {
+ this.vEvents.onLineDraw(vTmpDiv);
+ }
+ return vTmpDiv;
+};
+exports.drawSelector = function (pPos) {
+ var vOutput = document.createDocumentFragment();
+ var vDisplay = false;
+ for (var i = 0; i < this.vShowSelector.length && !vDisplay; i++) {
+ if (this.vShowSelector[i].toLowerCase() == pPos.toLowerCase())
+ vDisplay = true;
+ }
+ if (vDisplay) {
+ var vTmpDiv = exports.newNode(vOutput, 'div', null, 'gselector', this.vLangs[this.vLang]['format'] + ':');
+ if (this.vFormatArr.join().toLowerCase().indexOf('hour') != -1)
+ events_1.addFormatListeners(this, 'hour', exports.newNode(vTmpDiv, 'span', this.vDivId + 'formathour' + pPos, 'gformlabel' + ((this.vFormat == 'hour') ? ' gselected' : ''), this.vLangs[this.vLang]['hour']));
+ if (this.vFormatArr.join().toLowerCase().indexOf('day') != -1)
+ events_1.addFormatListeners(this, 'day', exports.newNode(vTmpDiv, 'span', this.vDivId + 'formatday' + pPos, 'gformlabel' + ((this.vFormat == 'day') ? ' gselected' : ''), this.vLangs[this.vLang]['day']));
+ if (this.vFormatArr.join().toLowerCase().indexOf('week') != -1)
+ events_1.addFormatListeners(this, 'week', exports.newNode(vTmpDiv, 'span', this.vDivId + 'formatweek' + pPos, 'gformlabel' + ((this.vFormat == 'week') ? ' gselected' : ''), this.vLangs[this.vLang]['week']));
+ if (this.vFormatArr.join().toLowerCase().indexOf('month') != -1)
+ events_1.addFormatListeners(this, 'month', exports.newNode(vTmpDiv, 'span', this.vDivId + 'formatmonth' + pPos, 'gformlabel' + ((this.vFormat == 'month') ? ' gselected' : ''), this.vLangs[this.vLang]['month']));
+ if (this.vFormatArr.join().toLowerCase().indexOf('quarter') != -1)
+ events_1.addFormatListeners(this, 'quarter', exports.newNode(vTmpDiv, 'span', this.vDivId + 'formatquarter' + pPos, 'gformlabel' + ((this.vFormat == 'quarter') ? ' gselected' : ''), this.vLangs[this.vLang]['quarter']));
+ }
+ else {
+ exports.newNode(vOutput, 'div', null, 'gselector');
+ }
+ return vOutput;
+};
+
+},{"../events":5}],13:[function(require,module,exports){
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.internalProperties = ['pID', 'pName', 'pStart', 'pEnd', 'pClass', 'pLink', 'pMile', 'pRes', 'pComp', 'pGroup', 'pParent',
+ 'pOpen', 'pDepend', 'pCaption', 'pNotes', 'pGantt', 'pCost', 'pPlanStart', 'pPlanEnd'];
+exports.internalPropertiesLang = {
+ 'pID': 'id',
+ 'pName': 'name',
+ 'pStart': 'startdate',
+ 'pEnd': 'enddate',
+ 'pLink': 'link',
+ 'pMile': 'mile',
+ 'pRes': 'resource',
+ 'pComp': 'comp',
+ 'pGroup': 'group',
+ 'pParent': 'parent',
+ 'pOpen': 'open',
+ 'pDepend': 'depend',
+ 'pCaption': 'caption',
+ 'pNotes': 'notes',
+ 'pCost': 'cost',
+ 'pPlanStart': 'planstartdate',
+ 'pPlanEnd': 'planenddate'
+};
+exports.getMinDate = function (pList, pFormat, pMinDate) {
+ var vDate = new Date();
+ if (pList.length <= 0)
+ return pMinDate || vDate;
+ vDate.setTime((pMinDate && pMinDate.getTime()) || pList[0].getStart().getTime());
+ // Parse all Task Start dates to find min
+ for (var i = 0; i < pList.length; i++) {
+ if (pList[i].getStart().getTime() < vDate.getTime())
+ vDate.setTime(pList[i].getStart().getTime());
+ }
+ // Adjust min date to specific format boundaries (first of week or first of month)
+ if (pFormat == 'day') {
+ vDate.setDate(vDate.getDate() - 1);
+ while (vDate.getDay() % 7 != 1)
+ vDate.setDate(vDate.getDate() - 1);
+ }
+ else if (pFormat == 'week') {
+ vDate.setDate(vDate.getDate() - 1);
+ while (vDate.getDay() % 7 != 1)
+ vDate.setDate(vDate.getDate() - 1);
+ }
+ else if (pFormat == 'month') {
+ vDate.setDate(vDate.getDate() - 15);
+ while (vDate.getDate() > 1)
+ vDate.setDate(vDate.getDate() - 1);
+ }
+ else if (pFormat == 'quarter') {
+ vDate.setDate(vDate.getDate() - 31);
+ if (vDate.getMonth() == 0 || vDate.getMonth() == 1 || vDate.getMonth() == 2)
+ vDate.setFullYear(vDate.getFullYear(), 0, 1);
+ else if (vDate.getMonth() == 3 || vDate.getMonth() == 4 || vDate.getMonth() == 5)
+ vDate.setFullYear(vDate.getFullYear(), 3, 1);
+ else if (vDate.getMonth() == 6 || vDate.getMonth() == 7 || vDate.getMonth() == 8)
+ vDate.setFullYear(vDate.getFullYear(), 6, 1);
+ else if (vDate.getMonth() == 9 || vDate.getMonth() == 10 || vDate.getMonth() == 11)
+ vDate.setFullYear(vDate.getFullYear(), 9, 1);
+ }
+ else if (pFormat == 'hour') {
+ vDate.setHours(vDate.getHours() - 1);
+ while (vDate.getHours() % 6 != 0)
+ vDate.setHours(vDate.getHours() - 1);
+ }
+ if (pFormat == 'hour')
+ vDate.setMinutes(0, 0);
+ else
+ vDate.setHours(0, 0, 0);
+ return (vDate);
+};
+exports.getMaxDate = function (pList, pFormat, pMaxDate) {
+ var vDate = new Date();
+ if (pList.length <= 0)
+ return pMaxDate || vDate;
+ vDate.setTime((pMaxDate && pMaxDate.getTime()) || pList[0].getEnd().getTime());
+ // Parse all Task End dates to find max
+ for (var i = 0; i < pList.length; i++) {
+ if (pList[i].getEnd().getTime() > vDate.getTime())
+ vDate.setTime(pList[i].getEnd().getTime());
+ }
+ // Adjust max date to specific format boundaries (end of week or end of month)
+ if (pFormat == 'day') {
+ vDate.setDate(vDate.getDate() + 1);
+ while (vDate.getDay() % 7 != 0)
+ vDate.setDate(vDate.getDate() + 1);
+ }
+ else if (pFormat == 'week') {
+ //For weeks, what is the last logical boundary?
+ vDate.setDate(vDate.getDate() + 1);
+ while (vDate.getDay() % 7 != 0)
+ vDate.setDate(vDate.getDate() + 1);
+ }
+ else if (pFormat == 'month') {
+ // Set to last day of current Month
+ while (vDate.getDate() > 1)
+ vDate.setDate(vDate.getDate() + 1);
+ vDate.setDate(vDate.getDate() - 1);
+ }
+ else if (pFormat == 'quarter') {
+ // Set to last day of current Quarter
+ if (vDate.getMonth() == 0 || vDate.getMonth() == 1 || vDate.getMonth() == 2)
+ vDate.setFullYear(vDate.getFullYear(), 2, 31);
+ else if (vDate.getMonth() == 3 || vDate.getMonth() == 4 || vDate.getMonth() == 5)
+ vDate.setFullYear(vDate.getFullYear(), 5, 30);
+ else if (vDate.getMonth() == 6 || vDate.getMonth() == 7 || vDate.getMonth() == 8)
+ vDate.setFullYear(vDate.getFullYear(), 8, 30);
+ else if (vDate.getMonth() == 9 || vDate.getMonth() == 10 || vDate.getMonth() == 11)
+ vDate.setFullYear(vDate.getFullYear(), 11, 31);
+ }
+ else if (pFormat == 'hour') {
+ if (vDate.getHours() == 0)
+ vDate.setDate(vDate.getDate() + 1);
+ vDate.setHours(vDate.getHours() + 1);
+ while (vDate.getHours() % 6 != 5)
+ vDate.setHours(vDate.getHours() + 1);
+ }
+ return (vDate);
+};
+exports.findObj = function (theObj, theDoc) {
+ if (theDoc === void 0) { theDoc = null; }
+ var p, i, foundObj;
+ if (!theDoc)
+ theDoc = document;
+ if (document.getElementById)
+ foundObj = document.getElementById(theObj);
+ return foundObj;
+};
+exports.changeFormat = function (pFormat, ganttObj) {
+ if (ganttObj)
+ ganttObj.setFormat(pFormat);
+ else
+ alert('Chart undefined');
+};
+exports.coerceDate = function (date) {
+ if (date instanceof Date) {
+ return date;
+ }
+ else {
+ var temp = new Date(date);
+ if (temp instanceof Date && !isNaN(temp.valueOf())) {
+ return temp;
+ }
+ }
+};
+exports.parseDateStr = function (pDateStr, pFormatStr) {
+ var vDate = new Date();
+ var vDateParts = pDateStr.split(/[^0-9]/);
+ if (pDateStr.length >= 10 && vDateParts.length >= 3) {
+ while (vDateParts.length < 5)
+ vDateParts.push(0);
+ switch (pFormatStr) {
+ case 'mm/dd/yyyy':
+ vDate = new Date(vDateParts[2], vDateParts[0] - 1, vDateParts[1], vDateParts[3], vDateParts[4]);
+ break;
+ case 'dd/mm/yyyy':
+ vDate = new Date(vDateParts[2], vDateParts[1] - 1, vDateParts[0], vDateParts[3], vDateParts[4]);
+ break;
+ case 'yyyy-mm-dd':
+ vDate = new Date(vDateParts[0], vDateParts[1] - 1, vDateParts[2], vDateParts[3], vDateParts[4]);
+ break;
+ }
+ }
+ return (vDate);
+};
+exports.formatDateStr = function (pDate, pDateFormatArr, pL) {
+ var vDateStr = '';
+ var vYear2Str = pDate.getFullYear().toString().substring(2, 4);
+ var vMonthStr = (pDate.getMonth() + 1) + '';
+ var vMonthArr = new Array(pL['january'], pL['february'], pL['march'], pL['april'], pL['maylong'], pL['june'], pL['july'], pL['august'], pL['september'], pL['october'], pL['november'], pL['december']);
+ var vDayArr = new Array(pL['sunday'], pL['monday'], pL['tuesday'], pL['wednesday'], pL['thursday'], pL['friday'], pL['saturday']);
+ var vMthArr = new Array(pL['jan'], pL['feb'], pL['mar'], pL['apr'], pL['may'], pL['jun'], pL['jul'], pL['aug'], pL['sep'], pL['oct'], pL['nov'], pL['dec']);
+ var vDyArr = new Array(pL['sun'], pL['mon'], pL['tue'], pL['wed'], pL['thu'], pL['fri'], pL['sat']);
+ for (var i = 0; i < pDateFormatArr.length; i++) {
+ switch (pDateFormatArr[i]) {
+ case 'dd':
+ if (pDate.getDate() < 10)
+ vDateStr += '0'; // now fall through
+ case 'd':
+ vDateStr += pDate.getDate();
+ break;
+ case 'day':
+ vDateStr += vDyArr[pDate.getDay()];
+ break;
+ case 'DAY':
+ vDateStr += vDayArr[pDate.getDay()];
+ break;
+ case 'mm':
+ if (parseInt(vMonthStr, 10) < 10)
+ vDateStr += '0'; // now fall through
+ case 'm':
+ vDateStr += vMonthStr;
+ break;
+ case 'mon':
+ vDateStr += vMthArr[pDate.getMonth()];
+ break;
+ case 'month':
+ vDateStr += vMonthArr[pDate.getMonth()];
+ break;
+ case 'yyyy':
+ vDateStr += pDate.getFullYear();
+ break;
+ case 'yy':
+ vDateStr += vYear2Str;
+ break;
+ case 'qq':
+ vDateStr += pL['qtr']; // now fall through
+ case 'q':
+ vDateStr += Math.floor(pDate.getMonth() / 3) + 1;
+ break;
+ case 'hh':
+ if ((((pDate.getHours() % 12) == 0) ? 12 : pDate.getHours() % 12) < 10)
+ vDateStr += '0'; // now fall through
+ case 'h':
+ vDateStr += ((pDate.getHours() % 12) == 0) ? 12 : pDate.getHours() % 12;
+ break;
+ case 'HH':
+ if ((pDate.getHours()) < 10)
+ vDateStr += '0'; // now fall through
+ case 'H':
+ vDateStr += (pDate.getHours());
+ break;
+ case 'MI':
+ if (pDate.getMinutes() < 10)
+ vDateStr += '0'; // now fall through
+ case 'mi':
+ vDateStr += pDate.getMinutes();
+ break;
+ case 'pm':
+ vDateStr += ((pDate.getHours()) < 12) ? 'am' : 'pm';
+ break;
+ case 'PM':
+ vDateStr += ((pDate.getHours()) < 12) ? 'AM' : 'PM';
+ break;
+ case 'ww':
+ if (exports.getIsoWeek(pDate) < 10)
+ vDateStr += '0'; // now fall through
+ case 'w':
+ vDateStr += exports.getIsoWeek(pDate);
+ break;
+ case 'week':
+ var vWeekNum = exports.getIsoWeek(pDate);
+ var vYear = pDate.getFullYear();
+ var vDayOfWeek = (pDate.getDay() == 0) ? 7 : pDate.getDay();
+ if (vWeekNum >= 52 && parseInt(vMonthStr, 10) === 1)
+ vYear--;
+ if (vWeekNum == 1 && parseInt(vMonthStr, 10) === 12)
+ vYear++;
+ if (vWeekNum < 10)
+ vWeekNum = parseInt('0' + vWeekNum, 10);
+ vDateStr += vYear + '-W' + vWeekNum + '-' + vDayOfWeek;
+ break;
+ default:
+ if (pL[pDateFormatArr[i].toLowerCase()])
+ vDateStr += pL[pDateFormatArr[i].toLowerCase()];
+ else
+ vDateStr += pDateFormatArr[i];
+ break;
+ }
+ }
+ return vDateStr;
+};
+exports.parseDateFormatStr = function (pFormatStr) {
+ var vComponantStr = '';
+ var vCurrChar = '';
+ var vSeparators = new RegExp('[\/\\ -.,\'":]');
+ var vDateFormatArray = new Array();
+ for (var i = 0; i < pFormatStr.length; i++) {
+ vCurrChar = pFormatStr.charAt(i);
+ if ((vCurrChar.match(vSeparators)) || (i + 1 == pFormatStr.length)) // separator or end of string
+ {
+ if ((i + 1 == pFormatStr.length) && (!(vCurrChar.match(vSeparators)))) // at end of string add any non-separator chars to the current component
+ {
+ vComponantStr += vCurrChar;
+ }
+ vDateFormatArray.push(vComponantStr);
+ if (vCurrChar.match(vSeparators))
+ vDateFormatArray.push(vCurrChar);
+ vComponantStr = '';
+ }
+ else {
+ vComponantStr += vCurrChar;
+ }
+ }
+ return vDateFormatArray;
+};
+exports.stripIds = function (pNode) {
+ for (var i = 0; i < pNode.childNodes.length; i++) {
+ if ('removeAttribute' in pNode.childNodes[i])
+ pNode.childNodes[i].removeAttribute('id');
+ if (pNode.childNodes[i].hasChildNodes())
+ exports.stripIds(pNode.childNodes[i]);
+ }
+};
+exports.stripUnwanted = function (pNode) {
+ var vAllowedTags = new Array('#text', 'p', 'br', 'ul', 'ol', 'li', 'div', 'span', 'img');
+ for (var i = 0; i < pNode.childNodes.length; i++) {
+ /* versions of IE<9 don't support indexOf on arrays so add trailing comma to the joined array and lookup value to stop substring matches */
+ if ((vAllowedTags.join().toLowerCase() + ',').indexOf(pNode.childNodes[i].nodeName.toLowerCase() + ',') == -1) {
+ pNode.replaceChild(document.createTextNode(pNode.childNodes[i].outerHTML), pNode.childNodes[i]);
+ }
+ if (pNode.childNodes[i].hasChildNodes())
+ exports.stripUnwanted(pNode.childNodes[i]);
+ }
+};
+exports.delayedHide = function (pGanttChartObj, pTool, pTimer) {
+ var vDelay = pGanttChartObj.getTooltipDelay() || 1500;
+ if (pTool)
+ pTool.delayTimeout = setTimeout(function () { exports.hideToolTip(pGanttChartObj, pTool, pTimer); }, vDelay);
+};
+exports.getZoomFactor = function () {
+ var vFactor = 1;
+ if (document.body.getBoundingClientRect) {
+ // rect is only in physical pixel size in IE before version 8
+ var vRect = document.body.getBoundingClientRect();
+ var vPhysicalW = vRect.right - vRect.left;
+ var vLogicalW = document.body.offsetWidth;
+ // the zoom level is always an integer percent value
+ vFactor = Math.round((vPhysicalW / vLogicalW) * 100) / 100;
+ }
+ return vFactor;
+};
+exports.benchMark = function (pItem) {
+ var vEndTime = new Date().getTime();
+ alert(pItem + ': Elapsed time: ' + ((vEndTime - this.vBenchTime) / 1000) + ' seconds.');
+ this.vBenchTime = new Date().getTime();
+};
+exports.getIsoWeek = function (pDate) {
+ // We have to compare against the monday of the first week of the year containing 04 jan *not* 01/01
+ // 60*60*24*1000=86400000
+ var dayMiliseconds = 86400000;
+ var keyDay = new Date(pDate.getFullYear(), 0, 4, 0, 0, 0);
+ var keyDayOfWeek = (keyDay.getDay() == 0) ? 6 : keyDay.getDay() - 1; // define monday as 0
+ var firstMondayYearTime = keyDay.getTime() - (keyDayOfWeek * dayMiliseconds);
+ var thisDate = new Date(pDate.getFullYear(), pDate.getMonth(), pDate.getDate(), 0, 0, 0); // This at 00:00:00
+ var thisTime = thisDate.getTime();
+ var daysFromFirstMonday = Math.round(((thisTime - firstMondayYearTime) / dayMiliseconds));
+ var lastWeek = 99;
+ var thisWeek = 99;
+ var firstMondayYear = new Date(firstMondayYearTime);
+ thisWeek = Math.ceil((daysFromFirstMonday + 1) / 7);
+ if (thisWeek <= 0)
+ thisWeek = exports.getIsoWeek(new Date(pDate.getFullYear() - 1, 11, 31, 0, 0, 0));
+ else if (thisWeek == 53 && (new Date(pDate.getFullYear(), 0, 1, 0, 0, 0)).getDay() != 4 && (new Date(pDate.getFullYear(), 11, 31, 0, 0, 0)).getDay() != 4)
+ thisWeek = 1;
+ return thisWeek;
+};
+exports.getScrollPositions = function () {
+ var vScrollLeft = window.pageXOffset;
+ var vScrollTop = window.pageYOffset;
+ if (!('pageXOffset' in window)) // Internet Explorer before version 9
+ {
+ var vZoomFactor = exports.getZoomFactor();
+ vScrollLeft = Math.round(document.documentElement.scrollLeft / vZoomFactor);
+ vScrollTop = Math.round(document.documentElement.scrollTop / vZoomFactor);
+ }
+ return { x: vScrollLeft, y: vScrollTop };
+};
+var scrollbarWidth = undefined;
+exports.getScrollbarWidth = function () {
+ if (scrollbarWidth)
+ return scrollbarWidth;
+ var outer = document.createElement('div');
+ outer.className = 'gscrollbar-calculation-container';
+ document.body.appendChild(outer);
+ // Creating inner element and placing it in the container
+ var inner = document.createElement('div');
+ outer.appendChild(inner);
+ // Calculating difference between container's full width and the child width
+ scrollbarWidth = (outer.offsetWidth - inner.offsetWidth);
+ // Removing temporary elements from the DOM
+ outer.parentNode.removeChild(outer);
+ return scrollbarWidth;
+};
+exports.getOffset = function (pStartDate, pEndDate, pColWidth, pFormat, pShowWeekends) {
+ var DAY_CELL_MARGIN_WIDTH = 3; // Cell margin for 'day' format
+ var WEEK_CELL_MARGIN_WIDTH = 3; // Cell margin for 'week' format
+ var MONTH_CELL_MARGIN_WIDTH = 3; // Cell margin for 'month' format
+ var QUARTER_CELL_MARGIN_WIDTH = 3; // Cell margin for 'quarter' format
+ var HOUR_CELL_MARGIN_WIDTH = 3; // Cell margin for 'hour' format
+ var vMonthDaysArr = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
+ var curTaskStart = new Date(pStartDate.getTime());
+ var curTaskEnd = new Date(pEndDate.getTime());
+ var vTaskRightPx = 0;
+ var tmpTaskStart = Date.UTC(curTaskStart.getFullYear(), curTaskStart.getMonth(), curTaskStart.getDate(), curTaskStart.getHours(), 0, 0);
+ var tmpTaskEnd = Date.UTC(curTaskEnd.getFullYear(), curTaskEnd.getMonth(), curTaskEnd.getDate(), curTaskEnd.getHours(), 0, 0);
+ var oneHour = 3600000;
+ var vTaskRight = (tmpTaskEnd - tmpTaskStart) / oneHour; // Length of task in hours
+ var vPosTmpDate;
+ if (pFormat == 'day') {
+ if (!pShowWeekends) {
+ var start = curTaskStart;
+ var end = curTaskEnd;
+ var countWeekends = 0;
+ while (start < end) {
+ var day = start.getDay();
+ if (day === 6 || day == 0) {
+ countWeekends++;
+ }
+ start = new Date(start.getTime() + 24 * oneHour);
+ }
+ vTaskRight -= countWeekends * 24;
+ }
+ vTaskRightPx = Math.ceil((vTaskRight / 24) * (pColWidth + DAY_CELL_MARGIN_WIDTH) - 1);
+ }
+ else if (pFormat == 'week') {
+ vTaskRightPx = Math.ceil((vTaskRight / (24 * 7)) * (pColWidth + WEEK_CELL_MARGIN_WIDTH) - 1);
+ }
+ else if (pFormat == 'month') {
+ var vMonthsDiff = (12 * (curTaskEnd.getFullYear() - curTaskStart.getFullYear())) + (curTaskEnd.getMonth() - curTaskStart.getMonth());
+ vPosTmpDate = new Date(curTaskEnd.getTime());
+ vPosTmpDate.setDate(curTaskStart.getDate());
+ var vDaysCrctn = (curTaskEnd.getTime() - vPosTmpDate.getTime()) / (86400000);
+ vTaskRightPx = Math.ceil((vMonthsDiff * (pColWidth + MONTH_CELL_MARGIN_WIDTH)) + (vDaysCrctn * (pColWidth / vMonthDaysArr[curTaskEnd.getMonth()])) - 1);
+ }
+ else if (pFormat == 'quarter') {
+ var vMonthsDiff = (12 * (curTaskEnd.getFullYear() - curTaskStart.getFullYear())) + (curTaskEnd.getMonth() - curTaskStart.getMonth());
+ vPosTmpDate = new Date(curTaskEnd.getTime());
+ vPosTmpDate.setDate(curTaskStart.getDate());
+ var vDaysCrctn = (curTaskEnd.getTime() - vPosTmpDate.getTime()) / (86400000);
+ vTaskRightPx = Math.ceil((vMonthsDiff * ((pColWidth + QUARTER_CELL_MARGIN_WIDTH) / 3)) + (vDaysCrctn * (pColWidth / 90)) - 1);
+ }
+ else if (pFormat == 'hour') {
+ // can't just calculate sum because of daylight savings changes
+ vPosTmpDate = new Date(curTaskEnd.getTime());
+ vPosTmpDate.setMinutes(curTaskStart.getMinutes(), 0);
+ var vMinsCrctn = (curTaskEnd.getTime() - vPosTmpDate.getTime()) / (3600000);
+ vTaskRightPx = Math.ceil((vTaskRight * (pColWidth + HOUR_CELL_MARGIN_WIDTH)) + (vMinsCrctn * (pColWidth)));
+ }
+ return vTaskRightPx;
+};
+exports.isIE = function () {
+ if (typeof document.all != 'undefined') {
+ if ('pageXOffset' in window)
+ return false; // give IE9 and above the benefit of the doubt!
+ else
+ return true;
+ }
+ else
+ return false;
+};
+exports.hideToolTip = function (pGanttChartObj, pTool, pTimer) {
+ if (pGanttChartObj.getUseFade()) {
+ clearInterval(pTool.fadeInterval);
+ pTool.fadeInterval = setInterval(function () { exports.fadeToolTip(-1, pTool, 0); }, pTimer);
+ }
+ else {
+ pTool.style.opacity = 0;
+ pTool.style.filter = 'alpha(opacity=0)';
+ pTool.style.visibility = 'hidden';
+ pTool.vToolCont.setAttribute("showing", null);
+ }
+};
+exports.fadeToolTip = function (pDirection, pTool, pMaxAlpha) {
+ var vIncrement = parseInt(pTool.getAttribute('fadeIncrement'));
+ var vAlpha = pTool.getAttribute('currentOpacity');
+ var vCurAlpha = parseInt(vAlpha);
+ if ((vCurAlpha != pMaxAlpha && pDirection == 1) || (vCurAlpha != 0 && pDirection == -1)) {
+ var i = vIncrement;
+ if (pMaxAlpha - vCurAlpha < vIncrement && pDirection == 1) {
+ i = pMaxAlpha - vCurAlpha;
+ }
+ else if (vAlpha < vIncrement && pDirection == -1) {
+ i = vCurAlpha;
+ }
+ vAlpha = vCurAlpha + (i * pDirection);
+ pTool.style.opacity = vAlpha * 0.01;
+ pTool.style.filter = 'alpha(opacity=' + vAlpha + ')';
+ pTool.setAttribute('currentOpacity', vAlpha);
+ }
+ else {
+ clearInterval(pTool.fadeInterval);
+ if (pDirection == -1) {
+ pTool.style.opacity = 0;
+ pTool.style.filter = 'alpha(opacity=0)';
+ pTool.style.visibility = 'hidden';
+ pTool.vToolCont.setAttribute("showing", null);
+ }
+ }
+};
+exports.hashString = function (key) {
+ if (!key) {
+ key = 'default';
+ }
+ key += '';
+ var hash = 5381;
+ for (var i = 0; i < key.length; i++) {
+ if (key.charCodeAt) {
+ // tslint:disable-next-line:no-bitwise
+ hash = (hash << 5) + hash + key.charCodeAt(i);
+ }
+ // tslint:disable-next-line:no-bitwise
+ hash = hash & hash;
+ }
+ // tslint:disable-next-line:no-bitwise
+ return hash >>> 0;
+};
+exports.hashKey = function (key) {
+ return this.hashString(key);
+};
+exports.criticalPath = function (tasks) {
+ var path = {};
+ // calculate duration
+ tasks.forEach(function (task) {
+ task.duration = new Date(task.pEnd).getTime() - new Date(task.pStart).getTime();
+ });
+ tasks.forEach(function (task) {
+ if (!path[task.pID]) {
+ path[task.pID] = task;
+ }
+ if (!path[task.pParent]) {
+ path[task.pParent] = {
+ childrens: []
+ };
+ }
+ if (!path[task.pID].childrens) {
+ path[task.pID].childrens = [];
+ }
+ path[task.pParent].childrens.push(task);
+ var max = path[task.pParent].childrens[0].duration;
+ path[task.pParent].childrens.forEach(function (t) {
+ if (t.duration > max) {
+ max = t.duration;
+ }
+ });
+ path[task.pParent].duration = max;
+ });
+ var finalNodes = { 0: path[0] };
+ var node = path[0];
+ var _loop_1 = function () {
+ if (node.childrens.length > 0) {
+ var found_1 = node.childrens[0];
+ var max_1 = found_1.duration;
+ node.childrens.forEach(function (c) {
+ if (c.duration > max_1) {
+ found_1 = c;
+ max_1 = c.duration;
+ }
+ });
+ finalNodes[found_1.pID] = found_1;
+ node = found_1;
+ }
+ else {
+ node = null;
+ }
+ };
+ while (node) {
+ _loop_1();
+ }
+};
+function isParentElementOrSelf(child, parent) {
+ while (child) {
+ if (child === parent)
+ return true;
+ child = child.parentElement;
+ }
+}
+exports.isParentElementOrSelf = isParentElementOrSelf;
+exports.updateFlyingObj = function (e, pGanttChartObj, pTimer) {
+ var vCurTopBuf = 3;
+ var vCurLeftBuf = 5;
+ var vCurBotBuf = 3;
+ var vCurRightBuf = 15;
+ var vMouseX = (e) ? e.clientX : window.event.clientX;
+ var vMouseY = (e) ? e.clientY : window.event.clientY;
+ var vViewportX = document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth;
+ var vViewportY = document.documentElement.clientHeight || document.getElementsByTagName('body')[0].clientHeight;
+ var vNewX = vMouseX;
+ var vNewY = vMouseY;
+ if (navigator.appName.toLowerCase() == 'microsoft internet explorer') {
+ // the clientX and clientY properties include the left and top borders of the client area
+ vMouseX -= document.documentElement.clientLeft;
+ vMouseY -= document.documentElement.clientTop;
+ var vZoomFactor = exports.getZoomFactor();
+ if (vZoomFactor != 1) { // IE 7 at non-default zoom level
+ vMouseX = Math.round(vMouseX / vZoomFactor);
+ vMouseY = Math.round(vMouseY / vZoomFactor);
+ }
+ }
+ var vScrollPos = exports.getScrollPositions();
+ /* Code for positioned right of the mouse by default*/
+ /*
+ if (vMouseX+vCurRightBuf+pGanttChartObj.vTool.offsetWidth>vViewportX)
+ {
+ if (vMouseX-vCurLeftBuf-pGanttChartObj.vTool.offsetWidth<0) vNewX=vScrollPos.x;
+ else vNewX=vMouseX+vScrollPos.x-vCurLeftBuf-pGanttChartObj.vTool.offsetWidth;
+ }
+ else vNewX=vMouseX+vScrollPos.x+vCurRightBuf;
+ */
+ /* Code for positioned left of the mouse by default */
+ if (vMouseX - vCurLeftBuf - pGanttChartObj.vTool.offsetWidth < 0) {
+ if (vMouseX + vCurRightBuf + pGanttChartObj.vTool.offsetWidth > vViewportX)
+ vNewX = vScrollPos.x;
+ else
+ vNewX = vMouseX + vScrollPos.x + vCurRightBuf;
+ }
+ else
+ vNewX = vMouseX + vScrollPos.x - vCurLeftBuf - pGanttChartObj.vTool.offsetWidth;
+ /* Code for positioned below the mouse by default */
+ if (vMouseY + vCurBotBuf + pGanttChartObj.vTool.offsetHeight > vViewportY) {
+ if (vMouseY - vCurTopBuf - pGanttChartObj.vTool.offsetHeight < 0)
+ vNewY = vScrollPos.y;
+ else
+ vNewY = vMouseY + vScrollPos.y - vCurTopBuf - pGanttChartObj.vTool.offsetHeight;
+ }
+ else
+ vNewY = vMouseY + vScrollPos.y + vCurBotBuf;
+ /* Code for positioned above the mouse by default */
+ /*
+ if (vMouseY-vCurTopBuf-pGanttChartObj.vTool.offsetHeight<0)
+ {
+ if (vMouseY+vCurBotBuf+pGanttChartObj.vTool.offsetHeight>vViewportY) vNewY=vScrollPos.y;
+ else vNewY=vMouseY+vScrollPos.y+vCurBotBuf;
+ }
+ else vNewY=vMouseY+vScrollPos.y-vCurTopBuf-pGanttChartObj.vTool.offsetHeight;
+ */
+ if (pGanttChartObj.getUseMove()) {
+ clearInterval(pGanttChartObj.vTool.moveInterval);
+ pGanttChartObj.vTool.moveInterval = setInterval(function () { exports.moveToolTip(vNewX, vNewY, pGanttChartObj.vTool, pTimer); }, pTimer);
+ }
+ else {
+ pGanttChartObj.vTool.style.left = vNewX + 'px';
+ pGanttChartObj.vTool.style.top = vNewY + 'px';
+ }
+};
+exports.moveToolTip = function (pNewX, pNewY, pTool, timer) {
+ var vSpeed = parseInt(pTool.getAttribute('moveSpeed'));
+ var vOldX = parseInt(pTool.style.left);
+ var vOldY = parseInt(pTool.style.top);
+ if (pTool.style.visibility != 'visible') {
+ pTool.style.left = pNewX + 'px';
+ pTool.style.top = pNewY + 'px';
+ clearInterval(pTool.moveInterval);
+ }
+ else {
+ if (pNewX != vOldX && pNewY != vOldY) {
+ vOldX += Math.ceil((pNewX - vOldX) / vSpeed);
+ vOldY += Math.ceil((pNewY - vOldY) / vSpeed);
+ pTool.style.left = vOldX + 'px';
+ pTool.style.top = vOldY + 'px';
+ }
+ else {
+ clearInterval(pTool.moveInterval);
+ }
+ }
+};
+exports.makeRequest = function (pFile, json, vDebug) {
+ if (json === void 0) { json = true; }
+ if (vDebug === void 0) { vDebug = false; }
+ if (window.fetch) {
+ var f = fetch(pFile);
+ if (json) {
+ return f.then(function (res) { return res.json(); });
+ }
+ else {
+ return f;
+ }
+ }
+ else {
+ return exports.makeRequestOldBrowsers(pFile, vDebug)
+ .then(function (xhttp) {
+ if (json) {
+ var jsonObj = JSON.parse(xhttp.response);
+ return jsonObj;
+ }
+ else {
+ var xmlDoc = xhttp.responseXML;
+ return xmlDoc;
+ }
+ });
+ }
+};
+exports.makeRequestOldBrowsers = function (pFile, vDebug) {
+ if (vDebug === void 0) { vDebug = false; }
+ return new Promise(function (resolve, reject) {
+ var bd;
+ if (vDebug) {
+ bd = new Date();
+ console.log('before jsonparse', bd);
+ }
+ var xhttp;
+ if (window.XMLHttpRequest) {
+ xhttp = new XMLHttpRequest();
+ }
+ else { // IE 5/6
+ xhttp = new window.ActiveXObject('Microsoft.XMLHTTP');
+ }
+ xhttp.open('GET', pFile, true);
+ xhttp.send(null);
+ xhttp.onload = function (e) {
+ if (xhttp.readyState === 4) {
+ if (xhttp.status === 200) {
+ // resolve(xhttp.responseText);
+ }
+ else {
+ console.error(xhttp.statusText);
+ }
+ if (vDebug) {
+ bd = new Date();
+ console.log('before jsonparse', bd);
+ }
+ resolve(xhttp);
+ }
+ };
+ xhttp.onerror = function (e) {
+ reject(xhttp.statusText);
+ };
+ });
+};
+exports.calculateStartEndFromDepend = function (tasksList) {
+};
+
+},{}],14:[function(require,module,exports){
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var task_1 = require("./task");
+var date_utils_1 = require("./utils/date_utils");
+var draw_utils_1 = require("./utils/draw_utils");
+var general_utils_1 = require("./utils/general_utils");
+exports.parseXML = function (pFile, pGanttVar) {
+ return general_utils_1.makeRequest(pFile, false, false)
+ .then(function (xmlDoc) {
+ exports.AddXMLTask(pGanttVar, xmlDoc);
+ });
+};
+exports.parseXMLString = function (pStr, pGanttVar) {
+ var xmlDoc;
+ if (typeof window.DOMParser != 'undefined') {
+ xmlDoc = (new window.DOMParser()).parseFromString(pStr, 'text/xml');
+ }
+ else if (typeof window.ActiveXObject != 'undefined' &&
+ new window.ActiveXObject('Microsoft.XMLDOM')) {
+ xmlDoc = new window.ActiveXObject('Microsoft.XMLDOM');
+ xmlDoc.async = 'false';
+ xmlDoc.loadXML(pStr);
+ }
+ exports.AddXMLTask(pGanttVar, xmlDoc);
+};
+exports.findXMLNode = function (pRoot, pNodeName) {
+ var vRetValue;
+ try {
+ vRetValue = pRoot.getElementsByTagName(pNodeName);
+ }
+ catch (error) {
+ ;
+ } // do nothing, we'll return undefined
+ return vRetValue;
+};
+// pType can be 1=numeric, 2=String, all other values just return raw data
+exports.getXMLNodeValue = function (pRoot, pNodeName, pType, pDefault) {
+ var vRetValue;
+ try {
+ vRetValue = pRoot.getElementsByTagName(pNodeName)[0].childNodes[0].nodeValue;
+ }
+ catch (error) {
+ if (typeof pDefault != 'undefined')
+ vRetValue = pDefault;
+ }
+ if (typeof vRetValue != 'undefined' && vRetValue != null) {
+ if (pType == 1)
+ vRetValue *= 1;
+ else if (pType == 2)
+ vRetValue = vRetValue.toString();
+ }
+ return vRetValue;
+};
+exports.AddXMLTask = function (pGanttVar, pXmlDoc) {
+ var project = '';
+ var Task;
+ var n = 0;
+ var m = 0;
+ var i = 0;
+ var j = 0;
+ var k = 0;
+ var maxPID = 0;
+ var ass = new Array();
+ var assRes = new Array();
+ var res = new Array();
+ var pars = new Array();
+ var projNode = exports.findXMLNode(pXmlDoc, 'Project');
+ if (typeof projNode != 'undefined' && projNode.length > 0) {
+ project = projNode[0].getAttribute('xmlns');
+ }
+ if (project == 'http://schemas.microsoft.com/project') {
+ pGanttVar.setDateInputFormat('yyyy-mm-dd');
+ Task = exports.findXMLNode(pXmlDoc, 'Task');
+ if (typeof Task == 'undefined')
+ n = 0;
+ else
+ n = Task.length;
+ var resources = exports.findXMLNode(pXmlDoc, 'Resource');
+ if (typeof resources == 'undefined') {
+ n = 0;
+ m = 0;
+ }
+ else
+ m = resources.length;
+ for (i = 0; i < m; i++) {
+ var resname = exports.getXMLNodeValue(resources[i], 'Name', 2, '');
+ var uid = exports.getXMLNodeValue(resources[i], 'UID', 1, -1);
+ if (resname.length > 0 && uid > 0)
+ res[uid] = resname;
+ }
+ var assignments = exports.findXMLNode(pXmlDoc, 'Assignment');
+ if (typeof assignments == 'undefined')
+ j = 0;
+ else
+ j = assignments.length;
+ for (i = 0; i < j; i++) {
+ var uid = void 0;
+ var resUID = exports.getXMLNodeValue(assignments[i], 'ResourceUID', 1, -1);
+ uid = exports.getXMLNodeValue(assignments[i], 'TaskUID', 1, -1);
+ if (uid > 0) {
+ if (resUID > 0)
+ assRes[uid] = res[resUID];
+ ass[uid] = assignments[i];
+ }
+ }
+ // Store information about parent UIDs in an easily searchable form
+ for (i = 0; i < n; i++) {
+ var uid = void 0;
+ uid = exports.getXMLNodeValue(Task[i], 'UID', 1, 0);
+ var vOutlineNumber = void 0;
+ if (uid != 0)
+ vOutlineNumber = exports.getXMLNodeValue(Task[i], 'OutlineNumber', 2, '0');
+ if (uid > 0)
+ pars[vOutlineNumber] = uid;
+ if (uid > maxPID)
+ maxPID = uid;
+ }
+ for (i = 0; i < n; i++) {
+ // optional parameters may not have an entry
+ // Task ID must NOT be zero otherwise it will be skipped
+ var pID = exports.getXMLNodeValue(Task[i], 'UID', 1, 0);
+ if (pID != 0) {
+ var pName = exports.getXMLNodeValue(Task[i], 'Name', 2, 'No Task Name');
+ var pStart = exports.getXMLNodeValue(Task[i], 'Start', 2, '');
+ var pEnd = exports.getXMLNodeValue(Task[i], 'Finish', 2, '');
+ var pPlanStart = exports.getXMLNodeValue(Task[i], 'PlanStart', 2, '');
+ var pPlanEnd = exports.getXMLNodeValue(Task[i], 'PlanFinish', 2, '');
+ var pDuration = exports.getXMLNodeValue(Task[i], 'Duration', 2, '');
+ var pLink = exports.getXMLNodeValue(Task[i], 'HyperlinkAddress', 2, '');
+ var pMile = exports.getXMLNodeValue(Task[i], 'Milestone', 1, 0);
+ var pComp = exports.getXMLNodeValue(Task[i], 'PercentWorkComplete', 1, 0);
+ var pCost = exports.getXMLNodeValue(Task[i], 'Cost', 2, 0);
+ var pGroup = exports.getXMLNodeValue(Task[i], 'Summary', 1, 0);
+ var pParent = 0;
+ var vOutlineLevel = exports.getXMLNodeValue(Task[i], 'OutlineLevel', 1, 0);
+ var vOutlineNumber = void 0;
+ if (vOutlineLevel > 1) {
+ vOutlineNumber = exports.getXMLNodeValue(Task[i], 'OutlineNumber', 2, '0');
+ pParent = pars[vOutlineNumber.substr(0, vOutlineNumber.lastIndexOf('.'))];
+ }
+ var pNotes = void 0;
+ try {
+ pNotes = Task[i].getElementsByTagName('Notes')[0].childNodes[1].nodeValue; //this should be a CDATA node
+ }
+ catch (error) {
+ pNotes = '';
+ }
+ var pRes = void 0;
+ if (typeof assRes[pID] != 'undefined')
+ pRes = assRes[pID];
+ else
+ pRes = '';
+ var predecessors = exports.findXMLNode(Task[i], 'PredecessorLink');
+ if (typeof predecessors == 'undefined')
+ j = 0;
+ else
+ j = predecessors.length;
+ var pDepend = '';
+ for (k = 0; k < j; k++) {
+ var depUID = exports.getXMLNodeValue(predecessors[k], 'PredecessorUID', 1, -1);
+ var depType = exports.getXMLNodeValue(predecessors[k], 'Type', 1, 1);
+ if (depUID > 0) {
+ if (pDepend.length > 0)
+ pDepend += ',';
+ switch (depType) {
+ case 0:
+ pDepend += depUID + 'FF';
+ break;
+ case 1:
+ pDepend += depUID + 'FS';
+ break;
+ case 2:
+ pDepend += depUID + 'SF';
+ break;
+ case 3:
+ pDepend += depUID + 'SS';
+ break;
+ default:
+ pDepend += depUID + 'FS';
+ break;
+ }
+ }
+ }
+ var pOpen = 1;
+ var pCaption = '';
+ var pClass = void 0;
+ if (pGroup > 0)
+ pClass = 'ggroupblack';
+ else if (pMile > 0)
+ pClass = 'gmilestone';
+ else
+ pClass = 'gtaskblue';
+ // check for split tasks
+ var splits = exports.findXMLNode(ass[pID], 'TimephasedData');
+ if (typeof splits == 'undefined')
+ j = 0;
+ else
+ j = splits.length;
+ var vSplitStart = pStart;
+ var vSplitEnd = pEnd;
+ var vSubCreated = false;
+ var vDepend = pDepend.replace(/,*[0-9]+[FS]F/g, '');
+ for (k = 0; k < j; k++) {
+ var vDuration = exports.getXMLNodeValue(splits[k], 'Value', 2, '0');
+ //remove all text
+ vDuration = '0' + vDuration.replace(/\D/g, '');
+ vDuration *= 1;
+ if ((vDuration == 0 && !vSubCreated) || (k + 1 == j && pGroup == 2)) {
+ // No time booked in the given period (or last entry)
+ // Make sure the parent task is set as a combined group
+ pGroup = 2;
+ // Handle last loop
+ if (k + 1 == j)
+ vDepend = pDepend.replace(/,*[0-9]+[FS]S/g, '');
+ // Now create a subtask
+ maxPID++;
+ vSplitEnd = exports.getXMLNodeValue(splits[k], (k + 1 == j) ? 'Finish' : 'Start', 2, '');
+ pGanttVar.AddTaskItem(new task_1.TaskItem(maxPID, pName, vSplitStart, vSplitEnd, 'gtaskblue', pLink, pMile, pRes, pComp, 0, pID, pOpen, vDepend, pCaption, pNotes, pGanttVar, pCost, pPlanStart, pPlanEnd, pDuration));
+ vSubCreated = true;
+ vDepend = '';
+ }
+ else if (vDuration != 0 && vSubCreated) {
+ vSplitStart = exports.getXMLNodeValue(splits[k], 'Start', 2, '');
+ vSubCreated = false;
+ }
+ }
+ if (vSubCreated)
+ pDepend = '';
+ // Finally add the task
+ pGanttVar.AddTaskItem(new task_1.TaskItem(pID, pName, pStart, pEnd, pClass, pLink, pMile, pRes, pComp, pGroup, pParent, pOpen, pDepend, pCaption, pNotes, pGanttVar, pCost, pPlanStart, pPlanEnd, pDuration));
+ }
+ }
+ }
+ else {
+ Task = pXmlDoc.getElementsByTagName('task');
+ n = Task.length;
+ for (i = 0; i < n; i++) {
+ // optional parameters may not have an entry
+ // Task ID must NOT be zero otherwise it will be skipped
+ var pID = exports.getXMLNodeValue(Task[i], 'pID', 1, 0);
+ if (pID != 0) {
+ var pName = exports.getXMLNodeValue(Task[i], 'pName', 2, 'No Task Name');
+ var pStart = exports.getXMLNodeValue(Task[i], 'pStart', 2, '');
+ var pEnd = exports.getXMLNodeValue(Task[i], 'pEnd', 2, '');
+ var pPlanStart = exports.getXMLNodeValue(Task[i], 'pPlanStart', 2, '');
+ var pPlanEnd = exports.getXMLNodeValue(Task[i], 'pPlanEnd', 2, '');
+ var pDuration = exports.getXMLNodeValue(Task[i], 'pDuration', 2, '');
+ var pLink = exports.getXMLNodeValue(Task[i], 'pLink', 2, '');
+ var pMile = exports.getXMLNodeValue(Task[i], 'pMile', 1, 0);
+ var pComp = exports.getXMLNodeValue(Task[i], 'pComp', 1, 0);
+ var pCost = exports.getXMLNodeValue(Task[i], 'pCost', 2, 0);
+ var pGroup = exports.getXMLNodeValue(Task[i], 'pGroup', 1, 0);
+ var pParent = exports.getXMLNodeValue(Task[i], 'pParent', 1, 0);
+ var pRes = exports.getXMLNodeValue(Task[i], 'pRes', 2, '');
+ var pOpen = exports.getXMLNodeValue(Task[i], 'pOpen', 1, 1);
+ var pDepend = exports.getXMLNodeValue(Task[i], 'pDepend', 2, '');
+ var pCaption = exports.getXMLNodeValue(Task[i], 'pCaption', 2, '');
+ var pNotes = exports.getXMLNodeValue(Task[i], 'pNotes', 2, '');
+ var pClass = exports.getXMLNodeValue(Task[i], 'pClass', 2, '');
+ if (typeof pClass == 'undefined') {
+ if (pGroup > 0)
+ pClass = 'ggroupblack';
+ else if (pMile > 0)
+ pClass = 'gmilestone';
+ else
+ pClass = 'gtaskblue';
+ }
+ // Finally add the task
+ pGanttVar.AddTaskItem(new task_1.TaskItem(pID, pName, pStart, pEnd, pClass, pLink, pMile, pRes, pComp, pGroup, pParent, pOpen, pDepend, pCaption, pNotes, pGanttVar, pCost, pPlanStart, pPlanEnd, pDuration));
+ }
+ }
+ }
+};
+exports.getXMLProject = function () {
+ var vProject = '';
+ for (var i = 0; i < this.vTaskList.length; i++) {
+ vProject += this.getXMLTask(i, true);
+ }
+ vProject += ' ';
+ return vProject;
+};
+exports.getXMLTask = function (pID, pIdx) {
+ var i = 0;
+ var vIdx = -1;
+ var vTask = '';
+ var vOutFrmt = date_utils_1.parseDateFormatStr(this.getDateInputFormat() + ' HH:MI');
+ if (pIdx === true)
+ vIdx = pID;
+ else {
+ for (i = 0; i < this.vTaskList.length; i++) {
+ if (this.vTaskList[i].getID() == pID) {
+ vIdx = i;
+ break;
+ }
+ }
+ }
+ if (vIdx >= 0 && vIdx < this.vTaskList.length) {
+ /* Simplest way to return case sensitive node names is to just build a string */
+ vTask = '';
+ vTask += '' + this.vTaskList[vIdx].getID() + ' ';
+ vTask += '' + this.vTaskList[vIdx].getName() + ' ';
+ vTask += '' + date_utils_1.formatDateStr(this.vTaskList[vIdx].getStart(), vOutFrmt, this.vLangs[this.vLang]) + ' ';
+ vTask += '' + date_utils_1.formatDateStr(this.vTaskList[vIdx].getEnd(), vOutFrmt, this.vLangs[this.vLang]) + ' ';
+ vTask += '' + date_utils_1.formatDateStr(this.vTaskList[vIdx].getPlanStart(), vOutFrmt, this.vLangs[this.vLang]) + ' ';
+ vTask += '' + date_utils_1.formatDateStr(this.vTaskList[vIdx].getPlanEnd(), vOutFrmt, this.vLangs[this.vLang]) + ' ';
+ vTask += '' + this.vTaskList[vIdx].getDuration() + ' ';
+ vTask += '' + this.vTaskList[vIdx].getClass() + ' ';
+ vTask += '' + this.vTaskList[vIdx].getLink() + ' ';
+ vTask += '' + this.vTaskList[vIdx].getMile() + ' ';
+ if (this.vTaskList[vIdx].getResource() != '\u00A0')
+ vTask += '' + this.vTaskList[vIdx].getResource() + ' ';
+ vTask += '' + this.vTaskList[vIdx].getCompVal() + ' ';
+ vTask += '' + this.vTaskList[vIdx].getCost() + ' ';
+ vTask += '' + this.vTaskList[vIdx].getGroup() + ' ';
+ vTask += '' + this.vTaskList[vIdx].getParent() + ' ';
+ vTask += '' + this.vTaskList[vIdx].getOpen() + ' ';
+ vTask += '';
+ var vDepList = this.vTaskList[vIdx].getDepend();
+ for (i = 0; i < vDepList.length; i++) {
+ if (i > 0)
+ vTask += ',';
+ if (vDepList[i] > 0)
+ vTask += vDepList[i] + this.vTaskList[vIdx].getDepType()[i];
+ }
+ vTask += ' ';
+ vTask += '' + this.vTaskList[vIdx].getCaption() + ' ';
+ var vTmpFrag = document.createDocumentFragment();
+ var vTmpDiv = draw_utils_1.newNode(vTmpFrag, 'div', null, null, this.vTaskList[vIdx].getNotes().innerHTML);
+ vTask += '' + vTmpDiv.innerHTML + ' ';
+ vTask += ' ';
+ }
+ return vTask;
+};
+
+},{"./task":10,"./utils/date_utils":11,"./utils/draw_utils":12,"./utils/general_utils":13}]},{},[1])(1)
+});
diff --git a/Metronic/assets/global/plugins/dhtmlxgantt/dhtmlxgantt.css b/Metronic/assets/global/plugins/dhtmlxgantt/dhtmlxgantt.css
new file mode 100644
index 000000000..289fae403
--- /dev/null
+++ b/Metronic/assets/global/plugins/dhtmlxgantt/dhtmlxgantt.css
@@ -0,0 +1 @@
+.gridHoverStyle,.gridSelection,.timelineSelection{background-color:#fff3a1}.gantt_grid_scale .gantt_grid_head_cell{color:#a6a6a6;border-top:none!important;border-right:none!important}.gantt_grid_data .gantt_cell{border-right:none;color:#454545}.gantt_task_link .gantt_link_arrow_right{border-width:6px;margin-top:-3px}.gantt_task_link .gantt_link_arrow_left{border-width:6px;margin-left:-6px;margin-top:-3px}.gantt_task_link .gantt_link_arrow_down,.gantt_task_link .gantt_link_arrow_up{border-width:6px}.gantt_task_line .gantt_task_progress_drag{bottom:-4px;height:10px;margin-left:-8px;width:16px}.chartHeaderBg{background-color:#fff}.gantt_task .gantt_task_scale .gantt_scale_cell{color:#a6a6a6;border-right:1px solid #ebebeb}.gantt_row.gantt_project,.gantt_row.odd.gantt_project{background-color:#edffef}.gantt_task_row.gantt_project,.gantt_task_row.odd.gantt_project{background-color:#f5fff6}.gantt_task_line.gantt_project{background-color:#65c16f;border:1px solid #3c9445}.gantt_task_line.gantt_project .gantt_task_progress{background-color:#46ad51}.buttonBg{background:#fff}.gantt_cal_light .gantt_btn_set{margin:5px 10px}.gantt_btn_set.gantt_cancel_btn_set{background:#fff;color:#454545;border:1px solid #cecece}.gantt_btn_set.gantt_save_btn_set{background:#3db9d3;text-shadow:0 -1px 0 #248a9f;color:#fff}.gantt_btn_set.gantt_delete_btn_set{text-shadow:0 -1px 0 #6f6f6f;background:#ec8e00;text-shadow:0 -1px 0 #a60;color:#fff}.gantt_cal_light_wide{padding-left:0!important;padding-right:0!important}.gantt_cal_light_wide .gantt_cal_larea{border-left:none!important;border-right:none!important}.gantt_popup_button.gantt_ok_button{background:#3db9d3;text-shadow:0 -1px 0 #248a9f;color:#fff;font-weight:700;border-width:0}.gantt_popup_button.gantt_cancel_button{font-weight:700;color:#454544}.gantt_popup_title{background-color:#fff}.gantt_popup_shadow{box-shadow:3px 3px 3px rgba(0,0,0,.07)}.gantt_qi_big_icon.icon_edit{color:#454545;background:#fff}.gantt_qi_big_icon.icon_delete{text-shadow:0 -1px 0 #a60;background:#ec8e00;color:#fff;border-width:0}.gantt_tooltip{box-shadow:3px 3px 3px rgba(0,0,0,.07);border-left:1px solid rgba(0,0,0,.07);border-top:1px solid rgba(0,0,0,.07);font-size:8pt;color:#454545}.gantt_container,.gantt_tooltip{background-color:#fff;font-family:Arial}.gantt_container{font-size:13px;border:1px solid #cecece;position:relative;white-space:nowrap;overflow-x:hidden;overflow-y:hidden}.gantt_task_scroll{overflow-x:scroll}.gantt_grid,.gantt_task{position:relative;overflow-x:hidden;overflow-y:hidden;display:inline-block;vertical-align:top}.gantt_grid_scale,.gantt_task_scale{color:#6b6b6b;font-size:12px;border-bottom:1px solid #cecece;box-sizing:border-box}.gantt_grid_scale,.gantt_task_scale,.gantt_task_vscroll{background-color:#fff}.gantt_scale_line{box-sizing:border-box;-moz-box-sizing:border-box;border-top:1px solid #cecece}.gantt_scale_line:first-child{border-top:none}.gantt_grid_head_cell{display:inline-block;vertical-align:top;border-right:1px solid #cecece;text-align:center;position:relative;cursor:default;height:100%;box-sizing:border-box;-moz-box-sizing:border-box;line-height:33px;-moz-user-select:-moz-none;-webkit-user-select:none;user-select:none;overflow:hidden}.gantt_scale_line{clear:both}.gantt_grid_data{width:100%;overflow:hidden;position:relative}.gantt_row{position:relative;-webkit-user-select:none;-moz-user-select:none;-moz-user-select:-moz-none}.gantt_add,.gantt_grid_head_add{width:100%;height:100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NTQ3MjMyMENDNkI0MTFFMjk4MTI5QTg3MDhFNDVDQTkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NTQ3MjMyMERDNkI0MTFFMjk4MTI5QTg3MDhFNDVDQTkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo1NDcyMzIwQUM2QjQxMUUyOTgxMjlBODcwOEU0NUNBOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo1NDcyMzIwQkM2QjQxMUUyOTgxMjlBODcwOEU0NUNBOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PshZT8UAAABbSURBVHjaYrTdeZmBEsCER+4wEP+H4sPkGGCDg020ARR7gb4GIAcYDKMDdPnDyAbYkGG5DVW9cIQMvUdBBAuUY4vDz8iAcZinA2zgCHqAYQMseAywJcYFAAEGAM+UFGuohFczAAAAAElFTkSuQmCC);background-position:50%;background-repeat:no-repeat;cursor:pointer;position:relative;-moz-opacity:.3;opacity:.3}.gantt_grid_head_cell.gantt_grid_head_add{-moz-opacity:.6;opacity:.6;top:0}.gantt_grid_head_cell.gantt_grid_head_add:hover{-moz-opacity:1;opacity:1}.gantt_grid_data .gantt_row.odd:hover,.gantt_grid_data .gantt_row:hover{background-color:#fff3a1}.gantt_grid_data .gantt_row.odd:hover .gantt_add,.gantt_grid_data .gantt_row:hover .gantt_add{-moz-opacity:1;opacity:1}.gantt_row,.gantt_task_row{border-bottom:1px solid #ebebeb;background-color:#fff}.gantt_row.odd,.gantt_task_row.odd{background-color:#fff}.gantt_cell,.gantt_grid_head_cell,.gantt_row,.gantt_scale_cell,.gantt_task_cell,.gantt_task_row{box-sizing:border-box;-moz-box-sizing:border-box}.gantt_grid_head_cell,.gantt_scale_cell{line-height:inherit}.gantt_grid_scale .gantt_grid_column_resize_wrap{cursor:col-resize;position:absolute;width:13px;margin-left:-7px}.gantt_grid_column_resize_wrap .gantt_grid_column_resize{background-color:#cecece;height:100%;width:1px;margin:0 auto}.gantt_drag_marker.gantt_grid_resize_area{background-color:hsla(0,0%,91%,.5);border-left:1px solid #cecece;border-right:1px solid #cecece;height:100%;width:100%;box-sizing:border-box}.gantt_row{display:flex}.gantt_row>div{flex-shrink:0;flex-grow:0}.gantt_cell{vertical-align:top;border-right:1px solid #ebebeb;padding-left:6px;padding-right:6px;height:100%;overflow:hidden;white-space:nowrap;font-size:13px}.gantt_cell_tree{display:flex;flex-wrap:nowrap}.gantt_grid_data .gantt_last_cell,.gantt_grid_scale .gantt_last_cell,.gantt_task .gantt_task_scale .gantt_scale_cell.gantt_last_cell,.gantt_task_bg .gantt_last_cell{border-right-width:0}.gantt_task .gantt_task_scale .gantt_scale_cell.gantt_last_cell{border-right-width:1px}.gantt_task_bg{overflow:hidden}.gantt_scale_cell{display:inline-block;white-space:nowrap;overflow:hidden;border-right:1px solid #cecece;text-align:center;height:100%}.gantt_task_cell{display:inline-block;height:100%;border-right:1px solid #ebebeb}.gantt_layout_cell.gantt_ver_scroll{width:0;background-color:transparent;height:1px;overflow-x:hidden;overflow-y:scroll;position:absolute;right:0;z-index:1}.gantt_ver_scroll>div{width:1px;height:1px}.gantt_hor_scroll{height:0;background-color:transparent;width:100%;clear:both;overflow-x:scroll;overflow-y:hidden}.gantt_layout_cell .gantt_hor_scroll{position:absolute}.gantt_hor_scroll>div{width:5000px;height:1px}.gantt_tree_icon,.gantt_tree_indent{flex-grow:0;flex-shrink:0}.gantt_tree_indent{width:15px;height:100%}.gantt_tree_content,.gantt_tree_icon{vertical-align:top}.gantt_tree_icon{width:28px;height:100%;background-repeat:no-repeat;background-position:50%}.gantt_tree_content{height:100%;white-space:nowrap;min-width:0}.gantt_tree_icon.gantt_open{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAArklEQVQ4T2NkoBJgpJI5DEPAoFOnTv0/c+YMQR+bmJgwmJmZwX2E4bVp06b9j4yMZODg4MBp2I8fPxiWL1/OkJWVNUAGcXJyMnz//h3uQrJdRLFBIAPQAchlJLsIFuCMjIwM////B5sJMoRkg2CuIdtrQcHBDOxsbHBfCQgIMHz48AHO//nrF8O6tWsJR7+7uzsDIxMTznT0/98/hp07d+I3iGopm2DewKFg8OV+AJWkfRMrTobLAAAAAElFTkSuQmCC);width:18px;cursor:pointer}.gantt_tree_icon.gantt_close{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAkUlEQVQ4T2NkoBJgpJI5DEPAoFOnTv0/c+YMQR+bmJgwmJmZwX2E4bVp06b9j4yMZODg4MBp2I8fPxiWL1/OkJWVNeIN4uTkxAin79+/M5AcRtgCHGQIyQbhijaiDQoKDmZgZ2PDGf0/f/1iWLd2LeHod3d3Z2BkYsJp0P9//xh27tyJ3yCqpWyCeQOHgsGX+wEZpW4T5LCxKwAAAABJRU5ErkJggg==);width:18px;cursor:pointer}.gantt_tree_icon.gantt_blank{width:18px}.gantt_tree_icon.gantt_folder_open{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAs0lEQVQ4T62T0Q2EIBBEpQlzuaaMsQoqooqLsSljbMLLmMxmUXBR4U+Qt7Mzi2sqLVeJ00SgEMKWAnvvzYLyAyHfT5sU2fXDJSwCAXK8MI0/UTkva7IIFJsg3NSwnKdFoKtAWOQ1CN7CEqeTotE5L7QyJhmBcklZM4ZgTiAr3iOU3kD93ppO5SkMjB1EeXdBWoSkRql3YeIRe+cGvktS056JR9wsmeBUkujCfNXWCPC8GugPqn5ii/hV+FoAAAAASUVORK5CYII=)}.gantt_tree_icon.gantt_folder_closed{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAfElEQVQ4T2NkoBJgpJI5DCgGTZ8+/T82gzMzMwlaCFcAM0RKQgyrI/0Dg/EahmIQyBB0DRvXr4W78tmLV1gtAbmYoEEgnciG4QpTogzCFyEwSyg2CBS2oCAZNQh3cA+hMAJ5AlcKxuVBlOgnNgVjMwyUrQjmamKLGaoZBAAOTFyLnFFW4wAAAABJRU5ErkJggg==)}.gantt_tree_icon.gantt_file{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAeElEQVQ4T2NkoBJgRDZn+vTp/wmZm5mZiaIHph7DICkJMUJmMfgHBmMYhtUgbAo3rl+L4lp0NUQbBPI2umuRDaPIIFAYwAyjv0HoMQALM5JdhG4QLMxGDcKdyIdoGIE89OzFK4KZF5Rl8EY/QROQFGA1iBQD0NUCAJVjcxO0naAQAAAAAElFTkSuQmCC)}.gantt_grid_head_cell .gantt_sort{position:absolute;right:5px;top:8px;width:7px;height:13px;background-repeat:no-repeat;background-position:50%}.gantt_grid_head_cell .gantt_sort.gantt_asc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAANCAYAAABlyXS1AAAARUlEQVR4nGNgQAKGxib/GbABkIS7b8B/DAUwCRiGK0CXwFBAb1DfP/U/LszwHwi2X7qFgUEArBtdAVwCBmAKMCSQFSDzAWXXaOHsXeqkAAAAAElFTkSuQmCC)}.gantt_grid_head_cell .gantt_sort.gantt_desc{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAANCAYAAABlyXS1AAAARUlEQVR42mNgQAL1/VP/M2ADIIntF2/9x1AAlrh0C47hCmA60DFYwX88gIFGwNDY5D8uDFbg7hvwHx2jmIBTAlkB0e4BAEjlaNtBWJPnAAAAAElFTkSuQmCC)}.gantt_inserted,.gantt_updated{font-weight:700}.gantt_deleted{text-decoration:line-through}.gantt_invalid{background-color:#ffe0e0}.gantt_error{color:red}.gantt_status{right:1px;padding:5px 10px;background:hsla(0,0%,61%,.1);position:absolute;top:1px;transition:opacity .2s;opacity:0}.gantt_status.gantt_status_visible{opacity:1}#gantt_ajax_dots span{transition:opacity .2s;background-repeat:no-repeat;opacity:0}#gantt_ajax_dots span.gantt_dot_visible{opacity:1}.gantt_column_drag_marker{border:1px solid #cecece;opacity:.8}.gantt_grid_head_cell_dragged{border:1px solid #cecece;opacity:.3}.gantt_grid_target_marker{position:absolute;top:0;width:2px;height:100%;background-color:#ffa011;transform:translateX(-1px)}.gantt_grid_target_marker:after,.gantt_grid_target_marker:before{display:block;content:"";position:absolute;left:-5px;width:0;height:0;border:6px solid transparent}.gantt_grid_target_marker:before{border-top-color:#ffa011}.gantt_grid_target_marker:after{bottom:0;border-bottom-color:#ffa011}.gantt_message_area{position:fixed;right:5px;width:250px;z-index:1000}.gantt-info{min-width:120px;padding:4px 4px 4px 20px;font-family:Arial;z-index:10000;margin:5px;margin-bottom:10px;transition:all .5s ease}.gantt-info.hidden{height:0;padding:0;border-width:0;margin:0;overflow:hidden}.gantt_modal_box{overflow:hidden;display:inline-block;min-width:250px;width:250px;text-align:center;position:fixed;z-index:20000;box-shadow:3px 3px 3px rgba(0,0,0,.07);font-family:Arial;border-radius:6px;border:1px solid #cecece;background:#fff}.gantt_popup_title{border-top-left-radius:6px;border-top-right-radius:6px;border-width:0}.gantt_button,.gantt_popup_button{border:1px solid #cecece;height:30px;line-height:30px;display:inline-block;margin:0 5px;border-radius:4px;background:#fff}.gantt-info,.gantt_button,.gantt_popup_button{user-select:none;-webkit-user-select:none;-moz-user-select:-moz-none;cursor:pointer}.gantt_popup_text{overflow:hidden}.gantt_popup_controls{border-radius:6px;padding:10px}.gantt_popup_button{min-width:100px}div.dhx_modal_cover{background-color:#000;cursor:default;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=20);opacity:.2;position:fixed;z-index:19999;left:0;top:0;width:100%;height:100%;border:none;zoom:1}.gantt-info img,.gantt_modal_box img{float:left;margin-right:20px}.gantt-alert-error,.gantt-confirm-error{border:1px solid red}.gantt_button input,.gantt_popup_button div{border-radius:4px;font-size:14px;box-sizing:content-box;padding:0;margin:0;vertical-align:top}.gantt_popup_title{border-bottom:1px solid #cecece;height:40px;line-height:40px;font-size:20px}.gantt_popup_text{margin:15px 15px 5px;font-size:14px;color:#000;min-height:30px;border-radius:6px}.gantt-error,.gantt-info{font-size:14px;color:#000;box-shadow:3px 3px 3px rgba(0,0,0,.07);padding:0;background-color:#fff;border-radius:3px;border:1px solid #fff}.gantt-info div{padding:5px 10px;background-color:#fff;border-radius:3px;border:1px solid #cecece}.gantt-error{background-color:#d81b1b;border:1px solid #ff3c3c}.gantt-error div{background-color:#d81b1b;border:1px solid #940000;color:#fff}.gantt-warning{background-color:#ff9000;border:1px solid #ffa633}.gantt-warning div{background-color:#ff9000;border:1px solid #b36500;color:#fff}.gantt_data_area div,.gantt_grid div{-ms-touch-action:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.gantt_data_area{position:relative;overflow-x:hidden;overflow-y:hidden;-moz-user-select:-moz-none;-webkit-user-select:none;user-select:none}.gantt_links_area{position:absolute;left:0;top:0}.gantt_side_content,.gantt_task_content,.gantt_task_progress{line-height:inherit;overflow:hidden;height:100%}.gantt_task_content{font-size:12px;color:#fff;width:100%;top:0;cursor:pointer;position:absolute;white-space:nowrap;text-align:center}.gantt_task_progress{text-align:center;z-index:0;background:#299cb4}.gantt_task_progress_wrapper{border-radius:inherit;position:relative;width:100%;height:100%;overflow:hidden}.gantt_task_line{border-radius:2px;position:absolute;box-sizing:border-box;background-color:#3db9d3;border:1px solid #2898b0;-webkit-user-select:none;-moz-user-select:none;-moz-user-select:-moz-none}.gantt_task_line.gantt_drag_move div{cursor:move}.gantt_touch_move,.gantt_touch_progress .gantt_touch_resize{transform:scale(1.02,1.1);transform-origin:50%}.gantt_touch_progress .gantt_task_progress_drag,.gantt_touch_resize .gantt_task_drag{transform:scaleY(1.3);transform-origin:50%}.gantt_side_content{position:absolute;white-space:nowrap;color:#6e6e6e;top:0;font-size:11px}.gantt_side_content.gantt_left{right:100%;padding-right:20px}.gantt_side_content.gantt_right{left:100%;padding-left:20px}.gantt_side_content.gantt_link_crossing{bottom:8.75px;top:auto}.gantt_link_arrow,.gantt_task_link .gantt_line_wrapper{position:absolute;cursor:pointer}.gantt_line_wrapper div{background-color:#ffa011}.gantt_task_link:hover .gantt_line_wrapper div{box-shadow:0 0 5px 0 #ffa011}.gantt_task_link div.gantt_link_arrow{background-color:transparent;border-style:solid;width:0;height:0}.gantt_link_control{position:absolute;width:20px;top:0}.gantt_link_control div{display:none;cursor:pointer;box-sizing:border-box;position:relative;top:50%;margin-top:-7.5px;vertical-align:middle;border:1px solid #929292;border-radius:6.5px;height:13px;width:13px;background-color:#f0f0f0}.gantt_link_control.task_right div.gantt_link_point{margin-left:7px}.gantt_link_control div:hover{background-color:#fff}.gantt_link_control.task_left{left:-20px}.gantt_link_control.task_right{right:-20px}.gantt_link_target .gantt_link_control div,.gantt_task_line.gantt_drag_move .gantt_link_control div,.gantt_task_line.gantt_drag_move .gantt_task_drag,.gantt_task_line.gantt_drag_move .gantt_task_progress_drag,.gantt_task_line.gantt_drag_progress .gantt_link_control div,.gantt_task_line.gantt_drag_progress .gantt_task_drag,.gantt_task_line.gantt_drag_progress .gantt_task_progress_drag,.gantt_task_line.gantt_drag_resize .gantt_link_control div,.gantt_task_line.gantt_drag_resize .gantt_task_drag,.gantt_task_line.gantt_drag_resize .gantt_task_progress_drag,.gantt_task_line.gantt_selected .gantt_link_control div,.gantt_task_line.gantt_selected .gantt_task_drag,.gantt_task_line.gantt_selected .gantt_task_progress_drag,.gantt_task_line:hover .gantt_link_control div,.gantt_task_line:hover .gantt_task_drag,.gantt_task_line:hover .gantt_task_progress_drag{display:block}.gantt_link_source,.gantt_link_target{box-shadow:0 0 3px #3db9d3}.gantt_link_target.link_finish_allow,.gantt_link_target.link_start_allow{box-shadow:0 0 3px #ffbf5e}.gantt_link_target.link_finish_deny,.gantt_link_target.link_start_deny{box-shadow:0 0 3px #e87e7b}.link_finish_allow .gantt_link_control.task_end_date div,.link_start_allow .gantt_link_control.task_start_date div{background-color:#ffbf5e;border-color:#ffa011}.link_finish_deny .gantt_link_control.task_end_date div,.link_start_deny .gantt_link_control.task_start_date div{background-color:#e87e7b;border-color:#dd3e3a}.gantt_link_arrow_right{border-width:4px 0 4px 6px;border-top-color:transparent!important;border-right-color:transparent!important;border-bottom-color:transparent!important;border-left-color:#ffa011;margin-top:-1px}.gantt_link_arrow_left{border-width:4px 6px 4px 0;margin-top:-1px;border-top-color:transparent!important;border-right-color:#ffa011;border-bottom-color:transparent!important;border-left-color:transparent!important}.gantt_link_arrow_up{border-width:0 4px 6px;border-color:transparent transparent #ffa011;border-top-color:transparent!important;border-right-color:transparent!important;border-bottom-color:#ffa011;border-left-color:transparent!important}.gantt_link_arrow_down{border-width:4px 6px 0 4px;border-top-color:#ffa011;border-right-color:transparent!important;border-bottom-color:transparent!important;border-left-color:transparent!important}.gantt_task_drag,.gantt_task_progress_drag{cursor:ew-resize;display:none;position:absolute}.gantt_task_drag.task_right{cursor:e-resize}.gantt_task_drag.task_left{cursor:w-resize}.gantt_task_drag{height:100%;width:8px;z-index:1;top:-1px}.gantt_task_drag.task_left{left:-7px}.gantt_task_drag.task_right{right:-7px}.gantt_task_progress_drag{height:8px;width:8px;bottom:-4px;margin-left:-4px;background-position:bottom;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAYAAAB24g05AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MkY3Rjk0RUVDMkYzMTFFMkI1OThEQTA3ODU0OTkzMEEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MkY3Rjk0RUZDMkYzMTFFMkI1OThEQTA3ODU0OTkzMEEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjdGOTRFQ0MyRjMxMUUyQjU5OERBMDc4NTQ5OTMwQSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDoyRjdGOTRFREMyRjMxMUUyQjU5OERBMDc4NTQ5OTMwQSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PobPBzIAAADkSURBVHjaYpk2bRoDDsAExL1QdjEQ/8OmiAWHZk4gXqymqhQM4ty6fU8OSMUA8XdiDBAB4k0a6iqWRga6EKcwMQXduHlnL5DpB8Rv0J2JDFSA+JiOtgZcMwiA2CAxkBxUDVYDLEAKgIpV9XQ0MZwFEgPJAZnHoWpRDAgC4n2W5saiQKfjClQGkBxQDciL+6B6wAbkA/EqJwdrTkUFOQZCAKQGpBbIXA3SCzJggo+XK7OEuBgDsQCkFqgHrBfsBT5eHgZSAUwP2IBfv36TbABMDygdtK1Zv6UESLORaAbIhG6AAAMAKN8wE24DXWcAAAAASUVORK5CYII=);background-repeat:no-repeat;z-index:1}.gantt_task_progress_drag:hover{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAALCAYAAAB24g05AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAs0lEQVQoz6WMPW7CQBgFJxZaiZ60qcgdwjVMmzu8gpwhDULabXyBdHAGuzRHivQiQZovigS2+Jtu95t5T03TMITtCtjEc5VSOgx5k5F4CnxJWgKUUl5sv6eUvk/daiCeAe1fDCCpBtq4jQ/YngO9pMWpGH99OOcDtt8ifmWEuO3D/R+wXQOdpGcuIGkGdNFQ2RawlTTlSsLd2RY55+O95JyPFQ/y8MAE+CylfADpxvYHWP8CXj+JR4wdKHYAAAAASUVORK5CYII=)}.gantt_link_tooltip{box-shadow:3px 3px 3px #888;background-color:#fff;border-left:1px dotted #cecece;border-top:1px dotted #cecece;font-family:Tahoma;font-size:8pt;color:#444;padding:6px;line-height:20px}.gantt_link_direction{height:0;border:0 none #ffa011;border-bottom-style:dashed;border-bottom-width:2px;transform-origin:0 0;-ms-transform-origin:0 0;-webkit-transform-origin:0 0;z-index:2;margin-left:1px;position:absolute}.gantt_grid_data .gantt_row.gantt_selected,.gantt_grid_data .gantt_row.odd.gantt_selected,.gantt_task_row.gantt_selected{background-color:#fff3a1}.gantt_task_row.gantt_selected .gantt_task_cell{border-right-color:#ffec6e}.gantt_task_line.gantt_selected{box-shadow:0 0 5px #299cb4}.gantt_task_line.gantt_project.gantt_selected{box-shadow:0 0 5px #46ad51}.gantt_task_line.gantt_milestone{visibility:hidden;background-color:#d33daf;border:0 solid #61164f;box-sizing:content-box;-moz-box-sizing:content-box}.gantt_task_line.gantt_milestone div{visibility:visible}.gantt_task_line.gantt_milestone .gantt_task_content{background:inherit;border:inherit;border-width:1px;border-radius:inherit;box-sizing:border-box;-moz-box-sizing:border-box;transform:rotate(45deg)}.gantt_task_line.gantt_task_inline_color{border-color:#999}.gantt_task_line.gantt_task_inline_color .gantt_task_progress{background-color:#363636;opacity:.2}.gantt_task_line.gantt_task_inline_color.gantt_project.gantt_selected,.gantt_task_line.gantt_task_inline_color.gantt_selected{box-shadow:0 0 5px #999}.gantt_task_link.gantt_link_inline_color:hover .gantt_line_wrapper div{box-shadow:0 0 5px 0 #999}.gantt_critical_task{background-color:#e63030;border-color:#9d3a3a}.gantt_critical_task .gantt_task_progress{background-color:rgba(0,0,0,.4)}.gantt_critical_link .gantt_line_wrapper>div{background-color:#e63030}.gantt_critical_link .gantt_link_arrow{border-color:#e63030}.gantt_btn_set:focus,.gantt_cell:focus,.gantt_grid_head_cell:focus,.gantt_popup_button:focus,.gantt_qi_big_icon:focus,.gantt_row:focus{box-shadow:inset 0 0 1px 1px #4d90fe}.gantt_split_parent,.gantt_split_subproject{opacity:.1;pointer-events:none}.gantt_unselectable,.gantt_unselectable div{-webkit-user-select:none;-moz-user-select:none;-moz-user-select:-moz-none}.gantt_cal_light{-webkit-tap-highlight-color:transparent;background:#fff;border-radius:6px;font-family:Arial;font-size:13px;border:1px solid #cecece;color:#6b6b6b;font-size:12px;position:absolute;z-index:10001;width:550px;height:250px;box-shadow:3px 3px 3px rgba(0,0,0,.07)}.gantt_cal_light_wide{width:650px}.gantt_cal_light select{font-family:Arial;border:1px solid #cecece;font-size:13px;padding:2px;margin:0}.gantt_cal_ltitle{padding:7px 10px;overflow:hidden;-webkit-border-top-left-radius:6px;-webkit-border-bottom-left-radius:0;-webkit-border-top-right-radius:6px;-webkit-border-bottom-right-radius:0;-moz-border-radius-topleft:6px;-moz-border-radius-bottomleft:0;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:0;border-top-left-radius:6px;border-bottom-left-radius:0;border-top-right-radius:6px;border-bottom-right-radius:0}.gantt_cal_ltitle,.gantt_cal_ltitle span{white-space:nowrap}.gantt_cal_lsection{color:#727272;font-weight:700;padding:12px 0 5px 10px}.gantt_cal_lsection .gantt_fullday{float:right;margin-right:5px;font-size:12px;font-weight:400;line-height:20px;vertical-align:top;cursor:pointer}.gantt_cal_lsection{font-size:13px}.gantt_cal_ltext{padding:2px 10px;overflow:hidden}.gantt_cal_ltext textarea{overflow-y:auto;overflow-x:hidden;font-family:Arial;font-size:13px;box-sizing:border-box;border:1px solid #cecece;height:100%;width:100%;outline:none!important;resize:none}.gantt_section_constraint [data-constraint-time-select]{margin-left:20px}.gantt_time{font-weight:700}.gantt_cal_light .gantt_title{padding-left:10px}.gantt_cal_larea{border:1px solid #cecece;border-left:none;border-right:none;background-color:#fff;overflow:hidden;height:1px}.gantt_btn_set{margin:10px 7px 5px 10px;padding:5px 15px 5px 10px;float:left;border-radius:4px;border:0 solid #cecece;height:32px;font-weight:700;background:#fff;box-sizing:border-box;cursor:pointer}.gantt_hidden{display:none}.gantt_btn_set div{float:left;font-size:13px;height:22px;line-height:22px;background-repeat:no-repeat;vertical-align:middle}.gantt_save_btn{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MTk1OUU5RDFDMzA0MTFFMkExMUZBQTdDNDAzOUE5RjMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MTk1OUU5RDJDMzA0MTFFMkExMUZBQTdDNDAzOUE5RjMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoxOTU5RTlDRkMzMDQxMUUyQTExRkFBN0M0MDM5QTlGMyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDoxOTU5RTlEMEMzMDQxMUUyQTExRkFBN0M0MDM5QTlGMyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjDroXYAAAEXSURBVHjaYvz//z8DJYCRUgPIAUxAbAnEHiAHMIBcQCwGaRYXF3e6evXqoffv39/dv38/CymaGSUkJBzv3LlzCsj///fv3wdAihkkIQnEvkAshU8zLy+v7a1bt06ANP/79+87kDIAy505cybq06dPr3p7ezuwGQLTfOPGjWP/ESAZLg8kPKBO+g01RBJNszWyZqC6uSgWgIg/f/4shxnS2dnZBjMEqNkSFGBImi8CKTYMA4BYCGjIczRDHC5dunQQSfN7IKWI4UUkjjdMMdCwnw8ePLjwHxV4Yw1gZA5Q47z/2EELzhhCE+ABGvIQWSeQvwcU38QaAML2wHj+C/X3MyAlijeB4ZBoBOIPQGxJKIVSnBsBAgwABddBclWfcZUAAAAASUVORK5CYII=);margin-top:2px;width:21px}.gantt_cancel_btn{margin-top:2px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDkzMDA3MzlDMzA0MTFFMjg2QTVFMzFEQzgwRkJERDYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDkzMDA3M0FDMzA0MTFFMjg2QTVFMzFEQzgwRkJERDYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowOTMwMDczN0MzMDQxMUUyODZBNUUzMURDODBGQkRENiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowOTMwMDczOEMzMDQxMUUyODZBNUUzMURDODBGQkRENiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PmYuYOUAAAEdSURBVHjaYvz//z8DJYAFXWDlypU8QKoIiD2A2AwqfAqIdwBxX3h4+Bdk9YzILgBqtgdS84FYEYeF94E4EWjIQZgAE5LmQCB1AKoZZKMPEAtAMYh9GSp3AKjWD8UFQAEhIPshEIOc3wHENUBb/qJ57SyQMoJyPwKxElDNO1gYFEE17wMKVmIJlzNQzeegrjaA6qmBecEbSvfh0GwMxGeBhoPoemQ9MAO0kEIbl2YTqPAFKK2IbMB3AjabYIkRZmQD7kNpMyI0G0PpO8gGbIUFJj7NQDk2INWIrIcJKfBAKcwJqvkcDs0TgFgXGo19KCkRmpDWQdWDEk0NUoCBoq0FqhkE/IEWbKJKUmZEz43QzFSKIzN1481M5ACAAAMAlfl/lCwRpagAAAAASUVORK5CYII=);width:20px}.gantt_delete_btn{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MjFENzI3NUNDMzA0MTFFMjhBNjJGQTc3MUIyQzYzNEYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MjFENzI3NURDMzA0MTFFMjhBNjJGQTc3MUIyQzYzNEYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyMUQ3Mjc1QUMzMDQxMUUyOEE2MkZBNzcxQjJDNjM0RiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDoyMUQ3Mjc1QkMzMDQxMUUyOEE2MkZBNzcxQjJDNjM0RiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PmUD0gAAAABvSURBVHjaYvz//z8DIyMjAxYQicReji4J0ofKQNP8HwmgGQbXB8IsWGwDSSwDuioKjY9uBthVjFAXYHUGAQA2kYmBUoAUBpGk0LAwgBvwH+YX4mkwptgLowYMRgOITUyYKRFIN/wnDjQgJySAAAMApryKzL8wjfUAAAAASUVORK5CYII=);margin-top:2px;width:20px}.gantt_cal_cover{width:100%;height:100%;position:absolute;z-index:10000;top:0;left:0;background-color:#000;opacity:.1;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=10)}.gantt_custom_button{padding:0 3px;font-family:Arial;font-size:13px;font-weight:400;margin-right:10px;margin-top:-5px;cursor:pointer;float:right;height:21px;width:90px;border:1px solid #cecece;text-align:center;border-radius:4px}.gantt_custom_button div{cursor:pointer;float:none;height:21px;line-height:21px;vertical-align:middle}.gantt_custom_button div:first-child{display:none}.gantt_cal_light_wide{width:580px;padding:2px 4px}.gantt_cal_light_wide .gantt_cal_larea{box-sizing:border-box;border:1px solid #cecece}.gantt_cal_light_wide .gantt_cal_lsection{border:0;float:left;text-align:right;width:80px;height:20px;padding:5px 10px 0 0}.gantt_cal_light_wide .gantt_wrap_section{position:relative;padding:10px 0;overflow:hidden;border-bottom:1px solid #ebebeb}.gantt_cal_light_wide .gantt_section_time{overflow:hidden;padding-top:2px!important;padding-right:0;height:20px!important}.gantt_cal_light_wide .gantt_cal_ltext{padding-right:0}.gantt_cal_light_wide .gantt_cal_larea{padding:0 10px;width:100%}.gantt_cal_light_wide .gantt_section_time{background:transparent}.gantt_cal_light_wide .gantt_cal_checkbox label{padding-left:0}.gantt_cal_light_wide .gantt_cal_lsection .gantt_fullday{float:none;margin-right:0;font-weight:700;cursor:pointer}.gantt_cal_light_wide .gantt_custom_button{position:absolute;top:0;right:0;margin-top:2px}.gantt_cal_light_wide .gantt_repeat_right{margin-right:55px}.gantt_cal_light_wide.gantt_cal_light_full{width:738px}.gantt_cal_wide_checkbox input{margin-top:8px;margin-left:14px}.gantt_cal_light input{font-size:13px}.gantt_section_time{background-color:#fff;white-space:nowrap;padding:2px 10px 5px;padding-top:2px!important}.gantt_section_time .gantt_time_selects{float:left;height:25px}.gantt_section_time .gantt_time_selects select{height:23px;padding:2px;border:1px solid #cecece}.gantt_duration{width:100px;height:23px;float:left;white-space:nowrap;margin-left:20px;line-height:23px}.gantt_duration .gantt_duration_dec,.gantt_duration .gantt_duration_inc,.gantt_duration .gantt_duration_value{box-sizing:border-box;text-align:center;vertical-align:top;height:100%;border:1px solid #cecece}.gantt_duration .gantt_duration_value{width:40px;padding:3px 4px;border-left-width:0;border-right-width:0}.gantt_duration .gantt_duration_value.gantt_duration_value_formatted{width:70px}.gantt_duration .gantt_duration_dec,.gantt_duration .gantt_duration_inc{width:20px;padding:1px;padding-bottom:1px;background:#fff}.gantt_duration .gantt_duration_dec{-moz-border-top-left-radius:4px;-moz-border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;border-top-left-radius:4px;border-bottom-left-radius:4px}.gantt_duration .gantt_duration_inc{margin-right:4px;-moz-border-top-right-radius:4px;-moz-border-bottom-right-radius:4px;-webkit-border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:4px}.gantt_resources{max-height:150px;height:auto;overflow-y:auto}.gantt_resource_row{display:block;padding:10px 0;border-bottom:1px solid #ebebeb;cursor:pointer}.gantt_resource_row input[type=checkbox]:not(:checked),.gantt_resource_row input[type=checkbox]:not(:checked)~div{opacity:.5}.gantt_resource_toggle{vertical-align:middle}.gantt_resources_filter .gantt_resources_filter_input{padding:1px 2px;box-sizing:border-box}.gantt_resources_filter .switch_unsetted{vertical-align:middle}.gantt_resource_cell{display:inline-block}.gantt_resource_cell.gantt_resource_cell_checkbox{width:24px;max-width:24px;min-width:24px;vertical-align:middle}.gantt_resource_cell.gantt_resource_cell_label{width:40%;max-width:40%;vertical-align:middle}.gantt_resource_cell.gantt_resource_cell_value{width:30%;max-width:30%;vertical-align:middle}.gantt_resource_cell.gantt_resource_cell_value input,.gantt_resource_cell.gantt_resource_cell_value select{width:80%;vertical-align:middle;padding:1px 2px;box-sizing:border-box}.gantt_resource_cell.gantt_resource_cell_unit{width:10%;max-width:10%;vertical-align:middle}.gantt_resource_early_value{opacity:.8;font-size:.9em}.gantt_cal_quick_info{border:1px solid #cecece;border-radius:6px;position:absolute;z-index:300;box-shadow:3px 3px 3px rgba(0,0,0,.07);background-color:#fff;width:300px;transition:left .5s ease,right .5s;-moz-transition:left .5s ease,right .5s;-webkit-transition:left .5s ease,right .5s;-o-transition:left .5s ease,right .5s}.gantt_no_animate{transition:none;-moz-transition:none;-webkit-transition:none;-o-transition:none}.gantt_cal_quick_info.gantt_qi_left .gantt_qi_big_icon{float:right}.gantt_cal_qi_title{-webkit-border-top-left-radius:6px;-webkit-border-bottom-left-radius:0;-webkit-border-top-right-radius:6px;-webkit-border-bottom-right-radius:0;-moz-border-radius-topleft:6px;-moz-border-radius-bottomleft:0;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:0;border-top-left-radius:6px;border-bottom-left-radius:0;border-top-right-radius:6px;border-bottom-right-radius:0;padding:5px 0 8px 12px;color:#454545;background-color:#fff;border-bottom:1px solid #cecece}.gantt_cal_qi_tdate{font-size:14px;font-weight:700}.gantt_cal_qi_tcontent{font-size:13px}.gantt_cal_qi_content{padding:16px 8px;font-size:13px;color:#454545;overflow:hidden}.gantt_cal_qi_controls{-webkit-border-top-left-radius:0;-webkit-border-bottom-left-radius:6px;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:6px;-moz-border-radius-topleft:0;-moz-border-radius-bottomleft:6px;-moz-border-radius-topright:0;-moz-border-radius-bottomright:6px;border-top-left-radius:0;border-bottom-left-radius:6px;border-top-right-radius:0;border-bottom-right-radius:6px;padding-left:7px}.gantt_cal_qi_controls .gantt_menu_icon{margin-top:6px;background-repeat:no-repeat}.gantt_cal_qi_controls .gantt_menu_icon.icon_edit{width:20px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAB3RJTUUH3QYFCjI5ZQj5bAAAAFNJREFUOMvt0zEOACAIA0DkwTymH8bJTRTKZGJXyaWEKPKTCQAH4Ls37cItcDUzsxHNDLZNhCq7Gt1wh9ErV7EjyGAhyGLphlnsClWuS32rn0czAV+vNGrM/LBtAAAAAElFTkSuQmCC)}.gantt_cal_qi_controls .gantt_menu_icon.icon_delete{width:20px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MjFENzI3NUNDMzA0MTFFMjhBNjJGQTc3MUIyQzYzNEYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MjFENzI3NURDMzA0MTFFMjhBNjJGQTc3MUIyQzYzNEYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyMUQ3Mjc1QUMzMDQxMUUyOEE2MkZBNzcxQjJDNjM0RiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDoyMUQ3Mjc1QkMzMDQxMUUyOEE2MkZBNzcxQjJDNjM0RiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PmUD0gAAAABvSURBVHjaYvz//z8DIyMjAxYQicReji4J0ofKQNP8HwmgGQbXB8IsWGwDSSwDuioKjY9uBthVjFAXYHUGAQA2kYmBUoAUBpGk0LAwgBvwH+YX4mkwptgLowYMRgOITUyYKRFIN/wnDjQgJySAAAMApryKzL8wjfUAAAAASUVORK5CYII=)}.gantt_qi_big_icon{font-size:13px;border-radius:4px;font-weight:700;background:#fff;margin:5px 9px 8px 0;min-width:60px;line-height:32px;vertical-align:middle;padding:0 10px 0 5px;cursor:pointer;border:1px solid #cecece}.gantt_cal_qi_controls div{float:left;height:32px;text-align:center;line-height:32px}.gantt_tooltip{padding:10px;position:absolute;z-index:50;white-space:nowrap}.gantt_resource_marker{position:absolute;text-align:center;font-size:14px;color:#fff}.gantt_resource_marker_ok{background:rgba(78,208,134,.75)}.gantt_resource_marker_overtime{background:hsla(0,100%,76%,.69)}.gantt_histogram_label{width:100%;height:100%;position:absolute;z-index:1;font-weight:700;font-size:13px}.gantt_histogram_fill{background-color:rgba(41,157,180,.2);width:100%;position:absolute;bottom:0}.gantt_histogram_hor_bar{height:1px;margin-top:-1px}.gantt_histogram_hor_bar,.gantt_histogram_vert_bar{position:absolute;background:#299db4;margin-left:-1px}.gantt_histogram_vert_bar{width:1px}.gantt_histogram_cell{position:absolute;text-align:center;font-size:13px;color:#000}.gantt_marker{height:100%;width:2px;top:0;position:absolute;text-align:center;background-color:rgba(255,0,0,.4);box-sizing:border-box}.gantt_marker .gantt_marker_content{padding:5px;background:inherit;color:#fff;position:absolute;font-size:12px;line-height:12px;opacity:.8}.gantt_marker_area{position:absolute;top:0;left:0}.gantt_grid_editor_placeholder{position:absolute}.gantt_grid_editor_placeholder>div,.gantt_grid_editor_placeholder input,.gantt_grid_editor_placeholder select{width:100%;height:100%;box-sizing:border-box}.gantt_row_placeholder div{opacity:.5}.gantt_row_placeholder .gantt_add,.gantt_row_placeholder .gantt_file{display:none}.gantt_drag_marker.gantt_grid_dnd_marker{background-color:transparent;transition:all .1s ease}.gantt_grid_dnd_marker_line{height:4px;width:100%;background-color:#3498db}.gantt_grid_dnd_marker_line:before{background:#fff;width:12px;height:12px;box-sizing:border-box;border:3px solid #3498db;border-radius:6px;content:"";line-height:1px;display:block;position:absolute;margin-left:-11px;margin-top:-4px;pointer-events:none}.gantt_grid_dnd_marker_folder{height:100%;width:100%;position:absolute;pointer-events:none;box-sizing:border-box;box-shadow:inset 0 0 0 2px #3f98db;background:transparent}.gantt_overlay_area{display:none}.gantt_overlay,.gantt_overlay_area{position:absolute;height:inherit;width:inherit;top:0;left:0}.gantt_click_drag_rect{position:absolute;left:0;top:0;outline:1px solid #3f98db;background-color:rgba(52,152,219,.3)}.gantt_timeline_move_available,.gantt_timeline_move_available *{cursor:move}.gantt_rtl .gantt_grid{text-align:right}.gantt_rtl .gantt_cell,.gantt_rtl .gantt_row{flex-direction:row-reverse}.gantt_layout_content{width:100%;overflow:auto;box-sizing:border-box}.gantt_layout_cell{position:relative;box-sizing:border-box}.gantt_layout_cell>.gantt_layout_header{background:#33aae8;color:#fff;font-size:17px;padding:5px 10px;box-sizing:border-box}.gantt_layout_header.collapsed_x{background:#a9a9a9}.gantt_layout_header.collapsed_x .gantt_header_arrow:before{content:"\21E7"}.gantt_layout_header.collapsed_y{background:#a9a9a9}.gantt_layout_header.collapsed_y .gantt_header_arrow:before{content:"\21E9"}.gantt_layout_header{cursor:pointer}.gantt_layout_header .gantt_header_arrow{float:right;text-align:right}.gantt_layout_header .gantt_header_arrow:before{content:"\21E6"}.gantt_layout_header.vertical .gantt_header_arrow:before{content:"\21E7"}.gantt_layout_outer_scroll_vertical .gantt_layout_content{overflow-y:hidden}.gantt_layout_outer_scroll_horizontal .gantt_layout_content{overflow-x:hidden}.gantt_layout_x>.gantt_layout_cell{display:inline-block;vertical-align:top}.gantt_layout_x{white-space:nowrap}.gantt_resizing{opacity:.7;background:#f2f2f2}.gantt_layout_cell_border_right.gantt_resizer{overflow:visible;border-right:0}.gantt_resizer{cursor:e-resize;position:relative}.gantt_resizer_y{cursor:n-resize}.gantt_resizer_stick{background:#33aae8;z-index:9999;position:absolute;top:0;width:100%}.gantt_resizer_x .gantt_resizer_x{position:absolute;width:20px;height:100%;margin-left:-10px;top:0;left:0;z-index:1}.gantt_resizer_y .gantt_resizer_y{position:absolute;height:20px;width:100%;top:-10px;left:0;z-index:1}.gantt_resizer_error{background:#cd5c5c!important}.gantt_layout_cell_border_left{border-left:1px solid #cecece}.gantt_layout_cell_border_right{border-right:1px solid #cecece}.gantt_layout_cell_border_top{border-top:1px solid #cecece}.gantt_layout_cell_border_bottom{border-bottom:1px solid #cecece}.gantt_layout_cell_border_transparent{border-color:transparent}.gantt_window{position:absolute;top:50%;left:50%;z-index:999999999;background:#fff}.gantt_window_content{position:relative}.gantt_window_content_header{background:#39c;color:#fff;height:33px;padding:10px 10px 0;border-bottom:2px solid #fff;position:relative}.gantt_window_content_header_text{padding-left:10%}.gantt_window_content_header_buttons{position:absolute;top:10px;right:10px}.gantt_window_content_header_buttons:hover{color:#000;cursor:pointer}.gantt_window_content_resizer{position:absolute;width:15px;height:15px;bottom:0;line-height:15px;right:-1px;text-align:center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAMAAAAMCGV4AAAABlBMVEUAAAAAAAClZ7nPAAAAAXRSTlMAQObYZgAAABZJREFUeAFjIAUwUshlpJDLSIhLGAAACQ4AFk79JaMAAAAASUVORK5CYII=);cursor:nw-resize;z-index:999}.gantt_window_content_frame{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.1);z-index:9999}.gantt_window_drag{cursor:pointer!important}.gantt_window_resizing{overflow:visible}.gantt_window_resizing_body{overflow:hidden!important}.gantt_window_modal{background:rgba(0,0,0,.1);z-index:9999;top:0;left:0;width:100%;height:100%;position:fixed}.gantt_cal_light,.gantt_cal_quick_info,.gantt_container,.gantt_message_area,.gantt_modal_box,.gantt_tooltip{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.gantt_noselect{-moz-user-select:-moz-none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.gantt_drag_marker{position:absolute;top:-1000px;left:-1000px;font-family:Arial;font-size:13px;z-index:1;white-space:nowrap}.gantt_drag_marker .gantt_tree_icon.gantt_blank,.gantt_drag_marker .gantt_tree_icon.gantt_close,.gantt_drag_marker .gantt_tree_icon.gantt_open,.gantt_drag_marker .gantt_tree_indent{display:none}.gantt_drag_marker,.gantt_drag_marker .gantt_row.odd{background-color:#fff}.gantt_drag_marker .gantt_row{border-left:1px solid #d2d2d2;border-top:1px solid #d2d2d2}.gantt_drag_marker .gantt_cell{border-color:#d2d2d2}.gantt_row.gantt_over,.gantt_task_row.gantt_over{background-color:#0070fe}.gantt_row.gantt_transparent .gantt_cell{opacity:.7}.gantt_task_row.gantt_transparent{background-color:#f8fdfd}.gantt_popup_button.gantt_delete_button{background:#3db9d3;text-shadow:0 -1px 0 #248a9f;color:#fff;font-weight:700;border-width:0}.gantt_container_resize_watcher{background:transparent;width:100%;height:100%;position:absolute;top:0;left:0;z-index:-1;pointer-events:none;border:0;box-sizing:border-box;opacity:0}
\ No newline at end of file
diff --git a/Metronic/assets/global/plugins/dhtmlxgantt/dhtmlxgantt.d.ts b/Metronic/assets/global/plugins/dhtmlxgantt/dhtmlxgantt.d.ts
new file mode 100644
index 000000000..abbed2392
--- /dev/null
+++ b/Metronic/assets/global/plugins/dhtmlxgantt/dhtmlxgantt.d.ts
@@ -0,0 +1,2485 @@
+// Type definitions for dhtmlxGantt 7.0.1
+// Project: https://dhtmlx.com/docs/products/dhtmlxGantt
+
+type GanttCallback = (...args: any[]) => any;
+
+
+export type GanttEventName = "onAfterAutoSchedule"|"onAfterBatchUpdate"|"onAfterBranchLoading"|"onAfterLightbox"|"onAfterLinkAdd"|"onAfterLinkDelete"|"onAfterLinkUpdate"|"onAfterQuickInfo"|"onAfterRedo"|"onAfterSort"|"onAfterTaskAdd"|"onAfterTaskAutoSchedule"|"onAfterTaskDelete"|"onAfterTaskDrag"|"onAfterTaskMove"|"onAfterTaskUpdate"|"onAfterUndo"|"onAjaxError"|"onAutoScheduleCircularLink"|"onBeforeAutoSchedule"|"onBeforeBatchUpdate"|"onBeforeBranchLoading"|"onBeforeCollapse"|"onBeforeDataRender"|"onBeforeExpand"|"onBeforeGanttReady"|"onBeforeGanttRender"|"onBeforeLightbox"|"onBeforeLinkAdd"|"onBeforeLinkDelete"|"onBeforeLinkDisplay"|"onBeforeLinkUpdate"|"onBeforeMultiSelect"|"onBeforeParse"|"onBeforeRedo"|"onBeforeRedoStack"|"onBeforeRowDragEnd"|"onBeforeRowDragMove"|"onBeforeTaskAdd"|"onBeforeTaskAutoSchedule"|"onBeforeTaskChanged"|"onBeforeTaskDelete"|"onBeforeTaskDisplay"|"onBeforeTaskDrag"|"onBeforeTaskMove"|"onBeforeTaskMultiSelect"|"onBeforeTaskSelected"|"onBeforeTaskUpdate"|"onBeforeUndo"|"onBeforeUndoStack"|"onCircularLinkError"|"onClear"|"onCollapse"|"onColumnResize"|"onColumnResizeEnd"|"onColumnResizeStart"|"onContextMenu"|"onDataProcessorReady"|"onDataRender"|"onDestroy"|"onEmptyClick"|"onError"|"onExpand"|"onGanttLayoutReady"|"onGanttReady"|"onGanttRender"|"onGanttScroll"|"onGridHeaderClick"|"onGridResize"|"onGridResizeEnd"|"onGridResizeStart"|"onLightbox"|"onLightboxButton"|"onLightboxCancel"|"onLightboxChange"|"onLightboxDelete"|"onLightboxSave"|"onLinkClick"|"onLinkCreated"|"onLinkDblClick"|"onLinkIdChange"|"onLinkValidation"|"onLoadEnd"|"onLoadStart"|"onMouseMove"|"onMultiSelect"|"onOptionsLoad"|"onParse"|"onQuickInfo"|"onRowDragEnd"|"onRowDragStart"|"onScaleAdjusted"|"onScaleClick"|"onTaskClick"|"onTaskClosed"|"onTaskCreated"|"onTaskDblClick"|"onTaskDrag"|"onTaskIdChange"|"onTaskLoading"|"onTaskMultiSelect"|"onTaskOpened"|"onTaskRowClick"|"onTaskSelected"|"onTaskUnselected"|"onTemplatesReady";
+
+
+export interface GanttTemplates {
+
+ /**
+ * specifies the content of start date or end date columns in grid
+ * @param date the date which needs formatting
+ * @param task the task object
+ * @param column the name of the column that called the template
+ */
+ date_grid(date: Date, task: any, column: string): string;
+
+ /**
+ * specifies the text of tooltips that are displayed when the user creates a new dependency link
+ * @param from the id of the source task
+ * @param from_start true , if the link is being dragged from the start of the source task, false - if from the end of the task
+ * @param to the id of the target task( 'null' or 'undefined', if the target task isn't specified yet)
+ * @param to_start true , if the link is being dragged to the start of the target task, false - if to the end of the task
+ */
+ drag_link(from: string|number, from_start: boolean, to: string|number, to_start: boolean): string;
+
+ /**
+ * specifies the CSS class that will be applied to the pop-up that appears when a user drags a link
+ * @param from the id of the source task
+ * @param from_start true , if the link is being dragged from the start of the source task, false - if from the end of the task
+ * @param to the id of the target task( 'null' or 'undefined', if the target task isn't specified yet)
+ * @param to_start true , if the link is being dragged to the start of the target task, false - if to the end of the task
+ */
+ drag_link_class(from: string|number, from_start: boolean, to: string|number, to_start: boolean): string;
+
+ /**
+ * сonverts a date object to a date string. Used to send data back to the server
+ * @param date the date which needs formatting
+ */
+ format_date(date: Date): string;
+
+ /**
+ * specifies the custom content inserted before the labels of child items in the tree column
+ * @param task the task object
+ */
+ grid_blank(task: any): string;
+
+ /**
+ * specifies the format of dates in the "Start time" column
+ * @param date the date which needs formatting
+ * @param column the name of the column that called the template
+ */
+ grid_date_format(date: Date, column: string): string;
+
+ /**
+ * specifies the icon of child items in the tree column
+ * @param task the task object
+ */
+ grid_file(task: any): string;
+
+ /**
+ * specifies the icon of parent items in the tree column
+ * @param task the task object
+ */
+ grid_folder(task: any): string;
+
+ /**
+ * specifies the CSS class that will be applied to the headers of the table's columns
+ * @param columnName the column's name (as specified in the "name" property of the column object)
+ * @param column column object (as specified in the gantt.config.columns config)
+ */
+ grid_header_class(columnName: string, column: any): string;
+
+ /**
+ * specifies the indent of the child items in a branch (in the tree column)
+ * @param task the task object
+ */
+ grid_indent(task: any): string;
+
+ /**
+ * specifies the icon of the open/close sign in the tree column
+ * @param task the task object
+ */
+ grid_open(task: any): string;
+
+ /**
+ * specifies the CSS class that will be applied to a grid row
+ * @param start the date when a task is scheduled to begin
+ * @param end the date when a task is scheduled to be completed
+ * @param task the task object
+ */
+ grid_row_class(start: Date, end: Date, task: any): string;
+
+ /**
+ * defines the height of the filled area in the resourceHistogram
+ * @param start_date start date of the scale cell
+ * @param end_date end date of the scale cell
+ * @param resource the resource object
+ * @param tasks tasks that are assigned to the specified resource and overlap start/end dates of the cell
+ */
+ histogram_cell_allocated(start_date: Date, end_date: Date, resource: any, tasks: any[]): void;
+
+ /**
+ * specifies the height of the line that defines the available capacity of the resource
+ * @param start_date start date of the scale cell
+ * @param end_date end date of the scale cell
+ * @param resource the resource object
+ * @param tasks tasks that are assigned to the specified resource and overlap start/end dates of the cell
+ */
+ histogram_cell_capacity(start_date: Date, end_date: Date, resource: any, tasks: any[]): void;
+
+ /**
+ * defines the CSS class which is applied to a cell of the resource panel
+ * @param start_date start date of the scale cell
+ * @param end_date end date of the scale cell
+ * @param resource the resource object
+ * @param tasks tasks that are assigned to the specified resource and overlap start/end dates of the cell
+ */
+ histogram_cell_class(start_date: Date, end_date: Date, resource: any, tasks: any[]): void;
+
+ /**
+ * defines the label inside a cell
+ * @param start_date start date of the scale cell
+ * @param end_date end date of the scale cell
+ * @param resource the resource object
+ * @param tasks tasks that are assigned to the specified resource and overlap start/end dates of the cell
+ */
+ histogram_cell_label(start_date: Date, end_date: Date, resource: any, tasks: any[]): void;
+
+ /**
+ * specifies the CSS class that will be applied to a link
+ * @param link the link object
+ */
+ link_class(link: any): string;
+
+ /**
+ * specifies the text in the header of the link's "delete" confirm window
+ * @param link the link object
+ */
+ link_description(link: any): string;
+
+ /**
+ * converts date string into a Date object
+ * @param date the string which need to be parsed
+ */
+ parse_date(date: string): Date;
+
+ /**
+ * specifies the text in the completed part of the task bar
+ * @param start the date when a task is scheduled to begin
+ * @param end the date when a task is scheduled to be completed
+ * @param task the task object
+ */
+ progress_text(start: Date, end: Date, task: any): string;
+
+ /**
+ * specifies the CSS class that will be applied to the pop-up edit form
+ * @param start the date when a task is scheduled to begin
+ * @param end the date when a task is scheduled to be completed
+ * @param task the task object
+ */
+ quick_info_class(start: Date, end: Date, task: any): void;
+
+ /**
+ * specifies the content of the pop-up edit form
+ * @param start the date when a task is scheduled to begin
+ * @param end the date when a task is scheduled to be completed
+ * @param task the task object
+ */
+ quick_info_content(start: Date, end: Date, task: any): string;
+
+ /**
+ * specifies the date of the pop-up edit form
+ * @param start the date when a task is scheduled to begin
+ * @param end the date when a task is scheduled to be completed
+ * @param task the task object
+ */
+ quick_info_date(start: Date, end: Date, task: any): string;
+
+ /**
+ * specifies the title of the pop-up edit form
+ * @param start the date when a task is scheduled to begin
+ * @param end the date when a task is scheduled to be completed
+ * @param task the task object
+ */
+ quick_info_title(start: Date, end: Date, task: any): string;
+
+ /**
+ * defines the CSS class names of cells in the resource timeline cells
+ * @param start_date start date of the scale cell
+ * @param end_date end date of the scale cell
+ * @param resource the resource object
+ * @param tasks tasks that are assigned to specified resource and overlap start/end dates of the cell
+ */
+ resource_cell_class(start_date: Date, end_date: Date, resource: any, tasks: any[]): string;
+
+ /**
+ * defines the HTML content of resource timeline cells
+ * @param start_date start date of the scale cell
+ * @param end_date end date of the scale cell
+ * @param resource the resource object
+ * @param tasks tasks that are assigned to specified resource and overlap start/end dates of the cell
+ */
+ resource_cell_value(start_date: Date, end_date: Date, resource: any, tasks: any[]): string;
+
+ /**
+ * specifies the CSS class that will be applied to cells of the time scale of the timeline area
+ * @param date the date of a cell
+ */
+ scale_cell_class(date: Date): string;
+
+ /**
+ * specifies the CSS class that will be applied to the time scale
+ * @param scale the scale's configuration object
+ */
+ scale_row_class(scale: any): string;
+
+ /**
+ * specifies the CSS class that will be applied to task bars
+ * @param start the date when a task is scheduled to begin
+ * @param end the date when a task is scheduled to be completed
+ * @param task the task object
+ */
+ task_class(start: Date, end: Date, task: any): string;
+
+ /**
+ * specifies the date format of the label in the 'Time period' section of the lightbox
+ * @param date the date which needs formatting
+ */
+ task_date(date: Date): string;
+
+ /**
+ * specifies the format for the end dates of tasks in the lightbox
+ * @param date the date which needs formatting
+ */
+ task_end_date(date: Date): string;
+
+ /**
+ * specifies the CSS class that will be applied to the row of the timeline area
+ * @param start the date when a task is scheduled to begin
+ * @param end the date when a task is scheduled to be completed
+ * @param task the task object
+ */
+ task_row_class(start: Date, end: Date, task: any): string;
+
+ /**
+ * specifies the text in the task bars and the header of the lightbox
+ * @param start the date when a task is scheduled to begin
+ * @param end the date when a task is scheduled to be completed
+ * @param task the task object
+ */
+ task_text(start: Date, end: Date, task: any): string;
+
+ /**
+ * specifies the date period in the header of the lightbox
+ * @param start the date when a task is scheduled to begin
+ * @param end the date when a task is scheduled to be completed
+ * @param task the task object
+ */
+ task_time(start: Date, end: Date, task: any): string;
+
+ /**
+ * specifies the dates of unscheduled tasks
+ * @param task the task object
+ */
+ task_unscheduled_time(task: any): void;
+
+ /**
+ * specifies the format of the drop-down time selector in the lightbox
+ * @param date the date which needs formatting
+ */
+ time_picker(date: Date): string;
+
+ /**
+ * specifies the CSS class that will be applied to the cells of the timeline area
+ * @param item the task object assigned to the row
+ * @param date the date of a cell
+ */
+ timeline_cell_class(item: any, date: Date): string;
+
+ /**
+ * specifies the format of start and end dates displayed in the tooltip
+ * @param date the date which needs formatting
+ */
+ tooltip_date_format(date: Date): string;
+
+ /**
+ * specifies the text of tooltips
+ * @param start the date when a task is scheduled to begin
+ * @param end the date when a task is scheduled to be completed
+ * @param task the task object
+ */
+ tooltip_text(start: Date, end: Date, task: any): string;
+
+ /**
+ * a string from an XML file is converted into a date object in conformity with this template
+ * @param date the date which needs formatting
+ */
+ xml_date(date: Date): string;
+
+ /**
+ * a date object is converted into a string in conformity with this template. Used to send data back to the server
+ * @param date the date which needs formatting
+ */
+ xml_format(date: Date): string;
+
+ /**
+ * specifies the text assigned to tasks bars on the right side
+ * @param start the date when a task is scheduled to begin
+ * @param end the date when a task is scheduled to be completed
+ * @param task the task object
+ */
+ rightside_text(start: Date, end: Date, task: any): string;
+
+ /**
+ * specifies the text assigned to tasks bars on the left side
+ * @param start the date when a task is scheduled to begin
+ * @param end the date when a task is scheduled to be completed
+ * @param task the task object
+ */
+ leftside_text(start: Date, end: Date, task: any): string;
+
+ /**
+ * specifies the lightbox's header
+ * @param start_date the date when a task is scheduled to begin
+ * @param end_date the date when a task is scheduled to be completed
+ * @param task the task's object
+ */
+ lightbox_header(start_date: Date, end_date: Date, task: any): string;
+}
+
+export interface GanttConfigOptions {
+
+ /**
+ * enables auto scheduling
+ */
+ auto_scheduling: boolean;
+
+ /**
+ * disables usage of time contraints for tasks
+ */
+ auto_scheduling_compatibility: boolean;
+
+ /**
+ * allows or forbids creating links from parent tasks (projects) to their children
+ */
+ auto_scheduling_descendant_links: boolean;
+
+ /**
+ * defines whether gantt will do autoscheduling on data loading/parsing
+ */
+ auto_scheduling_initial: boolean;
+
+ /**
+ * defines whether the whole project will be moved (see the details below)
+ */
+ auto_scheduling_move_projects: boolean;
+
+ /**
+ * enables the auto scheduling mode, in which tasks will always be rescheduled to the earliest possible date
+ */
+ auto_scheduling_strict: boolean;
+
+ /**
+ * automatically converts tasks with subtasks to projects and projects without subtasks back to tasks
+ */
+ auto_types: boolean;
+
+ /**
+ * enables automatic adjusting of the grid's columns to the grid's width
+ */
+ autofit: boolean;
+
+ /**
+ * enables autoscrolling while dragging a task or link out of the current browser screen
+ */
+ autoscroll: boolean;
+
+ /**
+ * defines the speed of autoscrolling (in ms) while dragging a task or link out of the current browser screen
+ */
+ autoscroll_speed: number;
+
+ /**
+ * forces the Gantt chart to automatically change its size to show all tasks without scrolling
+ */
+ autosize: boolean|string;
+
+ /**
+ * sets the minimum width (in pixels) that the Gantt chart can take in the horizontal 'autosize' mode
+ */
+ autosize_min_width: number;
+
+ /**
+ * enables dynamic loading in the Gantt chart
+ */
+ branch_loading: boolean;
+
+ /**
+ * specifies that the task has children that are not yet loaded from the backend
+ */
+ branch_loading_property: string;
+
+ /**
+ * stores a collection of buttons resided in the left bottom corner of the lightbox
+ */
+ buttons_left: any[];
+
+ /**
+ * stores a collection of buttons resided in the right bottom corner of the lightbox
+ */
+ buttons_right: any[];
+
+ /**
+ * changes the name of the property that affects binding of a calendar to a task/group of tasks
+ */
+ calendar_property: string;
+
+ /**
+ * enables cascade deleting of nested tasks and links
+ */
+ cascade_delete: boolean;
+
+ /**
+ * enables advanced drag-n-drop
+ */
+ click_drag: any;
+
+ /**
+ * configures the columns of the table
+ */
+ columns: any[];
+
+ /**
+ * contains all available constraint types
+ */
+ constraint_types: any;
+
+ /**
+ * enables adjusting the task's start and end dates to the work time (while dragging)
+ */
+ correct_work_time: boolean;
+
+ /**
+ * defines internal implementation of the code of date formatting methods
+ */
+ csp: boolean|string;
+
+ /**
+ * sets the date format that is used to parse data from a data set and to send dates back to the server
+ */
+ date_format: string;
+
+ /**
+ * sets the format of dates in the "Start time" column of the table
+ */
+ date_grid: string;
+
+ /**
+ * sets the format of the time scale (X-Axis)
+ */
+ date_scale: string;
+
+ /**
+ * 'says' to open the lightbox while creating new events by clicking the '+' button
+ */
+ details_on_create: boolean;
+
+ /**
+ * 'says' to open the lightbox after double clicking on a task
+ */
+ details_on_dblclick: boolean;
+
+ /**
+ * enables the possibility to drag the lightbox by the header
+ */
+ drag_lightbox: boolean;
+
+ /**
+ * enables creating dependency links by drag-and-drop
+ */
+ drag_links: boolean;
+
+ /**
+ * stores the types of available drag-and-drop modes
+ */
+ drag_mode: any;
+
+ /**
+ * enables the possibility to move tasks by drag-and-drop
+ */
+ drag_move: boolean;
+
+ /**
+ * enables the possibility to drag several selected tasks at once
+ */
+ drag_multiple: boolean;
+
+ /**
+ * enables the possibility to change the task progress by dragging the progress knob
+ */
+ drag_progress: boolean;
+
+ /**
+ * enables drag and drop of items of the project type
+ */
+ drag_project: boolean;
+
+ /**
+ * enables the possibility to resize tasks by drag-and-drop
+ */
+ drag_resize: boolean;
+
+ /**
+ * configures the behavior of the drag_timeline extension
+ */
+ drag_timeline: any;
+
+ /**
+ * sets the number of 'gantt.config.duration_unit' units that will correspond to one unit of the 'duration' data property.
+ */
+ duration_step: number;
+
+ /**
+ * sets the duration unit
+ */
+ duration_unit: string;
+
+ /**
+ * enables automatic merging of multiple resource calendars into one
+ */
+ dynamic_resource_calendars: boolean;
+
+ /**
+ * changes the name of a property that affects the editing ability of tasks/links in the read-only Gantt chart
+ */
+ editable_property: string;
+
+ /**
+ * an object that contains definitions of inline editors
+ */
+ editor_types: any;
+
+ /**
+ * sets the end value of the time scale
+ */
+ end_date: Date;
+
+ /**
+ * 'says' the Gantt chart to automatically extend the time scale in order to fit all displayed tasks
+ */
+ fit_tasks: boolean;
+
+ /**
+ * adjusts the width of columns inside a scrollable grid
+ */
+ grid_elastic_columns: boolean;
+
+ /**
+ * makes the grid resizable by dragging the right grid's border
+ */
+ grid_resize: boolean;
+
+ /**
+ * sets the name of the attribute of the grid resizer's DOM element
+ */
+ grid_resizer_attribute: string;
+
+ /**
+ * sets the name of the attribute of the column resizer's DOM element. The attribute presents the column's index
+ */
+ grid_resizer_column_attribute: string;
+
+ /**
+ * sets the width of the grid
+ */
+ grid_width: number;
+
+ /**
+ * shows the critical path in the chart
+ */
+ highlight_critical_path: boolean;
+
+ /**
+ * enables/disables horizontal scroll by the Shift|Alt|Meta key + mouse wheel movement
+ */
+ horizontal_scroll_key: string|boolean;
+
+ /**
+ * defines whether tasks should inherit work calendars from their summary parents
+ */
+ inherit_calendar: boolean;
+
+ /**
+ * specifies whether sub-scales shall use the scale_cell_class template by default
+ */
+ inherit_scale_class: boolean;
+
+ /**
+ * sets whether the timeline area will be initially scrolled to display the earliest task
+ */
+ initial_scroll: boolean;
+
+ /**
+ * keeps the duration of a task unchanged during editing of the start/end of a task
+ */
+ inline_editors_date_processing: string;
+
+ /**
+ * 'says' to preserve the initial grid's width while resizing columns within
+ */
+ keep_grid_width: boolean;
+
+ /**
+ * enables keyboard navigation in gantt
+ */
+ keyboard_navigation: boolean;
+
+ /**
+ * enables keyboard navigation by cells
+ */
+ keyboard_navigation_cells: boolean;
+
+ /**
+ * sets the name of the attribute of the task layer's DOM element
+ */
+ layer_attribute: string;
+
+ /**
+ * specifies the layout object
+ */
+ layout: any;
+
+ /**
+ * specifies the lightbox object
+ */
+ lightbox: any;
+
+ /**
+ * increases the height of the lightbox
+ */
+ lightbox_additional_height: number;
+
+ /**
+ * sets the size of the link arrow
+ */
+ link_arrow_size: number;
+
+ /**
+ * sets the name of the attribute that will specify the id of the link's HTML element
+ */
+ link_attribute: string;
+
+ /**
+ * sets the width of dependency links in the timeline area
+ */
+ link_line_width: number;
+
+ /**
+ * sets the width of the area (over the link) sensitive to clicks
+ */
+ link_wrapper_width: number;
+
+ /**
+ * stores the types of links dependencies
+ */
+ links: any;
+
+ /**
+ * sets the minimum width for a column in the timeline area
+ */
+ min_column_width: number;
+
+ /**
+ * sets the minimum duration (in milliseconds) that can be set for a task during resizing.
+ */
+ min_duration: number;
+
+ /**
+ * sets the minumum width for the grid (in pixels) while being resized
+ */
+ min_grid_column_width: number;
+
+ /**
+ * enables/disables multi-task selection in the Gantt chart
+ */
+ multiselect: boolean;
+
+ /**
+ * specifies whether multi-task selection will be available within one or any level
+ */
+ multiselect_one_level: boolean;
+
+ /**
+ * enables the possibility to expand/collapse split tasks by clicking the +/- button
+ */
+ open_split_tasks: boolean;
+
+ /**
+ * openes all branches initially
+ */
+ open_tree_initially: boolean;
+
+ /**
+ * activates the 'branch' mode that allows vertically reordering tasks within the same tree level
+ */
+ order_branch: string|boolean;
+
+ /**
+ * activates the 'branch' mode that allows reordering tasks within the whole gantt
+ */
+ order_branch_free: boolean;
+
+ /**
+ * adds an empty row into the end of the list of tasks to simplify tasks editing via keyboard
+ */
+ placeholder_task: boolean;
+
+ /**
+ * preserves the current position of the vertical and horizontal scrolls while re-drawing the gantt chart
+ */
+ preserve_scroll: boolean;
+
+ /**
+ * specifies whether the gantt container should block the mousewheel event, or should it be propagated up to the window element
+ */
+ prevent_default_scroll: boolean;
+
+ /**
+ * specifies the end date of a project
+ */
+ project_end: Date;
+
+ /**
+ * specifies the start date of a project
+ */
+ project_start: Date;
+
+ /**
+ * defines whether the task form will appear from the left/right side of the screen or near the selected task
+ */
+ quick_info_detached: boolean;
+
+ /**
+ * stores a collection of buttons resided in the pop-up task's details form
+ */
+ quickinfo_buttons: any[];
+
+ /**
+ * activates the read-only mode for the Gantt chart
+ */
+ readonly: boolean;
+
+ /**
+ * changes the name of a property that affects the read-only behaviour of tasks/links
+ */
+ readonly_property: string;
+
+ /**
+ * enables the Redo functionality for the gantt
+ */
+ redo: boolean;
+
+ /**
+ * enables the possibility to reorder grid columns by drag and drop
+ */
+ reorder_grid_columns: boolean;
+
+ /**
+ * changes the name of the attribute that Gantt uses to find which resource the task row in the resource grid/timeline is referring to
+ */
+ resource_attribute: string;
+
+ /**
+ * defines a set of working calendars that can be assigned to a specific resource, e.g. a user
+ */
+ resource_calendars: any;
+
+ /**
+ * defines the property of a task object that stores a resource id associated with resourceGrid/Timeline/Histogram/Calendar
+ */
+ resource_property: string;
+
+ /**
+ * tells the resource timeline to render elements and call templates for non-allocated cells
+ */
+ resource_render_empty_cells: boolean;
+
+ /**
+ * specifies the name of the dataStore connected to the resourceGrid/resourceTimeline/resourceHistogram views
+ */
+ resource_store: string;
+
+ /**
+ * sets the id of the virtual root element
+ */
+ root_id: string|number;
+
+ /**
+ * enables rounding the task's start and end dates to the nearest scale marks
+ */
+ round_dnd_dates: boolean;
+
+ /**
+ * sets the default height for rows of the table
+ */
+ row_height: number;
+
+ /**
+ * switches gantt to the right-to-left mode
+ */
+ rtl: boolean;
+
+ /**
+ * sets the height of the time scale and the header of the grid
+ */
+ scale_height: number;
+
+ /**
+ * sets the minimal scale unit (in case multiple scales are used) as the interval of the leading/closing empty space
+ */
+ scale_offset_minimal: boolean;
+
+ /**
+ * sets the unit of the time scale (X-Axis)
+ */
+ scale_unit: string;
+
+ /**
+ * defines configuration settings of the time scale
+ */
+ scales: any[];
+
+ /**
+ * enables backward scheduling
+ */
+ schedule_from_end: boolean;
+
+ /**
+ * specifies whether the timeline area shall be scrolled while selecting to display the selected task
+ */
+ scroll_on_click: boolean;
+
+ /**
+ * set the sizes of the vertical (width) and horizontal (height) scrolls
+ */
+ scroll_size: number;
+
+ /**
+ * enables selection of tasks in the Gantt chart
+ */
+ select_task: boolean;
+
+ /**
+ * enables converting server-side dates from UTC to a local time zone (and backward) while sending data to the server
+ */
+ server_utc: boolean;
+
+ /**
+ * shows the chart (timeline) area of the Gantt chart
+ */
+ show_chart: boolean;
+
+ /**
+ * enables showing error alerts in case of unexpected behavior
+ */
+ show_errors: boolean;
+
+ /**
+ * shows the grid area of the Gantt chart
+ */
+ show_grid: boolean;
+
+ /**
+ * enables/disables displaying links in the Gantt chart
+ */
+ show_links: boolean;
+
+ /**
+ * shows/hides markers on the page
+ */
+ show_markers: boolean;
+
+ /**
+ * enables displaying of the progress inside the task bars
+ */
+ show_progress: boolean;
+
+ /**
+ * activates/disables the 'quick_info' extension (pop-up task's details form)
+ */
+ show_quick_info: boolean;
+
+ /**
+ * enables/disables displaying column borders in the chart area
+ */
+ show_task_cells: boolean;
+
+ /**
+ * enables showing tasks that are outside the specified date range in the Gantt chart
+ */
+ show_tasks_outside_timescale: boolean;
+
+ /**
+ * enables showing unscheduled tasks
+ */
+ show_unscheduled: boolean;
+
+ /**
+ * hides non-working time from the time scale
+ */
+ skip_off_time: boolean;
+
+ /**
+ * enables the smart rendering mode for gantt's tasks and links rendering
+ */
+ smart_rendering: boolean;
+
+ /**
+ * specifies that only visible part of the time scale is rendered on the screen
+ */
+ smart_scales: boolean;
+
+ /**
+ * enables sorting in the table
+ */
+ sort: boolean;
+
+ /**
+ * sets the start value of the time scale
+ */
+ start_date: Date;
+
+ /**
+ * sets the starting day of the week
+ */
+ start_on_monday: boolean;
+
+ /**
+ * generates a background image for the timeline area instead of rendering actual columns' and rows' lines
+ */
+ static_background: boolean;
+
+ /**
+ * enables rendering of highlighted cells in the static_background mode
+ */
+ static_background_cells: boolean;
+
+ /**
+ * sets the step of the time scale (X-Axis)
+ */
+ step: number;
+
+ /**
+ * specifies the second time scale(s) (deprecated)
+ */
+ subscales: any[];
+
+ /**
+ * sets the name of the attribute that will specify the id of the task's HTML element
+ */
+ task_attribute: string;
+
+ /**
+ * sets the format of the date label in the 'Time period' section of the lightbox
+ */
+ task_date: string;
+
+ /**
+ * sets the height of task bars in the timeline area
+ */
+ task_height: number|string;
+
+ /**
+ * sets the offset (in pixels) of the nearest task from the left border in the timeline
+ */
+ task_scroll_offset: number;
+
+ /**
+ * sets the format of the time drop-down selector in the lightbox
+ */
+ time_picker: string;
+
+ /**
+ * sets the minimum step (in minutes) for the task's time values
+ */
+ time_step: number;
+
+ /**
+ * sets the length of time, in milliseconds, before the tooltip hides
+ */
+ tooltip_hide_timeout: number;
+
+ /**
+ * sets the right (if positive) offset of the tooltip's position
+ */
+ tooltip_offset_x: number;
+
+ /**
+ * sets the top (if positive) offset of the tooltip's position
+ */
+ tooltip_offset_y: number;
+
+ /**
+ * sets the timeout in milliseconds before the tooltip is displayed for a task
+ */
+ tooltip_timeout: number;
+
+ /**
+ * enables/disables the touch support for the Gantt chart
+ */
+ touch: boolean|string;
+
+ /**
+ * defines the time period in milliseconds that is used to differ the long touch gesture from the scroll gesture
+ */
+ touch_drag: number|boolean;
+
+ /**
+ * returns vibration feedback before/after drag and drop on touch devices
+ */
+ touch_feedback: boolean;
+
+ /**
+ * defines the duration of vibration feedback before/after drag and drop on touch devices (in milliseconds)
+ */
+ touch_feedback_duration: number;
+
+ /**
+ * redefines functions responsible for displaying different types of tasks
+ */
+ type_renderers: any;
+
+ /**
+ * stores the names of lightbox's structures (used for different types of tasks)
+ */
+ types: any;
+
+ /**
+ * enables the Undo functionality for the gantt
+ */
+ undo: boolean;
+
+ /**
+ * sets the actions that the Undo operation will revert
+ */
+ undo_actions: any;
+
+ /**
+ * sets the number of steps that should be reverted by the undo method
+ */
+ undo_steps: number;
+
+ /**
+ * sets the types of entities for which the Undo operation will be applied
+ */
+ undo_types: any;
+
+ /**
+ * enables WAI-ARIA support to make the component recognizable for screen readers
+ */
+ wai_aria_attributes: boolean;
+
+ /**
+ * enables calculating the duration of tasks in working time instead of calendar time
+ */
+ work_time: boolean;
+
+ /**
+ * defines date formats that are used to parse data from a data set and to send data to a server
+ */
+ xml_date: string;
+}
+
+export interface GanttDateHelpers {
+ add(origin: Date, count: number, unit: string): Date;
+ copy(origin: Date): Date;
+ date_part(origin: Date): Date;
+ time_part(origin: Date): Date;
+ day_start(origin: Date): Date;
+ month_start(origin: Date): Date;
+ week_start(origin: Date): Date;
+ year_start(origin: Date): Date;
+ getISOWeek(origin: Date): number;
+ getUTCISOWeek(origin: Date): number;
+ date_to_str(format: string): any;
+ str_to_date(format: string): any;
+ convert_to_utc(origin: Date): Date;
+ to_fixed(value: number): string;
+}
+
+export interface GanttHotkeys {
+ edit_save: number;
+ edit_cancel: number;
+}
+
+export type MonthLabelList = [string, string, string, string, string, string, string, string, string, string, string, string];
+export type WeekDayLabelList = [string, string, string, string, string, string, string];
+
+export interface GanttLocaleDate {
+ month_full: MonthLabelList;
+ month_short: MonthLabelList;
+ day_full: WeekDayLabelList;
+ day_short: WeekDayLabelList;
+}
+
+export interface GanttLocaleLabels {
+ new_task: string;
+ icon_save: string;
+ icon_cancel: string;
+ icon_details: string;
+ icon_edit: string;
+ icon_delete: string;
+ confirm_closing: string;
+ confirm_deleting: string;
+ section_description: string;
+ section_time: string;
+ section_type: string;
+
+ /* grid columns */
+ column_wbs: string;
+ column_text: string;
+ column_start_date: string;
+ column_duration: string;
+ column_add: string;
+
+ /* link confirmation */
+ link: string;
+ confirm_link_deleting: string;
+ link_start: string;
+ link_end: string;
+
+ type_task: string;
+ type_project: string;
+ type_milestone: string;
+
+ minutes: string;
+ hours: string;
+ days: string;
+ weeks: string;
+ months: string;
+ years: string;
+
+ /* message popup */
+ message_ok: string;
+ message_cancel: string;
+
+ /* constraints */
+ section_constraint: string;
+ constraint_type: string;
+ constraint_date: string;
+ asap: string;
+ alap: string;
+ snet: string;
+ snlt: string;
+ fnet: string;
+ fnlt: string;
+ mso: string;
+ mfo: string;
+
+ /* resource control */
+ resources_filter_placeholder: string;
+ resources_filter_label: string;
+}
+
+export interface GanttLocale {
+ date: GanttLocaleDate;
+ labels: GanttLocaleLabels;
+}
+
+export interface GanttPlugins {
+ auto_scheduling?: boolean;
+ click_drag?: boolean;
+ critical_path?: boolean;
+ drag_timeline?: boolean;
+ fullscreen?: boolean;
+ keyboard_navigation?: boolean;
+ quick_info?: boolean;
+ tooltip?: boolean;
+ undo?: boolean;
+ grouping?: boolean;
+ marker?: boolean;
+ multiselect?: boolean;
+ overlay?: boolean;
+}
+
+export interface GanttInitializationConfig {
+ container?: string|HTMLElement;
+ config?: any;
+ templates?: any;
+ events?: any;
+ data?: any;
+ plugins?: GanttPlugins;
+ locale?: any;
+}
+
+export interface GanttInternationalization {
+ setLocale(locale: any): void;
+ getLocale(language?: string): GanttLocale;
+ addLocale(language: string, locale: GanttLocale): void;
+}
+export type GanttPlugin = (gantt: GanttStatic) => void;
+
+export interface GanttEnterprise {
+ plugin(plugin: GanttPlugin): void;
+ getGanttInstance(settings?: GanttInitializationConfig) : GanttStatic;
+}
+
+
+export interface GanttStatic {
+
+ /**
+ * redefines the default click behavior for buttons of the Gantt chart
+ */
+ $click: any;
+
+ /**
+ * gantt ajax module
+ */
+ ajax: any;
+
+ /**
+ * the interface of the working calendar object
+ */
+ calendar: any;
+
+ /**
+ * defines configuration options for dates, scale, controls
+ */
+ config: GanttConfigOptions;
+
+ /**
+ * stores various constants to reduce the use of magic numbers in the code
+ */
+ constants: any;
+
+ /**
+ * a set of date formatting methods
+ */
+ date: GanttDateHelpers;
+
+ /**
+ * a set of flags which describe current environment
+ */
+ env: any;
+
+ /**
+ * an object that stores various extensions
+ */
+ ext: any;
+
+ /**
+ * a set of methods for Gantt chart localization
+ */
+ i18n: GanttInternationalization;
+
+ /**
+ * specifies JSON serialization and parsing
+ */
+ json: any;
+
+ /**
+ * defines the hot keys for the Gantt chart
+ */
+ keys: GanttHotkeys;
+
+ /**
+ * returns the license name of dhtmlxGantt
+ */
+ license: any;
+
+ /**
+ * the current locale object (region-specific labels) of the Gantt chart
+ */
+ locale: GanttLocale;
+
+ /**
+ * specifies serialization and parsing in the XML format of dhtmlxGantt 1.0
+ */
+ oldxml: any;
+
+ /**
+ * returns the current skin of the Gantt chart
+ */
+ skin: string;
+
+ /**
+ * returns objects of the available skins
+ */
+ skins: any;
+
+ /**
+ * defines formatting templates for dates, titles, tooltips in the Gantt chart
+ */
+ templates: GanttTemplates;
+
+ /**
+ * various helper modules
+ */
+ utils: any;
+
+ /**
+ * returns the version of dhtmlxGantt
+ */
+ version: string;
+
+ /**
+ * specifies XML serialization and parsing
+ */
+ xml: any;
+
+ /**
+ * Promise object constructor
+ */
+ Promise(): void;
+
+ /**
+ * adds a calendar into Gantt
+ * @param calendar an object with configuration of the calendar
+ */
+ addCalendar(calendar: any): number;
+
+ /**
+ * adds a new dependency link
+ * @param link the link object
+ */
+ addLink(link: any): string|number;
+
+ /**
+ * displays an additional layer with custom elements for a link in the timeline area
+ * @param func a render function or a config object
+ */
+ addLinkLayer(func: any): string;
+
+ /**
+ * adds a marker to the timeline area
+ * @param marker the marker's configuration object
+ */
+ addMarker(marker: any): string;
+
+ /**
+ * adds a new keyboard shortcut
+ * @param shortcut the key name or the name of keys combination for a shortcut (shortcut syntax )
+ * @param handler the handler of the shortcut call
+ * @param scope the name of the context element to attach the handler function to (list of scopes )
+ */
+ addShortcut(shortcut: string, handler: GanttCallback, scope: string): void;
+
+ /**
+ * adds a new task
+ * @param task the task object
+ * @param parent optional, optional, the parent's id
+ * @param index optional, optional, the position the task will be added into (0 or greater)
+ */
+ addTask(task: any, parent?: string|number, index?: number): string|number;
+
+ /**
+ * displays an additional layer with custom elements for a task in the timeline area
+ * @param func a render function or a config object
+ */
+ addTaskLayer(func: any): string;
+
+ /**
+ * calls an alert message box
+ * @param config the alert box's configuration
+ */
+ alert(config: any): HTMLElement;
+
+ /**
+ * if the specified expression is false, an errorMessage is shown in the red popup at the top right corner of the screen
+ * @param expression true to assert the expression, false - if assertion fails
+ * @param errorMessage an error message that will be shown in the red popup
+ */
+ assert(expression: boolean, errorMessage: string): void;
+
+ /**
+ * attaches the handler to an inner event of dhtmlxGantt
+ * @param name the event's name, case-insensitive
+ * @param handler the handler function
+ * @param settings optional, an object with settings for the event handler
+ */
+ attachEvent(name: GanttEventName, handler: GanttCallback, settings: any): string;
+
+ /**
+ * recalculates the schedule of the project
+ * @param taskId optional, optional, the task id
+ */
+ autoSchedule(taskId?: string|number): void;
+
+ /**
+ * updates multiple tasks/links at once
+ * @param callback the callback function
+ */
+ batchUpdate(callback: GanttCallback): void;
+
+ /**
+ * creates a new function that, when called, has its this keyword set to the provided value
+ * @param method the target function
+ * @param thisArg the value to be passed as the this parameter to the target function when the bound function is called
+ */
+ bind(method: GanttCallback, thisArg: any): GanttCallback;
+
+ /**
+ * calculates the duration of a task
+ * @param config the configuration object of a time span
+ */
+ calculateDuration(config: any): number;
+
+ /**
+ * calculates the end date of a task
+ * @param config the configuration object of a time span
+ */
+ calculateEndDate(config: any): Date;
+
+ /**
+ * calculates the level of nesting of a task
+ * @param task the task's object
+ */
+ calculateTaskLevel(task: any): number;
+
+ /**
+ * calls an inner event
+ * @param name the event's name, case-insensitive
+ * @param params an array of the event-related data
+ */
+ callEvent(name: string, params: any[]): boolean;
+
+ /**
+ * repaints the lighbox for the task according to its type
+ * @param type the task type
+ */
+ changeLightboxType(type: string): void;
+
+ /**
+ * changes the link's id
+ * @param id the current link's id
+ * @param new_id the new link's id
+ */
+ changeLinkId(id: string|number, new_id: string|number): void;
+
+ /**
+ * changes the task's id
+ * @param id the current task's id
+ * @param new_id the new task's id
+ */
+ changeTaskId(id: string|number, new_id: string|number): void;
+
+ /**
+ * checks whether an event has some handler(s) specified
+ * @param name the event's name
+ */
+ checkEvent(name: GanttEventName): boolean;
+
+ /**
+ * removes all tasks and additional elements (including markers) from the Gantt chart
+ */
+ clearAll(): void;
+
+ /**
+ * clears the stack of stored redo commands
+ */
+ clearRedoStack(): void;
+
+ /**
+ * clears the stack of stored undo commands
+ */
+ clearUndoStack(): void;
+
+ /**
+ * closes the branch with the specified id
+ * @param id the branch id
+ */
+ close(id: string|number): void;
+
+ /**
+ * collapses gantt from the full screen mode to the normal mode
+ */
+ collapse(): void;
+
+ /**
+ * returns the index of the column by the date
+ * @param date a date object
+ */
+ columnIndexByDate(date: Date): void;
+
+ /**
+ * calls a confirm message box
+ * @param config the confirm box's configuration
+ */
+ confirm(config: any): HTMLElement;
+
+ /**
+ * creates a deep copy of provided object
+ * @param task the object that needs to be copied
+ */
+ copy(task: any): any;
+
+ /**
+ * recalculates the task duration in the work time
+ * @param task the task's object
+ */
+ correctTaskWorkTime(task: any): void;
+
+ /**
+ * creates a working calendar
+ * @param parentCalendar optional, (optional) an existing calendar that is used for creating a new one on the base of it
+ */
+ createCalendar(parentCalendar?: any): void;
+
+ /**
+ * сreates a new dataProcessor instance and attaches it to gantt
+ * @param config dataProcessor configuration object
+ */
+ createDataProcessor(config: any): any;
+
+ /**
+ * creates a datastore according to the provided configuration
+ * @param config a configuration object of a datastore
+ */
+ createDatastore(config: any): void;
+
+ /**
+ * adds a new task and opens the lightbox to confirm
+ * @param task the task object
+ * @param parent the parent's id
+ * @param index optional, optional, the position the task will be added into (0 or greater)
+ */
+ createTask(task: any, parent: string, index?: number): string|number;
+
+ /**
+ * dataProcessor constructor
+ * @param url url to the data feed
+ */
+ dataProcessor(url: string): void;
+
+ /**
+ * gets the date of the specified horizontal position in the chart area
+ * @param pos the relative horizontal position you want to know the date of
+ */
+ dateFromPos(pos: number): Date;
+
+ /**
+ * returns false if the provided argument is undefined, otherwise true
+ * @param task the object that should be checked
+ */
+ defined(task: any): boolean;
+
+ /**
+ * deletes a task calendar by its id
+ * @param id the id of the calendar
+ */
+ deleteCalendar(id: string|number): void;
+
+ /**
+ * deletes the specified dependency link
+ * @param id the dependency link's id
+ */
+ deleteLink(id: string|number): void;
+
+ /**
+ * deletes the specified marker
+ * @param markerId the marker's id
+ */
+ deleteMarker(markerId: string): void;
+
+ /**
+ * deletes the specified task
+ * @param id the task's id
+ */
+ deleteTask(id: string|number): void;
+
+ /**
+ * destroys the gantt instance
+ */
+ destructor(): void;
+
+ /**
+ * detaches all events from dhtmlxGantt (both custom and inner ones)
+ */
+ detachAllEvents(): void;
+
+ /**
+ * detaches a handler from an event (which was attached before by the attachEvent() method)
+ * @param id the event's id
+ */
+ detachEvent(id: string): void;
+
+ /**
+ * iterates over all parent tasks of the specified task in the Gantt chart
+ * @param code a function that will iterate over tasks. Takes a task object as a parameter
+ * @param startTask the id of the item the parent tasks of which should be iterated over
+ * @param master optional, the object, that 'this' will refer to
+ */
+ eachParent(code: GanttCallback, startTask: string|number, master?: any): void;
+
+ /**
+ * iterates over all selected tasks in the Gantt chart
+ * @param code a function that will iterate over tasks. Takes a task id as a parameter
+ */
+ eachSelectedTask(code: GanttCallback): void;
+
+ /**
+ * iterates over all child tasks of a specific task or the of whole Gantt chart
+ * @param code a function that will iterate over tasks. Takes a task object as a parameter
+ * @param parent optional, the parent id. If specified, the function will iterate over children of the specified parent
+ * @param master optional, the object, that 'this' will refer to
+ */
+ eachTask(code: GanttCallback, parent?: string|number, master?: any): void;
+
+ /**
+ * attaches an event handler to an HTML element
+ * @param node the HTML node or its id
+ * @param event the name of an HTML event (without the 'on' prefix)
+ * @param handler the event handler
+ * @param options optional, optional, the value of either the useCapture or options parameter. Read details
+ */
+ event(node: HTMLElement|string, event: string, handler: GanttCallback, options?: any): void;
+
+ /**
+ * removes an event handler from an HTML element
+ * @param node the HTML node or its id
+ * @param event the name of an HTML event (without the 'on' prefix)
+ * @param handler the event handler
+ * @param options optional, optional, the value of either the useCapture or options parameter. Read details
+ */
+ eventRemove(node: HTMLElement|string, event: string, handler: GanttCallback, options?: any): void;
+
+ /**
+ * expands gantt to the full screen mode
+ */
+ expand(): void;
+
+ /**
+ * exports data from the Gantt chart to an Excel document
+ * @param _export_ an object with export settings (see the details)
+ */
+ exportToExcel(_export_: any): void;
+
+ /**
+ * exports data from the Gantt chart to an iCal string
+ * @param _export_ an object with export settings (see the details)
+ */
+ exportToICal(_export_: any): void;
+
+ /**
+ * exports the structure and data of a Gantt chart into a JSON object
+ * @param config an object with Gantt configuration
+ */
+ exportToJSON(config: any): void;
+
+ /**
+ * exports data from the Gantt chart to MS Project
+ * @param _export_ an object with export settings (see the details)
+ */
+ exportToMSProject(_export_: any): void;
+
+ /**
+ * exports a Gantt chart into the PDF format
+ * @param _export_ an object with export settings (see the details)
+ */
+ exportToPDF(_export_: any): void;
+
+ /**
+ * exports a Gantt chart into the PNG format
+ * @param _export_ an object with export settings (see the details)
+ */
+ exportToPNG(_export_: any): void;
+
+ /**
+ * exports data from the Gantt chart to Primavera P6
+ * @param _export_ an object with export settings (see the details)
+ */
+ exportToPrimaveraP6(_export_: any): void;
+
+ /**
+ * returns all dependency loops in the chart
+ */
+ findCycles(): any[];
+
+ /**
+ * sets focus on the gantt
+ */
+ focus(): void;
+
+ /**
+ * gets worktime calendar by id
+ * @param calendarId the id of the global calendar or "global"
+ */
+ getCalendar(calendarId: string|number): any;
+
+ /**
+ * gets all the calendars added into Gantt
+ */
+ getCalendars(): any[];
+
+ /**
+ * returns the 1st-level child tasks of the specified parent branch
+ * @param id the parent branch's id
+ */
+ getChildren(id: string|number): any[];
+
+ /**
+ * returns the closest working time
+ * @param config the configuration object
+ */
+ getClosestWorkTime(config: any): Date;
+
+ /**
+ * returns the index of the column by its name
+ * @param name the name of the column
+ */
+ getColumnIndex(name: string): number;
+
+ /**
+ * returns all tasks and links that a task is connected with
+ * @param id optional, optional, the id of a task
+ */
+ getConnectedGroup(id?: string|number): any;
+
+ /**
+ * returns the earliest and latest dates allowed by the constraint applied to a task
+ * @param task a task object
+ */
+ getConstraintLimitations(task: any): void;
+
+ /**
+ * returns the constraint type applied to the task
+ * @param task a task object
+ */
+ getConstraintType(task: any): string;
+
+ /**
+ * returns the configuration object of a datastore
+ * @param name the name of the datastore
+ */
+ getDatastore(name: string): any;
+
+ /**
+ * returns the free slack of a task
+ * @param task the object of a task
+ */
+ getFreeSlack(task: any): number;
+
+ /**
+ * gets the index of a task in the tree
+ * @param id the task id
+ */
+ getGlobalTaskIndex(id: string|number): number;
+
+ /**
+ * gets the configuration object of a column
+ * @param name the column's name
+ */
+ getGridColumn(name: string): any;
+
+ /**
+ * gets columns of the Gantt chart
+ */
+ getGridColumns(): any[];
+
+ /**
+ * gets the label of a select control in the lightbox
+ * @param property the name of a data property that the control is mapped to
+ * @param key the option's id. This parameter is compared with the task's data property to assign the select's option to the task
+ */
+ getLabel(property: string, key: string|number): string;
+
+ /**
+ * returns the id of the last selected task
+ */
+ getLastSelectedTask(): string|number;
+
+ /**
+ * gets the lightbox's HTML object element
+ */
+ getLightbox(): HTMLElement;
+
+ /**
+ * returns the object of the lightbox's section
+ * @param name the name of the section
+ */
+ getLightboxSection(name: string): any;
+
+ /**
+ * returns the name of the active lighbox's structure
+ */
+ getLightboxType(): string;
+
+ /**
+ * returns values of the lightbox's sections
+ */
+ getLightboxValues(): any;
+
+ /**
+ * returns the dependency link object by the specified id
+ * @param id the link id
+ */
+ getLink(id: string|number): any;
+
+ /**
+ * returns the number of all dependency links presented in the Gantt chart
+ */
+ getLinkCount(): number;
+
+ /**
+ * returns the HTML element of the specified dependency link
+ * @param id the link id
+ */
+ getLinkNode(id: string|number): HTMLElement;
+
+ /**
+ * returns all links presented in the Gantt chart
+ */
+ getLinks(): any[];
+
+ /**
+ * gets the marker's object
+ * @param markerId the marker's id
+ */
+ getMarker(markerId: string): any;
+
+ /**
+ * returns the id of the next item (no matter what the level of nesting is: the same or different)
+ * @param id the task id
+ */
+ getNext(id: string|number): string|number;
+
+ /**
+ * returns the id of the next task of the same level
+ * @param id the task id
+ */
+ getNextSibling(id: string|number): string|number;
+
+ /**
+ * returns the id of the parent task
+ * @param id the task id
+ */
+ getParent(id: string|number): string|number;
+
+ /**
+ * returns the id of the previous item (no matter what the level of nesting is: the same or different)
+ * @param id the task id
+ */
+ getPrev(id: string|number): string|number;
+
+ /**
+ * returns the id of the previous task of the same level
+ * @param id the task id
+ */
+ getPrevSibling(id: string|number): string|number;
+
+ /**
+ * returns the stack of stored redo user actions
+ */
+ getRedoStack(): any[];
+
+ /**
+ * returns all tasks assigned to the resource
+ * @param resourceId the id of the resource
+ */
+ getResourceAssignments(resourceId: string|number): any[];
+
+ /**
+ * returns a calendar which the resource is assigned to
+ * @param resource the id or object of the resource
+ */
+ getResourceCalendar(resource: any): any;
+
+ /**
+ * returns the configuration of the time scale
+ */
+ getScale(): any;
+
+ /**
+ * returns the scroll position
+ */
+ getScrollState(): any;
+
+ /**
+ * returns the id of the selected task
+ */
+ getSelectedId(): string;
+
+ /**
+ * returns an array of the currently selected tasks
+ */
+ getSelectedTasks(): any[];
+
+ /**
+ * gets a key navigation shortcut handler
+ * @param shortcut the key name or the name of keys combination for a shortcut (shortcut syntax )
+ * @param scope the name of the context element to attach the handler function to (list of scopes )
+ */
+ getShortcutHandler(shortcut: string, scope: string): GanttCallback;
+
+ /**
+ * returns siblings of the specified task (including itself)
+ * @param id the task id
+ */
+ getSiblings(id: string|number): any[];
+
+ /**
+ * checks how much time (in the current duration unit) a task has before it starts to affect other tasks
+ * @param task1 the object of the 1st task to check the slack for
+ * @param task2 the object of the 2nd task to check the slack for
+ */
+ getSlack(task1: any, task2: any): number|string;
+
+ /**
+ * gets the current state of the Gantt chart
+ */
+ getState(): any;
+
+ /**
+ * calculates the combined start/end dates of tasks nested in a project or another task
+ * @param task_id optional, the task's id, api/gantt_root_id_config.md will be used if not specified
+ */
+ getSubtaskDates(task_id?: string|number): any;
+
+ /**
+ * calculates the combined duration of tasks nested in a project or another task.
+ * @param task_id optional, the task's id, api/gantt_root_id_config.md will be used if not specified
+ */
+ getSubtaskDuration(task_id?: string|number): number;
+
+ /**
+ * returns the task object
+ * @param id the task id
+ */
+ getTask(id: string|number): any;
+
+ /**
+ * finds a task by the specified criteria
+ * @param propertyName the name of the property to match, or a filter function
+ * @param propertyValue the property value
+ */
+ getTaskBy(propertyName: string|GanttCallback, propertyValue: any): any[];
+
+ /**
+ * returns a task by its global task index
+ * @param index the task index in the tree (zero-based numbering)
+ */
+ getTaskByIndex(index: number): any;
+
+ /**
+ * returns a collection of tasks which occur during the specified period
+ * @param from optional, the start date of the period
+ * @param to optional, the end date of the period
+ */
+ getTaskByTime(from?: Date, to?: Date): any[];
+
+ /**
+ * returns a task by its WBS code
+ * @param code the WBS code of the task
+ */
+ getTaskByWBSCode(code: string): any;
+
+ /**
+ * gets a calendar assigned to the specified task (a task level calendar)
+ * @param task the id or object of a task
+ */
+ getTaskCalendar(task: any): any;
+
+ /**
+ * gets the number of tasks that are currently loaded in the gantt
+ */
+ getTaskCount(): number;
+
+ /**
+ * returns the visible height of a task
+ */
+ getTaskHeight(): number;
+
+ /**
+ * gets the index of a task in the branch
+ * @param id the task id
+ */
+ getTaskIndex(id: string|number): number;
+
+ /**
+ * returns the HTML element of the task bar
+ * @param id the task id
+ */
+ getTaskNode(id: string|number): HTMLElement;
+
+ /**
+ * calculates the position and size of the task's DOM element in the timeline area
+ * @param task the task object
+ * @param from the start date of the item
+ * @param to the end date of the item
+ */
+ getTaskPosition(task: any, from: Date, to: Date): any;
+
+ /**
+ * returns the HTML element of the task row in the table
+ * @param id the task id
+ */
+ getTaskRowNode(id: string|number): HTMLElement;
+
+ /**
+ * gets the top position of the task's DOM element in the timeline area
+ * @param id the task's id
+ */
+ getTaskTop(id: number|string): number;
+
+ /**
+ * returns the type of a task
+ * @param task the task object
+ */
+ getTaskType(task: any): string;
+
+ /**
+ * returns the total slack of a task
+ * @param task the object of a task
+ */
+ getTotalSlack(task: any): number;
+
+ /**
+ * returns the stack of stored undo user actions
+ */
+ getUndoStack(): any[];
+
+ /**
+ * gets the number of tasks visible on the screen (those that are not collapsed)
+ */
+ getVisibleTaskCount(): number;
+
+ /**
+ * returns the WBS code (the outline number) of a task
+ * @param task the object of a task
+ */
+ getWBSCode(task: any): string;
+
+ /**
+ * returns the working hours of the specified date
+ * @param date a date to check
+ */
+ getWorkHours(date: Date): any[];
+
+ /**
+ * groups tasks by the specified task's attribute
+ * @param config the grouping configuration object, or false to ungroup tasks
+ */
+ groupBy(config: any): void;
+
+ /**
+ * checks whether the specified item has child tasks
+ * @param id the task id
+ */
+ hasChild(id: string|number): boolean;
+
+ /**
+ * hides the lightbox modal overlay that blocks interactions with the remaining screen
+ * @param box optional, an element to hide
+ */
+ hideCover(box?: HTMLElement): void;
+
+ /**
+ * closes the lightbox if it's currently active
+ */
+ hideLightbox(): void;
+
+ /**
+ * hides the pop-up task form (if it's currently active)
+ */
+ hideQuickInfo(): void;
+
+ /**
+ * converts an Excel file to JSON
+ * @param config an object with configuration properties of an imported file
+ */
+ importFromExcel(config: any): void;
+
+ /**
+ * converts an XML or MPP MS Project file to JSON
+ * @param config an object with configuration properties of an imported file
+ */
+ importFromMSProject(config: any): void;
+
+ /**
+ * converts an XML or XAR Primavera P6 file to JSON
+ * @param config an object with configuration properties of an imported file
+ */
+ importFromPrimaveraP6(config: any): void;
+
+ /**
+ * initializes a dhtmlxGantt inside a container
+ * @param container an HTML container (or its id) where a dhtmlxGantt object will be initialized
+ * @param from optional, the start value of the time scale (X–Axis)
+ * @param to optional, the end value of the time scale (X–Axis)
+ */
+ init(container: string|HTMLElement, from?: Date, to?: Date): void;
+
+ /**
+ * checks whether a task is a child of a different task
+ * @param childId the id of a task that you want to check as a child
+ * @param parentId the id of a task that you want to check as a parent
+ */
+ isChildOf(childId: string|number, parentId: string|number): boolean;
+
+ /**
+ * checks whether the link is circular
+ * @param link the link object
+ */
+ isCircularLink(link: any): boolean;
+
+ /**
+ * checks whether the specified link is critical
+ * @param link the link's object
+ */
+ isCriticalLink(link: any): boolean;
+
+ /**
+ * checks whether the specified task is critical
+ * @param task the task's object
+ */
+ isCriticalTask(task: any): boolean;
+
+ /**
+ * checks whether the specified link is correct
+ * @param link the link object
+ */
+ isLinkAllowed(link: any): boolean;
+
+ /**
+ * checks whether the specified link exists
+ * @param id the link id
+ */
+ isLinkExists(id: string|number): boolean;
+
+ /**
+ * checks whether the specified task or link is read-only
+ * @param id the task/link id
+ */
+ isReadonly(id: string|number): boolean;
+
+ /**
+ * checks whether the specified task is currently selected
+ * @param task the task's id
+ */
+ isSelectedTask(task: string|number): boolean;
+
+ /**
+ * checks whether the specified task is split
+ * @param task the object of a task
+ */
+ isSplitTask(task: any): boolean;
+
+ /**
+ * checks whether the specified task is summary
+ * @param task the object of a task
+ */
+ isSummaryTask(task: any): boolean;
+
+ /**
+ * checks whether the specified task exists
+ * @param id the task id
+ */
+ isTaskExists(id: string|number): boolean;
+
+ /**
+ * checks whether the specifies task is currently rendered in the Gantt chart
+ * @param id the task's id
+ */
+ isTaskVisible(id: string|number): boolean;
+
+ /**
+ * checks if the task is unscheduled
+ * @param task the task's object
+ */
+ isUnscheduledTask(task: any): boolean;
+
+ /**
+ * checks whether the specified date is working or not
+ * @param config the configuration object of a time span
+ */
+ isWorkTime(config: any): boolean;
+
+ /**
+ * loads data to the gantt from an external data source
+ * @param url the server-side url (may be a static file or a server side script that outputs data)
+ * @param type optional, ('json', 'xml', 'oldxml') the data type. The default value - 'json'
+ * @param callback optional, the callback function
+ */
+ load(url: string, type?: string, callback?: GanttCallback): any;
+
+ /**
+ * gets the id of a task from the specified HTML event
+ * @param e a native event
+ */
+ locate(e: Event): string|number;
+
+ /**
+ * merges several working calendars into one
+ * @param calendars an array of calendars' objects
+ */
+ mergeCalendars(calendars: any[]): void;
+
+ /**
+ * calls a message box of the specified type
+ * @param config the message box's configuration
+ */
+ message(config: any): HTMLElement;
+
+ /**
+ * adds properties of the 'source' object into the 'target' object
+ * @param target the target object
+ * @param source the source object
+ * @param force if true, properties of the 'source' will overwrite matching properties of the 'target', if there are any. If false, properties that already exist in the 'target' will be omitted
+ */
+ mixin(target: any, source: any, force: boolean): void;
+
+ /**
+ * calls a modalbox
+ * @param config the modal box's configuration
+ */
+ modalbox(config: any): HTMLElement;
+
+ /**
+ * moves a task to a new position
+ * @param sid the id of the task to move
+ * @param tindex the index of the position that the task will be moved to (the index within a branch)
+ * @param parent optional, the parent id. If specified, the tindex will refer to the index in the 'parent' branch
+ */
+ moveTask(sid: string|number, tindex: number, parent?: string|number): boolean;
+
+ /**
+ * opens the branch with the specified id
+ * @param id the branch id
+ */
+ open(id: string|number): void;
+
+ /**
+ * loads data from a client-side resource
+ * @param url a string or object which represents data
+ * @param type optional, optional, ('json', 'xml' ) the data type. The default value - 'json'
+ */
+ parse(url: any, type?: string): void;
+
+ /**
+ * activates specified extensions
+ * @param ext extensions that need to be activated
+ */
+ plugins(ext: any): void;
+
+ /**
+ * gets the relative horizontal position of the specified date in the chart area
+ * @param date a date you want to know the position of
+ */
+ posFromDate(date: Date): number;
+
+ /**
+ * applies the reverted changes to the gantt once again
+ */
+ redo(): void;
+
+ /**
+ * refreshes data in the Gantt chart
+ */
+ refreshData(): void;
+
+ /**
+ * refreshes the specifies link
+ * @param id the link id
+ */
+ refreshLink(id: string|number): void;
+
+ /**
+ * refreshes the task and its related links
+ * @param id the task id
+ * @param refresh_links optional, optional, defines whether links related to the task should be refreshed, true by default
+ */
+ refreshTask(id: string|number, refresh_links?: boolean): void;
+
+ /**
+ * removes the specified layer related to a link
+ * @param layerId a DOM element that will be displayed in the layer
+ */
+ removeLinkLayer(layerId: string): void;
+
+ /**
+ * removes a keyboard shortcut
+ * @param shortcut the key name or the name of keys combination for a shortcut (shortcut syntax )
+ * @param scope the element to which the shortcut is attached (list of scopes )
+ */
+ removeShortcut(shortcut: string, scope: any): void;
+
+ /**
+ * removes the specified layer related to a task
+ * @param layerId a DOM element that will be displayed in the layer
+ */
+ removeTaskLayer(layerId: string): void;
+
+ /**
+ * renders the whole Gantt chart
+ */
+ render(): void;
+
+ /**
+ * updates all markers on the page
+ */
+ renderMarkers(): void;
+
+ /**
+ * rebuilds the Gantt layout using the current value of the layout config
+ */
+ resetLayout(): void;
+
+ /**
+ * removes the current lightbox's HTML object element
+ */
+ resetLightbox(): void;
+
+ /**
+ * re-calculates the duration of a project task depending on the dates of its children
+ * @param task the task's object
+ */
+ resetProjectDates(task: any): void;
+
+ /**
+ * re-calculates the skin's settings from the related attached skin CSS file
+ */
+ resetSkin(): void;
+
+ /**
+ * forces the lightbox to resize
+ */
+ resizeLightbox(): void;
+
+ /**
+ * rounds the specified date to the nearest date in the time scale
+ * @param date the Date object to round
+ */
+ roundDate(date: Date): Date;
+
+ /**
+ * rounds the start and end task's dates to the nearest dates in the time scale
+ * @param task the task object
+ */
+ roundTaskDates(task: any): void;
+
+ /**
+ * scrolls the Gantt container to the specified position
+ * @param x value of horizontal scroll or 'null' (if the scroll position shouldn't be changed)
+ * @param y value of vertical scroll or 'null' (if the scroll position shouldn't be changed)
+ */
+ scrollTo(x: number|null, y: number|null): void;
+
+ /**
+ * selects the specified task
+ * @param id the task id
+ */
+ selectTask(id: string|number): string|number;
+
+ /**
+ * serializes the data into JSON or XML format
+ * @param type optional, the format that the data will be serialized into. Possible values: 'json' (default ), 'xml'.
+ */
+ serialize(type?: string): any;
+
+ /**
+ * returns a list of options
+ * @param list_name the name of a list
+ * @param options optional, an array of options
+ */
+ serverList(list_name: string, options?: any[]): any[];
+
+ /**
+ * set the parent for a task
+ * @param task the task id
+ * @param pid the parent task id
+ */
+ setParent(task: number|string, pid: number|string): void;
+
+ /**
+ * resizes the Gantt chart
+ */
+ setSizes(): void;
+
+ /**
+ * sets the working time for the Gantt chart
+ * @param config the configuration object of a time span
+ */
+ setWorkTime(config: any): void;
+
+ /**
+ * shows the lightbox modal overlay that blocks interactions with the remaining screen
+ * @param box optional, an element to hide
+ */
+ showCover(box?: HTMLElement): void;
+
+ /**
+ * scrolls the chart area to makes the specified date visible
+ * @param date the date to show in the chart
+ */
+ showDate(date: Date): void;
+
+ /**
+ * opens the lightbox for the specified task
+ * @param id the task id
+ */
+ showLightbox(id: string|number): void;
+
+ /**
+ * displays the pop-up task form for the specified task
+ * @param id the task id
+ */
+ showQuickInfo(id: string|number): void;
+
+ /**
+ * makes the specified task visible on the screen
+ * @param id the task id
+ */
+ showTask(id: string|number): void;
+
+ /**
+ * sorts tasks in the grid
+ * @param field the name of the column that the grid will be sorted by or a custom sorting function
+ * @param desc optional, specifies the sorting direction: true - descending sort and false - ascending sort. By default, false
+ * @param parent optional, the id of the parent task. Specify the parameter if you want to sort tasks only in the branch of the specified parent.
+ * @param silent optional, specifies whether rendering should be invoked after reordering items
+ */
+ sort(field: string|GanttCallback, desc?: boolean, parent?: string|number, silent?: boolean): void;
+
+ /**
+ * selects the specified task if it was unselected and vice versa
+ * @param task the task's id
+ */
+ toggleTaskSelection(task: string|number): void;
+
+ /**
+ * returns a unique id
+ */
+ uid(): number;
+
+ /**
+ * reverts the changes made in the gantt
+ */
+ undo(): void;
+
+ /**
+ * removes selection from the selected task
+ * @param id optional, optional, the id of the task to remove selection from, see details
+ */
+ unselectTask(id?: string|number): void;
+
+ /**
+ * unsets a working time in the Gantt Chart
+ * @param config the configuration object of a time span
+ */
+ unsetWorkTime(config: any): void;
+
+ /**
+ * updates the specified collection with new options
+ * @param collection the name of the collection to update
+ * @param options the new values of the collection
+ */
+ updateCollection(collection: string, options: any[]): boolean;
+
+ /**
+ * updates the specified dependency link
+ * @param id the task id
+ */
+ updateLink(id: string): void;
+
+ /**
+ * updates the specified marker
+ * @param markerId the marker's id
+ */
+ updateMarker(markerId: string): void;
+
+ /**
+ * updates the specified task
+ * @param id the task id
+ */
+ updateTask(id: string): void;
+}
+
+declare var gantt: GanttStatic;
+
+declare var Gantt: GanttEnterprise;
+
+export {gantt, Gantt};
\ No newline at end of file
diff --git a/Metronic/assets/global/plugins/dhtmlxgantt/dhtmlxgantt.js b/Metronic/assets/global/plugins/dhtmlxgantt/dhtmlxgantt.js
new file mode 100644
index 000000000..a778ce513
--- /dev/null
+++ b/Metronic/assets/global/plugins/dhtmlxgantt/dhtmlxgantt.js
@@ -0,0 +1,14 @@
+/*
+@license
+
+dhtmlxGantt v.7.0.1 Standard
+
+This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
+
+To use dhtmlxGantt in non-GPL projects (and get Pro version of the product), please obtain Commercial/Enterprise or Ultimate license on our site https://dhtmlx.com/docs/products/dhtmlxGantt/#licensing or contact us at sales@dhtmlx.com
+
+(c) XB Software Ltd.
+
+*/
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("dhtmlxgantt",[],e):"object"==typeof exports?exports.dhtmlxgantt=e():t.dhtmlxgantt=e()}(window,function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/codebase/",n(n.s=242)}([function(t,e,n){var i,r=n(3);t.exports={copy:function t(e){var n,i;if(e&&"object"==typeof e)switch(!0){case r.isDate(e):i=new Date(e);break;case r.isArray(e):for(i=new Array(e.length),n=0;n=0}function a(t){return!{a:!0,area:!0}[t.nodeName.loLowerCase()]||!!t.getAttribute("href")}function o(t){return!{input:!0,select:!0,textarea:!0,button:!0,object:!0}[t.nodeName.toLowerCase()]||!t.hasAttribute("disabled")}function s(t){if(!t)return"";var e=t.className||"";return e.baseVal&&(e=e.baseVal),e.indexOf||(e=""),u(e)}var l;function c(t){return t.tagName?t:(t=t||window.event).target||t.srcElement}function u(t){return(String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")}).apply(t)}t.exports={getNodePosition:n,getFocusableNodes:function(t){for(var e=t.querySelectorAll(["a[href]","area[href]","input","select","textarea","button","iframe","object","embed","[tabindex]","[contenteditable]"].join(", ")),n=Array.prototype.slice.call(e,0),s=0;s=0){if(!n)return i;var o=0===a||!u(r.charAt(a-1)),l=a+e.length>=r.length||!u(r.charAt(a+e.length));if(o&&l)return i}}i=i.parentNode}return null},locateAttribute:function(t,e){if(e){for(var n=c(t);n;){if(n.getAttribute&&n.getAttribute(e))return n;n=n.parentNode}return null}},getTargetNode:c,getRelativeEventPosition:function(t,e){var i=document.documentElement,r=n(e);return{x:t.clientX+i.scrollLeft-i.clientLeft-r.x+e.scrollLeft,y:t.clientY+i.scrollTop-i.clientTop-r.y+e.scrollTop}},isChildOf:function(t,e){if(!t||!e)return!1;for(;t&&t!=e;)t=t.parentNode;return t===e},hasClass:function(t,e){return"classList"in t?t.classList.contains(e):new RegExp("\\b"+e+"\\b").test(t.className)},closest:function(t,e){if(t.closest)return t.closest(e);if(t.matches||t.msMatchesSelector||t.webkitMatchesSelector){var n=t;if(!document.documentElement.contains(n))return null;do{if((n.matches||n.msMatchesSelector||n.webkitMatchesSelector).call(n,e))return n;n=n.parentElement||n.parentNode}while(null!==n&&1===n.nodeType);return null}return console.error("Your browser is not supported"),null}}},function(t,e){t.exports=function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function i(){this.constructor=t}t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}},function(t,e){var n={second:1,minute:60,hour:3600,day:86400,week:604800,month:2592e3,quarter:7776e3,year:31536e3};function i(t){return!(!t||"object"!=typeof t)&&!!(t.getFullYear&&t.getMonth&&t.getDate)}function r(t,e){var n=[];if(t.filter)return t.filter(e);for(var i=0;i=0||navigator.userAgent.indexOf("Trident")>=0),isIE6:n&&!XMLHttpRequest&&navigator.userAgent.indexOf("MSIE")>=0,isIE7:n&&navigator.userAgent.indexOf("MSIE 7.0")>=0&&navigator.userAgent.indexOf("Trident")<0,isIE8:n&&navigator.userAgent.indexOf("MSIE 8.0")>=0&&navigator.userAgent.indexOf("Trident")>=0,isOpera:n&&navigator.userAgent.indexOf("Opera")>=0,isChrome:n&&navigator.userAgent.indexOf("Chrome")>=0,isKHTML:n&&(navigator.userAgent.indexOf("Safari")>=0||navigator.userAgent.indexOf("Konqueror")>=0),isFF:n&&navigator.userAgent.indexOf("Firefox")>=0,isIPad:n&&navigator.userAgent.search(/iPad/gi)>=0,isEdge:n&&-1!=navigator.userAgent.indexOf("Edge"),isNode:!n||"undefined"==typeof navigator};t.exports=i},function(t,e,n){var i=n(0),r=n(4),a=n(1),o=function(){"use strict";function t(t,e,n,o){t&&(this.$container=a.toNode(t),this.$parent=t),this.$config=i.mixin(e,{headerHeight:33}),this.$gantt=o,this.$domEvents=o._createDomEventScope(),this.$id=e.id||"c"+i.uid(),this.$name="cell",this.$factory=n,r(this)}return t.prototype.destructor=function(){this.$parent=this.$container=this.$view=null,this.$gantt.$services.getService("mouseEvents").detach("click","gantt_header_arrow",this._headerClickHandler),this.$domEvents.detachAll(),this.callEvent("onDestroy",[]),this.detachAllEvents()},t.prototype.cell=function(t){return null},t.prototype.scrollTo=function(t,e){1*t==t&&(this.$view.scrollLeft=t),1*e==e&&(this.$view.scrollTop=e)},t.prototype.clear=function(){this.getNode().innerHTML="",this.getNode().className="gantt_layout_content",this.getNode().style.padding="0"},t.prototype.resize=function(t){if(this.$parent)return this.$parent.resize(t);!1===t&&(this.$preResize=!0);var e=this.$container,n=e.offsetWidth,i=e.offsetHeight,r=this.getSize();e===document.body&&(n=document.body.offsetWidth,i=document.body.offsetHeight),nr.maxWidth&&(n=r.maxWidth),ir.maxHeight&&(i=r.maxHeight),this.setSize(n,i),this.$preResize,this.$preResize=!1},t.prototype.hide=function(){this._hide(!0),this.resize()},t.prototype.show=function(t){this._hide(!1),t&&this.$parent&&this.$parent.show(),this.resize()},t.prototype._hide=function(t){if(!0===t&&this.$view.parentNode)this.$view.parentNode.removeChild(this.$view);else if(!1===t&&!this.$view.parentNode){var e=this.$parent.cellIndex(this.$id);this.$parent.moveView(this,e)}this.$config.hidden=t},t.prototype.$toHTML=function(t,e){void 0===t&&(t=""),e=[e||"",this.$config.css||""].join(" ");var n=this.$config,i="";n.raw?t="string"==typeof n.raw?n.raw:"":(t||(t=""+(n.html||"")+"
"),n.header&&(i=""));return""+i+t+"
"},t.prototype.$fill=function(t,e){this.$view=t,this.$parent=e,this.init()},t.prototype.getNode=function(){return this.$view.querySelector("gantt_layout_cell")||this.$view},t.prototype.init=function(){var t=this;this._headerClickHandler=function(e){a.locateAttribute(e,"data-cell-id")==t.$id&&t.toggle()},this.$gantt.$services.getService("mouseEvents").delegate("click","gantt_header_arrow",this._headerClickHandler),this.callEvent("onReady",[])},t.prototype.toggle=function(){this.$config.collapsed=!this.$config.collapsed,this.resize()},t.prototype.getSize=function(){var t={height:this.$config.height||0,width:this.$config.width||0,gravity:this.$config.gravity||1,minHeight:this.$config.minHeight||0,minWidth:this.$config.minWidth||0,maxHeight:this.$config.maxHeight||1e5,maxWidth:this.$config.maxWidth||1e5};if(this.$config.collapsed){var e="x"===this.$config.mode;t[e?"width":"height"]=t[e?"maxWidth":"maxHeight"]=this.$config.headerHeight}return t},t.prototype.getContentSize=function(){var t=this.$lastSize.contentX;t!==1*t&&(t=this.$lastSize.width);var e=this.$lastSize.contentY;return e!==1*e&&(e=this.$lastSize.height),{width:t,height:e}},t.prototype._getBorderSizes=function(){var t={top:0,right:0,bottom:0,left:0,horizontal:0,vertical:0};return this._currentBorders&&(this._currentBorders[this._borders.left]&&(t.left=1,t.horizontal++),this._currentBorders[this._borders.right]&&(t.right=1,t.horizontal++),this._currentBorders[this._borders.top]&&(t.top=1,t.vertical++),this._currentBorders[this._borders.bottom]&&(t.bottom=1,t.vertical++)),t},t.prototype.setSize=function(t,e){this.$view.style.width=t+"px",this.$view.style.height=e+"px";var n=this._getBorderSizes(),i=e-n.vertical,r=t-n.horizontal;this.$lastSize={x:t,y:e,contentX:r,contentY:i},this.$config.header?this._sizeHeader():this._sizeContent()},t.prototype._borders={left:"gantt_layout_cell_border_left",right:"gantt_layout_cell_border_right",top:"gantt_layout_cell_border_top",bottom:"gantt_layout_cell_border_bottom"},t.prototype._setBorders=function(t,e){e||(e=this);var n=e.$view;for(var i in this._borders)a.removeClassName(n,this._borders[i]);"string"==typeof t&&(t=[t]);var r={};for(i=0;i";return e+=r.getHtmlSelect(t.options,[{key:"style",value:"width:100%;"}]),e+=""},a.prototype.set_value=function(t,e,n,i){var r=t.firstChild;!r._dhx_onchange&&i.onchange&&(r.onchange=i.onchange,r._dhx_onchange=!0),void 0===e&&(e=(r.options[0]||{}).value),r.value=e||""},a.prototype.get_value=function(t){return t.firstChild.value},a.prototype.focus=function(e){var n=e.firstChild;t._focus(n,!0)},a}},function(t,e){t.exports=function(t){return t.config.smart_rendering&&t._smart_render}},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){(function(e){var n;n="undefined"!=typeof window?window:e,t.exports=n}).call(this,n(13))},function(t,e,n){var i=n(0);t.exports={createDropTargetObject:function(t){var e={targetParent:null,targetIndex:0,targetId:null,child:!1,nextSibling:!1,prevSibling:!1};return t&&i.mixin(e,t,!0),e},nextSiblingTarget:function(t,e,n){var i=this.createDropTargetObject();return i.targetId=e,i.nextSibling=!0,i.targetParent=n.getParent(i.targetId),i.targetIndex=n.getBranchIndex(i.targetId),(n.getParent(t)!=i.targetParent||i.targetIndexn.getBranchIndex(t)&&(i.targetIndex-=1),i},firstChildTarget:function(t,e,n){var i=this.createDropTargetObject();return i.targetId=e,i.targetParent=i.targetId,i.targetIndex=0,i.child=!0,i},lastChildTarget:function(t,e,n){var i=n.getChildren(e),r=this.createDropTargetObject();return r.targetId=i[i.length-1],r.targetParent=e,r.targetIndex=i.length,r.nextSibling=!0,r}}},function(t,e,n){var i=n(12);t.exports=function(t,e,n,r){var a=e.width[t];if(a<=0)return!1;if(!r.config.smart_rendering||i(r))return!0;var o=e.left[t]-a,s=e.left[t]+a;return o<=n.x_end&&s>=n.x}},function(t,e){t.exports=function(t,e){var n=0,i=t.left.length-1;if(e)for(var r=0;re.x_end){i=r;break}}return{start:n,end:i}}},function(t,e){t.exports=function(t,e){var n=e.$getConfig();return{top:e.getItemTop(t.id),height:n.row_height,left:0,right:1/0}}},function(t,e,n){var i=n(22),r=n(4),a=n(0),o=n(32),s=n(100),l=function(t,e,n,s){this.$config=a.mixin({},e||{}),this.$scaleHelper=new i(s),this.$gantt=s,this._posFromDateCache={},this._timelineDragScroll=null,a.mixin(this,o()),r(this)};function c(t,e){for(var n,i,r,a=0,o=t.length-1;a<=o;)if(i=+t[n=Math.floor((a+o)/2)],r=+t[n-1],ie)){for(;+t[n]==+t[n+1];)n++;return n}if(!isNaN(r)&&r",this.$task=t.childNodes[0],this.$task.innerHTML="
",this.$task_scale=this.$task.childNodes[0],this.$task_data=this.$task.childNodes[1],this.$task_data.innerHTML="
",this.$task_bg=this.$task_data.childNodes[0],this.$task_links=this.$task_data.childNodes[1],this.$task_bars=this.$task_data.childNodes[2],this._tasks={col_width:0,width:[],full_width:0,trace_x:[],rendered:{}};var e=this.$getConfig(),n=e[this.$config.bind+"_attribute"],i=e[this.$config.bindLinks+"_attribute"];!n&&this.$config.bind&&(n="data-"+this.$config.bind+"-id"),!i&&this.$config.bindLinks&&(i="data-"+this.$config.bindLinks+"-id"),this.$config.item_attribute=n||null,this.$config.link_attribute=i||null;var r=this._createLayerConfig();this.$config.layers||(this.$config.layers=r.tasks),this.$config.linkLayers||(this.$config.linkLayers=r.links),this._attachLayers(this.$gantt),this.callEvent("onReady",[]),this.$gantt.ext.dragTimeline&&(this._timelineDragScroll=this.$gantt.ext.dragTimeline.create(),this._timelineDragScroll.attach(this))},setSize:function(t,e){var n=this.$getConfig();if(1*t===t&&(this.$config.width=t),1*e===e){this.$config.height=e;var i=Math.max(this.$config.height-n.scale_height);this.$task_data.style.height=i+"px"}if(this.refresh(),this.$task_bg.style.backgroundImage="",n.smart_rendering&&this.$config.rowStore){var r=this.$config.rowStore;this.$task_bg.style.height=n.row_height*r.countVisible()+"px"}else this.$task_bg.style.height="";for(var a=this._tasks,o=this.$task_data.childNodes,s=0,l=o.length;s'+this._prepareScaleHtml(t[a],e,n)+"")}return i.join("")},_prepareScaleHtml:function(t,e,n){var i=this.$getConfig(),r=this.$gantt.templates,a=[],o=null,s=null,l=t.format||t.template||t.date;"string"==typeof l&&(l=this.$gantt.date.date_to_str(l));var u=0,d=t.count;!i.smart_scales||isNaN(e)||isNaN(n)||(u=c(t.left,e),d=c(t.left,n)+1),s=t.css||function(){},!t.css&&i.inherit_scale_class&&(s=r.scale_cell_class);for(var h=u;h"+f+"";a.push(k)}}return a.join("")},dateFromPos:function(t){var e=this._tasks;if(t<0||t>e.full_width||!e.full_width)return null;var n=c(this._tasks.left,t),i=this._tasks.left[n],r=e.width[n]||e.col_width,a=0;r&&(a=(t-i)/r,e.rtl&&(a=1-a));var o=0;return a&&(o=this._getColumnDuration(e,e.trace_x[n])),new Date(e.trace_x[n].valueOf()+Math.round(a*o))},posFromDate:function(t){if(!this.isVisible())return 0;if(!t)return 0;var e=String(t.valueOf());if(void 0!==this._posFromDateCache[e])return this._posFromDateCache[e];var n=this.columnIndexByDate(t);this.$gantt.assert(n>=0,"Invalid day index");var i=Math.floor(n),r=n%1,a=this._tasks.left[Math.min(i,this._tasks.width.length-1)];i==this._tasks.width.length&&(a+=this._tasks.width[this._tasks.width.length-1]),r&&(i=r.max_date)return this._tasks.rtl?0:n.length;var a=c(n,e),o=this._getClosestVisibleColumn(a,n,i),s=n[o],l=this._tasks.trace_index_transition;if(!s)return l?l[0]:0;var u=(t-n[o])/this._getColumnDuration(this._tasks,n[o]);return l?l[o]+(1-u):o+u},getItemPosition:function(t,e,n){var i,r,a;return this._tasks.rtl?(r=this.posFromDate(e||t.start_date),i=this.posFromDate(n||t.end_date)):(i=this.posFromDate(e||t.start_date),r=this.posFromDate(n||t.end_date)),a=Math.max(r-i,0),{left:i,top:this.getItemTop(t.id),height:this.getItemHeight(),width:a}},getItemHeight:function(){var t=this.$getConfig(),e=t.task_height;if("full"==e){var n=t.task_height_offset||5;e=t.row_height-n}return e=Math.min(e,t.row_height),Math.max(e,0)},getScale:function(){return this._tasks},_getScales:function(){var t=this.$getConfig(),e=this.$scaleHelper,n=[e.primaryScale(t)].concat(e.getSubScales(t));return e.sortScales(n),n},_getColumnDuration:function(t,e){return this.$gantt.date.add(e,t.step,t.unit)-e},_bindStore:function(){if(this.$config.bind){var t=this.$gantt.getDatastore(this.$config.bind);if(this.$config.rowStore=t,t&&!t._timelineCacheAttached){var e=this;t._timelineCacheAttached=t.attachEvent("onBeforeFilter",function(){e._resetTopPositionHeight()})}}},_unbindStore:function(){if(this.$config.bind){var t=this.$gantt.getDatastore(this.$config.bind);t._timelineCacheAttached&&(t.detachEvent(t._timelineCacheAttached),t._timelineCacheAttached=!1)}},refresh:function(){this._bindStore(),this.$config.bindLinks&&(this.$config.linkStore=this.$gantt.getDatastore(this.$config.bindLinks)),this._resetTopPositionHeight(),this._initStaticBackgroundRender(),this._render_tasks_scales()},destructor:function(){var t=this.$gantt;this._clearLayers(t),this._unbindStore(),this.$task=null,this.$task_scale=null,this.$task_data=null,this.$task_bg=null,this.$task_links=null,this.$task_bars=null,this.$gantt=null,this.$config.rowStore&&(this.$config.rowStore.detachEvent(this._staticBgHandler),this.$config.rowStore=null),this.$config.linkStore&&(this.$config.linkStore=null),this._timelineDragScroll&&(this._timelineDragScroll.destructor(),this._timelineDragScroll=null),this.callEvent("onDestroy",[]),this.detachAllEvents()}},t.exports=l},function(t,e){t.exports=function(t){var e=[];return{delegate:function(n,i,r,a){e.push([n,i,r,a]),t.$services.getService("mouseEvents").delegate(n,i,r,a)},destructor:function(){for(var n=t.$services.getService("mouseEvents"),i=0;i",this.$grid=t.childNodes[0],this.$grid.innerHTML="
",this.$grid_scale=this.$grid.childNodes[0],this.$grid_data=this.$grid.childNodes[1];var c=a[this.$config.bind+"_attribute"];if(!c&&this.$config.bind&&(c="data-"+this.$config.bind+"-id"),this.$config.item_attribute=c||null,!this.$config.layers){var u=this._createLayerConfig();this.$config.layers=u}var d=o(e,this);d.init(),this._renderHeaderResizers=d.doOnRender,this._mouseDelegates=n(20)(e),this._addLayers(this.$gantt),this._initEvents(),s&&(this._columnDND=new l(e,this),this._columnDND.init()),this.callEvent("onReady",[])},_validateColumnWidth:function(t,e){var n=t[e];if(n&&"*"!=n){var i=this.$gantt,r=1*n;isNaN(r)?i.assert(!1,"Wrong "+e+" value of column "+t.name):t[e]=r}},setSize:function(t,e){this.$config.width=this.$state.width=t,this.$config.height=this.$state.height=e;for(var n,i=this.getGridColumns(),r=0,a=(u=this.$getConfig()).grid_elastic_columns,o=0,s=i.length;ou.max_width&&(d=u.max_width-u.width),r-=u.width,u.width+=d,l-=d}for(var h=l>0?1:-1;l>0&&1===h||l<0&&-1===h;){var f=l;for(o=e+1;o-1&&((_=i[e].width+l)==this._getColumnWidth(i[e],n,_)&&(i[e].width=_));return this._getColsTotalWidth()},_getColsTotalWidth:function(){for(var t=this.getGridColumns(),e=0,n=0;no+h&&(d.width=h=f-o),o+=h;var _=t._sort&&d.name==t._sort.name?"
":"",g=["gantt_grid_head_cell","gantt_grid_head_"+d.name,u?"gantt_last_cell":"",i.grid_header_class(d.name,d)].join(" "),p="width:"+(h-(u?1:0))+"px;",v=d.label||s["column_"+d.name]||s[d.name];v=v||"";var m=""+v+_+"
";a.push(m)}this.$grid_scale.style.height=e.scale_height+"px",this.$grid_scale.style.lineHeight=l+"px",this.$grid_scale.innerHTML=a.join(""),this._renderHeaderResizers&&this._renderHeaderResizers()},_getGridWidth:function(){return this.$config.width},destructor:function(){this._clearLayers(this.$gantt),this._mouseDelegates&&(this._mouseDelegates.destructor(),this._mouseDelegates=null),this._unbindStore(),this.$grid=null,this.$grid_scale=null,this.$grid_data=null,this.$gantt=null,this.$config.rowStore&&(this.$config.rowStore.detachEvent(this._staticBgHandler),this.$config.rowStore=null),this.callEvent("onDestroy",[]),this.detachAllEvents()}},t.exports=c},function(t,e,n){var i=n(0);t.exports=function(t){var e=t.date,n=t.$services;return{getSum:function(t,e,n){void 0===n&&(n=t.length-1),void 0===e&&(e=0);for(var i=0,r=e;r<=n;r++)i+=t[r];return i},setSumWidth:function(t,e,n,i){var r=e.width;void 0===i&&(i=r.length-1),void 0===n&&(n=0);var a=i-n+1;if(!(n>r.length-1||a<=0||i>r.length-1)){var o=t-this.getSum(r,n,i);this.adjustSize(o,r,n,i),this.adjustSize(-o,r,i+1),e.full_width=this.getSum(r)}},splitSize:function(t,e){for(var n=[],i=0;in(e.unit,e.step)?-1:0});for(var i=0;i=0;u--){var d=u==t.length-1,h=this.initScaleConfig(t[u],r,a);d&&this.processIgnores(h),this.initColSizes(h,e,l,s[u]),this.limitVisibleRange(h),d&&(l=h.full_width),c.unshift(h)}for(u=0;u=+l&&(l=e.add(c,i,n));+c<+l;){o.call(this,new Date(c));var u=c.getTimezoneOffset();c=e.add(c,i,n),c=t._correct_dst_change(c,u,i,n),e[n+"_start"]&&(c=e[n+"_start"](c))}},limitVisibleRange:function(t){var n=t.trace_x,i=t.width.length-1,r=0;if(+n[0]<+t.min_date&&0!=i){var a=Math.floor(t.width[0]*((n[1]-t.min_date)/(n[1]-n[0])));r+=t.width[0]-a,t.width[0]=a,n[0]=new Date(t.min_date)}var o=n.length-1,s=n[o],l=e.add(s,t.step,t.unit);if(+l>+t.max_date&&o>0&&(a=t.width[o]-Math.floor(t.width[o]*((l-t.max_date)/(l-s))),r+=t.width[o]-a,t.width[o]=a),r){for(var c=this.getSum(t.width),u=0,d=0;d"}};function a(t,e,n){return e=e||[],"<"+t+o(n||[])+">"+(e.innerHTML||"")+""+t+">"}function o(t){var e="";return i.forEach(t,function(t){e+=" "+t.key+"='"+t.value+"'"}),e}t.exports=r},function(t,e){t.exports=function(t){var e={};return t.$data.tasksStore.attachEvent("onStoreUpdated",function(){e={}}),function(n,i,r,a){var o=n.id+"_"+i+"_"+r.unit+"_"+r.step;return e[o]?e[o]:e[o]=function(e,n,i,r){g="task"==e.$role?[]:t.getTaskBy(n,e.id);for(var a=i.unit,o=i.step,s={},l=0;l1&&(d+=1),u==s.types.milestone&&(o.left-=Math.round(c/2),o.width=c);var h=document.createElement("div"),f=Math.round(o.width);a.$config.item_attribute&&(h.setAttribute(a.$config.item_attribute,e.id),h.setAttribute(a.$config.bind+"_id",e.id)),s.show_progress&&u!=s.types.milestone&&function(e,n,i,r,a){var o=1*e.progress||0;i=Math.max(i-2,0);var s=document.createElement("div"),l=Math.round(i*o);l=Math.min(i,l),e.progressColor&&(s.style.backgroundColor=e.progressColor,s.style.opacity=1),s.style.width=l+"px",s.className="gantt_task_progress",s.innerHTML=a.progress_text(e.start_date,e.end_date,e),r.rtl&&(s.style.position="absolute",s.style.right="0px");var c=document.createElement("div");if(c.className="gantt_task_progress_wrapper",c.appendChild(s),n.appendChild(c),t.config.drag_progress&&!t.isReadonly(e)){var u=document.createElement("div"),d=l;r.rtl&&(d=i-l),u.style.left=d+"px",u.className="gantt_task_progress_drag",s.appendChild(u),n.appendChild(u)}}(e,h,f,s,l);var _=function(e,n,i){var r=document.createElement("div");return t.getTaskType(e.type)!=t.config.types.milestone&&(r.innerHTML=i.task_text(e.start_date,e.end_date,e)),r.className="gantt_task_content",r}(e,0,l);e.textColor&&(_.style.color=e.textColor),h.appendChild(_);var g=function(e,n,i,r){var a=r.$getConfig(),o=[e];n&&o.push(n);var s=t.getState(),l=t.getTask(i);if(t.getTaskType(l.type)==a.types.milestone?o.push("gantt_milestone"):t.getTaskType(l.type)==a.types.project&&o.push("gantt_project"),o.push("gantt_bar_"+t.getTaskType(l.type)),t.isSummaryTask(l)&&o.push("gantt_dependent_task"),t.isSplitTask(l)&&(a.open_split_tasks&&!l.$open||!a.open_split_tasks)&&o.push("gantt_split_parent"),a.select_task&&t.isSelectedTask(i)&&o.push("gantt_selected"),i==s.drag_id&&(o.push("gantt_drag_"+s.drag_mode),s.touch_drag&&o.push("gantt_touch_"+s.drag_mode)),s.link_source_id==i&&o.push("gantt_link_source"),s.link_target_id==i&&o.push("gantt_link_target"),a.highlight_critical_path&&t.isCriticalTask&&t.isCriticalTask(l)&&o.push("gantt_critical_task"),s.link_landing_area&&s.link_target_id&&s.link_source_id&&s.link_target_id!=s.link_source_id){var c=s.link_source_id,u=s.link_from_start,d=s.link_to_start,h=t.isLinkAllowed(c,i,u,d),f="";f=h?d?"link_start_allow":"link_finish_allow":d?"link_start_deny":"link_finish_deny",o.push(f)}return o.join(" ")}("gantt_task_line",l.task_class(e.start_date,e.end_date,e),e.id,a);(e.color||e.progressColor||e.textColor)&&(g+=" gantt_task_inline_color"),h.className=g;var p=["left:"+o.left+"px","top:"+(d+o.top)+"px","height:"+c+"px","line-height:"+Math.max(c<30?c-2:c,0)+"px","width:"+f+"px"];e.color&&p.push("background-color:"+e.color),e.textColor&&p.push("color:"+e.textColor),h.style.cssText=p.join(";");var v=function(t,e,r){var a="gantt_left "+i(!e.rtl,t);return n(t,r.leftside_text,a)}(e,s,l);v&&h.appendChild(v),(v=function(t,e,r){var a="gantt_right "+i(!!e.rtl,t);return n(t,r.rightside_text,a)}(e,s,l))&&h.appendChild(v),t._waiAria.setTaskBarAttr(e,h);var m=t.getState();return t.isReadonly(e)||(s.drag_resize&&!t.isSummaryTask(e)&&u!=s.types.milestone&&r(h,"gantt_task_drag",e,function(t){var e=document.createElement("div");return e.className=t,e},s),s.drag_links&&s.show_links&&r(h,"gantt_link_control",e,function(t){var e=document.createElement("div");e.className=t,e.style.cssText=["height:"+c+"px","line-height:"+c+"px"].join(";");var n=document.createElement("div");n.className="gantt_link_point";var i=!1;return m.link_source_id&&s.touch&&(i=!0),n.style.display=i?"block":"",e.appendChild(n),e},s)),h}}function n(t,e,n){if(!e)return null;var i=e(t.start_date,t.end_date,t);if(!i)return null;var r=document.createElement("div");return r.className="gantt_side_content "+n,r.innerHTML=i,r}function i(e,n){var i=function(e){return e?{$source:[t.config.links.start_to_start],$target:[t.config.links.start_to_start,t.config.links.finish_to_start]}:{$source:[t.config.links.finish_to_start,t.config.links.finish_to_finish],$target:[t.config.links.finish_to_finish]}}(e);for(var r in i)for(var a=n[r],o=0;o=+s.min_date&&((o=r([n,a.rtl?"task_right":"task_left","task_start_date"].join(" "))).setAttribute("data-bind-property","start_date"),e.appendChild(o)),+i.end_date<=+s.max_date&&((o=r([n,a.rtl?"task_left":"task_right","task_end_date"].join(" "))).setAttribute("data-bind-property","end_date"),e.appendChild(o))}return function(n,i){var r=i.$getConfig().type_renderers[t.getTaskType(n.type)],a=e;return r?r.call(t,n,function(e){return a.call(t,e,i)},i):a.call(t,n,i)}}},function(t,e){t.exports=function(t,e,n,i){if(!t.start_date||!t.end_date)return null;var r=n.$getConfig(),a=n.getItemTop(t.id),o=r.row_height;if(a>e.y_end||a+oe.x_end||u0?t[r].$parent.getNextSibling(t[r].$id):t[r].$parent.getPrevSibling(t[r].$id);"resizer"==o.$name&&(o=i>0?o.$parent.getNextSibling(o.$id):o.$parent.getPrevSibling(o.$id));var s=o.getSize();if(o[n]){var l=a.gravity+s.gravity,c=a[n]+s[n],u=l/c;t[r].$config.gravity=u*e,o.$config[n]=c-e,o.$config.gravity=l-u*e}else t[r].$config[n]=e;var d=this.$gantt.$ui.getView("grid");d&&t[r].$content===d&&!d.$config.scrollable&&(this.$gantt.config.grid_width=e)}},e.prototype.resize=function(e){var n=!1;if(this.$root&&!this._resizeInProgress&&(this.callEvent("onBeforeResize",[]),n=!0,this._resizeInProgress=!0),t.prototype.resize.call(this,!0),t.prototype.resize.call(this,!1),n){var i=[];i=(i=(i=i.concat(this.getCellsByType("viewCell"))).concat(this.getCellsByType("viewLayout"))).concat(this.getCellsByType("hostCell"));for(var r=this.getCellsByType("scroller"),a=0;a=0&&this.$cells[e+1]?this.$cells[e+1]:null},e.prototype.getPrevSibling=function(t){var e=this.cellIndex(t);return e>=0&&this.$cells[e-1]?this.$cells[e-1]:null},e.prototype.cell=function(t){for(var e=0;e=n.childNodes.length?n.appendChild(t.$view):n.insertBefore(t.$view,n.childNodes[e])},e.prototype._parseConfig=function(t){this.$cells=[],this._xLayout=!t.rows;for(var e=t.rows||t.cols||t.views,n=0;n=0;i--){var a=this.$cells[i];a.$fill(n[i],this),a.$config.hidden&&a.$view.parentNode.removeChild(a.$view)}},e.prototype.$toHTML=function(){for(var e=this._xLayout?"x":"y",n=[],i=0;i=1e5&&(c.maxWidth=i),c.maxHeight>=1e5&&(c.maxHeight=a),c.minWidth=c.minWidth!=c.minWidth?0:c.minWidth,c.minHeight=c.minHeight!=c.minHeight?0:c.minHeight,this._xLayout?(c.minWidth+=this.$config.margin*this.$cells.length||0,c.minWidth+=2*this.$config.padding||0,c.minHeight+=2*this.$config.padding||0):(c.minHeight+=this.$config.margin*this.$cells.length||0,c.minHeight+=2*this.$config.padding||0),c},e.prototype._calcFreeSpace=function(t,e,n){var i=n?e.minWidth:e.minHeight,r=e.maxWidth,a=t;return a?(a>r&&(a=r),ar&&(a=r,this._free-=a,this._gravity-=e.gravity),aa&&(i=a),i=0;i--)if(!e[i].$config.hidden){n=i;break}for(i=0;i=n,a="";!r&&e[i+1]&&"scrollbar"==e[i+1].$config.view&&(this._xLayout?r=!0:a="gantt_layout_cell_border_transparent"),this._setBorders(r?[]:[t,a],e[i])}},e.prototype._updateCellVisibility=function(){for(var t,e=this._visibleCells||{},n=!this._visibleCells,i={},r=0;r=n.$level)return!1;for(;n&&this.exists(i);){if((n=this.getItem(i))&&n.id==e)return!0;i=this.getParent(n)}return!1},getSiblings:function(t){if(!this.exists(t))return i.$create();var e=this.getParent(t);return this.getChildren(e)},getNextSibling:function(t){for(var e=this.getSiblings(t),n=0,i=e.length;nn[t]?1:-1}:t;if(e){var r=i;i=function(t,e){return r(e,t)}}var o=this.getChildren(n);if(o){for(var s=[],l=o.length-1;l>=0;l--)s[l]=this.getItem(o[l]);s.sort(i);for(l=0;l=0&&this.splice(t,e||1)},$remove:function(t){this.$removeAt(this.$find(t))},$insertAt:function(t,e){if(e||0===e){var n=this.splice(e,this.length-e);this[e]=t,this.push.apply(this,n)}else this.push(t)},$find:function(t){for(var e=0;ei&&(e=Math.min(n.length,e))}this.pull[t.id]=t,this._skip_refresh||this._updateOrder(function(){-1===this.$find(t.id)&&this.$insertAt(t.id,e)}),this.filter()},isVisible:function(t){return this.visibleOrder.$find(t)>-1},getVisibleItems:function(){return this.getIndexRange()},addItem:function(t,e){return r.defined(t.id)||(t.id=r.uid()),this.$initItem&&(t=this.$initItem(t)),!(!this._skip_refresh&&!1===this.callEvent("onBeforeAdd",[t.id,t]))&&(this._addItemInner(t,e),this._skip_refresh||(this.callEvent("onAfterAdd",[t.id,t]),this.callEvent("onStoreUpdated",[t.id,t,"add"])),t.id)},_changeIdInner:function(t,e){this.pull[t]&&(this.pull[e]=this.pull[t]);var n=this._searchVisibleOrder[t];this.pull[e].id=e,this._updateOrder(function(){this[this.$find(t)]=e}),this._searchVisibleOrder[e]=n,delete this._searchVisibleOrder[t],delete this.pull[t]},changeId:function(t,e){this._changeIdInner(t,e),this.callEvent("onIdChange",[t,e])},exists:function(t){return!!this.pull[t]},_moveInner:function(t,e){var n=this.getIdByIndex(t);this._updateOrder(function(){this.$removeAt(t),this.$insertAt(n,Math.min(this.length,e))})},move:function(t,e){var n=this.getIdByIndex(t),i=this.getItem(n);this._moveInner(t,e),this._skip_refresh||this.callEvent("onStoreUpdated",[i.id,i,"move"])},clearAll:function(){this.pull={},this.visibleOrder=i.$create(),this.fullOrder=i.$create(),this._skip_refresh||(this.callEvent("onClearAll",[]),this.refresh())},silent:function(t,e){this._skip_refresh=!0,t.call(e||this),this._skip_refresh=!1},arraysEqual:function(t,e){if(t.length!==e.length)return!1;for(var n=0;n1)for(var n=1;n","gm"),n=new RegExp(" +","gm");function i(t){return(t+"").replace(e," ").replace(n," ")}var r=new RegExp("'","gm");function a(t){return(t+"").replace(r,"'")}for(var o in t._waiAria={getAttributeString:function(t){var e=[" "];for(var n in t){var r=a(i(t[n]));e.push(n+"='"+r+"'")}return e.push(" "),e.join(" ")},getTimelineCellAttr:function(e){return t._waiAria.getAttributeString({"aria-label":e})},_taskCommonAttr:function(e,n){e.start_date&&e.end_date&&(n.setAttribute("aria-label",i(t.templates.tooltip_text(e.start_date,e.end_date,e))),e.$dataprocessor_class&&n.setAttribute("aria-busy",!0),n.setAttribute("aria-selected",t.isSelectedTask(e.id)?"true":"false"))},setTaskBarAttr:function(e,n){this._taskCommonAttr(e,n),!t.isReadonly(e)&&t.config.drag_move&&(e.id!=t.getState().drag_id?n.setAttribute("aria-grabbed",!1):n.setAttribute("aria-grabbed",!0))},taskRowAttr:function(e,n){this._taskCommonAttr(e,n),!t.isReadonly(e)&&t.config.order_branch&&n.setAttribute("aria-grabbed",!1),n.setAttribute("role","row"),n.setAttribute("aria-level",e.$level),t.hasChild(e.id)&&n.setAttribute("aria-expanded",e.$open?"true":"false")},linkAttr:function(e,n){var r=t.config.links,a=e.type==r.finish_to_start||e.type==r.start_to_start,o=e.type==r.start_to_start||e.type==r.start_to_finish,s=t.locale.labels.link+" "+t.templates.drag_link(e.source,o,e.target,a);n.setAttribute("aria-label",i(s)),t.isReadonly(e)&&n.setAttribute("aria-readonly",!0)},gridSeparatorAttr:function(t){t.setAttribute("role","separator")},lightboxHiddenAttr:function(t){t.setAttribute("aria-hidden","true")},lightboxVisibleAttr:function(t){t.setAttribute("aria-hidden","false")},lightboxAttr:function(t){t.setAttribute("role","dialog"),t.setAttribute("aria-hidden","true"),t.firstChild.setAttribute("role","heading")},lightboxButtonAttrString:function(e){return this.getAttributeString({role:"button","aria-label":t.locale.labels[e],tabindex:"0"})},lightboxHeader:function(t,e){t.setAttribute("aria-label",e)},lightboxSelectAttrString:function(e){var n="";switch(e){case"%Y":n=t.locale.labels.years;break;case"%m":n=t.locale.labels.months;break;case"%d":n=t.locale.labels.days;break;case"%H:%i":n=t.locale.labels.hours+t.locale.labels.minutes}return t._waiAria.getAttributeString({"aria-label":n})},lightboxDurationInputAttrString:function(e){return this.getAttributeString({"aria-label":t.locale.labels.column_duration,"aria-valuemin":"0"})},gridAttrString:function(){return[" role='treegrid'",t.config.multiselect?"aria-multiselectable='true'":"aria-multiselectable='false'"," "].join(" ")},gridScaleRowAttrString:function(){return"role='row'"},gridScaleCellAttrString:function(e,n){var i="";if("add"==e.name)i=this.getAttributeString({role:"button","aria-label":t.locale.labels.new_task});else{var r={role:"columnheader","aria-label":n};t._sort&&t._sort.name==e.name&&("asc"==t._sort.direction?r["aria-sort"]="ascending":r["aria-sort"]="descending"),i=this.getAttributeString(r)}return i},gridDataAttrString:function(){return"role='rowgroup'"},gridCellAttrString:function(e,n,i){var r={role:"gridcell","aria-label":n};return e.editor&&!t.isReadonly(i)||(r["aria-readonly"]=!0),this.getAttributeString(r)},gridAddButtonAttrString:function(e){return this.getAttributeString({role:"button","aria-label":t.locale.labels.new_task})},messageButtonAttrString:function(t){return"tabindex='0' role='button' aria-label='"+t+"'"},messageInfoAttr:function(t){t.setAttribute("role","alert")},messageModalAttr:function(t,e){t.setAttribute("role","dialog"),e&&t.setAttribute("aria-labelledby",e)},quickInfoAttr:function(t){t.setAttribute("role","dialog")},quickInfoHeaderAttrString:function(){return" role='heading' "},quickInfoHeader:function(t,e){t.setAttribute("aria-label",e)},quickInfoButtonAttrString:function(e){return t._waiAria.getAttributeString({role:"button","aria-label":e,tabindex:"0"})},tooltipAttr:function(t){t.setAttribute("role","tooltip")},tooltipVisibleAttr:function(t){t.setAttribute("aria-hidden","false")},tooltipHiddenAttr:function(t){t.setAttribute("aria-hidden","true")}},t._waiAria)t._waiAria[o]=function(e){return function(){return t.config.wai_aria_attributes?e.apply(this,arguments):""}}(t._waiAria[o])}},function(t,e){t.exports=function(t){t._extend_to_optional=function(e){var n=e,i={render:n.render,focus:n.focus,set_value:function(e,r,a,o){var s=t._resolve_default_mapping(o);if(!a[s.start_date]||"start_date"==s.start_date&&this._isAllowedUnscheduledTask(a)){i.disable(e,o);var l={};for(var c in s)l[s[c]]=a[c];return n.set_value.call(t,e,r,l,o)}return i.enable(e,o),n.set_value.call(t,e,r,a,o)},get_value:function(e,i,r){return r.disabled?{start_date:null}:n.get_value.call(t,e,i,r)},update_block:function(e,n){if(t.callEvent("onSectionToggle",[t._lightbox_id,n]),e.style.display=n.disabled?"none":"block",n.button){var i=e.previousSibling.querySelector(".gantt_custom_button_label"),r=t.locale.labels,a=n.disabled?r[n.name+"_enable_button"]:r[n.name+"_disable_button"];i.innerHTML=a}t.resizeLightbox()},disable:function(t,e){e.disabled=!0,i.update_block(t,e)},enable:function(t,e){e.disabled=!1,i.update_block(t,e)},button_click:function(e,n,r,a){if(!1!==t.callEvent("onSectionButton",[t._lightbox_id,r])){var o=t._get_typed_lightbox_config()[e];o.disabled?i.enable(a,o):i.disable(a,o)}}};return i},t.form_blocks.duration_optional=t._extend_to_optional(t.form_blocks.duration),t.form_blocks.time_optional=t._extend_to_optional(t.form_blocks.time)}},function(t,e,n){var i=n(2);t.exports=function(t){var e=n(11)(t);function r(){return e.apply(this,arguments)||this}return i(r,e),r.prototype.render=function(n){var i=t.config.types,r=t.locale.labels,a=[],o=n.filter||function(t,e){return!i.placeholder||e!==i.placeholder};for(var s in i)!1==!o(s,i[s])&&a.push({key:i[s],label:r["type_"+s]});n.options=a;var l=n.onchange;return n.onchange=function(){t.changeLightboxType(this.value),"function"==typeof l&&l.apply(this,arguments)},e.prototype.render.apply(this,arguments)},r}},function(t,e,n){var i=n(2),r=n(25);t.exports=function(t){var e=n(5)(t);function a(){return e.apply(this,arguments)||this}function o(e){return!e||e===t.config.constraint_types.ASAP||e===t.config.constraint_types.ALAP}function s(t,e){for(var n=o(e),i=0;i",a=[];for(var o in t.config.constraint_types)a.push({key:t.config.constraint_types[o],label:t.locale.labels[t.config.constraint_types[o]]});return e.options=e.options||a,i+=""+r.getHtmlSelect(e.options,[{key:"data-type",value:"constraint-type"}])+" ",i+=""+(t.locale.labels.constraint_date||"Constraint date")+": "+t.form_blocks.getTimePicker.call(this,e)+" ",i+=""},a.prototype.set_value=function(e,n,i,r){var a=e.querySelector("[data-constraint-type-select] select"),o=e.querySelectorAll("[data-constraint-time-select] select"),l=r._time_format_order,c=t._resolve_default_mapping(r);a._eventsInitialized||(a.addEventListener("change",function(t){s(o,t.target.value)}),a._eventsInitialized=!0);var u=i[c.constraint_date]||new Date;t.form_blocks._fill_lightbox_select(o,0,u,l,r);var d=i[c.constraint_type]||t.getConstraintType(i);a.value=d,s(o,d)},a.prototype.get_value=function(e,n,i){var r=e.querySelector("[data-constraint-type-select] select"),a=e.querySelectorAll("[data-constraint-time-select] select"),s=r.value,l=null;return o(s)||(l=t.form_blocks.getTimePickerValue(a,i)),{constraint_type:s,constraint_date:l}},a.prototype.focus=function(e){t._focus(e.querySelector("select"))},a}},function(t,e,n){var i=n(2);t.exports=function(t){var e=n(11)(t);function r(){return e.apply(this,arguments)||this}function a(e,n){var i=[],r=[];n&&(i=t.getTaskByTime(),e.allow_root&&i.unshift({id:t.config.root_id,text:e.root_label||""}),i=function(e,n,i){var r=n.filter||function(){return!0};e=e.slice(0);for(var a=0;a",i=" "+t.locale.labels[t.config.duration_unit+"s"]+" ",r=e.single_date?" style='display:none'":"",a=e.readonly?" disabled='disabled'":"",o=t._waiAria.lightboxDurationInputAttrString(e),s="gantt_duration_value";e.formatter&&(i="",s+=" gantt_duration_value_formatted");var l=" "+i+"
";return""+n+" "+l+"
"},a.prototype.set_value=function(e,n,i,r){var a,c,u,d,h=e.getElementsByTagName("select"),f=e.getElementsByTagName("input"),_=f[1],g=[f[0],f[2]],p=e.getElementsByTagName("span")[0],v=r._time_format_order;function m(){var n=s.call(t,e,r),a=l.call(t,e,r),o=t.calculateEndDate({start_date:n,duration:a,task:i}),c=t.templates.task_end_date||t.templates.task_date;p.innerHTML=c(o)}function y(t){var e=_.value;e=o(r).parse(e),window.isNaN(e)&&(e=0),(e+=t)<1&&(e=1),_.value=o(r).format(e),m()}g[0].onclick=t.bind(function(){y(-1*t.config.duration_step)},this),g[1].onclick=t.bind(function(){y(1*t.config.duration_step)},this),h[0].onchange=m,h[1].onchange=m,h[2].onchange=m,h[3]&&(h[3].onchange=m),_.onkeydown=t.bind(function(e){var n;return(n=(e=e||window.event).charCode||e.keyCode||e.which)==t.constants.KEY_CODES.DOWN?(y(-1*t.config.duration_step),!1):n==t.constants.KEY_CODES.UP?(y(1*t.config.duration_step),!1):void window.setTimeout(m,1)},this),_.onchange=t.bind(m,this),"string"==typeof(a=t._resolve_default_mapping(r))&&(a={start_date:a}),c=i[a.start_date]||new Date,u=i[a.end_date]||t.calculateEndDate({start_date:c,duration:1,task:i}),d=Math.round(i[a.duration])||t.calculateDuration({start_date:c,end_date:u,task:i}),d=o(r).format(d),t.form_blocks._fill_lightbox_select(h,0,c,v,r),_.value=d,m()},a.prototype.get_value=function(e,n,i){var r=s(e,i),a=l(e,i),o=t.calculateEndDate({start_date:r,duration:a,task:n});return"string"==typeof t._resolve_default_mapping(i)?r:{start_date:r,end_date:o,duration:a}},a.prototype.focus=function(e){t._focus(e.getElementsByTagName("select")[0])},a}},function(t,e,n){var i=n(2);t.exports=function(t){var e=n(5)(t);function r(){return e.apply(this,arguments)||this}return i(r,e),r.prototype.render=function(t){var e="";if(t.options&&t.options.length)for(var n=0;n "+t.options[n].label+"";return e+="
"},r.prototype.set_value=function(t,e,n,i){var r;i.options&&i.options.length&&(r=t.querySelector("input[type=radio][value='"+e+"']")||t.querySelector("input[type=radio][value='"+i.default_value+"']"))&&(!t._dhx_onchange&&i.onchange&&(t.onchange=i.onchange,t._dhx_onchange=!0),r.checked=!0)},r.prototype.get_value=function(t,e){var n=t.querySelector("input[type=radio]:checked");return n?n.value:""},r.prototype.focus=function(e){t._focus(e.querySelector("input[type=radio]"))},r}},function(t,e,n){var i=n(3),r=n(2);t.exports=function(t){var e=n(5)(t);function a(){return e.apply(this,arguments)||this}return r(a,e),a.prototype.render=function(t){var e="";if(t.options&&t.options.length)for(var n=0;n "+t.options[n].label+"";return e+="
"},a.prototype.set_value=function(t,e,n,r){var a=Array.prototype.slice.call(t.querySelectorAll("input[type=checkbox]"));!t._dhx_onchange&&r.onchange&&(t.onchange=r.onchange,t._dhx_onchange=!0),i.forEach(a,function(t){t.checked=!!e&&e.indexOf(t.value)>=0})},a.prototype.get_value=function(t){return i.arrayMap(Array.prototype.slice.call(t.querySelectorAll("input[type=checkbox]:checked")),function(t){return t.value})},a.prototype.focus=function(e){t._focus(e.querySelector("input[type=checkbox]"))},a}},function(t,e,n){var i=n(2);t.exports=function(t){var e=n(5)(t);function r(){return e.apply(this,arguments)||this}return i(r,e),r.prototype.render=function(e){var n=t.form_blocks.getTimePicker.call(this,e),i="";return i+=n,e.single_date?(n=t.form_blocks.getTimePicker.call(this,e,!0),i+=" "):i+=" – ",i+=n,i+="
"},r.prototype.set_value=function(e,n,i,r){var a=r,o=e.getElementsByTagName("select"),s=r._time_format_order;if(a.auto_end_date)for(var l=function(){d=new Date(o[s[2]].value,o[s[1]].value,o[s[0]].value,0,0),h=t.calculateEndDate({start_date:d,duration:1,task:i}),t.form_blocks._fill_lightbox_select(o,s.size,h,s,a)},c=0;c<4;c++)o[c].onchange=l;var u=t._resolve_default_mapping(r);"string"==typeof u&&(u={start_date:u});var d=i[u.start_date]||new Date,h=i[u.end_date]||t.calculateEndDate({start_date:d,duration:1,task:i});t.form_blocks._fill_lightbox_select(o,0,d,s,a),t.form_blocks._fill_lightbox_select(o,s.size,h,s,a)},r.prototype.get_value=function(e,n,i){var r,a=e.getElementsByTagName("select"),o=i._time_format_order;return r=t.form_blocks.getTimePickerValue(a,i),"string"==typeof t._resolve_default_mapping(i)?r:{start_date:r,end_date:function(e,n,r){var a=t.form_blocks.getTimePickerValue(e,i,n.size);return a<=r?t.date.add(r,t._get_timepicker_step(),"minute"):a}(a,o,r)}},r.prototype.focus=function(e){t._focus(e.getElementsByTagName("select")[0])},r}},function(t,e,n){var i=n(2);t.exports=function(t){var e=n(5)(t);function r(){return e.apply(this,arguments)||this}return i(r,e),r.prototype.render=function(t){return"
"},r.prototype.set_value=function(e,n){t.form_blocks.textarea._get_input(e).value=n||""},r.prototype.get_value=function(e){return t.form_blocks.textarea._get_input(e).value},r.prototype.focus=function(e){var n=t.form_blocks.textarea._get_input(e);t._focus(n,!0)},r.prototype._get_input=function(t){return t.querySelector("textarea")},r}},function(t,e,n){var i=n(2);t.exports=function(t){var e=n(5)(t);function r(){return e.apply(this,arguments)||this}return i(r,e),r.prototype.render=function(t){return"
"},r.prototype.set_value=function(t,e){t.innerHTML=e||""},r.prototype.get_value=function(t){return t.innerHTML||""},r.prototype.focus=function(){},r}},function(t,e,n){t.exports=function(t){var e=n(1),i=n(3),r=n(52)(t),a=n(51)(t),o=n(50)(t),s=n(11)(t),l=n(49)(t),c=n(48)(t),u=n(47)(t),d=n(46)(t),h=n(11)(t),f=n(45)(t),_=n(44)(t);function g(e,n){var i,r,a="";for(r=0;r
"+t.locale.labels[i]+"
";return a}function p(e,n,i){var r,a,o,s,l,c,u="";switch(i.timeFormat[n]){case"%Y":for(e._time_format_order[2]=n,e._time_format_order.size++,e.year_range&&(isNaN(e.year_range)?e.year_range.push&&(o=e.year_range[0],s=e.year_range[1]):r=e.year_range),r=r||10,a=a||Math.floor(r/2),o=o||i.date.getFullYear()-a,s=s||o+r,l=o;l"+l+"";break;case"%m":for(e._time_format_order[1]=n,e._time_format_order.size++,l=0;l<12;l++)u+=""+t.locale.date.month_full[l]+" ";break;case"%d":for(e._time_format_order[0]=n,e._time_format_order.size++,l=1;l<32;l++)u+=""+l+" ";break;case"%H:%i":for(e._time_format_order[3]=n,e._time_format_order.size++,l=i.first,c=i.date.getDate(),e._time_values=[];l"+t.templates.time_picker(i.date)+"",e._time_values.push(l),i.date.setTime(i.date.valueOf()+60*t._get_timepicker_step()*1e3),l=24*(i.date.getDate()!=c?1:0)*60+60*i.date.getHours()+i.date.getMinutes()}return u}t._lightbox_methods={},t._lightbox_template="
",t.$services.getService("state").registerProvider("lightbox",function(){return{lightbox:t._lightbox_id}}),t.showLightbox=function(t){if(this.callEvent("onBeforeLightbox",[t])){var e=this.getTask(t),n=this.getLightbox(this.getTaskType(e.type));this._center_lightbox(n),this.showCover(),this._fill_lightbox(t,n),this._waiAria.lightboxVisibleAttr(n),this.callEvent("onLightbox",[t])}},t._get_timepicker_step=function(){if(this.config.round_dnd_dates){var e;if(function(t){var e=t.$ui.getView("timeline");return!(!e||!e.isVisible())}(this)){var n=t.getScale();e=i.getSecondsInUnit(n.unit)*n.step/60}return(!e||e>=1440)&&(e=this.config.time_step),e}return this.config.time_step},t.getLabel=function(t,e){for(var n=this._get_typed_lightbox_config(),i=0;i
"+this.locale.labels["button_"+t[n].button]+"
"),this.config.wide_form&&(e+=""),e+="
"+a+this.locale.labels["section_"+t[n].name]+"
"+i.render.call(this,t[n]),e+="
"}}return e},t.resizeLightbox=function(){if(this._lightbox){var t=this._lightbox.childNodes[1];t.style.height="0px",t.style.height=t.scrollHeight+"px",this._lightbox.style.height=t.scrollHeight+this.config.lightbox_additional_height+"px",t.style.height=t.scrollHeight+"px"}},t._center_lightbox=function(t){if(t){t.style.display="block";var e=window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop,n=window.pageXOffset||document.body.scrollLeft||document.documentElement.scrollLeft,i=window.innerHeight||document.documentElement.clientHeight;t.style.top=e?Math.round(e+Math.max((i-t.offsetHeight)/2,0))+"px":Math.round(Math.max((i-t.offsetHeight)/2,0)+9)+"px",document.documentElement.scrollWidth>document.body.offsetWidth?t.style.left=Math.round(n+(document.body.offsetWidth-t.offsetWidth)/2)+"px":t.style.left=Math.round((document.body.offsetWidth-t.offsetWidth)/2)+"px"}},t.showCover=function(){if(!this._cover){this._cover=document.createElement("DIV"),this._cover.className="gantt_cal_cover";var t=void 0!==document.height?document.height:document.body.offsetHeight,e=document.documentElement?document.documentElement.scrollHeight:0;this._cover.style.height=Math.max(t,e)+"px",document.body.appendChild(this._cover)}},t._init_lightbox_events=function(){t.lightbox_events={},t.lightbox_events.gantt_save_btn=function(){t._save_lightbox()},t.lightbox_events.gantt_delete_btn=function(){t.callEvent("onLightboxDelete",[t._lightbox_id])&&(t.isTaskExists(t._lightbox_id)?t.$click.buttons.delete(t._lightbox_id):t.hideLightbox())},t.lightbox_events.gantt_cancel_btn=function(){t._cancel_lightbox()},t.lightbox_events.default=function(n,i){if(i.getAttribute("data-dhx-button"))t.callEvent("onLightboxButton",[i.className,i,n]);else{var r,a,o=e.getClassName(i);if(-1!=o.indexOf("gantt_custom_button"))if(-1!=o.indexOf("gantt_custom_button_"))for(r=i.parentNode.getAttribute("data-index"),a=i;a&&-1==e.getClassName(a).indexOf("gantt_cal_lsection");)a=a.parentNode;else r=i.getAttribute("data-index"),a=i.parentNode,i=i.firstChild;var s=t._get_typed_lightbox_config();r&&(r*=1,t.form_blocks[s[1*r].type].button_click(r,i,a,a.nextSibling))}},this.event(t.getLightbox(),"click",function(n){var i=(n=n||window.event).target?n.target:n.srcElement,r=e.getClassName(i);return r||(i=i.previousSibling,r=e.getClassName(i)),i&&r&&0===r.indexOf("gantt_btn_set")&&(i=i.firstChild,r=e.getClassName(i)),!(!i||!r)&&(t.defined(t.lightbox_events[i.className])?t.lightbox_events[i.className]:t.lightbox_events.default)(n,i)}),t.getLightbox().onkeydown=function(n){var i=n||window.event,r=n.target||n.srcElement,a=e.getClassName(r).indexOf("gantt_btn_set")>-1;switch((n||i).keyCode){case t.constants.KEY_CODES.SPACE:if((n||i).shiftKey)return;a&&r.click&&r.click();break;case t.keys.edit_save:if((n||i).shiftKey)return;a&&r.click?r.click():t._save_lightbox();break;case t.keys.edit_cancel:t._cancel_lightbox()}}},t._cancel_lightbox=function(){var e=this.getLightboxValues();this.callEvent("onLightboxCancel",[this._lightbox_id,e.$new]),t.isTaskExists(e.id)&&e.$new&&this.silent(function(){t.$data.tasksStore.removeItem(e.id),t._update_flags(e.id,null)}),this.refreshData(),this.hideLightbox()},t._save_lightbox=function(){var t=this.getLightboxValues();this.callEvent("onLightboxSave",[this._lightbox_id,t,!!t.$new])&&(t.$new?(delete t.$new,this.addTask(t,t.parent,this.getTaskIndex(t.id))):this.isTaskExists(t.id)&&(this.mixin(this.getTask(t.id),t,!0),this.refreshTask(t.id),this.updateTask(t.id)),this.refreshData(),this.hideLightbox())},t._resolve_default_mapping=function(t){var e=t.map_to;return!{time:!0,time_optional:!0,duration:!0,duration_optional:!0}[t.type]?"constraint"===t.type&&(t.map_to&&"string"!=typeof t.map_to||(e={constraint_type:"constraint_type",constraint_date:"constraint_date"})):"auto"==t.map_to?e={start_date:"start_date",end_date:"end_date",duration:"duration"}:"string"==typeof t.map_to&&(e={start_date:t.map_to}),e},t.getLightboxValues=function(){var e={};t.isTaskExists(this._lightbox_id)&&(e=this.mixin({},this.getTask(this._lightbox_id)));for(var n=this._get_typed_lightbox_config(),i=0;i0&&(s+=" "),(a=p(e,r,c))&&(o=t._waiAria.lightboxSelectAttrString(c.timeFormat[r]),s+=""+a+" ");return s},getTimePickerValue:function(e,n,i){var r,a=n._time_format_order,o=t.defined(a[3]),s=0,l=0,c=i||0;return o&&(r=parseInt(e[a[3]+c].value,10),s=Math.floor(r/60),l=r%60),new Date(e[a[2]+c].value,e[a[1]+c].value,e[a[0]+c].value,s,l)},_fill_lightbox_select:function(e,n,i,r){if(e[n+r[0]].value=i.getDate(),e[n+r[1]].value=i.getMonth(),e[n+r[2]].value=i.getFullYear(),t.defined(r[3])){var a=60*i.getHours()+i.getMinutes();a=Math.round(a/t._get_timepicker_step())*t._get_timepicker_step();var o=e[n+r[3]];o.value=a,o.setAttribute("data-value",a)}},template:new r,textarea:new a,select:new s,time:new o,duration:new u,parent:new d,radio:new c,checkbox:new l,resources:new h,constraint:new f,typeselect:new _},t._is_lightbox_timepicker=function(){for(var t=this._get_typed_lightbox_config(),e=0;e1?null:t.touches[0]?{target:t.target,pageX:t.touches[0].pageX,pageY:t.touches[0].pageY,clientX:t.touches[0].clientX,clientY:t.touches[0].clientY}:t},function(){return!1}):window.navigator.pointerEnabled?this._touch_events(["pointermove","pointerdown","pointerup"],function(t){return"mouse"==t.pointerType?null:t},function(t){return!t||"mouse"==t.pointerType}):window.navigator.msPointerEnabled&&this._touch_events(["MSPointerMove","MSPointerDown","MSPointerUp"],function(t){return t.pointerType==t.MSPOINTER_TYPE_MOUSE?null:t},function(t){return!t||t.pointerType==t.MSPOINTER_TYPE_MOUSE})}},t));var n=[];t._touch_events=function(i,r,a){for(var o,s=0,l=!1,c=!1,u=null,d=null,h=null,f=0;f5||Math.abs(g)>5)&&(t._touch_scroll_active=c=!0,s=0,o=t.getScrollState()),c){t.scrollTo(o.x+f,o.y+g);var p=t.getScrollState();if(o.x!=p.x&&g>2*f||o.y!=p.y&&f>2*g)return _(n)}}return _(n)}return!0}}]),n.push([this.$container,"contextmenu",function(t){if(l)return _(t)}]),n.push([this.$container,i[1],function(n){if(!a(n))if(n.touches&&n.touches.length>1)l=!1;else{u=r(n),t._locate_css(u,"gantt_hor_scroll")||t._locate_css(u,"gantt_ver_scroll")||(l=!0);var i=e();d=setTimeout(function(){var e=t.locate(u);i&&e&&!t._locate_css(u,"gantt_link_control")&&!t._locate_css(u,"gantt_grid_data")&&(i.on_mouse_down(u),i.drag&&i.drag.start_drag&&(!function(e){var n=t._getTaskLayers(),i=t.getTask(e);if(i&&t.isTaskVisible(e))for(var r=0;re._levels.length-1||e.setLevel(t)},this.getCurrentLevel=function(){return e._activeLevelIndex},this.getLevels=function(){return e._levels},this.setLevel=function(t){var n=e._getZoomIndexByName(t);-1===n&&e.$gantt.assert(-1!==n,"Invalid zoom level for gantt.ext.zoom.setLevel. "+t+" is not an expected value."),e._setLevel(n,0)},this._getZoomIndexByName=function(t){var n=-1;if("string"==typeof t){if(!isNaN(Number(t))&&e._levels[Number(t)])n=Number(t);else for(var i=0;i0&&(r=!0),t.preventDefault(),t.stopPropagation(),e._setScaleSettings(r,i)},this._setScaleDates=function(){e._initialStartDate&&e._initialEndDate&&(e.$gantt.config.start_date=e._initialStartDate,e.$gantt.config.end_date=e._initialEndDate)},this.$gantt=t,this._domEvents=this.$gantt._createDomEventScope()}return t.prototype.init=function(t){var e=this;a(this.$gantt)&&(this._initialStartDate=t.startDate,this._initialEndDate=t.endDate,this._activeLevelIndex=t.activeLevelIndex?t.activeLevelIndex:0,this._levels=this._mapScales(t.levels||s),this._handler=t.handler||this._defaultHandler,this._minColumnWidth=t.minColumnWidth||60,this._maxColumnWidth=t.maxColumnWidth||240,this._widthStep=t.widthStep||3/8*t.minColumnWidth,this._useKey=t.useKey,this._initialized||(r(this),this.$gantt.attachEvent("onGanttScroll",function(){e._getVisibleDate()})),this._domEvents.detachAll(),"wheel"===t.trigger&&(this.$gantt.$root?this._attachWheelEvent(t):this.$gantt.attachEvent("onGanttReady",function(){e._attachWheelEvent(t)})),this._initialized=!0,this.setLevel(this._activeLevelIndex))},t.prototype._mapScales=function(t){return t.map(function(t){return Array.isArray(t)?{scales:t}:t})},t.prototype._setScaleSettings=function(t,e){t?this._stepUp(e):this._stepDown(e)},t.prototype._stepUp=function(t){if(!(this._activeLevelIndex>=this._levels.length-1)){var e=this._activeLevelIndex;if(this._setScaleDates(),this._widthStep){var n=this.$gantt.config.min_column_width+this._widthStep;n>this._maxColumnWidth&&(n=this._minColumnWidth,e++),this.$gantt.config.min_column_width=n}else e++;this._setLevel(e,t)}},t.prototype._stepDown=function(t){if(!(this._activeLevelIndex<1)){var e=this._activeLevelIndex;if(this._setScaleDates(),this._widthStep){var n=this.$gantt.config.min_column_width-this._widthStep;n0&&_+p>=v+2&&(s=0),o&&!k?o=0:o<0&&!y?o=0:o>0&&y+k>=b&&(o=0);var w=t.config.autoscroll_step;w&&w<2&&(w=2),o*=w||n,s*=w||n,(o||s)&&function(e,n){var i=t.getScrollState(),r=null,a=null;e&&(r=i.x+e,r=Math.min(i.width,r),r=Math.max(0,r));n&&(a=i.y+n,a=Math.min(i.height,a),a=Math.max(0,a));t.scrollTo(r,a)}(o,s)}function m(t,n,i){return t-e<0&&tn-e&&t>i?1:0}t.attachEvent("onGanttReady",function(){r(t)||(t.eventRemove(document.body,"mousemove",p),t.event(document.body,"mousemove",p))})}},function(t,e,n){t.exports=function(t){t.ext||(t.ext={});for(var e=[n(58),n(57),n(56)],i=0;i-1&&(n.className=n.className.slice(0,t))},200))})}},function(t,e){t.exports=function(t){t.skins.broadway={config:{grid_width:360,row_height:35,scale_height:35,link_line_width:1,link_arrow_size:7,lightbox_additional_height:86},_second_column_width:90,_third_column_width:80,_lightbox_template:"
",_config_buttons_left:{},_config_buttons_right:{gantt_delete_btn:"icon_delete",gantt_save_btn:"icon_save"}}}},function(t,e){t.exports=function(t){t.skins.terrace={config:{grid_width:360,row_height:35,scale_height:35,link_line_width:2,link_arrow_size:6,lightbox_additional_height:75},_second_column_width:90,_third_column_width:70}}},function(t,e){t.exports=function(t){t.skins.meadow={config:{grid_width:350,row_height:27,scale_height:30,link_line_width:2,link_arrow_size:6,lightbox_additional_height:72},_second_column_width:95,_third_column_width:80}}},function(t,e){t.exports=function(t){t.skins.skyblue={config:{grid_width:350,row_height:27,scale_height:27,link_line_width:1,link_arrow_size:8,lightbox_additional_height:75},_second_column_width:95,_third_column_width:80}}},function(t,e){function n(t,e){var n=e.skin;if(!n||t)for(var i=document.getElementsByTagName("link"),r=0;rl.width?l.min_width:l.width,l.width=l.max_width&&l.max_widthl[1]&&(t.config.grid_width=l[1]),r&&t.config.show_chart)if(a.$config.width=t.config.grid_width-1,n)a.$parent.$config.width=t.config.grid_width,a.$parent.$config.group&&t.$layout._syncCellSizes(a.$parent.$config.group,a.$parent.$config.width);else if(r&&!i.isChildOf(r.$task,e.$view)){if(!a.$config.original_grid_width){var c=t.skins[t.skin];c&&c.config&&c.config.grid_width?a.$config.original_grid_width=c.config.grid_width:a.$config.original_grid_width=0}t.config.grid_width=a.$config.original_grid_width,a.$parent.$config.width=t.config.grid_width}else a.$parent._setContentSize(a.$config.width,null),t.$layout._syncCellSizes(a.$parent.$config.group,t.config.grid_width);else r&&i.isChildOf(r.$task,e.$view)&&(a.$config.original_grid_width=t.config.grid_width),n||(a.$parent.$config.width=0)}n=!1}}),this._initScrollStateEvents(e)},_initScrollStateEvents:function(e){t._getVerticalScrollbar=this.getVerticalScrollbar,t._getHorizontalScrollbar=this.getHorizontalScrollbar;var n=this.getVerticalScrollbar(),i=this.getHorizontalScrollbar();n&&n.attachEvent("onScroll",function(e,n,i){var r=t.getScrollState();t.callEvent("onGanttScroll",[r.x,e,r.x,n])}),i&&i.attachEvent("onScroll",function(e,n,i){var r=t.getScrollState();t.callEvent("onGanttScroll",[e,r.y,n,r.y])}),e.attachEvent("onResize",function(){n&&!t.$scroll_ver&&(t.$scroll_ver=n.$scroll_ver),i&&!t.$scroll_hor&&(t.$scroll_hor=i.$scroll_hor)})},_findGridResizer:function(t,e){for(var n,i=t.getCellsByType("resizer"),r=!0,a=0;aa.bottom&&(d.y=a.bottom-r.height-s),d.right>a.right&&(d.x=a.right-r.width-o),d}function v(t){var n=u(),i=["gantt_link_tooltip"];n.link_source_id&&n.link_target_id&&(e.isLinkAllowed(n.link_source_id,n.link_target_id,n.link_from_start,n.link_to_start)?i.push("gantt_allowed_link"):i.push("gantt_invalid_link"));var r=e.templates.drag_link_class(n.link_source_id,n.link_from_start,n.link_target_id,n.link_to_start);r&&i.push(r);var a=""+e.templates.drag_link(n.link_source_id,n.link_from_start,n.link_target_id,n.link_to_start)+"
";t.innerHTML=a}function m(){o=s=r=null,a=!0}function y(n,i,r,a){var o=function(){_._direction&&_._direction.parentNode||(_._direction=document.createElement("div"),t.$task_links.appendChild(_._direction));return _._direction}(),s=u(),l=["gantt_link_direction"];e.templates.link_direction_class&&l.push(e.templates.link_direction_class(s.link_source_id,s.link_from_start,s.link_target_id,s.link_to_start));var c=Math.sqrt(Math.pow(r-n,2)+Math.pow(a-i,2));if(c=Math.max(0,c-3)){o.className=l.join(" ");var d=(a-i)/(r-n),h=Math.atan(d);2==k(n,r,i,a)?h+=Math.PI:3==k(n,r,i,a)&&(h-=Math.PI);var f=Math.sin(h),g=Math.cos(h),p=Math.round(i),v=Math.round(n),m=["-webkit-transform: rotate("+h+"rad)","-moz-transform: rotate("+h+"rad)","-ms-transform: rotate("+h+"rad)","-o-transform: rotate("+h+"rad)","transform: rotate("+h+"rad)","width:"+Math.round(c)+"px"];if(-1!=window.navigator.userAgent.indexOf("MSIE 8.0")){m.push('-ms-filter: "'+function(t,e){return"progid:DXImageTransform.Microsoft.Matrix(M11 = "+e+",M12 = -"+t+",M21 = "+t+",M22 = "+e+",SizingMethod = 'auto expand')"}(f,g)+'"');var y=Math.abs(Math.round(n-r)),b=Math.abs(Math.round(a-i));switch(k(n,r,i,a)){case 1:p-=b;break;case 2:v-=y,p-=b;break;case 3:v-=y}}m.push("top:"+p+"px"),m.push("left:"+v+"px"),o.style.cssText=m.join(";")}}function k(t,e,n,i){return e>=t?i<=n?1:4:i<=n?2:3}_.attachEvent("onBeforeDragStart",e.bind(function(n,r){var a=r.target||r.srcElement;if(m(),e.getState().drag_id)return!1;if(i.locateClassName(a,"gantt_link_point")){i.locateClassName(a,"task_start_date")&&(s=!0);var l=e.locate(r);o=l;var c=e.getTask(l);if(e.isReadonly(c))return m(),!1;return this._dir_start=g(c,!!s,0,t.$getConfig(),!0),!0}return!1},this)),_.attachEvent("onAfterDragStart",e.bind(function(t,n){e.config.touch&&e.refreshData(),v(_.config.marker)},this)),_.attachEvent("onDragMove",e.bind(function(o,s){var l=_.config,c=p(s,l.marker);!function(t,e){t.style.left=e.x+"px",t.style.top=e.y+"px"}(l.marker,c);var u=!!i.locateClassName(s,"gantt_link_control"),d=r,h=n,f=a,m=e.locate(s),k=!0;if(i.isChildOf(s.target||s.srcElement,e.$root)||(u=!1,m=null),u&&(k=!i.locateClassName(s,"task_end_date"),u=!!m),r=m,n=u,a=k,u){var b=e.getTask(m),w=t.$getConfig(),x=i.locateClassName(s,"gantt_link_control"),T=0;x&&(T=Math.floor(x.offsetWidth/2)),this._dir_end=g(b,!!a,T,w)}else this._dir_end=i.getRelativeEventPosition(s,t.$task_data),e.env.isEdge&&(this._dir_end.y+=window.scrollY);var $=!(h==u&&d==m&&f==k);return $&&(d&&e.refreshTask(d,!1),m&&e.refreshTask(m,!1)),$&&v(l.marker),y(this._dir_start.x,this._dir_start.y,this._dir_end.x,this._dir_end.y),!0},this)),_.attachEvent("onDragEnd",e.bind(function(){var t=u();if(t.link_source_id&&t.link_target_id&&t.link_source_id!=t.link_target_id){var n=e._get_link_type(t.link_from_start,t.link_to_start),i={source:t.link_source_id,target:t.link_target_id,type:n};i.type&&e.isLinkAllowed(i)&&e.callEvent("onLinkCreated",[i])&&e.addLink(i)}m(),e.config.touch?e.refreshData():(t.link_source_id&&e.refreshTask(t.link_source_id,!1),t.link_target_id&&e.refreshTask(t.link_target_id,!1)),_._direction&&(_._direction.parentNode&&_._direction.parentNode.removeChild(_._direction),_._direction=null)},this)),e.attachEvent("onGanttRender",e.bind(function(){_._direction&&y(this._dir_start.x,this._dir_start.y,this._dir_end.x,this._dir_end.y)},this))};t.exports={createLinkDND:function(){return{init:r}}}},function(t,e,n){var i=n(1),r=n(0),a=n(40),o=n(3);t.exports={createTaskDND:function(){var t;return{extend:function(e){e.roundTaskDates=function(e){t.round_task_dates(e)}},init:function(e,n){return t=function(t,e){var n=e.$services;return{drag:null,dragMultiple:{},_events:{before_start:{},before_finish:{},after_finish:{}},_handlers:{},init:function(){this._domEvents=e._createDomEventScope(),this.clear_drag_state();var t=e.config.drag_mode;this.set_actions(),n.getService("state").registerProvider("tasksDnd",r.bind(function(){return{drag_id:this.drag?this.drag.id:void 0,drag_mode:this.drag?this.drag.mode:void 0,drag_from_start:this.drag?this.drag.left:void 0}},this));var i={before_start:"onBeforeTaskDrag",before_finish:"onBeforeTaskChanged",after_finish:"onAfterTaskDrag"};for(var a in this._events)for(var o in t)this._events[a][o]=i[a];this._handlers[t.move]=this._move,this._handlers[t.resize]=this._resize,this._handlers[t.progress]=this._resize_progress},set_actions:function(){var n=t.$task_data;this._domEvents.attach(n,"mousemove",e.bind(function(t){this.on_mouse_move(t)},this)),this._domEvents.attach(n,"mousedown",e.bind(function(t){this.on_mouse_down(t)},this)),this._domEvents.attach(e.$root,"mouseup",e.bind(function(t){this.on_mouse_up(t)},this))},clear_drag_state:function(){this.drag={id:null,mode:null,pos:null,start_x:null,start_y:null,obj:null,left:null},this.dragMultiple={}},_resize:function(n,i,r){var a=t.$getConfig(),o=this._drag_task_coords(n,r);r.left?(n.start_date=e.dateFromPos(o.start+i),n.start_date||(n.start_date=new Date(e.getState().min_date))):(n.end_date=e.dateFromPos(o.end+i),n.end_date||(n.end_date=new Date(e.getState().max_date)));var s=this._calculateMinDuration(a.min_duration,a.duration_unit);n.end_date-n.start_datec){var u=c-s.end;(ui||void 0===i)&&(i=d)}}return i},_move:function(t,n,i){var r=this._drag_task_coords(t,i),a=e.dateFromPos(r.start+n),o=e.dateFromPos(r.end+n);a?o?(t.start_date=a,t.end_date=o):(t.end_date=new Date(e.getState().max_date),t.start_date=e.dateFromPos(e.posFromDate(t.end_date)-(r.end-r.start))):(t.start_date=new Date(e.getState().min_date),t.end_date=e.dateFromPos(e.posFromDate(t.start_date)+(r.end-r.start)))},_drag_task_coords:function(t,n){return{start:n.obj_s_x=n.obj_s_x||e.posFromDate(t.start_date),end:n.obj_e_x=n.obj_e_x||e.posFromDate(t.end_date)}},_mouse_position_change:function(t,e){var n=t.x-e.x,i=t.y-e.y;return Math.sqrt(n*n+i*i)},_is_number:function(t){return!isNaN(parseFloat(t))&&isFinite(t)},on_mouse_move:function(t){if(this.drag.start_drag){var n=i.getRelativeEventPosition(t,e.$task_data),r=this.drag.start_drag.start_x,o=this.drag.start_drag.start_y;(Date.now()-this.drag.timestamp>50||this._is_number(r)&&this._is_number(o)&&this._mouse_position_change({x:r,y:o},n)>20)&&this._start_dnd(t)}if(this.drag.mode){if(!a(this,40))return;this._update_on_move(t)}},_update_item_on_move:function(t,n,i,r,a){var o=e.getTask(n),s=e.mixin({},o),l=e.mixin({},o);this._handlers[i].apply(this,[l,t,r]),e.mixin(o,l,!0),e.callEvent("onTaskDrag",[o.id,i,l,s,a]),e.mixin(o,l,!0),e.refreshTask(n)},_update_on_move:function(n){var a=this.drag,o=t.$getConfig();if(a.mode){var s=i.getRelativeEventPosition(n,t.$task_data);if(a.pos&&a.pos.x==s.x)return;a.pos=s;var l=e.dateFromPos(s.x);if(!l||isNaN(l.getTime()))return;var c=s.x-a.start_x,u=e.getTask(a.id);if(this._handlers[a.mode]){if(a.mode===o.drag_mode.move){var d={};if(this._isMultiselect()&&e.getSelectedTasks().indexOf(a.id)>=0&&(d=this.dragMultiple),e.isSummaryTask(u)&&e.config.drag_project){var h={};h[a.id]=r.copy(a),d=r.mixin(h,this.dragMultiple)}var f=this._find_max_shift(d,c);for(var _ in void 0!==f&&(c=f),this._update_item_on_move(c,a.id,a.mode,a,n),d){var g=d[_];this._update_item_on_move(c,g.id,g.mode,g,n)}}else this._update_item_on_move(c,a.id,a.mode,a,n);e._update_parents(a.id)}}},on_mouse_down:function(n,r){if(2!=n.button||void 0===n.button){var a=t.$getConfig(),o=e.locate(n),s=null;if(e.isTaskExists(o)&&(s=e.getTask(o)),!e.isReadonly(s)&&!this.drag.mode){this.clear_drag_state(),r=r||n.target||n.srcElement;var l=i.getClassName(r),c=this._get_drag_mode(l,r);if(!l||!c)return r.parentNode?this.on_mouse_down(n,r.parentNode):void 0;if(c)if(c.mode&&c.mode!=a.drag_mode.ignore&&a["drag_"+c.mode]){if(o=e.locate(r),s=e.copy(e.getTask(o)||{}),e.isReadonly(s))return this.clear_drag_state(),!1;if(e.isSummaryTask(s)&&!a.drag_project&&c.mode!=a.drag_mode.progress)return void this.clear_drag_state();c.id=o;var u=i.getRelativeEventPosition(n,e.$task_data);c.start_x=u.x,c.start_y=u.y,c.obj=s,this.drag.start_drag=c,this.drag.timestamp=Date.now()}else this.clear_drag_state();else if(e.checkEvent("onMouseDown")&&e.callEvent("onMouseDown",[l.split(" ")[0]])&&r.parentNode)return this.on_mouse_down(n,r.parentNode)}}},_fix_dnd_scale_time:function(n,i){var r=t.$getConfig(),a=e.getScale().unit,o=e.getScale().step;function s(n){if(e.config.correct_work_time){var i=t.$getConfig();e.isWorkTime(n.start_date,void 0,n)||(n.start_date=e.calculateEndDate({start_date:n.start_date,duration:-1,unit:i.duration_unit,task:n}))}}r.round_dnd_dates||(a="minute",o=r.time_step),i.mode==r.drag_mode.resize?i.left?(n.start_date=e.roundDate({date:n.start_date,unit:a,step:o}),s(n)):(n.end_date=e.roundDate({date:n.end_date,unit:a,step:o}),function(n){if(e.config.correct_work_time){var i=t.$getConfig();e.isWorkTime(new Date(n.end_date-1),void 0,n)||(n.end_date=e.calculateEndDate({start_date:n.end_date,duration:1,unit:i.duration_unit,task:n}))}}(n)):i.mode==r.drag_mode.move&&(n.start_date=e.roundDate({date:n.start_date,unit:a,step:o}),s(n),n.end_date=e.calculateEndDate(n))},_fix_working_times:function(n,i){var r=t.$getConfig();(i=i||{mode:r.drag_mode.move}).mode==r.drag_mode.resize?i.left?n.start_date=e.getClosestWorkTime({date:n.start_date,dir:"future",task:n}):n.end_date=e.getClosestWorkTime({date:n.end_date,dir:"past",task:n}):i.mode==r.drag_mode.move&&e.correctTaskWorkTime(n)},_finalize_mouse_up:function(t,n,i,r){var a=e.getTask(t);if(n.work_time&&n.correct_work_time&&this._fix_working_times(a,i),this._fix_dnd_scale_time(a,i),this._fireEvent("before_finish",i.mode,[t,i.mode,e.copy(i.obj),r])){var o=t;e._init_task_timing(a),this.clear_drag_state(),e.updateTask(a.id),this._fireEvent("after_finish",i.mode,[o,i.mode,r])}else this.clear_drag_state(),t==i.id&&(i.obj._dhx_changed=!1,e.mixin(a,i.obj,!0)),e.refreshTask(a.id)},on_mouse_up:function(n){var i=this.drag;if(i.mode&&i.id){var r=t.$getConfig(),a=e.getTask(i.id),o=this.dragMultiple;if(i.mode===r.drag_mode.move&&(e.isSummaryTask(a)&&r.drag_project||this._isMultiselect()))for(var s in o)this._finalize_mouse_up(o[s].id,r,o[s],n);this._finalize_mouse_up(i.id,r,i,n)}this.clear_drag_state()},_get_drag_mode:function(e,n){var i=t.$getConfig().drag_mode,r={mode:null,left:null};switch((e||"").split(" ")[0]){case"gantt_task_line":case"gantt_task_content":r.mode=i.move;break;case"gantt_task_drag":r.mode=i.resize;var a=n.getAttribute("data-bind-property");r.left="start_date"==a;break;case"gantt_task_progress_drag":r.mode=i.progress;break;case"gantt_link_control":case"gantt_link_point":r.mode=i.ignore;break;default:r=null}return r},_start_dnd:function(n){var i=this.drag=this.drag.start_drag;delete i.start_drag;var r=t.$getConfig(),a=i.id;if(r["drag_"+i.mode]&&e.callEvent("onBeforeDrag",[a,i.mode,n])&&this._fireEvent("before_start",i.mode,[a,i.mode,n])){delete i.start_drag;var s=e.getTask(a);if(e.isReadonly(s))return void this.clear_drag_state();if(this._isMultiselect()){var l=e.getSelectedTasks();l.indexOf(i.id)>=0&&o.forEach(l,e.bind(function(t){var n=e.getTask(t);e.isSummaryTask(n)&&e.config.drag_project&&i.mode==r.drag_mode.move&&this._addSubtasksToDragMultiple(n.id),this.dragMultiple[t]=e.mixin({id:n.id,obj:e.copy(n)},this.drag)},this))}e.isSummaryTask(s)&&e.config.drag_project&&i.mode==r.drag_mode.move&&this._addSubtasksToDragMultiple(s.id),e.callEvent("onTaskDragStart",[])}else this.clear_drag_state()},_fireEvent:function(t,n,i){e.assert(this._events[t],"Invalid stage:{"+t+"}");var r=this._events[t][n];return e.assert(r,"Unknown after drop mode:{"+n+"}"),e.assert(i,"Invalid event arguments"),!e.checkEvent(r)||e.callEvent(r,i)},round_task_dates:function(e){var n=this.drag,i=t.$getConfig();n||(n={mode:i.drag_mode.move}),this._fix_dnd_scale_time(e,n)},destructor:function(){this._domEvents.detachAll()},_isMultiselect:function(){return e.config.drag_multiple&&!!(e.getSelectedTasks&&e.getSelectedTasks().length>0)},_addSubtasksToDragMultiple:function(t){e.eachTask(function(t){this.dragMultiple[t.id]=e.mixin({id:t.id,obj:e.copy(t)},this.drag)},t,this)}}}(e,n),e._tasks_dnd=t,t.init(n)},destructor:function(){t&&(t.destructor(),t=null)}}}}},function(t,e,n){var i=n(0),r=n(72),a=n(71),o=n(1),s=function(t){var e=t.$services;return{onCreated:function(e){var o=e.$config;o.bind=i.defined(o.bind)?o.bind:"task",o.bindLinks=i.defined(o.bindLinks)?o.bindLinks:"link",e._linksDnD=a.createLinkDND(),e._tasksDnD=r.createTaskDND(),e._tasksDnD.extend(e),this._mouseDelegates=n(20)(t)},onInitialized:function(e){this._attachDomEvents(t),this._attachStateProvider(t,e),e._tasksDnD.init(e,t),e._linksDnD.init(e,t),"timeline"==e.$config.id&&this.extendDom(e)},onDestroyed:function(e){this._clearDomEvents(t),this._clearStateProvider(t),e._tasksDnD&&e._tasksDnD.destructor()},extendDom:function(e){t.$task=e.$task,t.$task_scale=e.$task_scale,t.$task_data=e.$task_data,t.$task_bg=e.$task_bg,t.$task_links=e.$task_links,t.$task_bars=e.$task_bars},_clearDomEvents:function(){this._mouseDelegates.destructor(),this._mouseDelegates=null},_attachDomEvents:function(t){function e(e,n){if(e&&this.callEvent("onLinkDblClick",[e,n])){var i=this.getLink(e);if(this.isReadonly(i))return;var r=this.locale.labels.link+" "+this.templates.link_description(this.getLink(e))+" "+this.locale.labels.confirm_link_deleting;window.setTimeout(function(){t._dhtmlx_confirm(r,"",function(){t.deleteLink(e)})},this.config.touch?300:1)}}this._mouseDelegates.delegate("click","gantt_task_link",t.bind(function(t,e){var n=this.locate(t,this.config.link_attribute);n&&this.callEvent("onLinkClick",[n,t])},t),this.$task),this._mouseDelegates.delegate("click","gantt_scale_cell",t.bind(function(e,n){var i=o.getRelativeEventPosition(e,t.$task_data),r=t.dateFromPos(i.x),a=Math.floor(t.columnIndexByDate(r)),s=t.getScale().trace_x[a];t.callEvent("onScaleClick",[e,s])},t),this.$task),this._mouseDelegates.delegate("doubleclick","gantt_task_link",t.bind(function(n,i,r){i=this.locate(n,t.config.link_attribute),e.call(this,i,n)},t),this.$task),this._mouseDelegates.delegate("doubleclick","gantt_link_point",t.bind(function(t,n,i){n=this.locate(t);var r=this.getTask(n),a=null;return i.parentNode&&o.getClassName(i.parentNode)&&(a=o.getClassName(i.parentNode).indexOf("_left")>-1?r.$target[0]:r.$source[0]),a&&e.call(this,a,t),!1},t),this.$task)},_attachStateProvider:function(t,n){var i=n;e.getService("state").registerProvider("tasksTimeline",function(){return{scale_unit:i._tasks?i._tasks.unit:void 0,scale_step:i._tasks?i._tasks.step:void 0}})},_clearStateProvider:function(){e.getService("state").unregisterProvider("tasksTimeline")}}};t.exports=s},function(t,e,n){var i=n(1);function r(t,e){var n=i.getNodePosition(e.$grid_data);return t.x+=n.x-e.$grid.scrollLeft,t.y+=n.y-e.$grid_data.scrollTop,t}t.exports={removeLineHighlight:function(t){t.markerLine&&t.markerLine.parentNode&&t.markerLine.parentNode.removeChild(t.markerLine),t.markerLine=null},highlightPosition:function(t,e,n){var a=function(t,e){var n=i.getNodePosition(e.$grid_data),r=i.getRelativeEventPosition(t,e.$grid_data),a=e.$config.rowStore,o=n.x,s=r.y-10,l=e.$getConfig();sn.y+c-l.row_height&&(s=n.y+c-l.row_height),n.x=o,n.y=s,n}(t,n);e.marker.style.left=a.x+9+"px",e.marker.style.top=a.y+"px";var o=e.markerLine;o||((o=document.createElement("div")).className="gantt_drag_marker gantt_grid_dnd_marker",o.innerHTML="
",o.style.pointerEvents="none",document.body.appendChild(o),e.markerLine=o),t.child?function(t,e,n){var i=t.targetParent,a=r({x:0,y:n.getItemTop(i)},n);e.innerHTML="
",e.style.width=n.$grid_data.offsetWidth+"px",e.style.top=a.y+"px",e.style.left=a.x+"px",e.style.height=n.getItemHeight(i)+"px"}(t,o,n):function(t,e,n){var i=function(t,e){var n=e.$config.rowStore,i={x:0,y:0},a=e.$grid_data.querySelector(".gantt_tree_indent"),o=15,s=0;if(a&&(o=a.offsetWidth),t.targetId!==n.$getRootId()){var l=e.getItemTop(t.targetId),c=e.getItemHeight(t.targetId);if(s=n.exists(t.targetId)?n.calculateItemLevel(n.getItem(t.targetId)):0,t.prevSibling)i.y=l;else if(t.nextSibling){var u=0;n.eachItem(function(t){-1!==n.getIndexById(t.id)&&u++},t.targetId),i.y=l+c+u*c}else i.y=l+c,s+=1}return i.x=40+s*o,i.width=Math.max(e.$grid_data.offsetWidth-i.x,0),r(i,e)}(t,n);e.innerHTML="
",e.style.left=i.x+"px",e.style.height="4px",e.style.top=i.y-2+"px",e.style.width=i.width+"px"}(t,o,n)}}},function(t,e,n){var i=n(15);t.exports=function(t,e,n,r,a){var o;if(e!==a.$getRootId())o=n<.25?i.prevSiblingTarget(t,e,a):!(n>.6)||a.hasChild(e)&&a.getItem(e).$open?i.firstChildTarget(t,e,a):i.nextSiblingTarget(t,e,a);else{var s=a.$getRootId();o=a.hasChild(s)&&r>=0?i.lastChildTarget(t,s,a):i.firstChildTarget(t,s,a)}return o}},function(t,e,n){var i=n(15);function r(t,e,n,r,a){for(var o=e;r.exists(o);){var s=r.calculateItemLevel(r.getItem(o));if((s===n||s===n-1)&&r.getBranchIndex(o)>-1)break;o=a?r.getPrev(o):r.getNext(o)}return r.exists(o)?r.calculateItemLevel(r.getItem(o))===n?a?i.nextSiblingTarget(t,o,r):i.prevSiblingTarget(t,o,r):i.firstChildTarget(t,o,r):null}function a(t,e,n,i){return r(t,e,n,i,!0)}function o(t,e,n,i){return r(t,e,n,i,!1)}t.exports=function(t,e,n,r,s,l){var c;if(e!==s.$getRootId())n<.5?s.calculateItemLevel(s.getItem(e))===l?c=s.getPrevSibling(e)?i.nextSiblingTarget(t,s.getPrevSibling(e),s):i.prevSiblingTarget(t,e,s):(c=a(t,e,l,s))&&(c=o(t,e,l,s)):s.calculateItemLevel(s.getItem(e))===l?c=i.nextSiblingTarget(t,e,s):(c=o(t,e,l,s))&&(c=a(t,e,l,s));else{var u=s.$getRootId(),d=s.getChildren(u);c=i.createDropTargetObject(),c=d.length&&r>=0?a(t,function(t){for(var e=t.getNext();t.exists(e);){var n=t.getNext(e);if(!t.exists(n))return e;e=n}return null}(s),l,s):o(t,u,l,s)}return c}},function(t,e,n){var i=n(1),r=n(15),a=n(76),o=n(75),s=n(74);t.exports={init:function(t,e){var n=t.$services.getService("dnd");if(e.$config.bind&&t.getDatastore(e.$config.bind)){var l=new n(e.$grid_data,{updates_per_second:60});t.defined(e.$getConfig().dnd_sensitivity)&&(l.config.sensitivity=e.$getConfig().dnd_sensitivity),l.attachEvent("onBeforeDragStart",t.bind(function(n,r){var a=c(r);if(!a)return!1;if(t.hideQuickInfo&&t._hideQuickInfo(),i.closest(r.target,".gantt_grid_editor_placeholder"))return!1;var o=a.getAttribute(e.$config.item_attribute),s=e.$config.rowStore.getItem(o);return!t.isReadonly(s)&&(l.config.initial_open_state=s.$open,!!t.callEvent("onRowDragStart",[o,r.target||r.srcElement,r])&&void 0)},t)),l.attachEvent("onAfterDragStart",t.bind(function(t,n){var i=c(n);l.config.marker.innerHTML=i.outerHTML;var a=l.config.marker.firstChild;a&&(l.config.marker.style.opacity=.4,a.style.position="static",a.style.pointerEvents="none"),l.config.id=i.getAttribute(e.$config.item_attribute);var o=e.$config.rowStore,s=o.getItem(l.config.id);l.config.level=o.calculateItemLevel(s),l.config.drop_target=r.createDropTargetObject({targetParent:o.getParent(s.id),targetIndex:o.getBranchIndex(s.id),targetId:s.id,nextSibling:!0}),s.$open=!1,s.$transparent=!0,this.refreshData()},t)),l.attachEvent("onDragMove",t.bind(function(n,i){var a=u(i);return a&&!1!==t.callEvent("onBeforeRowDragMove",[l.config.id,a.targetParent,a.targetIndex])||(a=r.createDropTargetObject(l.config.drop_target)),s.highlightPosition(a,l.config,e),l.config.drop_target=a,this.callEvent("onRowDragMove",[l.config.id,a.targetParent,a.targetIndex]),!0},t)),l.attachEvent("onDragEnd",t.bind(function(){var t=e.$config.rowStore,n=t.getItem(l.config.id);s.removeLineHighlight(l.config),n.$transparent=!1,n.$open=l.config.initial_open_state;var i=l.config.drop_target;!1===this.callEvent("onBeforeRowDragEnd",[l.config.id,i.targetParent,i.targetIndex])?n.$drop_target=null:(t.move(l.config.id,i.targetIndex,i.targetParent),this.callEvent("onRowDragEnd",[l.config.id,i.targetParent,i.targetIndex])),t.refresh(n.id)},t))}function c(t){return i.locateAttribute(t,e.$config.item_attribute)}function u(t){var n=function(t){var n=i.getRelativeEventPosition(t,e.$grid_data).y,r=e.$config.rowStore;if((n=n||0)<0)return r.$getRootId();var a=Math.floor(n/e.getItemHeight());return a>r.countVisible()-1?r.$getRootId():r.getIdByIndex(a)}(t),r=null,s=e.$config.rowStore,c=!e.$getConfig().order_branch_free,u=i.getRelativeEventPosition(t,e.$grid_data).y;return n!==s.$getRootId()&&(r=(u-e.getItemTop(n))/e.getItemHeight()),c?a(l.config.id,n,r,u,s,l.config.level):o(l.config.id,n,r,u,s)}}}},function(t,e,n){var i=n(1);t.exports={init:function(t,e){var n=t.$services.getService("dnd");if(e.$config.bind&&t.getDatastore(e.$config.bind)){var r=new n(e.$grid_data,{updates_per_second:60});t.defined(e.$getConfig().dnd_sensitivity)&&(r.config.sensitivity=e.$getConfig().dnd_sensitivity),r.attachEvent("onBeforeDragStart",t.bind(function(n,s){var l=a(s);if(!l)return!1;if(t.hideQuickInfo&&t._hideQuickInfo(),i.closest(s.target,".gantt_grid_editor_placeholder"))return!1;var c=l.getAttribute(e.$config.item_attribute),u=o().getItem(c);return!t.isReadonly(u)&&(r.config.initial_open_state=u.$open,!!t.callEvent("onRowDragStart",[c,s.target||s.srcElement,s])&&void 0)},t)),r.attachEvent("onAfterDragStart",t.bind(function(t,n){var i=a(n);r.config.marker.innerHTML=i.outerHTML;var s=r.config.marker.firstChild;s&&(s.style.position="static"),r.config.id=i.getAttribute(e.$config.item_attribute);var l=o(),c=l.getItem(r.config.id);r.config.index=l.getBranchIndex(r.config.id),r.config.parent=c.parent,c.$open=!1,c.$transparent=!0,this.refreshData()},t)),r.lastTaskOfLevel=function(t){for(var e=null,n=o().getItems(),i=0,r=n.length;in.y+c-l.row_height&&(s=n.y+c-l.row_height),n.x=a,n.y=s,n},t),r._getTargetY=t.bind(function(t){var n=i.getNodePosition(e.$grid_data),r=t.pageY-n.y+(e.$state.scrollTop||0);return r<0&&(r=0),r},t),r._getTaskByY=t.bind(function(t,n){var i=e.$getConfig(),r=o();t=t||0;var a=Math.floor(t/i.row_height);return(a=nr.countVisible()-1?null:r.getIdByIndex(a)},t),r.attachEvent("onDragMove",t.bind(function(t,n){var i=r.config,a=r._getGridPos(n),s=e.$getConfig(),l=o();i.marker.style.left=a.x+10+"px",i.marker.style.top=a.y+"px";var c=l.getItem(r.config.id),u=r._getTargetY(n),d=r._getTaskByY(u,l.getIndexById(c.id));function h(t,e){return!l.isChildOf(f.id,e.id)&&(t.$level==e.$level||s.order_branch_free)}if(l.exists(d)||(d=r.lastTaskOfLevel(s.order_branch_free?c.$level:0))==r.config.id&&(d=null),l.exists(d)){var f=l.getItem(d);if(l.getIndexById(f.id)*s.row_height+s.row_height/2=0;)v=l.getIdByIndex(_-y),m=l.getItem(v),y++;if(c.id==f.id)return;h(f,c)&&c.id!=f.id?l.move(c.id,0,0,f.id):f.$level!=c.$level-1||l.getChildren(f.id).length?m&&h(m,c)&&c.id!=m.id&&l.move(c.id,-1,l.getParent(m.id)):l.move(c.id,0,f.id)}return!0},t)),r.attachEvent("onDragEnd",t.bind(function(){var t=o(),e=t.getItem(r.config.id);e.$transparent=!1,e.$open=r.config.initial_open_state,!1===this.callEvent("onBeforeRowDragEnd",[r.config.id,r.config.parent,r.config.index])?(t.move(r.config.id,r.config.index,r.config.parent),e.$drop_target=null):this.callEvent("onRowDragEnd",[r.config.id,e.$drop_target]),this.refreshData()},t))}function a(t){return i.locateAttribute(t,e.$config.item_attribute)}function o(){return t.getDatastore(e.$config.bind)}}}},function(t,e,n){var i=n(0),r=n(78),a=n(77),o=function(t){return{onCreated:function(e){e.$config=i.mixin(e.$config,{bind:"task"}),"grid"==e.$config.id&&(this.extendGantt(e),t.ext.inlineEditors=t.ext._inlineEditors.createEditors(e),t.ext.inlineEditors.init()),this._mouseDelegates=n(20)(t)},onInitialized:function(e){var n=e.$getConfig();n.order_branch&&("marker"==n.order_branch?a.init(e.$gantt,e):r.init(e.$gantt,e)),this.initEvents(e,t),"grid"==e.$config.id&&this.extendDom(e)},onDestroyed:function(e){"grid"==e.$config.id&&t.ext.inlineEditors.destructor(),this.clearEvents(e,t)},initEvents:function(t,e){this._mouseDelegates.delegate("click","gantt_row",e.bind(function(n,i,r){var a=t.$getConfig();if(null!==i){var o=this.getTask(i);a.scroll_on_click&&!e._is_icon_open_click(n)&&this.showDate(o.start_date),e.callEvent("onTaskRowClick",[i,r])}},e),t.$grid),this._mouseDelegates.delegate("click","gantt_grid_head_cell",e.bind(function(n,i,r){var a=r.getAttribute("data-column-id");if(e.callEvent("onGridHeaderClick",[a,n])){var o=t.$getConfig();if("add"!=a){if(o.sort){for(var s,l=a,c=0;c"+l+""),c&&(l="
"+l),l&&(u.innerHTML=l),u}return null}return{render:function(i,r,s){var l=r.$getConfig(),c=r.$getTemplates(),h=r.getScale(),g=e(i,l.resource_property,h,r),p=[],v={},m=i.capacity||r.$config.capacity||24;n[i.id]={},u[i.id]=null,d[i.id]=null;for(var y=!!s,k=a(h,s),b=k.start;b<=k.end;b++){var w=g[b];if(w&&(!y||o(b,h,s,t))){var x=c.histogram_cell_capacity(w.start_date,w.end_date,i,w.tasks);v[w.start_date.valueOf()]=x||0;var T=r.getItemPosition(i,w.start_date,w.end_date),$=_(i,T,m,l,c,w,r);$&&(p.push($),n[i.id][b]=$)}}var S=null;if(p.length){S=document.createElement("div");for(var C=0;C",f=""):(h=g.template?g.template(e):e[g.name],i.isDate(h)&&(h=s.date_grid(h,e,g.name)),null!==h&&void 0!==h||(h=""),f=h,h=""+h+"
");var p="gantt_cell"+(_?" gantt_last_cell":""),v=[];if(g.tree){p+=" gantt_cell_tree";for(var m=0;m"+v.join("")+"",c.push(d)}if(p=t.getGlobalTaskIndex(e.id)%2==0?"":" odd",p+=e.$transparent?" gantt_transparent":"",p+=e.$dataprocessor_class?" "+e.$dataprocessor_class:"",s.grid_row_class){var w=s.grid_row_class.call(t,e.start_date,e.end_date,e);w&&(p+=" "+w)}l.isSelected(e.id)&&(p+=" gantt_selected");var x=document.createElement("div");x.className="gantt_row"+p+" gantt_row_"+t.getTaskType(e.type);var T=n.getItemHeight();return x.style.height=T+"px",x.style.lineHeight=T+"px",o.smart_rendering&&(x.style.position="absolute",x.style.left="0px",x.style.top=n.getItemTop(e.id)+"px"),n.$config.item_attribute&&(x.setAttribute(n.$config.item_attribute,e.id),x.setAttribute(n.$config.bind+"_id",e.id)),t._waiAria.taskRowAttr(e,x),x.innerHTML=c.join(""),x},update:null,getRectangle:r,getVisibleRange:a}}},function(t,e){t.exports=function(t,e,n,i){var r=n.$gantt.getTask(t.source),a=n.$gantt.getTask(t.target),o=n.$getConfig(),s=n.getItemTop(r.id),l=o.row_height,c=n.getItemTop(a.id),u=o.row_height;if(e.y>s+l&&e.y>c+u)return!1;if(e.y_endh){var g=h;h=d,d=g}if(f>_){g=_;_=f,f=g}return d+=-100,h+=100,f+=-100,_+=100,!(e.x>h&&e.x>_)&&!(e.x_endt.x?this.dirs.right:e.y>t.y?this.dirs.down:this.dirs.up}},n={path:[],clear:function(){this.path=[]},current:function(){return this.path[this.path.length-1]},point:function(e){return e?(this.path.push(t.copy(e)),e):this.current()},point_to:function(n,i,r){r=r?{x:r.x,y:r.y}:t.copy(this.point());var a=e.dirs;switch(n){case a.left:r.x-=i;break;case a.right:r.x+=i;break;case a.up:r.y-=i;break;case a.down:r.y+=i}return this.point(r)},get_points:function(n,i){var r=this.get_endpoint(n,i),a=t.config,o=r.e_y-r.y,s=r.e_x-r.x,l=e.dirs;this.clear(),this.point({x:r.x,y:r.y});var c=2*a.link_arrow_size,u=this.get_line_type(n,i.$getConfig()),d=r.e_x>r.x;if(u.from_start&&u.to_start)this.point_to(l.left,c),d?(this.point_to(l.down,o),this.point_to(l.right,s)):(this.point_to(l.right,s),this.point_to(l.down,o)),this.point_to(l.right,c);else if(!u.from_start&&u.to_start)if(d=r.e_x>r.x+2*c,this.point_to(l.right,c),d)s-=c,this.point_to(l.down,o),this.point_to(l.right,s);else{s-=2*c;var h=o>0?1:-1;this.point_to(l.down,h*(a.row_height/2)),this.point_to(l.right,s),this.point_to(l.down,h*(Math.abs(o)-a.row_height/2)),this.point_to(l.right,c)}else u.from_start||u.to_start?u.from_start&&!u.to_start&&(d=r.e_x>r.x-2*c,this.point_to(l.left,c),d?(s+=2*c,h=o>0?1:-1,this.point_to(l.down,h*(a.row_height/2)),this.point_to(l.right,s),this.point_to(l.down,h*(Math.abs(o)-a.row_height/2)),this.point_to(l.left,c)):(s+=c,this.point_to(l.down,o),this.point_to(l.right,s))):(this.point_to(l.right,c),d?(this.point_to(l.right,s),this.point_to(l.down,o)):(this.point_to(l.down,o),this.point_to(l.right,s)),this.point_to(l.left,c));return this.path},get_line_type:function(e,n){var i=n.links,r=!1,a=!1;return e.type==i.start_to_start?r=a=!0:e.type==i.finish_to_finish?r=a=!1:e.type==i.finish_to_start?(r=!1,a=!0):e.type==i.start_to_finish?(r=!0,a=!1):t.assert(!1,"Invalid link type"),n.rtl&&(r=!r,a=!a),{from_start:r,to_start:a}},get_endpoint:function(e,n){var i=n.$getConfig(),a=this.get_line_type(e,i),o=a.from_start,s=a.to_start,l=t.getTask(e.source),c=t.getTask(e.target),u=r(l,n),d=r(c,n);return{x:o?u.left:u.left+u.width,e_x:s?d.left:d.left+d.width,y:u.top,e_y:d.top}}};function r(e,n){var i=n.$getConfig(),r=n.getItemPosition(e);if(t.getTaskType(e.type)==i.types.milestone){var a=t.getTaskHeight(),o=Math.sqrt(2*a*a);r.left-=o/2,r.width=o}return r}return{render:function(i,r){var a=r.$getConfig(),o=n.get_endpoint(i,r),s=o.e_y-o.y;if(!(o.e_x-o.x||s))return null;var l=n.get_points(i,r),c=e.get_lines(l,r),u=document.createElement("div"),d="gantt_task_link";i.color&&(d+=" gantt_link_inline_color");var h=t.templates.link_class?t.templates.link_class(i):"";h&&(d+=" "+h),a.highlight_critical_path&&t.isCriticalLink&&t.isCriticalLink(i)&&(d+=" gantt_critical_link"),u.className=d,r.$config.link_attribute&&(u.setAttribute(r.$config.link_attribute,i.id),u.setAttribute("link_id",i.id));for(var f=0;fg.end)&&c(t.id,v)}n[t.id]={};for(var m=g.start;m<=g.end;m++){var y=d(h,m,t,a,f,_,s);!y&&l(t,m)?c(t.id,m):y&&!y.parentNode&&i.appendChild(y)}}},getRectangle:i,getVisibleRange:a}}},function(t,e,n){var i=n(28);t.exports=function(t,e,n,r){if(!r.isSplitTask(t))return!1;var a=r.getSubtaskDates(t.id);return i({id:t.id,start_date:a.start_date,end_date:a.end_date,parent:t.parent},e,n,r)}},function(t,e,n){var i=n(27),r=n(86),a=n(6);t.exports=function(t){var e=i(t);return{render:function(n,i){if(t.isSplitTask(n)&&(t.config.open_split_tasks&&!n.$open||!t.config.open_split_tasks)){var r=document.createElement("div"),a=t.getTaskPosition(n);return t.hasChild(n.id)&&t.eachTask(function(n){var o=t.isSummaryTask(n);o&&t.resetProjectDates(n);var s=e(n,i);if(s){var l=Math.floor((t.config.row_height-a.height)/2);s.style.top=a.top+l+"px",s.classList.add("gantt_split_child"),o&&s.classList.add("gantt_split_subproject"),r.appendChild(s)}},n.id),r}return!1},update:null,isInViewPort:r,getVisibleRange:a}}},function(t,e,n){var i=n(28),r=n(6),a=n(27);t.exports=function(t){return{render:a(t),update:null,isInViewPort:i,getVisibleRange:r}}},function(t,e){t.exports=function(t){return function(e,n,i){"keepDates"==i?function(e,n){"duration"==n?e.end_date=t.calculateEndDate(e):"end_date"!=n&&"start_date"!=n||(e.duration=t.calculateDuration(e))}(e,n):"keepDuration"==i?function(e,n){"end_date"==n?e.start_date=t.calculateEndDate({start_date:e.end_date,duration:-e.duration,task:e}):"start_date"!=n&&"duration"!=n||(e.end_date=t.calculateEndDate(e))}(e,n):function(e,n){"start_date"==n||"duration"==n?e.end_date=t.calculateEndDate(e):"end_date"==n&&(e.duration=t.calculateDuration(e))}(e,n)}}},function(t,e,n){t.exports=function(t){var e=n(7)(t),i=n(0);function r(){return e.apply(this,arguments)||this}function a(e){return e.formatter||t.ext.formatters.durationFormatter()}return n(2)(r,e),i.mixin(r.prototype,{show:function(t,e,n,i){var r="
";i.innerHTML=r},set_value:function(t,e,n,i){this.get_input(i).value=a(n.editor).format(t)},get_value:function(t,e,n){return a(e.editor).parse(this.get_input(n).value||"")}},!0),r}},function(t,e,n){t.exports=function(t){var e=n(7)(t),i=n(0);function r(){return e.apply(this,arguments)||this}function a(e){return e.formatter||t.ext.formatters.linkFormatter()}function o(t,e){for(var n=(t||"").split(e.delimiter||","),i=0;i";i.innerHTML=r},hide:function(){},set_value:function(e,n,i,r){this.get_input(r).value=s(e,i.editor,t)},get_value:function(t,e,n){return o(this.get_input(n).value||"",e.editor)},save:function(e,n,i){var r=c(t.getTask(e),this.get_value(e,n,i),n.editor);(r.add.length||r.remove.length)&&t.batchUpdate(function(){r.add.forEach(function(e){t.addLink(e)}),r.remove.forEach(function(e){t.deleteLink(e)}),t.autoSchedule&&t.autoSchedule()})},is_changed:function(e,n,i,r){var a=this.get_value(n,i,r),l=o(s(e,i.editor,t),i.editor);return a.join()!==l.join()}},!0),r}},function(t,e,n){t.exports=function(t){var e=n(7)(t),i=n(0),r="%Y-%m-%d",a=null,o=null;function s(){return e.apply(this,arguments)||this}return n(2)(s,e),i.mixin(s.prototype,{show:function(e,n,i,s){a||(a=t.date.date_to_str(r)),o||(o=t.date.str_to_date(r));var l=null,c=null;l="function"==typeof i.min?i.min(e,n):i.min,c="function"==typeof i.max?i.max(e,n):i.max;var u="
";s.innerHTML=u},set_value:function(t,e,n,i){t&&t.getFullYear?this.get_input(i).value=a(t):this.get_input(i).value=t},is_valid:function(t,e,n,i){return!(!t||isNaN(t.getTime()))},get_value:function(t,e,n){var i;try{i=o(this.get_input(n).value||"")}catch(t){i=null}return i}},!0),s}},function(t,e,n){t.exports=function(t){var e=n(7)(t),i=n(0);function r(){return e.apply(this,arguments)||this}return n(2)(r,e),i.mixin(r.prototype,{show:function(t,e,n,i){for(var r="",a=[],o=n.options||[],s=0;s"+o[s].label+"");r+=a.join("")+"
",i.innerHTML=r},get_input:function(t){return t.querySelector("select")}},!0),r}},function(t,e,n){t.exports=function(t){var e=n(7)(t),i=n(0);function r(){return e.apply(this,arguments)||this}return n(2)(r,e),i.mixin(r.prototype,{show:function(t,e,n,i){var r="
";i.innerHTML=r},get_value:function(t,e,n){return this.get_input(n).value||""},is_valid:function(t,e,n,i){return!isNaN(parseInt(t,10))}},!0),r}},function(t,e,n){t.exports=function(t){var e=n(7)(t),i=n(0);function r(){return e.apply(this,arguments)||this}return n(2)(r,e),i.mixin(r.prototype,{show:function(t,e,n,i){var r="
";i.innerHTML=r}},!0),r}},function(t,e){t.exports={init:function(t,e){var n=t,i=e.$gantt,r=null,a=i.ext.keyboardNavigation;a.attachEvent("onBeforeFocus",function(e){var i=t.locateCell(e);if(clearTimeout(r),i){var a=i.columnName,o=i.id,s=n.getState();if(n.isVisible()&&s.id==o&&s.columnName===a)return!1}return!0}),a.attachEvent("onFocus",function(e){var i=t.locateCell(e),a=t.getState();return clearTimeout(r),!i||i.id==a.id&&i.columnName==a.columnName||n.isVisible()&&n.save(),!0}),t.attachEvent("onHide",function(){clearTimeout(r)}),a.attachEvent("onBlur",function(){return r=setTimeout(function(){n.save()}),!0}),i.attachEvent("onTaskDblClick",function(e,n){var i=t.getState(),r=t.locateCell(n.target);return!r||!t.isVisible()||r.columnName!=i.columnName}),i.attachEvent("onTaskClick",function(e,n){if(i._is_icon_open_click(n))return!0;var r=t.getState(),a=t.locateCell(n.target);return!a||!t.getEditorConfig(a.columnName)||(t.isVisible()&&r.id==a.id&&r.columnName==a.columnName||t.startEdit(a.id,a.columnName),!1)}),i.attachEvent("onEmptyClick",function(){return n.save(),!0}),a.attachEvent("onKeyDown",function(e,r){var o=t.locateCell(r.target),s=!!o&&t.getEditorConfig(o.columnName),l=t.getState(),c=i.constants.KEY_CODES,u=r.keyCode,d=!1;switch(u){case c.ENTER:t.isVisible()?(t.save(),r.preventDefault(),d=!0):s&&!(r.ctrlKey||r.metaKey||r.shiftKey)&&(n.startEdit(o.id,o.columnName),r.preventDefault(),d=!0);break;case c.ESC:t.isVisible()&&(t.hide(),r.preventDefault(),d=!0);break;case c.UP:case c.DOWN:break;case c.LEFT:case c.RIGHT:(s&&t.isVisible()||"date"===l.editorType)&&(d=!0);break;case c.SPACE:t.isVisible()&&(d=!0),s&&!t.isVisible()&&(n.startEdit(o.id,o.columnName),r.preventDefault(),d=!0);break;case c.DELETE:s&&!t.isVisible()?(n.startEdit(o.id,o.columnName),d=!0):s&&t.isVisible()&&(d=!0);break;case c.TAB:if(t.isVisible()){r.shiftKey?t.editPrevCell(!0):t.editNextCell(!0);var h=t.getState();h.id&&a.focus({type:"taskCell",id:h.id,column:h.columnName}),r.preventDefault(),d=!0}break;default:if(t.isVisible())d=!0;else if(u>=48&&u<=57||u>95&&u<112||u>=64&&u<=91||u>185&&u<193||u>218&&u<223){var f=e.modifiers,_=f.alt||f.ctrl||f.meta||f.shift;f.alt||_&&a.getCommandHandler(e,"taskCell")||s&&!t.isVisible()&&(n.startEdit(o.id,o.columnName),d=!0)}}return!d})},onShow:function(t,e,n){},onHide:function(t,e,n){n.$gantt.focus()},destroy:function(){}}},function(t,e){t.exports={init:function(t,e){var n=e.$gantt;n.attachEvent("onTaskClick",function(e,i){if(n._is_icon_open_click(i))return!0;var r=t.getState(),a=t.locateCell(i.target);return!a||!t.getEditorConfig(a.columnName)||(t.isVisible()&&r.id==a.id&&r.columnName==a.columnName||t.startEdit(a.id,a.columnName),!1)}),n.attachEvent("onEmptyClick",function(){return t.isVisible()&&t.isChanged()?t.save():t.hide(),!0}),n.attachEvent("onTaskDblClick",function(e,n){var i=t.getState(),r=t.locateCell(n.target);return!r||!t.isVisible()||r.columnName!=i.columnName||(t.hide(),!1)})},onShow:function(t,e,n){var i=n.$gantt;i.ext&&i.ext.keyboardNavigation&&i.ext.keyboardNavigation.attachEvent("onKeyDown",function(e,n){var r=i.constants.KEY_CODES,a=!1;switch(n.keyCode){case r.SPACE:t.isVisible()&&(a=!0)}return!a});e.onkeydown=function(e){e=e||window.event;var n=i.constants.KEY_CODES;if(!(e.defaultPrevented||e.shiftKey&&e.keyCode!=n.TAB)){var r=!0;switch(e.keyCode){case i.keys.edit_save:t.save();break;case i.keys.edit_cancel:t.hide();break;case n.UP:case n.DOWN:t.isVisible()&&(t.hide(),r=!1);break;case n.TAB:e.shiftKey?t.editPrevCell(!0):t.editNextCell(!0);break;default:r=!1}r&&e.preventDefault()}}},onHide:function(){},destroy:function(){}}},function(t,e,n){var i=n(97),r=n(96);t.exports=function(t){var e=null;return{setMapping:function(t){e=t},getMapping:function(){return e||(t.config.keyboard_navigation_cells?r:i)}}}},function(t,e,n){var i=n(98),r=n(95),a=n(94),o=n(93),s=n(92),l=n(91),c=n(90),u=n(0),d=n(1),h=n(4),f=n(89);function _(t){t.config.editor_types={text:new(r(t)),number:new(a(t)),select:new(o(t)),date:new(s(t)),predecessor:new(l(t)),duration:new(c(t))}}t.exports=function(t){var e=i(t),n={};h(n);var r={init:_,createEditors:function(i){function r(t,e){var n=i.$getConfig(),r=function(t,e){for(var n=i.$getConfig(),r=i.getItemTop(t),a=i.getItemHeight(t),o=i.getGridColumns(),s=0,l=0,c=0,u=0;u0?t.getNext:t.getPrev,i=(n=t.bind(n,t))(this._itemId);t.isTaskExists(i)&&t.isReadonly(t.getTask(i));)i=n(i);return i},editNextRow:function(){var t=this.getNextCell(1);t&&this.startEdit(t,this._columnName)},editPrevRow:function(){var t=this.getNextCell(-1);t&&this.startEdit(t,this._columnName)},destructor:function(){o.forEach(function(t){s.detachEvent(t)}),s=null,this.hide(),this.detachAllEvents()}};return u.mixin(l,e),u.mixin(l,n),l}};return u.mixin(r,e),u.mixin(r,n),r}},function(t,e){t.exports={create:function(){return{render:function(){},destroy:function(){}}}}},function(t,e,n){var i=n(2),r=n(1),a=n(0),o=n(9),s=function(t){"use strict";var e=["altKey","shiftKey","metaKey"];function n(e,n,i,r){var o=t.apply(this,arguments)||this;this.$config=a.mixin(n,{scroll:"x"}),o._scrollHorizontalHandler=a.bind(o._scrollHorizontalHandler,o),o._scrollVerticalHandler=a.bind(o._scrollVerticalHandler,o),o._outerScrollVerticalHandler=a.bind(o._outerScrollVerticalHandler,o),o._outerScrollHorizontalHandler=a.bind(o._outerScrollHorizontalHandler,o),o._mouseWheelHandler=a.bind(o._mouseWheelHandler,o),this.$config.hidden=!0;var s=r.config.scroll_size;return r.env.isIE&&(s+=1),this._isHorizontal()?(o.$config.height=s,o.$parent.$config.height=s):(o.$config.width=s,o.$parent.$config.width=s),this.$config.scrollPosition=0,o.$name="scroller",o}return i(n,t),n.prototype.init=function(t){t.innerHTML=this.$toHTML(),this.$view=t.firstChild,this.$view||this.init(),this._isVertical()?this._initVertical():this._initHorizontal(),this._initMouseWheel(),this._initLinkedViews()},n.prototype.$toHTML=function(){return""},n.prototype._getRootParent=function(){for(var t=this.$parent;t&&t.$parent;)t=t.$parent;if(t)return t},n.prototype._eachView=function(){var t=[];return function t(e,n){if(n.push(e),e.$cells)for(var i=0;id[s]&&d[o]>e&&u>d[s]-l+2&&(e=u+(i?0:2),n=d[s]);else{var h=Math.max(d[o]-u,0);(u+=h)>Math.max(d[s]-h,0)&&u>e&&(e=u,n=d[s])}}return{outerScroll:n,innerScroll:e}},n.prototype.scroll=function(t){this._isHorizontal()?this.scrollHorizontally(t):this.scrollVertically(t)},n.prototype.getScrollState=function(){return{visible:this.isVisible(),direction:this.$config.scroll,size:this.$config.outerSize,scrollSize:this.$config.scrollSize||0,position:this.$config.scrollPosition||0}},n.prototype.setSize=function(e,n){t.prototype.setSize.apply(this,arguments);var i=this._getScrollSize(),r=(this._isVertical()?n:e)-this._getScrollOffset()+(this._isHorizontal()?1:0);i.innerScroll&&r>i.outerScroll&&(i.innerScroll+=r-i.outerScroll),this.$config.scrollSize=i.innerScroll,this.$config.width=e,this.$config.height=n,this._setScrollSize(i.innerScroll)},n.prototype.isVisible=function(){return!(!this.$parent||!this.$parent.$view.parentNode)},n.prototype.shouldShow=function(){var t=this._getScrollSize();return!(!t.innerScroll&&this.$parent&&this.$parent.$view.parentNode)&&!(!t.innerScroll||this.$parent&&this.$parent.$view.parentNode)},n.prototype.shouldHide=function(){return!(this._getScrollSize().innerScroll||!this.$parent||!this.$parent.$view.parentNode)},n.prototype.toggleVisibility=function(){this.shouldHide()?this.hide():this.shouldShow()&&this.show()},n.prototype._getScaleOffset=function(t){var e=0;return!t||"timeline"!=t.$config.view&&"grid"!=t.$config.view||(e=t.$content.$getConfig().scale_height),e},n.prototype._getScrollOffset=function(){var t=0;if(this._isVertical()){var e=this.$parent.$parent;t=Math.max(this._getScaleOffset(e.getPrevSibling(this.$parent.$id)),this._getScaleOffset(e.getNextSibling(this.$parent.$id)))}else for(var n=this._getLinkedViews(),i=0;i=0&&(!t[l]||t.deltaX||t.wheelDeltaX||(a=2*s,s=0)),a&&Math.abs(a)>Math.abs(s)){if(this._isVertical())return;if(i.x)return!0;if(!this.$scroll_hor||!this.$scroll_hor.offsetWidth)return!0;var c=a/-40,u=this._oldLeft,d=u+30*c;if(this.scrollHorizontally(d),this.$scroll_hor.scrollLeft=d,u==this.$scroll_hor.scrollLeft)return!0;this._oldLeft=this.$scroll_hor.scrollLeft}else{if(this._isHorizontal())return;if(i.y)return!0;if(!this.$scroll_ver||!this.$scroll_ver.offsetHeight)return!0;c=s/-40;void 0===s&&(c=t.detail);var h=this._oldTop,f=this.$scroll_ver.scrollTop+30*c;if(this.scrollVertically(f),this.$scroll_ver.scrollTop=f,h==this.$scroll_ver.scrollTop)return!0;this._oldTop=this.$scroll_ver.scrollTop}return t.preventDefault&&t.preventDefault(),t.cancelBubble=!0,!1}},n}(n(10));t.exports=s},function(t,e){t.exports=null},function(t,e,n){var i=n(2),r=n(0),a=function(t){"use strict";function e(e,n,i){var a=t.apply(this,arguments)||this;if(n.view){n.id&&(this.$id=r.uid());var o=r.copy(n);if(delete o.config,delete o.templates,this.$content=this.$factory.createView(n.view,this,o,this),!this.$content)return!1}return a.$name="viewCell",a}return i(e,t),e.prototype.destructor=function(){this.clear(),t.prototype.destructor.call(this)},e.prototype.clear=function(){if(this.$initialized=!1,this.$content){var e=this.$content.unload||this.$content.destructor;e&&e.call(this.$content)}t.prototype.clear.call(this)},e.prototype.scrollTo=function(e,n){this.$content&&this.$content.scrollTo?this.$content.scrollTo(e,n):t.prototype.scrollTo.call(this,e,n)},e.prototype._setContentSize=function(t,e){var n=this._getBorderSizes();if("number"==typeof t){var i=t+n.horizontal;this.$config.width=i}if("number"==typeof e){var r=e+n.vertical;this.$config.height=r}},e.prototype.setSize=function(e,n){if(t.prototype.setSize.call(this,e,n),!this.$preResize&&this.$content&&!this.$initialized){this.$initialized=!0;var i=this.$view.childNodes[0],r=this.$view.childNodes[1];r||(r=i),this.$content.init(r)}},e.prototype.setContentSize=function(){!this.$preResize&&this.$content&&this.$initialized&&this.$content.setSize(this.$lastSize.contentX,this.$lastSize.contentY)},e.prototype.getContentSize=function(){var e=t.prototype.getContentSize.call(this);if(this.$content&&this.$initialized){var n=this.$content.getSize();e.width=void 0===n.contentX?n.width:n.contentX,e.height=void 0===n.contentY?n.height:n.contentY}var i=this._getBorderSizes();return e.width+=i.horizontal,e.height+=i.vertical,e},e}(n(10));t.exports=a},function(t,e,n){var i=n(2),r=n(29),a=n(10),o=function(t){"use strict";function e(e,n,i){for(var r=t.apply(this,arguments)||this,a=0;at.x_end||e.left+e.widtht.y_end||e.top+e.height-1&&o.click?o.click():(a(n,!0),i=!0)}27==e&&(a(n,!1),i=!0)}return i?(t.preventDefault&&t.preventDefault(),!(t.cancelBubble=!0)):void 0}}function s(t){s.cover||(s.cover=document.createElement("div"),s.cover.onkeydown=o,s.cover.className="dhx_modal_cover",document.body.appendChild(s.cover)),s.cover.style.display=t?"inline-block":"none"}function l(e,n,i){var r=t._waiAria.messageButtonAttrString(e),a=n.toLowerCase().replace(/ /g,"_");return""}function c(){for(var t=[].slice.apply(arguments,[0]),e=0;e