Server IP : 80.241.246.6 / Your IP : 216.73.216.188 Web Server : Apache/2.4.25 (Debian) System : Linux kharagauli 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64 User : www-data ( 33) PHP Version : 7.0.33-0+deb9u12 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/kharagauli_new/moduls/query/admin/js/ |
Upload File : |
// Generated by CoffeeScript 1.9.3 $(function() { return $(".timePicker").datetimepicker({ changeMonth: true, changeYear: true, dateFormat: 'dd/mm/yy', timeFormat: "HH:mm", yearRange: '1920:2030' }); }); this.add_new_answer = function() { var cont, div, len; div = $('#answer_template').clone(); cont = $(".answer_container"); len = $(".answers", cont).length; div.prop("id", "").removeClass("display_none"); $('span', div).text((len + 1) + ")"); $("input:text", div).prop({ name: "answer_" + len }); return div.appendTo(".answer_container"); }; this.delete_answer = function(ths) { var ind, prnt, th; th = $(ths); prnt = th.parent(); ind = $("input:text", prnt).prop("name"); ind = ind.split("_").length === 2 ? Number(ind.split("_")[1]) : Number(ind.split("_")[2]); prnt.remove(); return change_index(ind); }; this.change_index = function(index) { var div, len; div = $(".answer_container"); len = $(".answers", div).length; if (len > index) { return $(".answers", div).each(function(ind) { var nm, nms, th; if (ind >= index) { th = $(this); $('span', th).text((ind + 1) + ")"); nm = $("input:text", th); nms = nm.prop("name").split("_"); return $("input:text", th).prop({ name: nms.join("_") + "_" + ind }); } }); } }; this.add_new_answer = function() { var cont, div, len; div = $('#answer_template').clone(); cont = $(".answer_container"); len = $(".answers", cont).length; div.prop("id", "").removeClass("display_none"); $('span', div).text((len + 1) + ")"); $("input:text", div).prop({ name: "answer_" + len }); return div.appendTo(".answer_container"); }; this.delete_answer = function(ths) { var ind, prnt, th; th = $(ths); prnt = th.parent(); ind = $("input:text", prnt).prop("name"); ind = ind.split("_").length === 2 ? Number(ind.split("_")[1]) : Number(ind.split("_")[2]); prnt.remove(); return change_index(ind); }; this.change_index = function(index) { var div, len; div = $(".answer_container"); len = $(".answers", div).length; if (len > index) { return $(".answers", div).each(function(ind) { var nm, nms, th; if (ind >= index) { th = $(this); $('span', th).text((ind + 1) + ")"); nm = $("input:text", th); nms = nm.prop("name").split("_"); nms.pop(); return $("input:text", th).prop({ name: nms.join("_") + "_" + ind }); } }); } }; this.send_form = function() { var ret, txt; ret = true; txt = $("textarea"); $(".answer_container .answers,.date_each").each(function() { if (!$("input:text", $(this)).val().length) { ret = false; } }); if (!ret) { $.alerts.alert("ცარიელი ველები არ გაიგზავნება!", "message"); } return ret; }; this.show_hide_map = function(id, param) { var div, iframe, src, top_; if (param == null) { param = 'show'; } div = $("#maper"); top_ = param === "show" ? $(window).scrollTop() + 20 : -1000; if (id) { iframe = $("#iframe"); src = iframe.prop("src").split("?")[0]; iframe.prop({ src: src + "?id=" + id }); } return div.animate({ top: top_ + "px" }, 500); };