Standardsafarbug und Feiertage Bug
This commit is contained in:
parent
77877fbab5
commit
77ab97f54a
|
|
@ -705,7 +705,9 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var ua = window.navigator.userAgent;
|
var ua = window.navigator.userAgent;
|
||||||
var isIE = /MSIE|Trident/.test(ua);
|
var isIE = /MSIE|Trident/.test(ua);
|
||||||
if ( isIE ) {
|
var isSafari = /Safari/.test(ua);
|
||||||
|
|
||||||
|
if ( isIE || isSafari) {
|
||||||
//IE specific code goes here
|
//IE specific code goes here
|
||||||
setInterval(function()
|
setInterval(function()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ def checkDefaultAbsenceReasons(sender, user, request, **kwargs):
|
||||||
|
|
||||||
today = date.today()
|
today = date.today()
|
||||||
|
|
||||||
# FREEDAYS LADEN
|
# FREEDAYS LADEN Zwei Jahre
|
||||||
if len(FreeDays.objects.filter(agency=user.profile.agency, year=today.year+2)) == 0:
|
if len(FreeDays.objects.filter(agency=user.profile.agency, year=today.year+2)) == 0:
|
||||||
tempdays = loadingFreeDays(user.profile.agency.plz, today.year+2)
|
tempdays = loadingFreeDays(user.profile.agency.plz, today.year+2)
|
||||||
if(tempdays != False):
|
if(tempdays != False):
|
||||||
|
|
@ -98,7 +98,32 @@ def checkDefaultAbsenceReasons(sender, user, request, **kwargs):
|
||||||
tempdate = tempdays[k]["datum"].split("-")
|
tempdate = tempdays[k]["datum"].split("-")
|
||||||
FreeDays(agency=user.profile.agency, name=k, day=datetime.datetime(int(tempdate[0]),int(tempdate[1]),int(tempdate[2])), year=date.today().year+2).save()
|
FreeDays(agency=user.profile.agency, name=k, day=datetime.datetime(int(tempdate[0]),int(tempdate[1]),int(tempdate[2])), year=date.today().year+2).save()
|
||||||
|
|
||||||
|
# FREEDAYS LADEN DIese Jahr
|
||||||
|
if len(FreeDays.objects.filter(agency=user.profile.agency, year=today.year+1)) == 0:
|
||||||
|
tempdays = loadingFreeDays(user.profile.agency.plz, today.year+1)
|
||||||
|
if(tempdays != False):
|
||||||
|
for k in tempdays.keys():
|
||||||
|
tempdate = tempdays[k]["datum"].split("-")
|
||||||
|
FreeDays(agency=user.profile.agency, name=k, day=datetime.datetime(int(tempdate[0]),int(tempdate[1]),int(tempdate[2])), year=date.today().year+1).save()
|
||||||
|
|
||||||
# CHECK FOR YEARS
|
# CHECK FOR YEARS
|
||||||
|
# FREEDAYS LADEN LETZTES JAHR
|
||||||
|
if len(FreeDays.objects.filter(agency=user.profile.agency, year=today.year-1)) == 0:
|
||||||
|
tempdays = loadingFreeDays(user.profile.agency.plz, today.year-1)
|
||||||
|
if(tempdays != False):
|
||||||
|
for k in tempdays.keys():
|
||||||
|
tempdate = tempdays[k]["datum"].split("-")
|
||||||
|
FreeDays(agency=user.profile.agency, name=k, day=datetime.datetime(int(tempdate[0]),int(tempdate[1]),int(tempdate[2])), year=date.today().year-1).save()
|
||||||
|
|
||||||
|
# FREEDAYS LADEN
|
||||||
|
if len(FreeDays.objects.filter(agency=user.profile.agency, year=today.year)) == 0:
|
||||||
|
tempdays = loadingFreeDays(user.profile.agency.plz, today.year)
|
||||||
|
if(tempdays != False):
|
||||||
|
for k in tempdays.keys():
|
||||||
|
tempdate = tempdays[k]["datum"].split("-")
|
||||||
|
FreeDays(agency=user.profile.agency, name=k, day=datetime.datetime(int(tempdate[0]),int(tempdate[1]),int(tempdate[2])), year=date.today().year).save()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# NO YEARS FOUND
|
# NO YEARS FOUND
|
||||||
if len(UserYearAbsenceInfo.objects.filter(agency=user.profile.agency)) == 0:
|
if len(UserYearAbsenceInfo.objects.filter(agency=user.profile.agency)) == 0:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue