From 4f0e41c4e279145ded9caf80e729fae95c82f940 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Thu, 7 Jan 2021 20:54:47 +0100 Subject: [PATCH] delete unused calendar js, css and images --- public/calendar.js | 336 --------------------- public/css/calendar.css | 95 ------ public/css/default.css | 1 - public/images/calendar/cal.gif | Bin 127 -> 0 bytes public/images/calendar/next_mon.gif | Bin 60 -> 0 bytes public/images/calendar/next_year.gif | Bin 70 -> 0 bytes public/images/calendar/no_cal.gif | Bin 139 -> 0 bytes public/images/calendar/pixel.gif | Bin 67 -> 0 bytes public/images/calendar/prev_mon.gif | Bin 59 -> 0 bytes public/images/calendar/prev_year.gif | Bin 69 -> 0 bytes public/images/calendar/shade_bl.png | Bin 185 -> 0 bytes public/images/calendar/shade_bm.png | Bin 164 -> 0 bytes public/images/calendar/shade_br.png | Bin 204 -> 0 bytes public/images/calendar/shade_mr.png | Bin 155 -> 0 bytes public/images/calendar/shade_tr.png | Bin 200 -> 0 bytes public/users/calendar.js | 336 --------------------- public/users/css/calendar.css | 95 ------ public/users/images/calendar/cal.gif | Bin 127 -> 0 bytes public/users/images/calendar/next_mon.gif | Bin 60 -> 0 bytes public/users/images/calendar/next_year.gif | Bin 70 -> 0 bytes public/users/images/calendar/no_cal.gif | Bin 139 -> 0 bytes public/users/images/calendar/pixel.gif | Bin 67 -> 0 bytes public/users/images/calendar/prev_mon.gif | Bin 59 -> 0 bytes public/users/images/calendar/prev_year.gif | Bin 69 -> 0 bytes public/users/images/calendar/shade_bl.png | Bin 185 -> 0 bytes public/users/images/calendar/shade_bm.png | Bin 164 -> 0 bytes public/users/images/calendar/shade_br.png | Bin 204 -> 0 bytes public/users/images/calendar/shade_mr.png | Bin 155 -> 0 bytes public/users/images/calendar/shade_tr.png | Bin 200 -> 0 bytes 29 files changed, 863 deletions(-) delete mode 100644 public/calendar.js delete mode 100644 public/css/calendar.css delete mode 100644 public/images/calendar/cal.gif delete mode 100644 public/images/calendar/next_mon.gif delete mode 100644 public/images/calendar/next_year.gif delete mode 100644 public/images/calendar/no_cal.gif delete mode 100644 public/images/calendar/pixel.gif delete mode 100644 public/images/calendar/prev_mon.gif delete mode 100644 public/images/calendar/prev_year.gif delete mode 100644 public/images/calendar/shade_bl.png delete mode 100644 public/images/calendar/shade_bm.png delete mode 100644 public/images/calendar/shade_br.png delete mode 100644 public/images/calendar/shade_mr.png delete mode 100644 public/images/calendar/shade_tr.png delete mode 100644 public/users/calendar.js delete mode 100644 public/users/css/calendar.css delete mode 100644 public/users/images/calendar/cal.gif delete mode 100644 public/users/images/calendar/next_mon.gif delete mode 100644 public/users/images/calendar/next_year.gif delete mode 100644 public/users/images/calendar/no_cal.gif delete mode 100644 public/users/images/calendar/pixel.gif delete mode 100644 public/users/images/calendar/prev_mon.gif delete mode 100644 public/users/images/calendar/prev_year.gif delete mode 100644 public/users/images/calendar/shade_bl.png delete mode 100644 public/users/images/calendar/shade_bm.png delete mode 100644 public/users/images/calendar/shade_br.png delete mode 100644 public/users/images/calendar/shade_mr.png delete mode 100644 public/users/images/calendar/shade_tr.png diff --git a/public/calendar.js b/public/calendar.js deleted file mode 100644 index 2dfc4513..00000000 --- a/public/calendar.js +++ /dev/null @@ -1,336 +0,0 @@ -// Tigra Calendar v4.0.2 (12-01-2009) European (dd.mm.yyyy) -// http://www.softcomplex.com/products/tigra_calendar/ -// Public Domain Software... You're welcome. - -// default settins -var A_TCALDEF = { - 'months' : ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], - 'weekdays' : ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], - 'yearscroll': true, // show year scroller - 'weekstart': 1, // first day of week: 0-Su or 1-Mo - 'centyear' : 70, // 2 digit years less than 'centyear' are in 20xx, othewise in 19xx. - 'imgpath' : 'images/calendar/' // directory with calendar images -} -// date parsing function -function f_tcalParseDate (s_date) { - - var re_date = /^\s*(\d{1,2})\.(\d{1,2})\.(\d{2,4})\s*$/; - if (!re_date.exec(s_date)) - return alert ("Invalid date: '" + s_date + "'.\nAccepted format is dd.mm.yyyy.") - var n_day = Number(RegExp.$1), - n_month = Number(RegExp.$2), - n_year = Number(RegExp.$3); - - if (n_year < 100) - n_year += (n_year < this.a_tpl.centyear ? 2000 : 1900); - if (n_month < 1 || n_month > 12) - return alert ("Invalid month value: '" + n_month + "'.\nAllowed range is 01-12."); - var d_numdays = new Date(n_year, n_month, 0); - if (n_day > d_numdays.getDate()) - return alert("Invalid day of month value: '" + n_day + "'.\nAllowed range for selected month is 01 - " + d_numdays.getDate() + "."); - - return new Date (n_year, n_month - 1, n_day); -} -// date generating function -function f_tcalGenerDate (d_date) { - return ( - (d_date.getDate() < 10 ? '0' : '') + d_date.getDate() + "." - + (d_date.getMonth() < 9 ? '0' : '') + (d_date.getMonth() + 1) + "." - + d_date.getFullYear() - ); -} - -// implementation -function tcal (a_cfg, a_tpl) { - - // apply default template if not specified - if (!a_tpl) - a_tpl = A_TCALDEF; - - // register in global collections - if (!window.A_TCALS) - window.A_TCALS = []; - if (!window.A_TCALSIDX) - window.A_TCALSIDX = []; - - this.s_id = a_cfg.id ? a_cfg.id : A_TCALS.length; - window.A_TCALS[this.s_id] = this; - window.A_TCALSIDX[window.A_TCALSIDX.length] = this; - - // assign methods - this.f_show = f_tcalShow; - this.f_hide = f_tcalHide; - this.f_toggle = f_tcalToggle; - this.f_update = f_tcalUpdate; - this.f_relDate = f_tcalRelDate; - this.f_parseDate = f_tcalParseDate; - this.f_generDate = f_tcalGenerDate; - - // create calendar icon - this.s_iconId = 'tcalico_' + this.s_id; - this.e_icon = f_getElement(this.s_iconId); - if (!this.e_icon) { - document.write('Open Calendar'); - this.e_icon = f_getElement(this.s_iconId); - } - // save received parameters - this.a_cfg = a_cfg; - this.a_tpl = a_tpl; -} - -function f_tcalShow (d_date) { - - // find input field - if (!this.a_cfg.controlname) - throw("TC: control name is not specified"); - if (this.a_cfg.formname) { - var e_form = document.forms[this.a_cfg.formname]; - if (!e_form) - throw("TC: form '" + this.a_cfg.formname + "' can not be found"); - this.e_input = e_form.elements[this.a_cfg.controlname]; - } - else - this.e_input = f_getElement(this.a_cfg.controlname); - - if (!this.e_input || !this.e_input.tagName || this.e_input.tagName != 'INPUT') - throw("TC: element '" + this.a_cfg.controlname + "' does not exist in " - + (this.a_cfg.formname ? "form '" + this.a_cfg.controlname + "'" : 'this document')); - - // dynamically create HTML elements if needed - this.e_div = f_getElement('tcal'); - if (!this.e_div) { - this.e_div = document.createElement("DIV"); - this.e_div.id = 'tcal'; - document.body.appendChild(this.e_div); - } - this.e_shade = f_getElement('tcalShade'); - if (!this.e_shade) { - this.e_shade = document.createElement("DIV"); - this.e_shade.id = 'tcalShade'; - document.body.appendChild(this.e_shade); - } - this.e_iframe = f_getElement('tcalIF') - if (b_ieFix && !this.e_iframe) { - this.e_iframe = document.createElement("IFRAME"); - this.e_iframe.style.filter = 'alpha(opacity=0)'; - this.e_iframe.id = 'tcalIF'; - this.e_iframe.src = this.a_tpl.imgpath + 'pixel.gif'; - document.body.appendChild(this.e_iframe); - } - - // hide all calendars - f_tcalHideAll(); - - // generate HTML and show calendar - this.e_icon = f_getElement(this.s_iconId); - if (!this.f_update()) - return; - - this.e_div.style.visibility = 'visible'; - this.e_shade.style.visibility = 'visible'; - if (this.e_iframe) - this.e_iframe.style.visibility = 'visible'; - - // change icon and status - this.e_icon.src = this.a_tpl.imgpath + 'no_cal.gif'; - this.e_icon.title = 'Close Calendar'; - this.b_visible = true; -} - -function f_tcalHide (n_date) { - if (n_date) - this.e_input.value = this.f_generDate(new Date(n_date)); - - // no action if not visible - if (!this.b_visible) - return; - - // hide elements - if (this.e_iframe) - this.e_iframe.style.visibility = 'hidden'; - if (this.e_shade) - this.e_shade.style.visibility = 'hidden'; - this.e_div.style.visibility = 'hidden'; - - // change icon and status - this.e_icon = f_getElement(this.s_iconId); - this.e_icon.src = this.a_tpl.imgpath + 'cal.gif'; - this.e_icon.title = 'Open Calendar'; - this.b_visible = false; -} - -function f_tcalToggle () { - return this.b_visible ? this.f_hide() : this.f_show(); -} - -function f_tcalUpdate (d_date) { - - var d_today = this.a_cfg.today ? this.f_parseDate(this.a_cfg.today) : f_tcalResetTime(new Date()); - var d_selected = this.e_input.value == '' - ? (this.a_cfg.selected ? this.f_parseDate(this.a_cfg.selected) : d_today) - : this.f_parseDate(this.e_input.value); - - // figure out date to display - if (!d_date) - // selected by default - d_date = d_selected; - else if (typeof(d_date) == 'number') - // get from number - d_date = f_tcalResetTime(new Date(d_date)); - else if (typeof(d_date) == 'string') - // parse from string - this.f_parseDate(d_date); - - if (!d_date) return false; - - // first date to display - var d_firstday = new Date(d_date); - d_firstday.setDate(1); - d_firstday.setDate(1 - (7 + d_firstday.getDay() - this.a_tpl.weekstart) % 7); - - var a_class, s_html = '' - + (this.a_tpl.yearscroll ? '' : '') - + '' - + (this.a_tpl.yearscroll ? '' : '') - + '
' - + this.a_tpl.months[d_date.getMonth()] + ' ' + d_date.getFullYear() - + '
'; - - // print weekdays titles - for (var i = 0; i < 7; i++) - s_html += ''; - s_html += '' ; - - // print calendar table - var n_date, n_month, d_current = new Date(d_firstday); - while (d_current.getMonth() == d_date.getMonth() || - d_current.getMonth() == d_firstday.getMonth()) { - - // print row heder - s_html +=''; - for (var n_wday = 0; n_wday < 7; n_wday++) { - - a_class = []; - n_date = d_current.getDate(); - n_month = d_current.getMonth(); - - // other month - if (d_current.getMonth() != d_date.getMonth()) - a_class[a_class.length] = 'othermonth'; - // weekend - if (d_current.getDay() == 0 || d_current.getDay() == 6) - a_class[a_class.length] = 'weekend'; - // today - if (d_current.valueOf() == d_today.valueOf()) - a_class[a_class.length] = 'today'; - // selected - if (d_current.valueOf() == d_selected.valueOf()) - a_class[a_class.length] = 'selected'; - - s_html += '' - - d_current.setDate(++n_date); - while (d_current.getDate() != n_date && d_current.getMonth() == n_month) { - alert(n_date + "\n" + d_current + "\n" + new Date()); - d_current.setHours(d_current.getHours + 1); - d_current = f_tcalResetTime(d_current); - } - } - // print row footer - s_html +=''; - } - s_html +='
' + this.a_tpl.weekdays[(this.a_tpl.weekstart + i) % 7] + '
' : '>') + n_date + '
'; - - // update HTML, positions and sizes - this.e_div.innerHTML = s_html; - - var n_width = this.e_div.offsetWidth; - var n_height = this.e_div.offsetHeight; - var n_top = f_getPosition (this.e_icon, 'Top') + this.e_icon.offsetHeight; - var n_left = f_getPosition (this.e_icon, 'Left') - n_width + this.e_icon.offsetWidth; - if (n_left < 0) n_left = 0; - - this.e_div.style.left = n_left + 'px'; - this.e_div.style.top = n_top + 'px'; - - this.e_shade.style.width = (n_width + 8) + 'px'; - this.e_shade.style.left = (n_left - 1) + 'px'; - this.e_shade.style.top = (n_top - 1) + 'px'; - this.e_shade.innerHTML = b_ieFix - ? '
' - : '
'; - - if (this.e_iframe) { - this.e_iframe.style.left = n_left + 'px'; - this.e_iframe.style.top = n_top + 'px'; - this.e_iframe.style.width = (n_width + 6) + 'px'; - this.e_iframe.style.height = (n_height + 6) +'px'; - } - return true; -} - -function f_getPosition (e_elemRef, s_coord) { - var n_pos = 0, n_offset, - e_elem = e_elemRef; - - while (e_elem) { - n_offset = e_elem["offset" + s_coord]; - n_pos += n_offset; - e_elem = e_elem.offsetParent; - } - // margin correction in some browsers - if (b_ieMac) - n_pos += parseInt(document.body[s_coord.toLowerCase() + 'Margin']); - else if (b_safari) - n_pos -= n_offset; - - e_elem = e_elemRef; - while (e_elem != document.body) { - n_offset = e_elem["scroll" + s_coord]; - if (n_offset && e_elem.style.overflow == 'scroll') - n_pos -= n_offset; - e_elem = e_elem.parentNode; - } - return n_pos; -} - -function f_tcalRelDate (d_date, d_diff, s_units) { - var s_units = (s_units == 'y' ? 'FullYear' : 'Month'); - var d_result = new Date(d_date); - d_result['set' + s_units](d_date['get' + s_units]() + d_diff); - if (d_result.getDate() != d_date.getDate()) - d_result.setDate(0); - return ' onclick="A_TCALS[\'' + this.s_id + '\'].f_update(' + d_result.valueOf() + ')"'; -} - -function f_tcalHideAll () { - for (var i = 0; i < window.A_TCALSIDX.length; i++) - window.A_TCALSIDX[i].f_hide(); -} - -function f_tcalResetTime (d_date) { - d_date.setHours(0); - d_date.setMinutes(0); - d_date.setSeconds(0); - d_date.setMilliseconds(0); - return d_date; -} - -f_getElement = document.all ? - function (s_id) { return document.all[s_id] } : - function (s_id) { return document.getElementById(s_id) }; - -if (document.addEventListener) - window.addEventListener('scroll', f_tcalHideAll, false); -if (window.attachEvent) - window.attachEvent('onscroll', f_tcalHideAll); - -// global variables -var s_userAgent = navigator.userAgent.toLowerCase(), - re_webkit = /WebKit\/(\d+)/i; -var b_mac = s_userAgent.indexOf('mac') != -1, - b_ie5 = s_userAgent.indexOf('msie 5') != -1, - b_ie6 = s_userAgent.indexOf('msie 6') != -1 && s_userAgent.indexOf('opera') == -1; -var b_ieFix = b_ie5 || b_ie6, - b_ieMac = b_mac && b_ie5, - b_safari = b_mac && re_webkit.exec(s_userAgent) && Number(RegExp.$1) < 500; diff --git a/public/css/calendar.css b/public/css/calendar.css deleted file mode 100644 index a3ddcae5..00000000 --- a/public/css/calendar.css +++ /dev/null @@ -1,95 +0,0 @@ -/* calendar icon */ -img.tcalIcon { - cursor: pointer; - margin-left: 1px; - vertical-align: middle; -} -/* calendar container element */ -div#tcal { - position: absolute; - visibility: hidden; - z-index: 100; - width: 158px; - padding: 2px 0 0 0; -} -/* all tables in calendar */ -div#tcal table { - width: 100%; - border: 1px solid silver; - border-collapse: collapse; - background-color: white; -} -/* navigation table */ -div#tcal table.ctrl { - border-bottom: 0; -} -/* navigation buttons */ -div#tcal table.ctrl td { - width: 15px; - height: 20px; -} -/* month year header */ -div#tcal table.ctrl th { - background-color: white; - color: black; - border: 0; -} -/* week days header */ -div#tcal th { - border: 1px solid silver; - border-collapse: collapse; - text-align: center; - padding: 3px 0; - font-family: tahoma, verdana, arial; - font-size: 10px; - background-color: gray; - color: white; -} -/* date cells */ -div#tcal td { - border: 0; - border-collapse: collapse; - text-align: center; - padding: 2px 0; - font-family: tahoma, verdana, arial; - font-size: 11px; - width: 22px; - cursor: pointer; -} -/* date highlight - in case of conflicting settings order here determines the priority from least to most important */ -div#tcal td.othermonth { - color: silver; -} -div#tcal td.weekend { - background-color: #ACD6F5; -} -div#tcal td.today { - border: 1px solid red; -} -div#tcal td.selected { - background-color: #FFB3BE; -} -/* iframe element used to suppress windowed controls in IE5/6 */ -iframe#tcalIF { - position: absolute; - visibility: hidden; - z-index: 98; - border: 0; -} -/* transparent shadow */ -div#tcalShade { - position: absolute; - visibility: hidden; - z-index: 99; -} -div#tcalShade table { - border: 0; - border-collapse: collapse; - width: 100%; -} -div#tcalShade table td { - border: 0; - border-collapse: collapse; - padding: 0; -} diff --git a/public/css/default.css b/public/css/default.css index 248e7874..525b0797 100644 --- a/public/css/default.css +++ b/public/css/default.css @@ -1,4 +1,3 @@ -@import url(calendar.css); body { background: #ffffff; color: #000000; diff --git a/public/images/calendar/cal.gif b/public/images/calendar/cal.gif deleted file mode 100644 index 8526cf5d19a915aa8073cf344873c4505491970d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 127 zcmZ?wbhEHb6krfwSj51v)Yr?)cd3`J*V1K6uU)?O9}E~67!-f9FfuT(G3WrDe9t*lU6Cf*}@W|K}Ia7jqK KTIkNmU=09O91^+! diff --git a/public/images/calendar/next_year.gif b/public/images/calendar/next_year.gif deleted file mode 100644 index b66f2888bc2596174993d91dc1cdf758408096f9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 70 zcmZ?wbhEHbU6Ch;S7Ws45~z9W1k UpsZP>F>7UEheb_$Bm;vr07*C)4*&oF diff --git a/public/images/calendar/no_cal.gif b/public/images/calendar/no_cal.gif deleted file mode 100644 index adc58e2a840ee4b95febddf7e9dcb0be27ea1ede..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 139 zcmZ?wbhEHb6krfwSj51v)Yr?)cd3`J*V1K6uU)?O9}E~67!-f9FfuT(G3WrDe9t*lKewZczmuz#XON+u0n@#=42nNl7#SFt7<7PY Nfa*bPrVvI3YXHjL5YGSr diff --git a/public/images/calendar/prev_mon.gif b/public/images/calendar/prev_mon.gif deleted file mode 100644 index 12ce7ff5015454f8a1761372e4dd41247b26120a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 59 zcmZ?wbhEHbWMSZ7n8?7e^zh9^hi-bbZT|oNzv5381`yBz5g>U6CZ0KkMhb^yXLV({ JBy%%Z0{}SV5nliR diff --git a/public/images/calendar/prev_year.gif b/public/images/calendar/prev_year.gif deleted file mode 100644 index c726b0e45b97072d3e5c177d41f88a6a83a4f1d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 69 zcmZ?wbhEHbU6Cb2n*<&zGaV{7rh Tks!G(S^BTf_QvF)OpxloL#+zDP(P>^45XWtP=!?dlIpXJtN% guUjklpH+fk-Fm*{6~(1ffW|U-y85}Sb4q9e0RIF*eEzopr03c~D>;M1& diff --git a/public/images/calendar/shade_br.png b/public/images/calendar/shade_br.png deleted file mode 100644 index ce8a2fad28005dadd783895d07d46462ed38dd9f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 204 zcmeAS@N?(olHy`uVBq!ia0vp^>>$j+1|*LJgBdAc};RNV6EbL49<;9%*j_{bPn zJLUg>XJP(XVq5ig_$thlo58wDX;U-rngqtpf3B+Ah?*ok`1tI=Q%=3McOo64?5=!! z|KYH9nHm diff --git a/public/images/calendar/shade_mr.png b/public/images/calendar/shade_mr.png deleted file mode 100644 index 4594bc4e22e1ef12bc1b19e62ff1925d0c8678cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 155 zcmeAS@N?(olHy`uVBq!ia0vp^>_E)H!3HEvS)PI@mUKs7M+S!VC(K#9UIO`&C9V-A z!TD(=<%vb942~)JNvR5+xryniL8*x;m4zo$ZGeh&JzX3_DsCmEB_wb#C0Qznu_pN` yq$M^q{P%HalI)tfV1{7VL76!T7d)9*BpBj~8P_Wd<=g~nWbkzLb6Mw<&;$TWdMeKV diff --git a/public/images/calendar/shade_tr.png b/public/images/calendar/shade_tr.png deleted file mode 100644 index 2e598c95b669cc78bb47684e367fb2f8bda84a23..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 200 zcmeAS@N?(olHy`uVBq!ia0vp^>>$j+1|*LJg4r;Bl6g;oxHa zzvsWI>oY6iw+mX2d)@coHjaL?-Y|aZET?M%c8m(|Ct1IIqNw}p9Dl$QNzRUl{v`_^ uI_4FrYVJz$U8Jh8Q#J6>ul%Fh2N;s96xA!ujiv%^VeoYIb6Mw<&;$Uv!$NBS diff --git a/public/users/calendar.js b/public/users/calendar.js deleted file mode 100644 index 2dfc4513..00000000 --- a/public/users/calendar.js +++ /dev/null @@ -1,336 +0,0 @@ -// Tigra Calendar v4.0.2 (12-01-2009) European (dd.mm.yyyy) -// http://www.softcomplex.com/products/tigra_calendar/ -// Public Domain Software... You're welcome. - -// default settins -var A_TCALDEF = { - 'months' : ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], - 'weekdays' : ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], - 'yearscroll': true, // show year scroller - 'weekstart': 1, // first day of week: 0-Su or 1-Mo - 'centyear' : 70, // 2 digit years less than 'centyear' are in 20xx, othewise in 19xx. - 'imgpath' : 'images/calendar/' // directory with calendar images -} -// date parsing function -function f_tcalParseDate (s_date) { - - var re_date = /^\s*(\d{1,2})\.(\d{1,2})\.(\d{2,4})\s*$/; - if (!re_date.exec(s_date)) - return alert ("Invalid date: '" + s_date + "'.\nAccepted format is dd.mm.yyyy.") - var n_day = Number(RegExp.$1), - n_month = Number(RegExp.$2), - n_year = Number(RegExp.$3); - - if (n_year < 100) - n_year += (n_year < this.a_tpl.centyear ? 2000 : 1900); - if (n_month < 1 || n_month > 12) - return alert ("Invalid month value: '" + n_month + "'.\nAllowed range is 01-12."); - var d_numdays = new Date(n_year, n_month, 0); - if (n_day > d_numdays.getDate()) - return alert("Invalid day of month value: '" + n_day + "'.\nAllowed range for selected month is 01 - " + d_numdays.getDate() + "."); - - return new Date (n_year, n_month - 1, n_day); -} -// date generating function -function f_tcalGenerDate (d_date) { - return ( - (d_date.getDate() < 10 ? '0' : '') + d_date.getDate() + "." - + (d_date.getMonth() < 9 ? '0' : '') + (d_date.getMonth() + 1) + "." - + d_date.getFullYear() - ); -} - -// implementation -function tcal (a_cfg, a_tpl) { - - // apply default template if not specified - if (!a_tpl) - a_tpl = A_TCALDEF; - - // register in global collections - if (!window.A_TCALS) - window.A_TCALS = []; - if (!window.A_TCALSIDX) - window.A_TCALSIDX = []; - - this.s_id = a_cfg.id ? a_cfg.id : A_TCALS.length; - window.A_TCALS[this.s_id] = this; - window.A_TCALSIDX[window.A_TCALSIDX.length] = this; - - // assign methods - this.f_show = f_tcalShow; - this.f_hide = f_tcalHide; - this.f_toggle = f_tcalToggle; - this.f_update = f_tcalUpdate; - this.f_relDate = f_tcalRelDate; - this.f_parseDate = f_tcalParseDate; - this.f_generDate = f_tcalGenerDate; - - // create calendar icon - this.s_iconId = 'tcalico_' + this.s_id; - this.e_icon = f_getElement(this.s_iconId); - if (!this.e_icon) { - document.write('Open Calendar'); - this.e_icon = f_getElement(this.s_iconId); - } - // save received parameters - this.a_cfg = a_cfg; - this.a_tpl = a_tpl; -} - -function f_tcalShow (d_date) { - - // find input field - if (!this.a_cfg.controlname) - throw("TC: control name is not specified"); - if (this.a_cfg.formname) { - var e_form = document.forms[this.a_cfg.formname]; - if (!e_form) - throw("TC: form '" + this.a_cfg.formname + "' can not be found"); - this.e_input = e_form.elements[this.a_cfg.controlname]; - } - else - this.e_input = f_getElement(this.a_cfg.controlname); - - if (!this.e_input || !this.e_input.tagName || this.e_input.tagName != 'INPUT') - throw("TC: element '" + this.a_cfg.controlname + "' does not exist in " - + (this.a_cfg.formname ? "form '" + this.a_cfg.controlname + "'" : 'this document')); - - // dynamically create HTML elements if needed - this.e_div = f_getElement('tcal'); - if (!this.e_div) { - this.e_div = document.createElement("DIV"); - this.e_div.id = 'tcal'; - document.body.appendChild(this.e_div); - } - this.e_shade = f_getElement('tcalShade'); - if (!this.e_shade) { - this.e_shade = document.createElement("DIV"); - this.e_shade.id = 'tcalShade'; - document.body.appendChild(this.e_shade); - } - this.e_iframe = f_getElement('tcalIF') - if (b_ieFix && !this.e_iframe) { - this.e_iframe = document.createElement("IFRAME"); - this.e_iframe.style.filter = 'alpha(opacity=0)'; - this.e_iframe.id = 'tcalIF'; - this.e_iframe.src = this.a_tpl.imgpath + 'pixel.gif'; - document.body.appendChild(this.e_iframe); - } - - // hide all calendars - f_tcalHideAll(); - - // generate HTML and show calendar - this.e_icon = f_getElement(this.s_iconId); - if (!this.f_update()) - return; - - this.e_div.style.visibility = 'visible'; - this.e_shade.style.visibility = 'visible'; - if (this.e_iframe) - this.e_iframe.style.visibility = 'visible'; - - // change icon and status - this.e_icon.src = this.a_tpl.imgpath + 'no_cal.gif'; - this.e_icon.title = 'Close Calendar'; - this.b_visible = true; -} - -function f_tcalHide (n_date) { - if (n_date) - this.e_input.value = this.f_generDate(new Date(n_date)); - - // no action if not visible - if (!this.b_visible) - return; - - // hide elements - if (this.e_iframe) - this.e_iframe.style.visibility = 'hidden'; - if (this.e_shade) - this.e_shade.style.visibility = 'hidden'; - this.e_div.style.visibility = 'hidden'; - - // change icon and status - this.e_icon = f_getElement(this.s_iconId); - this.e_icon.src = this.a_tpl.imgpath + 'cal.gif'; - this.e_icon.title = 'Open Calendar'; - this.b_visible = false; -} - -function f_tcalToggle () { - return this.b_visible ? this.f_hide() : this.f_show(); -} - -function f_tcalUpdate (d_date) { - - var d_today = this.a_cfg.today ? this.f_parseDate(this.a_cfg.today) : f_tcalResetTime(new Date()); - var d_selected = this.e_input.value == '' - ? (this.a_cfg.selected ? this.f_parseDate(this.a_cfg.selected) : d_today) - : this.f_parseDate(this.e_input.value); - - // figure out date to display - if (!d_date) - // selected by default - d_date = d_selected; - else if (typeof(d_date) == 'number') - // get from number - d_date = f_tcalResetTime(new Date(d_date)); - else if (typeof(d_date) == 'string') - // parse from string - this.f_parseDate(d_date); - - if (!d_date) return false; - - // first date to display - var d_firstday = new Date(d_date); - d_firstday.setDate(1); - d_firstday.setDate(1 - (7 + d_firstday.getDay() - this.a_tpl.weekstart) % 7); - - var a_class, s_html = '' - + (this.a_tpl.yearscroll ? '' : '') - + '' - + (this.a_tpl.yearscroll ? '' : '') - + '
' - + this.a_tpl.months[d_date.getMonth()] + ' ' + d_date.getFullYear() - + '
'; - - // print weekdays titles - for (var i = 0; i < 7; i++) - s_html += ''; - s_html += '' ; - - // print calendar table - var n_date, n_month, d_current = new Date(d_firstday); - while (d_current.getMonth() == d_date.getMonth() || - d_current.getMonth() == d_firstday.getMonth()) { - - // print row heder - s_html +=''; - for (var n_wday = 0; n_wday < 7; n_wday++) { - - a_class = []; - n_date = d_current.getDate(); - n_month = d_current.getMonth(); - - // other month - if (d_current.getMonth() != d_date.getMonth()) - a_class[a_class.length] = 'othermonth'; - // weekend - if (d_current.getDay() == 0 || d_current.getDay() == 6) - a_class[a_class.length] = 'weekend'; - // today - if (d_current.valueOf() == d_today.valueOf()) - a_class[a_class.length] = 'today'; - // selected - if (d_current.valueOf() == d_selected.valueOf()) - a_class[a_class.length] = 'selected'; - - s_html += '' - - d_current.setDate(++n_date); - while (d_current.getDate() != n_date && d_current.getMonth() == n_month) { - alert(n_date + "\n" + d_current + "\n" + new Date()); - d_current.setHours(d_current.getHours + 1); - d_current = f_tcalResetTime(d_current); - } - } - // print row footer - s_html +=''; - } - s_html +='
' + this.a_tpl.weekdays[(this.a_tpl.weekstart + i) % 7] + '
' : '>') + n_date + '
'; - - // update HTML, positions and sizes - this.e_div.innerHTML = s_html; - - var n_width = this.e_div.offsetWidth; - var n_height = this.e_div.offsetHeight; - var n_top = f_getPosition (this.e_icon, 'Top') + this.e_icon.offsetHeight; - var n_left = f_getPosition (this.e_icon, 'Left') - n_width + this.e_icon.offsetWidth; - if (n_left < 0) n_left = 0; - - this.e_div.style.left = n_left + 'px'; - this.e_div.style.top = n_top + 'px'; - - this.e_shade.style.width = (n_width + 8) + 'px'; - this.e_shade.style.left = (n_left - 1) + 'px'; - this.e_shade.style.top = (n_top - 1) + 'px'; - this.e_shade.innerHTML = b_ieFix - ? '
' - : '
'; - - if (this.e_iframe) { - this.e_iframe.style.left = n_left + 'px'; - this.e_iframe.style.top = n_top + 'px'; - this.e_iframe.style.width = (n_width + 6) + 'px'; - this.e_iframe.style.height = (n_height + 6) +'px'; - } - return true; -} - -function f_getPosition (e_elemRef, s_coord) { - var n_pos = 0, n_offset, - e_elem = e_elemRef; - - while (e_elem) { - n_offset = e_elem["offset" + s_coord]; - n_pos += n_offset; - e_elem = e_elem.offsetParent; - } - // margin correction in some browsers - if (b_ieMac) - n_pos += parseInt(document.body[s_coord.toLowerCase() + 'Margin']); - else if (b_safari) - n_pos -= n_offset; - - e_elem = e_elemRef; - while (e_elem != document.body) { - n_offset = e_elem["scroll" + s_coord]; - if (n_offset && e_elem.style.overflow == 'scroll') - n_pos -= n_offset; - e_elem = e_elem.parentNode; - } - return n_pos; -} - -function f_tcalRelDate (d_date, d_diff, s_units) { - var s_units = (s_units == 'y' ? 'FullYear' : 'Month'); - var d_result = new Date(d_date); - d_result['set' + s_units](d_date['get' + s_units]() + d_diff); - if (d_result.getDate() != d_date.getDate()) - d_result.setDate(0); - return ' onclick="A_TCALS[\'' + this.s_id + '\'].f_update(' + d_result.valueOf() + ')"'; -} - -function f_tcalHideAll () { - for (var i = 0; i < window.A_TCALSIDX.length; i++) - window.A_TCALSIDX[i].f_hide(); -} - -function f_tcalResetTime (d_date) { - d_date.setHours(0); - d_date.setMinutes(0); - d_date.setSeconds(0); - d_date.setMilliseconds(0); - return d_date; -} - -f_getElement = document.all ? - function (s_id) { return document.all[s_id] } : - function (s_id) { return document.getElementById(s_id) }; - -if (document.addEventListener) - window.addEventListener('scroll', f_tcalHideAll, false); -if (window.attachEvent) - window.attachEvent('onscroll', f_tcalHideAll); - -// global variables -var s_userAgent = navigator.userAgent.toLowerCase(), - re_webkit = /WebKit\/(\d+)/i; -var b_mac = s_userAgent.indexOf('mac') != -1, - b_ie5 = s_userAgent.indexOf('msie 5') != -1, - b_ie6 = s_userAgent.indexOf('msie 6') != -1 && s_userAgent.indexOf('opera') == -1; -var b_ieFix = b_ie5 || b_ie6, - b_ieMac = b_mac && b_ie5, - b_safari = b_mac && re_webkit.exec(s_userAgent) && Number(RegExp.$1) < 500; diff --git a/public/users/css/calendar.css b/public/users/css/calendar.css deleted file mode 100644 index a3ddcae5..00000000 --- a/public/users/css/calendar.css +++ /dev/null @@ -1,95 +0,0 @@ -/* calendar icon */ -img.tcalIcon { - cursor: pointer; - margin-left: 1px; - vertical-align: middle; -} -/* calendar container element */ -div#tcal { - position: absolute; - visibility: hidden; - z-index: 100; - width: 158px; - padding: 2px 0 0 0; -} -/* all tables in calendar */ -div#tcal table { - width: 100%; - border: 1px solid silver; - border-collapse: collapse; - background-color: white; -} -/* navigation table */ -div#tcal table.ctrl { - border-bottom: 0; -} -/* navigation buttons */ -div#tcal table.ctrl td { - width: 15px; - height: 20px; -} -/* month year header */ -div#tcal table.ctrl th { - background-color: white; - color: black; - border: 0; -} -/* week days header */ -div#tcal th { - border: 1px solid silver; - border-collapse: collapse; - text-align: center; - padding: 3px 0; - font-family: tahoma, verdana, arial; - font-size: 10px; - background-color: gray; - color: white; -} -/* date cells */ -div#tcal td { - border: 0; - border-collapse: collapse; - text-align: center; - padding: 2px 0; - font-family: tahoma, verdana, arial; - font-size: 11px; - width: 22px; - cursor: pointer; -} -/* date highlight - in case of conflicting settings order here determines the priority from least to most important */ -div#tcal td.othermonth { - color: silver; -} -div#tcal td.weekend { - background-color: #ACD6F5; -} -div#tcal td.today { - border: 1px solid red; -} -div#tcal td.selected { - background-color: #FFB3BE; -} -/* iframe element used to suppress windowed controls in IE5/6 */ -iframe#tcalIF { - position: absolute; - visibility: hidden; - z-index: 98; - border: 0; -} -/* transparent shadow */ -div#tcalShade { - position: absolute; - visibility: hidden; - z-index: 99; -} -div#tcalShade table { - border: 0; - border-collapse: collapse; - width: 100%; -} -div#tcalShade table td { - border: 0; - border-collapse: collapse; - padding: 0; -} diff --git a/public/users/images/calendar/cal.gif b/public/users/images/calendar/cal.gif deleted file mode 100644 index 8526cf5d19a915aa8073cf344873c4505491970d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 127 zcmZ?wbhEHb6krfwSj51v)Yr?)cd3`J*V1K6uU)?O9}E~67!-f9FfuT(G3WrDe9t*lU6Cf*}@W|K}Ia7jqK KTIkNmU=09O91^+! diff --git a/public/users/images/calendar/next_year.gif b/public/users/images/calendar/next_year.gif deleted file mode 100644 index b66f2888bc2596174993d91dc1cdf758408096f9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 70 zcmZ?wbhEHbU6Ch;S7Ws45~z9W1k UpsZP>F>7UEheb_$Bm;vr07*C)4*&oF diff --git a/public/users/images/calendar/no_cal.gif b/public/users/images/calendar/no_cal.gif deleted file mode 100644 index adc58e2a840ee4b95febddf7e9dcb0be27ea1ede..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 139 zcmZ?wbhEHb6krfwSj51v)Yr?)cd3`J*V1K6uU)?O9}E~67!-f9FfuT(G3WrDe9t*lKewZczmuz#XON+u0n@#=42nNl7#SFt7<7PY Nfa*bPrVvI3YXHjL5YGSr diff --git a/public/users/images/calendar/prev_mon.gif b/public/users/images/calendar/prev_mon.gif deleted file mode 100644 index 12ce7ff5015454f8a1761372e4dd41247b26120a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 59 zcmZ?wbhEHbWMSZ7n8?7e^zh9^hi-bbZT|oNzv5381`yBz5g>U6CZ0KkMhb^yXLV({ JBy%%Z0{}SV5nliR diff --git a/public/users/images/calendar/prev_year.gif b/public/users/images/calendar/prev_year.gif deleted file mode 100644 index c726b0e45b97072d3e5c177d41f88a6a83a4f1d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 69 zcmZ?wbhEHbU6Cb2n*<&zGaV{7rh Tks!G(S^BTf_QvF)OpxloL#+zDP(P>^45XWtP=!?dlIpXJtN% guUjklpH+fk-Fm*{6~(1ffW|U-y85}Sb4q9e0RIF*eEzopr03c~D>;M1& diff --git a/public/users/images/calendar/shade_br.png b/public/users/images/calendar/shade_br.png deleted file mode 100644 index ce8a2fad28005dadd783895d07d46462ed38dd9f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 204 zcmeAS@N?(olHy`uVBq!ia0vp^>>$j+1|*LJgBdAc};RNV6EbL49<;9%*j_{bPn zJLUg>XJP(XVq5ig_$thlo58wDX;U-rngqtpf3B+Ah?*ok`1tI=Q%=3McOo64?5=!! z|KYH9nHm diff --git a/public/users/images/calendar/shade_mr.png b/public/users/images/calendar/shade_mr.png deleted file mode 100644 index 4594bc4e22e1ef12bc1b19e62ff1925d0c8678cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 155 zcmeAS@N?(olHy`uVBq!ia0vp^>_E)H!3HEvS)PI@mUKs7M+S!VC(K#9UIO`&C9V-A z!TD(=<%vb942~)JNvR5+xryniL8*x;m4zo$ZGeh&JzX3_DsCmEB_wb#C0Qznu_pN` yq$M^q{P%HalI)tfV1{7VL76!T7d)9*BpBj~8P_Wd<=g~nWbkzLb6Mw<&;$TWdMeKV diff --git a/public/users/images/calendar/shade_tr.png b/public/users/images/calendar/shade_tr.png deleted file mode 100644 index 2e598c95b669cc78bb47684e367fb2f8bda84a23..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 200 zcmeAS@N?(olHy`uVBq!ia0vp^>>$j+1|*LJg4r;Bl6g;oxHa zzvsWI>oY6iw+mX2d)@coHjaL?-Y|aZET?M%c8m(|Ct1IIqNw}p9Dl$QNzRUl{v`_^ uI_4FrYVJz$U8Jh8Q#J6>ul%Fh2N;s96xA!ujiv%^VeoYIb6Mw<&;$Uv!$NBS