1var CalendarParser = function () { 2 return { 3 calendar_parser_id: "calendar", 4 calendar_parser_parent: 0, 5 calendar_parser_child: 0, 6 calendar_parser_child_recursive: 0, 7 isloadstatic: 0, 8 redirectPath: $('#urlsearch').length > 0 ? redirect = $('#urlsearch').val() : "/tim-kiem", 9 datepickerloaded: 0, 10 blockbox: function (e) { 11 return "undefined" != e && (this.addstatic(), 12 this._blockboxhtml(e), 13 void (1 == this.datepickerloaded ? this._blockaction(e) : $.getScript("/assets/js/datepicker.js", function (a, t, r) { 14 CalendarParser._blockaction(e), 15 CalendarParser.datepickerloaded = 1 16 }))) 17 }, 18 _blockaction: function (param) { 19 var prefix = param.prefix ? param.prefix : "block_", divid = param.id ? param.id : "calendarblock", fomatdate = param.fomatdate ? param.fomatdate : "m/d/Y", now3 = new Date, now4 = new Date, calendarid = prefix + "widgetCalendar", calendarfield = prefix + "widgetField", currentdate = param.currentdate ? param.currentdate : [new Date(now3), 20 new Date(now4)]; $("#" + calendarid).DatePicker({ 21 flat: !0, format: fomatdate, date: currentdate, calendars: 1, starts: 1, onChange: function (formated) { eval(param.callback)(formated) } 22 }); 23 var state = !1; $("#" + calendarfield).bind("click", function () { 24 return $("#" + calendarid).stop().animate({ height: state ? 0 : $("#" + calendarid + " div.datepicker").get(0).offsetHeight }, 25 500), 26 state = !state, !1 27 }), 28 $("#" + calendarid + " div.datepicker").css("position", "absolute") 29 }, 30 _blockboxhtml: function (e) { 31 var a = e.prefix ? e.prefix : "block_", t = e.id ? e.id : "calendarblock", r = document.createElement("div"); 32 r.setAttribute("id", a + "widgetCalendar"), 33 r.setAttribute("class", "calendarblockvne"); 34 var d = document.createElement("div"); 35 d.setAttribute("id", a + "widgetField"); 36 var n = document.createElement("div"); 37 n.setAttribute("id", a + "widget"), 38 n.appendChild(d), 39 n.appendChild(r), 40 document.getElementById(t).appendChild(n) 41 }, 42 addstatic: function () { 43 return 1 != this.isloadstatic && (CalendarParser.addCss("/assets/styles/datepicker/css/datepicker.css"), 44 CalendarParser.addCss("/assets/styles/datepicker/css/layout.css"), 45 void (this.isloadstatic = 1)) 46 }, 47 parse: function () { 48 return $("#" + CalendarParser.calendar_parser_id).length > 0 && (this.addstatic(), 49 this.addHtml(), 50 void (1 == this.datepickerloaded ? this.action() : $.getScript("/assets/js/datepicker.js", function (e, a, t) { 51 CalendarParser.action(), 52 CalendarParser.datepickerloaded = 1 53 }))) 54 }, 55 addCss: function (e) { 56 var a = document.createElement("link"); 57 a.setAttribute("href", e), 58 a.setAttribute("type", "text/css"), 59 a.setAttribute("rel", "stylesheet"), 60 document.getElementsByTagName("head")[0].appendChild(a) 61 }, 62 addHtml: function () { 63 var e = new Date; e = [e.getDate(), 64 e.getMonth() + 1, e.getFullYear()].join("/"); 65 var a = document.createElement("span"); 66 a.setAttribute("id", "vne_ttn_current_date"), 67 a.innerHTML = "Xem theo ngà y"; var t = document.createElement("div"); 68 t.setAttribute("id", "widgetField"); 69 var r = document.createElement("div"); 70 r.setAttribute("id", "widgetCalendar"); 71 var d = document.createElement("div"); 72 d.setAttribute("id", "widget"), 73 t.appendChild(a), 74 d.appendChild(t), 75 d.appendChild(r), 76 document.getElementById(CalendarParser.calendar_parser_id
76).appendChild(d) 77 }, 78 action: function () { 79 var e = $("#current_cate_from").val(); 80 e = e ? e : new Date; 81 var a = $("#current_cate_to").val(); 82 a = a ? a : new Date; 83 if (!(e instanceof Date)) { 84 var b = e.split("/"), 85 c = a.split("/"); 86 var from = b[1] + "/" + b[0] + "/" + b[2], to = c[1] + "/" + c[0] + "/" + c[2]; 87 $("#widgetField span").get(0).innerHTML = from + " - " + to; 88 } 89 90 $("#widgetCalendar").DatePicker({ 91 flat: !0, format: "m/d/Y", date: [e, a], calendars: 1, mode: "range", starts: 1, onChange: function (e) { 92 var a = e[0].split("/"), 93 r = e[1].split("/"); 94 a = a[1] + "/" + a[0] + "/" + a[2], r = r[1] + "/" + r[0] + "/" + r[2]; 95 $("#widgetField span").get(0).innerHTML = a + " - " + r, 96 $("#widgetCalendar").find(".btn_calenda_dong").bind("click", function () { 97 $("#widgetCalendar").stop().animate({ height: 0 }, 98 'medium'), 99 t = !1 100 }) 101 } 102 }); 103 var t = !1; 104 $("#widgetField>span, .btn_calenda_dong").on("click", 105 function() { 106 return $("#widgetCalendar").stop().animate( 107 { height: t ? 0 : $("#widgetCalendar div.datepicker").get(0).offsetHeight }, 108 'medium'), 109 t = !t, !1 110 }), 111 $("#widgetCalendar div.datepicker").css("position", "absolute"); 112 if ($) { 113 var backroundColor = $('#box-color').val() ? $('#box-color').val() : "#c60000"; 114 $('.datepickerViewDays thead tr th, .datepickerViewDays thead tr th a:hover, .datepickerViewDays thead tr th a, .datepickerViewDays thead tr th a:hover, .datepickerViewDays thead tr th a') 115 .css('background', backroundColor); 116 } 117 }, 118 finish: function () { 119 var e = $("#widgetField span").html(); 120 if (!e || "" == e) return alert("Vui lòng chá»n ngà y"), 121 !1; 122 var a = e.split("-"), 123 t = a[0].split("/"), 124 r = a[1].split("/"); 125 t = t[1] + "/" + t[0] + "/" + t[2], r = r[1] + "/" + r[0] + "/" + r[2]; 126 var d = Date.parse(t) / 1e3, 127 n = Date.parse(r) / 1e3; 128 d == n ? n = d + 83544 : n += 84960; 129 var c = $("#cateid").val(); 130 var params = extractParamsFromUrl(); 131 var o = this.redirectPath + "?fromdate=" + d + "&todate=" + n + (c ? "&catId=" + c : "") + (params["key"] ? "&key=" + encodeURIComponent(params["key"]) : ""); 132 window.location.href = o; 133 } 134 } 135}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.