دانلود نرم افزار تست زنی برای کامپیوتر
نویسنده : مینا علی زاده | زمان انتشار : 25 دی 1400 ساعت 16:56
همه ( 201 ) مطالب ( 193 ) فیلم کتاب نویسندگان
"); sb.append("
"); sb.append(""); } sb.append(""); return sb.toString(); } var doSearchrenderHeader = function (header) { $("#litSearchQuery").text(header.q); var sb = new StringBuilder(); sb.append("تعداد نتیجه : "); sb.append(header.record_count); sb.append(" صفحه "); sb.append(header.page_number); sb.append(" ار "); sb.append(header.page_count); sb.append(" ( در زمان "); sb.append(header.exec_time); sb.append(" ثانیه ) "); $("#SearchresultDetails").text(sb.toString()); } var doSearch = function (event, baseUrl) { var $result = $('#result'); $result.html(Loading); searchmainUrlTemp = baseUrl; var start = parseInt($('#searchStart').val()), num = parseInt($('#searchNum').val()); if (start 100) { num = 10; } switch (event.data.navi) { case -1: start -= num; break; case 1: start += num; break; case 0: start = 0; break; default: start = num * event.data.navi; break; } currentpage = start; if (searchQuery.length != 0) { var urlBuf = []; urlBuf.push(baseUrl || searchmainUrl, '&start=', start, '&num=', num); $.ajax({ url: urlBuf.join(""), dataType: 'json', success: function (data) { var dataResponse = data.response; if (dataResponse.status != 0) { alert(""); return; } var recordCount = dataResponse.record_count, offset = 0, buf = []; totalpage = recordCount; if (recordCount == 0) { buf.push("", dataResponse.q, ""); $result[0].innerHTML = buf.join(""); $('#pagination-here').bootpag({ total: 1, page: 1, maxVisible: 10 }); } else { var pageNumber = dataResponse.page_number, pageSize = dataResponse.page_size, pageCount = dataResponse.page_count, startRange = (pageNumber - 1) * pageSize + 1, endRange = pageNumber * pageSize, i = 0, max; offset = startRange - 1; buf.push("", dataResponse.q, " ", recordCount, " ", startRange, " - ", endRange, " (", dataResponse.exec_time, " )"); $result.empty(); doSearchrenderHeader(dataResponse); $result.html(doSearchrender(dataResponse.result, dataResponse)); if (pageNumber 1) { $('#pagination-here').bootpag({ total: $("#searchCount").val(), page: 1, maxVisible: 10 }).on("page", { navi: 0 }, function (event, num) { event.data.navi = num - 1; doSearch(event, searchmainUrlTemp); }); } $(document).on("change", '.btnsereachFilter input', { navi: 0 }, function (event, num) { var baseurl = $(this).attr("baseurl"); var url; switch (baseurl) { case "searchmainUrl": url = searchmainUrl; break; case "searchkanoonUrl": url = searchkanoonUrl; break; case "searchamoozeshUrl": url = searchamoozeshUrl; break; case "searchbookUrl": url = searchbookUrl; break; case "searchwriterUrl": url = searchwriterUrl; break; default: url = searchmainUrl; } event.data.navi = num - 1; doSearch(event, url); }); }); function GOAction() { if ("".length > 0 && ($(this).attr('data-order') || 0) == 0) { $("#result a.search-link").each(function () { var docId = $(this).attr('data-id'), rt = $('#rt').val(), queryId = $('#searchqueryId').val(), order = $(this).attr('data-order') || 0, url = $(this).attr('href'), buf = []; buf.push("/Searchapi?go=t"); buf.push('&rt='); buf.push(rt); buf.push('&docId='); buf.push(docId); buf.push('&queryId='); buf.push(queryId); buf.push('&order='); buf.push(order); buf.push("&userCode="); var hashIndex = url.indexOf('#'); if (hashIndex >= 0) { var hashStr = url.substring(hashIndex); buf.push('&hash='); buf.push(encodeURIComponent(hashStr)); } $(this).attr('onmousedown', "this.href=window.location.protocol+'//'+window.location.hostname+'" + buf.join('') + "'"); }); } } (function (h, q) { h.fn.bootpag = function (p) { function m(c, b) { b = parseInt(b, 10); var d, e = 0 == a.maxVisible ? 1 : a.maxVisible, k = 1 == a.maxVisible ? 0 : 1, n = Math.floor((b - 1) / e) * e, f = c.find("li"); a.page = b = 0 > b ? 0 : b > a.total ? a.total : b; f.removeClass(a.activeClass); d = 1 > b - 1 ? 1 : a.leaps && b - 1 >= a.maxVisible ? Math.floor((b - 1) / e) * e : b - 1; a.firstLastUse && f.first().toggleClass(a.disabledClass, 1 === b); e = f.first(); a.firstLastUse && (e = e.next()); e.toggleClass(a.disabledClass, 1 === b).attr("data-lp", d).find("a").attr("href", g(d)); k = 1 == a.maxVisible ? 0 : 1; d = b + 1 > a.total ? a.total : a.leaps && b + 1 ←', last: '→', wrapClass: "pagination", activeClass: "active", disabledClass: "disabled", nextClass: "next", prevClass: "prev", lastClass: "last", firstClass: "first" }, l.data("settings") || {}, p || {}); if (0 >= a.total) return this; h.isNumeric(a.maxVisible) || a.maxVisible || (a.maxVisible = parseInt(a.total, 10)); l.data("settings", a); return this.each(function () { var c, b, d = h(this); c = ['
- ']; a.firstLastUse && (c = c.concat(['
- ', a.first, ""])); a.prev && (c = c.concat(['
- ', a.prev, ""])); for (b = 1; b
', b, ""]); a.next && (b = a.leaps && a.total > a.maxVisible ? Math.min(a.maxVisible + 1, a.total) : 2, c = c.concat(['', a.next, ""])); a.firstLastUse && (c = c.concat(['', a.last, ""])); c.push("
"); d.find("ul.bootpag").remove(); d.append(c.join("")); c = d.find("ul.bootpag"); d.find("li").click(function () { var b = h(this); if (!b.hasClass(a.disabledClass) && !b.hasClass(a.activeClass)) { var c = parseInt(b.attr("data-lp"), 10); l.find("ul.bootpag").each(function () { m(h(this), c) }); l.trigger("page", c) } }); m(c, a.page) }) } })(jQuery, window);
منبع: www.kanoon.ir