summaryrefslogtreecommitdiffstats
path: root/admin/survey/script/telefon.js
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2022-01-11 12:35:47 +0100
committerAnton Luka Šijanec <anton@sijanec.eu>2022-01-11 12:35:47 +0100
commit19985dbb8c0aa66dc4bf7905abc1148de909097d (patch)
tree2cd5a5d20d7e80fc2a51adf60d838d8a2c40999e /admin/survey/script/telefon.js
download1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.gz
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.bz2
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.lz
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.xz
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.tar.zst
1ka-19985dbb8c0aa66dc4bf7905abc1148de909097d.zip
Diffstat (limited to 'admin/survey/script/telefon.js')
-rw-r--r--admin/survey/script/telefon.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/admin/survey/script/telefon.js b/admin/survey/script/telefon.js
new file mode 100644
index 0000000..15f393f
--- /dev/null
+++ b/admin/survey/script/telefon.js
@@ -0,0 +1,31 @@
+// meta podatki
+var srv_meta_anketa_id = $("#srv_meta_anketa").val();
+
+// avtomatsko vsake 30 sekund preverimo, ce se je pojavila kaksna nova stevilka
+function preveri_nove_stevilke () {
+ $.timer(30000, function (timer) {
+
+ $('#preveri_stevilke').load('ajax.php?t=telefon&a=preveri_stevilke', {anketa: srv_meta_anketa_id});
+ timer.stop();
+ });
+}
+
+// dashboard filter na datum
+function tel_date_filter () {
+
+ // Ce imamo nastavljen datum "od"
+ var dateFrom = $('#tel_dash_dateFrom').val();
+ var dateFromText = '';
+ if(dateFrom != '')
+ dateFromText = '&date_from=' + dateFrom;
+
+ // Ce imamo nastavljen datum "do"
+ var dateTo = $('#tel_dash_dateTo').val();
+ var dateToText = '';
+ if(dateTo != '')
+ dateToText = '&date_to=' + dateTo;
+
+ var srv_site_url = $("#srv_site_url").val();
+ srv_site_url += 'admin/survey/index.php?anketa='+srv_meta_anketa_id+'&a=telephone&m=dashboard'+dateFromText+dateToText;
+ window.location.href = srv_site_url;
+} \ No newline at end of file