{"id":33374,"date":"2023-12-04T13:12:10","date_gmt":"2023-12-04T07:12:10","guid":{"rendered":"https:\/\/elib.amu.kz\/?page_id=33374"},"modified":"2025-11-13T16:36:52","modified_gmt":"2025-11-13T11:36:52","slug":"prof","status":"publish","type":"page","link":"https:\/\/elib.amu.kz\/ru\/lib\/prof\/","title":{"rendered":"\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u043c\u0443 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443"},"content":{"rendered":"<script>\r\nfunction gid(element_id){\r\nreturn document.getElementById(element_id);\r\n}\r\nfunction sh(layer){\r\n  gid(layer).style.display=(gid(layer).style.display==\"none\") ? \"\" : \"none\";   \r\n}\r\n\r\n<\/script>\r\n\r\n\r\n\r\n\r\n<script type=\"text\/javascript\" >\r\nvar sprintf = function(str) {\r\n\tvar args = arguments,\r\n\tflag = true,\r\n\ti = 1;\r\n\r\n\tstr = str.replace(\/%s\/g, function() {\r\n\t\tvar arg = args[i++];\r\n\r\n\t\tif (typeof arg === 'undefined') {\r\n\t\t\tflag = false;\r\n\t\t\treturn '';\r\n\t\t}\r\n\t\treturn arg;\r\n\t});\r\n\treturn flag ? str : '';\r\n};\r\n\r\njQuery(document).ready(function($) {\r\n\t\r\n\tfunction inputJoin(Sign){\r\n\t\tlet JoinVal  = \"\";\r\n\t\tlet Truncation = \"\";\r\n\t\t\r\n\t\tlet $inputComplex = $( \"#inputComplex\" );\r\n\t\tlet $inputQuery = $(\"#inputQuery\");\r\n\t\tlet $selectDict = $(\"#selectDict\");\r\n\t\tlet $checkboxTruncation = $(\"#checkboxTruncation\");\r\n\t\t\r\n\t\tlet Query = $inputQuery.val();\r\n\t\tlet Dict = $selectDict.val();\r\n\t\tlet ComplexQuery = $inputComplex.val();\r\n\t\t\r\n\t\tif (Query == \"\") return;\r\n\t\tif ($checkboxTruncation.is( \":checked\" ) ) Truncation = \"$\";\r\n\t\t\r\n\t\tJoinVal = sprintf('(<.>%s%s%s<.>)', Dict, Query, Truncation );\r\n\t\t\r\n\t\tif ( ComplexQuery ){\r\n\t\t\tJoinVal = sprintf('%s%s%s', ComplexQuery, Sign, JoinVal );\r\n\t\t}\r\n\t\t\r\n\t\t$inputComplex.val(JoinVal);\r\n\t\t$inputQuery.val(\"\").focus();\r\n\t}\r\n\t\r\n\t$('#inputQuery').on('keypress', function (event) {\r\n\t\tif(event.which === 13){\r\n\t\t\tevent.preventDefault();\r\n\t\t\tinputJoin(\"*\");\t\r\n\t\t}\r\n\t});\r\n\t\r\n\t$(\"#inputJoinAnd\").click(function(event){\r\n\t\tevent.preventDefault();\r\n\t\tinputJoin(\"*\");\t\r\n\t});\r\n\t\r\n\t$(\"#inputJoinOr\").click(function(event){\r\n\t\tevent.preventDefault();\r\n\t\tinputJoin(\"+\");\t\r\n\t});\r\n\t\r\n\t$(\"#inputJoinNot\").click(function(event){\r\n\t\tevent.preventDefault();\r\n\t\tinputJoin(\"^\");\t\r\n\t});\r\n\t\r\n\t$(\"#SearchForm\").submit(function(event){\r\n\t\tinputJoin(\"*\");\r\n\t\tlet ComplexQuery = $( \"#inputComplex\" ).val();\r\n\t\tif( !ComplexQuery ) {\r\n\t\t\tevent.preventDefault();\r\n\t\t\t\r\n\t\t\t$( \"#inputEmpty\" ).removeClass('hidden').addClass('show');\r\n\t\t\t\r\n\t\t\tfunction hiddenInputEmpty() {\r\n\t\t\t\t$( \"#inputEmpty\" ).removeClass('show').addClass('hidden');\r\n\t\t\t}\r\n\r\n\t\t\tsetTimeout(hiddenInputEmpty, 3000);\r\n\t\t\t\r\n\t\t}\r\n\t});\r\n\t\r\n\t$(\"#buttonReset\").click(function(event){\r\n\t\tevent.preventDefault();\r\n\t\t$( \"#selectDict\" ).prop('selectedIndex',0);\r\n\t\t$( \"#inputQuery\" ).val('');\r\n\t\t$( \"#inputComplex\" ).val('');\r\n\t});\r\n});\r\n\r\n<\/script>\r\n\r\n<div class=\"row\">\r\n\t<div class=\"col-md-12\" >\r\n\t\t<form class=\"form-horizontal elib_search_form\" id=\"SearchForm\">\r\n\t\t\t<input type=\"hidden\" name=\"e_sort\" value=\"\">\r\n\t\t\t<div class=\"form-group\">\r\n\t\t\t\t<label for=\"selectDB\" class=\"col-sm-6 col-md-5 col-lg-4 control-label\">\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/label>\r\n\t\t\t\t<div class=\"col-sm-6 col-md-7 col-lg-8\">\r\n\t\t\t\t\t\t<select name=\"e_src\" class=\"form-control\" id=\"selectDB\" placeholder=\"\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"SK_ELIB\" selected>\u042d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430<\/option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"KNIGA\" selected>\u042d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0439 \u041a\u0430\u0442\u0430\u043b\u043e\u0433<\/option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"GURN\" selected>\u0416\u0443\u0440\u043d\u0430\u043b\u044b<\/option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"TRUDI\" selected>\u0422\u0440\u0443\u0434\u044b \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u043a\u043e\u0432<\/option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"REDKO\" selected>\u0420\u0435\u0434\u043a\u0438\u0439 \u0444\u043e\u043d\u0434<\/option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"STAT\" selected>\u0421\u0442\u0430\u0442\u044c\u0438<\/option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"IPR\" selected>IPR \u0411\u0430\u0437\u0430<\/option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/select>\r\n\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"form-group\">\r\n\t\t\t\t<label for=\"selectDict\" class=\"col-sm-6 col-md-5 col-lg-4 control-label\">\u041e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u043e\u0438\u0441\u043a\u0430<\/label>\r\n\t\t\t\t<div class=\"col-sm-6 col-md-7 col-lg-8\">\r\n\t\t\t\t\t<div class=\"row\">\r\n\t\t\t\t\t\t<div class=\"col-md-7 col-lg-8\">\r\n\t\t\t\t\t\t\t<select class=\"form-control\" id=\"selectDict\" placeholder=\"\u041e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u043e\u0438\u0441\u043a\u0430\">\r\n\t\t\t\t\t\t\t\t<option value=\"K=\">\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430<\/option>\r\n\t\t\t\t\t\t\t\t<option value=\"A=\">\u0410\u0432\u0442\u043e\u0440<\/option>\r\n\t\t\t\t\t\t\t\t<option value=\"T=\">\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435<\/option>\r\n\t\t\t\t\t\t\t\t<option value=\"TJ=\">\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 - \u0436\u0443\u0440\u043d\u0430\u043b\u044b<\/option>\r\n\t\t\t\t\t\t\t\t<option value=\"TS=\">\u0417\u0430\u0433\u043b\u0430\u0432\u0438\u0435 - \u0441\u0435\u0440\u0438\u0438<\/option>\r\n\t\t\t\t\t\t\t\t<option value=\"M=\">\u041a\u043e\u043b\u043b\u0435\u043a\u0442\u0438\u0432\/\u041c\u0435\u0440\u043e\u043f\u0440\u0438\u044f\u0442\u0438\u0435<\/option>\r\n\t\t\t\t\t\t\t\t<option value=\"O=\">\u0418\u0437\u0434\u0430\u044e\u0449\u0430\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f<\/option>\r\n\t\t\t\t\t\t\t\t<option value=\"MI=\">\u041c\u0435\u0441\u0442\u043e \u0438\u0437\u0434\u0430\u043d\u0438\u044f<\/option>\r\n\t\t\t\t\t\t\t\t<option value=\"G=\">\u0413\u043e\u0434 \u0438\u0437\u0434\u0430\u043d\u0438\u044f<\/option>\r\n\t\t\t\t\t\t\t\t<option value=\"JR=\">\u0416\u0443\u0440\u043d\u0430\u043b \u0437\u0430 ... (\u0433\u043e\u0434)<\/option>\r\n\t\t\t\t\t\t\t\t<option value=\"P=\">\u041f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u044f<\/option>\r\n\t\t\t\t\t\t\t\t<option value=\"F=\">\u0410\u0432\u0442\u043e\u0433\u0440\u0430\u0444<\/option> \r\n\t\t\t\t\t\t\t\t<option value=\"S=\">\u041f\u0440\u0435\u0434\u043c\u0435\u0442\u043d\u044b\u0435 \u0440\u0443\u0431\u0440\u0438\u043a\u0438<\/option>\r\n\t\t\t\t\t\t\t\t<option value=\"U=\">\u0423\u0414\u041a\/\u0411\u0411\u041a<\/option> \r\n\t\t\t\t\t\t\t\t<option value=\"RIN=\">\u0414\u0440\u0443\u0433\u0430\u044f \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f<\/option> \r\n\t\t\t\t\t\t\t\t<option value=\"B=\">ISBN\/ISSN<\/option>\r\n\t\t\t\t\t\t\t\t<option value=\"R=\">\u0422\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0440\u0443\u0431\u0440\u0438\u043a\u0430 \u0413\u0420\u041d\u0422\u0418<\/option>\r\n\t\t\t\t\t\t\t\t<option value=\"V=\">\u0412\u0438\u0434\/\u0422\u0438\u043f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430<\/option>\r\n\t\t\t\t\t\t\t<\/select>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t<div class=\"col-md-5 col-lg-4\">\r\n\t\t\t\t\t\t\t<div class=\"checkbox\">\r\n\t\t\t\t\t\t\t\t<label>\r\n\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"checkboxTruncation\" checked> \u0423\u0441\u0435\u0447\u0435\u043d\u0438\u0435 \r\n\t\t\t\t\t\t\t\t<\/label>\r\n\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"form-group\">\r\n\t\t\t\t<label for=\"inputQuery\" class=\"col-sm-6 col-md-5 col-lg-4 control-label\">\u041f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441<\/label>\r\n\t\t\t\t<div class=\"col-sm-6 col-md-7 col-lg-8\">\r\n\t\t\t\t\t<input type=\"text\" class=\"form-control\" id=\"inputQuery\" placeholder=\"\u041f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441\">\r\n\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"form-group\">\r\n\t\t\t\t<label class=\"col-sm-6 col-md-5 col-lg-4 control-label\">\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f<\/label>\r\n\t\t\t\t<div class=\"col-sm-6 col-md-7 col-lg-8\">\r\n\t\t\t\t\t<button type=\"button\" id=\"inputJoinAnd\" class=\"btn btn-default\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u0418&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/button>\r\n\t\t\t\t\t<button type=\"button\" id=\"inputJoinOr\" class=\"btn btn-default\">&nbsp;&nbsp;&nbsp;&nbsp;\u0418\u043b\u0438&nbsp;&nbsp;&nbsp;&nbsp;<\/button>\r\n\t\t\t\t\t<button type=\"button\" id=\"inputJoinNot\" class=\"btn btn-default\">&nbsp;&nbsp;&nbsp;&nbsp;\u041d\u0435\u0442&nbsp;&nbsp;&nbsp;&nbsp;<\/button>\r\n\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"form-group\">\r\n\t\t\t\t<label for=\"inputComplex\" class=\"col-sm-6 col-md-5 col-lg-4 control-label\">\u041a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441<\/label>\r\n\t\t\t\t<div class=\"col-sm-6 col-md-7 col-lg-8\">\r\n\t\t\t\t\t<textarea name=\"e_query\" class=\"form-control\" rows=\"3\" id=\"inputComplex\" placeholder=\"\u041a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441\" style=\"resize:vertical;\"><\/textarea>\r\n\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"form-group\">\r\n\t\t\t\t<div class=\"col-sm-offset-6 col-sm-6 col-md-offset-5 col-md-7 col-lg-offset-4 col-lg-8\">\r\n\t\t\t\t\t<button type=\"submit\" class=\"btn btn-primary btn-submit\" style=\"background-color: rgba(85, 98, 112, 0.9); border-color: rgba(85, 98, 112, 0.9);\" ><i class=\"glyphicon glyphicon-search\"><\/i> \u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u043e\u0438\u0441\u043a<\/button>\r\n\t\t\t\t\t<button type=\"button\" id=\"buttonReset\" class=\"btn btn-link\">\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0444\u043e\u0440\u043c\u0443<\/button>\r\n\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"form-group hidden\" id=\"inputEmpty\">\r\n\t\t\t\t<div class=\"col-sm-offset-6 col-sm-6 col-md-offset-5 col-md-7 col-lg-offset-4 col-lg-8\">\r\n\t\t\t\t\t<div class=\"alert alert-warning\" role=\"alert\">\u041f\u0443\u0441\u0442\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t<\/form>\r\n\t<\/div>\r\n<\/div>\r\n<script>\r\n\/\/ function will clear input elements on ever form on HTML page\r\nfunction clearForms() {\r\n    \/\/ variable declaration\r\n    var x, y, z, type = null;\r\n    \/\/ loop through forms on HTML page\r\n    for (x = 0; x < document.forms.length; x++) {\r\n        \/\/ loop through each element on form\r\n        for (y = 0; y < document.forms[x].elements.length; y++) {\r\n            \/\/ define element type\r\n            type = document.forms[x].elements[y].type;\r\n            \/\/ alert before erasing form element\r\n            \/\/alert('form='+x+' element='+y+' type='+type);\r\n            \/\/ switch on element type\r\n            switch (type) {\r\n            case 'text':\r\n            case 'textarea':\r\n            case 'password':\r\n            \/\/case \"hidden\":\r\n                document.forms[x].elements[y].value = '';\r\n                break;\r\n            case 'radio':\r\n            case 'checkbox':\r\n                document.forms[x].elements[y].checked = '';\r\n                break;\r\n            case 'select-one':\r\n                document.forms[x].elements[y].options[0].selected = true;\r\n                break;\r\n            case 'select-multiple':\r\n                for (z = 0; z < document.forms[x].elements[y].options.length; z++) {\r\n                    document.forms[x].elements[y].options[z].selected = false;\r\n                }\r\n                break;\r\n            } \/\/ end switch\r\n        } \/\/ end for y\r\n    } \/\/ end for x\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n$(document).ready(function() {\r\n\t\r\n\r\n$(\"select[name='e_sort']\").change(function(event){\r\n\tevent.preventDefault();\r\n\t\/\/window.open('home.php','_blank');\r\n\twindow.location.href=$(this).val();\r\n});\r\n\r\n\/*\t\r\n\t\r\n\t\r\nfunction highlight(text, words, tag) {\r\n\t\r\n  \/\/ Default tag if no tag is provided\r\n  tag = tag || 'span';\r\n\r\n  var i, len = words.length, re;\r\n  for (i = 0; i < len; i++) {\r\n    \/\/ Global regex to highlight all matches\r\n    re = new RegExp(words[i], \"g\",\"i\");\r\n    if (re.test(text)) {\r\n      text = text.replace(re, '<'+ tag +' class=\"highlight\">$&<\/'+ tag +'>');\r\n    }\r\n  }\r\n \/*\r\n  \r\n  jQuery.each(words, function(ind, txt) {\r\n    var re = new RegExp(txt,\"g\");\r\n    text = text.replace(re, '<span class=\"text_red\">'+txt+'<\/span>');\r\n  });\r\n   *\r\n  return text;\r\n}\r\n\r\nfunction unhighlight(text, tag) {\r\n  \/\/ Default tag if no tag is provided\r\n  tag = tag || 'span';\r\n  var re = new RegExp('(<'+ tag +'.+?>|<\\\/'+ tag +'>)', 'g');\r\n  return text.replace(re, '');\r\n}\r\n\r\n\r\n$('#result_query').html( highlight(\r\n    $('#result_query').html(), \/\/ \u0442\u0435\u043a\u0441\u0442 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430\r\n    [],\/\/['foo', 'bar', 'baz', 'hello world'], \/\/ \u0441\u043b\u043e\u0432\u0430 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u043c\u043b\u0435\u043d\u0438\u044f\r\n    'strong' \/\/ \u0442\u0435\u0433 \u043e\u0431\u0440\u0430\u043c\u043b\u0435\u043d\u0438\u044f\r\n));\r\n\r\n\r\n  \r\n*\/\r\n\r\nvar instance = new Mark(document.querySelector(\"#result_query\"));\r\ninstance.mark(  [], {\r\n    \"wildcards\": \"withSpaces\",\r\n    \"accuracy\": \"exactly\",\r\n\t\"className\": \"highlight\",\r\n\t\"element\": \"span\"\r\n});\r\n\r\n});\r\n<\/script>\r\n<!--\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u0432\u044b\u0440\u0430\u043d\u0438\u0432\u0430\u043d\u0438\u044f-->\r\n<p>&nbsp;<\/p>\r\n\r\n<style>\r\n.highlight{\r\n\tbackground: rgba(255, 188, 0, 0.3);\r\n}\r\n<\/style>\r\n\r\n\r\n\r\n\r\n<!--\r\n-->\r\n\r\n\r\n<!-- \u041e\u0442\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438, \u043f\u0435\u0447\u0430\u0442\u044c \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0445, \u043e\u0447\u0438\u0441\u0442\u043a\u0430 -->\r\n\r\n<div class=\"row\" style=\" padding-bottom: 25px; \">\r\n\t<div class=\"col-md-12\">\r\n\t\t\t\t\u041e\u0442\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438: <span class='elib_document_select_count'>0<\/span>\r\n\t\t<!--\u041e\u0442\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435: <span class='elib_document_select_countdb'>0<\/span>-->\r\n\t\t<span class=\"elib_tagged_btn\" style=\"display:none;\">\r\n\t\t\t<span>&nbsp;<\/span> \r\n\t\t\t<select class=\"elib_tagged_format\">\r\n\t\t\t  <option value=\"brief\">\u041a\u0440\u0430\u0442\u043a\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/option>\r\n\t\t\t  <!--<option value=\"full\">\u041f\u043e\u043b\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/option>-->\r\n\t\t\t<\/select>\r\n\t\t\t<a href='#' class=\"elib_tagged\">\u041f\u0435\u0447\u0430\u0442\u044c<\/a>\r\n\t\t\t\r\n\t\t\t<span>&nbsp;&nbsp;|&nbsp;&nbsp;<\/span> \r\n\t\t\t\r\n\t\t\t<a href='#' class=\"elib_document_select_clear\">\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c<\/a>\r\n\t\t<\/span>\r\n\t<\/div>\r\n<\/div>\r\n\r\n<script type=\"text\/javascript\" >\r\njQuery(document).ready(function($) {\r\n\t\/\/CLEAR\r\n\t$( \".elib_document_select_clear\" ).click(function(event) {\r\n\t\tevent.preventDefault();\r\n\t\tvar elib_document_select_count = $( \".elib_document_select_count\" );\r\n\t\tvar elib_document_select_countdb = $( \".elib_document_select_countdb\" );\r\n\t\tvar elib_tagged_btn = $( \".elib_tagged_btn\" );\r\n\t\tvar elib_document_select = $( \".elib_document_select\" );\r\n\t\tvar elib_document_select_clear = $(this);\r\n\t\telib_document_select_clear.addClass( \"loading\" );\r\n\t\t\r\n\t\tif( elib_document_select_clear.attr(\"disabled\") == false || typeof elib_document_select_clear.attr(\"disabled\") === \"undefined\"){\r\n\t\t\t\r\n\t\t\telib_document_select_clear.attr(\"disabled\", true);\r\n\r\n\t\t\tvar data = {\r\n\t\t\t\taction: 'elib_document_select_clear',\r\n\t\t\t\tnonce_code: elibajax.nonce,\r\n\t\t\t\t\/\/documentdb: documentdb,\r\n\t\t\t\t\/\/documenttype: documenttype,\r\n\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t$.ajax({\r\n\t\t\t\ttype: 'POST',\r\n\t\t\t\turl: elibajax.url,\r\n\t\t\t\tdataType: 'json',\r\n\t\t\t\tdata: data\r\n\t\t\t})\r\n\t\t\t.done(function(results) {\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tif( results.success == true ){\r\n\t\t\t\t\t\tif( typeof(results.data) == 'undefined' || results.data === null || results.data === undefined ){\r\n\t\t\t\t\t\t\t\/\/ \u041d\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 results.data.\r\n\t\t\t\t\t\t\t\/\/console.log('\u041d\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 results.data');\r\n\t\t\t\t\t\t\telib_tagged_btn.hide();\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif( typeof(results.data.count) != 'undefined' && results.data.count !== null && results.data.count !== undefined ){\r\n\t\t\t\t\t\t\t\telib_document_select_count.html(results.data.count);\r\n\t\t\t\t\t\t\t\tif( results.data.count > 0){\r\n\t\t\t\t\t\t\t\t\telib_tagged_btn.show();\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\telib_tagged_btn.hide();\r\n\t\t\t\t\t\t\t\t\telib_document_select.prop('checked', false);\r\n\t\t\t\t\t\t\t\t\telib_document_select.removeData(\"documentselect\" );\r\n\t\t\t\t\t\t\t\t\telib_document_select.removeAttr(\"data-documentselect\" );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif( typeof(results.data.countdb) != 'undefined' && results.data.countdb !== null && results.data.countdb !== undefined ){\r\n\t\t\t\t\t\t\t\telib_document_select_countdb.html(results.data.countdb);\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(typeof(results.error) == 'undefined' || results.error === null || results.error === undefined){\r\n\t\t\t\t\t\t\t\/\/ \u041d\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.\r\n\t\t\t\t\t\t\talert('\u041e\u0448\u0438\u0431\u043a\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435! ' + JSON.stringify(results) );\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\/\/ \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0435\u0441\u0442\u044c.\r\n\t\t\t\t\t\t\talert('\u041e\u0448\u0438\u0431\u043a\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435! ' + results.error.message);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\/*\r\n\t\t\t\t\tif( results.success == true ){\r\n\t\t\t\t\t\tif( typeof(results.data) == 'undefined' || results.data === null || results.data === undefined ){\r\n\t\t\t\t\t\t\t\/\/ \u041d\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 results.data.\r\n\t\t\t\t\t\t\t\/\/console.log('\u041d\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 results.data');\r\n\t\t\t\t\t\t\telib_tagged_btn.hide();\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif( typeof(results.data.count) != 'undefined' && results.data.count !== null && results.data.count !== undefined ){\r\n\t\t\t\t\t\t\t\telib_document_select_count.html(results.data.count);\r\n\t\t\t\t\t\t\t\tif( results.data.count > 0){\r\n\t\t\t\t\t\t\t\t\telib_tagged_btn.show();\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\telib_tagged_btn.hide();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif( typeof(results.data.countdb) != 'undefined' && results.data.countdb !== null && results.data.countdb !== undefined ){\r\n\t\t\t\t\t\t\t\telib_document_select_countdb.html(results.data.countdb);\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(typeof(results.error) == 'undefined' || results.error === null || results.error === undefined){\r\n\t\t\t\t\t\t\t\/\/ \u041d\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.\r\n\t\t\t\t\t\t\talert('\u041e\u0448\u0438\u0431\u043a\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435! ' + JSON.stringify(results) );\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\/\/ \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0435\u0441\u0442\u044c.\r\n\t\t\t\t\t\t\talert('\u041e\u0448\u0438\u0431\u043a\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435! ' + results.error.message);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*\/\r\n\t\t\t\t\t\r\n\t\t\t\t} catch(e){\r\n\t\t\t\t\tconsole.log(e);\r\n\t\t\t\t\tconsole.log(results);\r\n\t\t\t\t\tconsole.log(results.success);\r\n\t\t\t\t\talert('Error: invalid json. results: ' + results);\r\n\t\t\t\t}\r\n\t\t\t\telib_document_select_clear.removeAttr(\"disabled\");\r\n\t\t\t\telib_document_select_clear.removeClass( \"loading\" );\r\n\t\t\t})\r\n\t\t\t.fail(function( jqXHR, textStatus, errorThrown ) {\r\n\t\t\t\t\/\/alert( \"error\" );\r\n\t\t\t\telib_document_select_clear.removeAttr(\"disabled\");\r\n\t\t\t\telib_document_select_clear.removeClass( \"loading\" );\r\n\t\t\t\tconsole.log( 'Could not get posts, server results: ' + textStatus + ': ' + errorThrown );\r\n\t\t\t})\r\n\t\t\t.always(function() {\r\n\t\t\t\t\/\/alert( \"complete\" );\r\n\t\t\t\telib_document_select_clear.removeAttr(\"disabled\");\r\n\t\t\t\telib_document_select_clear.removeClass( \"loading\" );\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n\/\/\u041f\u0415\u0427\u0410\u0422\u042c print\r\n\t$( \".elib_tagged\" ).click(function(event) {\r\n\t\tevent.preventDefault();\r\n\t\t\r\n\t\tvar elib_tagged = $(this);\r\n\t\telib_tagged.addClass( \"loading\" );\r\n\t\t\r\n\t\tif( elib_tagged.attr(\"disabled\") == false || typeof elib_tagged.attr(\"disabled\") === \"undefined\"){\r\n\t\t\t\r\n\t\t\telib_tagged.attr(\"disabled\", true);\r\n\r\n\t\t\tvar data = {\r\n\t\t\t\taction: 'elib_page_tagged_print',\r\n\t\t\t\tnonce_code: elibajax.nonce,\r\n\t\t\t\tdocumentformat: elib_tagged.siblings('.elib_tagged_format').val(),\r\n\t\t\t\t\/\/documentid: documentid,\r\n\t\t\t\t\/\/documentdb: documentdb,\r\n\t\t\t\t\/\/documenttype: documenttype,\r\n\t\t\t\t\/\/documentselect: documentselect\r\n\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t$.ajax({\r\n\t\t\t\ttype: 'POST',\r\n\t\t\t\turl: elibajax.url,\r\n\t\t\t\tdataType: 'text',\r\n\t\t\t\tdata: data\r\n\t\t\t})\r\n\t\t\t.done(function(text) {\r\n\t\t\t\r\n\t\t\t\tvar element = document.createElement('a');\r\n\t\t\t\telement.setAttribute('href', 'data:text\/plain;charset=utf-8,' + encodeURIComponent(text));\r\n\t\t\t\telement.setAttribute('download', 'tagged.rtf');\r\n\r\n\t\t\t\telement.style.display = 'none';\r\n\t\t\t\tdocument.body.appendChild(element);\r\n\t\t\t\telement.click();\r\n\t\t\t\tdocument.body.removeChild(element);\r\n\t\t\t\r\n\t\t\t})\r\n\t\t\t.fail(function( jqXHR, textStatus, errorThrown ) {\r\n\t\t\t\t\/\/alert( \"error\" );\r\n\t\t\t\telib_tagged.removeAttr(\"disabled\");\r\n\t\t\t\telib_tagged.removeClass( \"loading\" );\r\n\t\t\t\tconsole.log( 'Could not get posts, server results: ' + textStatus + ': ' + errorThrown );\r\n\t\t\t})\r\n\t\t\t.always(function() {\r\n\t\t\t\t\/\/alert( \"complete\" );\r\n\t\t\t\telib_tagged.removeAttr(\"disabled\");\r\n\t\t\t\telib_tagged.removeClass( \"loading\" );\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n\t\r\n\t\r\n\t\/\/\u041f\u0415\u0427\u0410\u0422\u042c print\r\n\t$( \".elib_tagged_save\" ).click(function(event) {\r\n\t\tevent.preventDefault();\r\n\t\t\r\n\t\tvar elib_tagged = $(this);\r\n\t\telib_tagged.addClass( \"loading\" );\r\n\t\t\r\n\t\tif( elib_tagged.attr(\"disabled\") == false || typeof elib_tagged.attr(\"disabled\") === \"undefined\"){\r\n\t\t\t\r\n\t\t\telib_tagged.attr(\"disabled\", true);\r\n\r\n\t\t\tvar data = {\r\n\t\t\t\taction: 'elib_tagged_save',\r\n\t\t\t\tnonce_code: elibajax.nonce,\r\n\t\t\t\tdocumentformat: elib_tagged.siblings('.elib_tagged_save_alias').val(),\r\n\t\t\t\t\/\/documentid: documentid,\r\n\t\t\t\t\/\/documentdb: documentdb,\r\n\t\t\t\t\/\/documenttype: documenttype,\r\n\t\t\t\t\/\/documentselect: documentselect\r\n\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t$.ajax({\r\n\t\t\t\ttype: 'POST',\r\n\t\t\t\turl: elibajax.url,\r\n\t\t\t\tdataType: 'text',\r\n\t\t\t\tdata: data\r\n\t\t\t})\r\n\t\t\t.done(function(text) {\r\n\t\t\t\r\n\t\t\t\tvar element = document.createElement('a');\r\n\t\t\t\telement.setAttribute('href', 'data:text\/plain;charset=utf-8,' + encodeURIComponent(text));\r\n\t\t\t\telement.setAttribute('download', 'tagged.rtf');\r\n\r\n\t\t\t\telement.style.display = 'none';\r\n\t\t\t\tdocument.body.appendChild(element);\r\n\t\t\t\telement.click();\r\n\t\t\t\tdocument.body.removeChild(element);\r\n\t\t\t\r\n\t\t\t})\r\n\t\t\t.fail(function( jqXHR, textStatus, errorThrown ) {\r\n\t\t\t\t\/\/alert( \"error\" );\r\n\t\t\t\telib_tagged.removeAttr(\"disabled\");\r\n\t\t\t\telib_tagged.removeClass( \"loading\" );\r\n\t\t\t\tconsole.log( 'Could not get posts, server results: ' + textStatus + ': ' + errorThrown );\r\n\t\t\t})\r\n\t\t\t.always(function() {\r\n\t\t\t\t\/\/alert( \"complete\" );\r\n\t\t\t\telib_tagged.removeAttr(\"disabled\");\r\n\t\t\t\telib_tagged.removeClass( \"loading\" );\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n});\r\n<\/script>\r\n\r\n\r\n\t\r\n\r\n\r\n<!--\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u0432\u044b\u0440\u0430\u043d\u0438\u0432\u0430\u043d\u0438\u044f-->\r\n<p>&nbsp;<\/p>\r\n\r\n<script type=\"text\/javascript\" >\r\njQuery(document).ready(function($) {\r\n\t\r\n\r\n\t\/\/\u041c\u0430\u0441\u043a\u0430 \u0434\u0430\u0442\u044b\r\n\t$(\".inputmaskDate\").inputmask({\r\n\t\talias: \"datetime\", \r\n\t\tinputFormat: \"dd.mm.yyyy\",\r\n\t\tclearIncomplete: true,\r\n\t\toncomplete: function () { \r\n\t\t\t$(this).parents('.form-group').addClass(\"has-success\");\r\n\t\t\t$(this).parents('.form-group').removeClass(\"has-error\");\t\r\n\t\t\t\/\/ Remove lighting - it's work\t\r\n\t\t}, \r\n\t\tonincomplete: function () { \r\n\t\t\t$(this).parents('.form-group').removeClass(\"has-success\");\t\r\n\t\t\t$(this).parents('.form-group').addClass(\"has-error\"); \/\/ Lighting incomplete field - not work \r\n\t\t},\r\n\t\tplaceholder: \"\u0434\u0434.\u043c\u043c.\u0433\u0433\u0433\u0433\",\r\n\t});\r\n\r\n\t\/\/\u041c\u0430\u0441\u043a\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u0438\r\n\t$(\".inputmaskTime\").inputmask({\r\n\t\talias: \"datetime\", \r\n\t\tinputFormat: \"HH:MM\",\r\n\t\tclearIncomplete: true,\r\n\t\toncomplete: function () { \r\n\t\t\t$(this).parents('.form-group').addClass(\"has-success\");\r\n\t\t\t$(this).parents('.form-group').removeClass(\"has-error\");\t\r\n\t\t\t\/\/ Remove lighting - it's work\t\r\n\t\t}, \r\n\t\tonincomplete: function () { \r\n\t\t\t$(this).parents('.form-group').removeClass(\"has-success\");\t\r\n\t\t\t$(this).parents('.form-group').addClass(\"has-error\"); \/\/ Lighting incomplete field - not work \r\n\t\t},\r\n\t\tplaceholder: \"\u0447\u0447:\u043c\u043c\",\r\n\t});\r\n\r\n\r\n\t\/\/\u041f\u0435\u0447\u0430\u0442\u044c\r\n\t\r\n\t$(\".printable-short-btn\").click(function(event){\r\n\t\tevent.preventDefault();\r\n\t\t\r\n\t\tvar id = $(this).data('printable');\r\n\t\t\r\n\t\t$(\"#printable_short_\" + id).printThis({\r\n\t\t\timportCSS: false\r\n\t\t});\r\n\t\t\/\/$(this).addClass( \"loading\" );\r\n\t\t\/\/$(\".printable-page\").printThis();\r\n\t\t\/\/printablebtn = $(this);\r\n\t\t\/\/var timerId = setInterval(function() {\r\n\t\t\/\/\tprintablebtn.removeClass( \"loading\" );\r\n\t\t\/\/\tconsole.log(1);\r\n\t\t\/\/\tclearTimeout(timerId);\r\n\t\t\/\/}, 700);\t\r\n\t\t\r\n\t});\r\n\t\r\n\t$(\".printable-full-btn\").click(function(event){\r\n\t\tevent.preventDefault();\r\n\t\t\r\n\t\tvar id = $(this).data('printable');\r\n\t\t\r\n\t\t$(\"#printable_full_\" + id).printThis({\r\n\t\t\timportCSS: false\r\n\t\t});\r\n\t\t\/\/$(this).addClass( \"loading\" );\r\n\t\t\/\/$(\".printable-page\").printThis();\r\n\t\t\/\/printablebtn = $(this);\r\n\t\t\/\/var timerId = setInterval(function() {\r\n\t\t\/\/\tprintablebtn.removeClass( \"loading\" );\r\n\t\t\/\/\tconsole.log(1);\r\n\t\t\/\/\tclearTimeout(timerId);\r\n\t\t\/\/}, 700);\t\r\n\t\t\r\n\t});\r\n\t\r\n\t\/\/\u041b\u0430\u0439\u043a\r\n\t$( \".form_lib_document_printorder\" ).submit(function(event) {\r\n\t\tevent.preventDefault();\r\n\t\t\r\n\t\tvar fields = $(this).serializeArray();\r\n\t\t\r\n\t\tvar dbName, shifr, comment, actionPrintorder;\r\n\t\t\/\/$( \"#results\" ).empty();\r\n\t\tjQuery.each( fields, function( i, field ) {\r\n\t\t\t\r\n\t\t\tswitch ( field.name ) {\r\n\t\t\t\tcase 'dbName':\r\n\t\t\t\t\tdbName = field.value;\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 'irbisRecord':\r\n\t\t\t\t\tirbisRecord = field.value;\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 'brief':\r\n\t\t\t\t\tbrief = field.value;\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 'comment':\r\n\t\t\t\t\tcomment = field.value;\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 'actionPrintorder':\r\n\t\t\t\t\tactionPrintorder = field.value;\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\/\/lib_document_printorder = $( \".lib_document_printorder\" );\r\n\t\t\/\/alert_lib_document_printorder = $( \".alert_lib_document_printorder\" );\r\n\t\tlib_document_printorder = $(this).find(\".lib_document_printorder\");\r\n\t\talert_lib_document_printorder = $(this).find(\".alert_lib_document_printorder\");\r\n\t\t\r\n\t\t\r\n\t\tlib_document_printorder.addClass( \"loading\" );\r\n\t\t\r\n\t\t\r\n\t\tif( lib_document_printorder.attr(\"disabled\") == false || typeof lib_document_printorder.attr(\"disabled\") === \"undefined\"){\r\n\t\t\r\n\t\t\tlib_document_printorder.attr(\"disabled\", true);\r\n\t\t\talert_lib_document_printorder.hide();\r\n\t\t\t\r\n\t\t\tvar data = {\r\n\t\t\t\taction: 'lib_document_printorder',\r\n\t\t\t\tnonce_code: elibajax.nonce,\r\n\t\t\t\tdbName: dbName,\r\n\t\t\t\tirbisRecord: irbisRecord,\r\n\t\t\t\tbrief: brief,\r\n\t\t\t\tcomment: comment,\r\n\t\t\t\tactionPrintorder: actionPrintorder,\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t$.ajax({\r\n\t\t\t\ttype: 'POST',\r\n\t\t\t\turl: elibajax.url,\r\n\t\t\t\tdataType: 'json',\r\n\t\t\t\tdata: data\r\n\t\t\t})\r\n\t\t\t.done(function(results) {\r\n\t\t\t\t\/\/alert( \"success\" );\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tif( results.success == true ){\r\n\t\t\t\t\t\tif( typeof(results.data) == 'undefined' || results.data === null || results.data === undefined ){\r\n\t\t\t\t\t\t\t\/\/ \u041d\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 results.data.\r\n\t\t\t\t\t\t\tconsole.log('\u041d\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 results.data');\r\n\t\t\t\t\t\t\t\/\/lib_document_printorder.html('<i class=\"far fa-star \" aria-hidden=\"true\"><\/i> \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435');\r\n\t\t\t\t\t\t\tlib_document_printorder.removeData(\"favorite\" );\r\n\t\t\t\t\t\t\tlib_document_printorder.removeAttr(\"data-favorite\" );\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\talert_lib_document_printorder.show();\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\/\/ \r\n\t\t\t\t\t\t\tconsole.log('\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f results.data \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.');\r\n\t\t\t\t\t\t\tif( typeof(results.data.favorites_id) == 'undefined' || results.data.favorites_id === null || results.data.favorites_id === undefined ){\r\n\t\t\t\t\t\t\t\t\/\/ \u041d\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 results.data.favorites_id.\r\n\t\t\t\t\t\t\t\tconsole.log('\u041d\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 results.data.favorites_id');\r\n\t\t\t\t\t\t\t\t\/\/lib_document_printorder.html('<i class=\"far fa-star \" aria-hidden=\"true\"><\/i> \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435');\r\n\t\t\t\t\t\t\t\tlib_document_printorder.removeData(\"favorite\" );\r\n\t\t\t\t\t\t\t\tlib_document_printorder.removeAttr(\"data-favorite\" );\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\talert_lib_document_printorder.show();\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\/\/ \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0435\u0441\u0442\u044c.\r\n\t\t\t\t\t\t\t\tconsole.log('\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f results.data.favorites_id \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442');\r\n\t\t\t\t\t\t\t\t\/\/lib_document_printorder.html('<i class=\"fa fa-star\" aria-hidden=\"true\"><\/i> \u0423\u0431\u0440\u0430\u0442\u044c \u0438\u0437 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e');\r\n\t\t\t\t\t\t\t\tlib_document_printorder.data( \"favorite\", results.data.favorites_id);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(typeof(results.error) == 'undefined' || results.error === null || results.error === undefined){\r\n\t\t\t\t\t\t\t\/\/ \u041d\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.\r\n\t\t\t\t\t\t\talert('\u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0437\u0430\u044f\u0432\u043a\u0438! ' + JSON.stringify(results) );\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\/\/ \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0435\u0441\u0442\u044c.\r\n\t\t\t\t\t\t\talert('\u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0437\u0430\u044f\u0432\u043a\u0438! ' + results.error.message);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t} catch(e){\r\n\t\t\t\t\tconsole.log(e);\r\n\t\t\t\t\tconsole.log(results);\r\n\t\t\t\t\talert('Error: invalid json. results: ' + results);\r\n\t\t\t\t}\r\n\t\t\t\tlib_document_printorder.removeAttr(\"disabled\");\r\n\t\t\t\tlib_document_printorder.removeClass( \"loading\" );\r\n\t\t\t\t\r\n\t\t\t})\r\n\t\t\t.fail(function( jqXHR, textStatus, errorThrown ) {\r\n\t\t\t\t\/\/alert( \"error\" );\r\n\t\t\t\tlib_document_printorder.removeAttr(\"disabled\");\r\n\t\t\t\tlib_document_printorder.removeClass( \"loading\" );\r\n\t\t\t\tconsole.log( 'Could not get posts, server results: ' + textStatus + ': ' + errorThrown );\r\n\t\t\t})\r\n\t\t\t.always(function() {\r\n\t\t\t\t\/\/alert( \"complete\" );\r\n\t\t\t\tlib_document_printorder.removeAttr(\"disabled\");\r\n\t\t\t\tlib_document_printorder.removeClass( \"loading\" );\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n\r\n\t\/\/\u041b\u0430\u0439\u043a\r\n\t$( \".form_lib_document_order\" ).submit(function(event) {\r\n\t\tevent.preventDefault();\r\n\t\t\r\n\t\tvar fields = $(this).serializeArray();\r\n\t\t\r\n\t\tvar dbName, shifr, comment, actionOrder, orderdate, ordertime;\r\n\t\t\/\/$( \"#results\" ).empty();\r\n\t\tjQuery.each( fields, function( i, field ) {\r\n\t\t\t\r\n\t\t\tswitch ( field.name ) {\r\n\t\t\t\tcase 'dbName':\r\n\t\t\t\t\tdbName = field.value;\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 'irbisRecord':\r\n\t\t\t\t\tirbisRecord = field.value;\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 'brief':\r\n\t\t\t\t\tbrief = field.value;\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 'comment':\r\n\t\t\t\t\tcomment = field.value;\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 'extradition':\r\n\t\t\t\t\textradition = field.value;\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 'orderdate':\r\n\t\t\t\t\torderdate = field.value;\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 'ordertime':\r\n\t\t\t\t\tordertime = field.value;\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t\/\/lib_document_order = $( \".lib_document_order\" );\r\n\t\t\/\/alert_lib_document_order = $( \".alert_lib_document_order\" );\r\n\t\tlib_document_order = $(this).find(\".lib_document_order\");\r\n\t\talert_lib_document_order = $(this).find(\".alert_lib_document_order\");\r\n\t\t\r\n\t\t\r\n\t\tlib_document_order.addClass( \"loading\" );\r\n\t\t\r\n\t\t\r\n\t\tif( lib_document_order.attr(\"disabled\") == false || typeof lib_document_order.attr(\"disabled\") === \"undefined\"){\r\n\t\t\r\n\t\t\tlib_document_order.attr(\"disabled\", true);\r\n\t\t\talert_lib_document_order.hide();\r\n\t\t\t\r\n\t\t\tvar data = {\r\n\t\t\t\taction: 'lib_document_order',\r\n\t\t\t\tnonce_code: elibajax.nonce,\r\n\t\t\t\tdbName: dbName,\r\n\t\t\t\tirbisRecord: irbisRecord,\r\n\t\t\t\tbrief: brief,\r\n\t\t\t\tcomment: comment,\r\n\t\t\t\torderdate: orderdate,\r\n\t\t\t\tordertime: ordertime,\r\n\t\t\t\textradition: extradition,\r\n\t\t\t};\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t$.ajax({\r\n\t\t\t\ttype: 'POST',\r\n\t\t\t\turl: elibajax.url,\r\n\t\t\t\tdataType: 'json',\r\n\t\t\t\tdata: data\r\n\t\t\t})\r\n\t\t\t.done(function(results) {\r\n\t\t\t\t\/\/alert( \"success\" );\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tif( results.success == true ){\r\n\t\t\t\t\t\tif( typeof(results.data) == 'undefined' || results.data === null || results.data === undefined ){\r\n\t\t\t\t\t\t\t\/\/ \u041d\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 results.data.\r\n\t\t\t\t\t\t\tconsole.log('\u041d\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 results.data');\r\n\t\t\t\t\t\t\t\/\/lib_document_order.html('<i class=\"far fa-star \" aria-hidden=\"true\"><\/i> \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435');\r\n\t\t\t\t\t\t\tlib_document_order.removeData(\"favorite\" );\r\n\t\t\t\t\t\t\tlib_document_order.removeAttr(\"data-favorite\" );\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\talert_lib_document_order.show();\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\/\/ \r\n\t\t\t\t\t\t\tconsole.log('\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f results.data \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.');\r\n\t\t\t\t\t\t\tif( typeof(results.data.favorites_id) == 'undefined' || results.data.favorites_id === null || results.data.favorites_id === undefined ){\r\n\t\t\t\t\t\t\t\t\/\/ \u041d\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 results.data.favorites_id.\r\n\t\t\t\t\t\t\t\tconsole.log('\u041d\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 results.data.favorites_id');\r\n\t\t\t\t\t\t\t\t\/\/lib_document_order.html('<i class=\"far fa-star \" aria-hidden=\"true\"><\/i> \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435');\r\n\t\t\t\t\t\t\t\tlib_document_order.removeData(\"favorite\" );\r\n\t\t\t\t\t\t\t\tlib_document_order.removeAttr(\"data-favorite\" );\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\talert_lib_document_order.show();\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\/\/ \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0435\u0441\u0442\u044c.\r\n\t\t\t\t\t\t\t\tconsole.log('\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f results.data.favorites_id \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442');\r\n\t\t\t\t\t\t\t\t\/\/lib_document_order.html('<i class=\"fa fa-star\" aria-hidden=\"true\"><\/i> \u0423\u0431\u0440\u0430\u0442\u044c \u0438\u0437 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e');\r\n\t\t\t\t\t\t\t\tlib_document_order.data( \"favorite\", results.data.favorites_id);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(typeof(results.error) == 'undefined' || results.error === null || results.error === undefined){\r\n\t\t\t\t\t\t\t\/\/ \u041d\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.\r\n\t\t\t\t\t\t\talert('\u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0437\u0430\u044f\u0432\u043a\u0438! ' + JSON.stringify(results) );\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\/\/ \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0435\u0441\u0442\u044c.\r\n\t\t\t\t\t\t\talert('\u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0437\u0430\u044f\u0432\u043a\u0438! ' + results.error.message);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t} catch(e){\r\n\t\t\t\t\tconsole.log(e);\r\n\t\t\t\t\tconsole.log(results);\r\n\t\t\t\t\talert('Error: invalid json. results: ' + results);\r\n\t\t\t\t}\r\n\t\t\t\tlib_document_order.removeAttr(\"disabled\");\r\n\t\t\t\tlib_document_order.removeClass( \"loading\" );\r\n\t\t\t\t\r\n\t\t\t})\r\n\t\t\t.fail(function( jqXHR, textStatus, errorThrown ) {\r\n\t\t\t\t\/\/alert( \"error\" );\r\n\t\t\t\tlib_document_order.removeAttr(\"disabled\");\r\n\t\t\t\tlib_document_order.removeClass( \"loading\" );\r\n\t\t\t\tconsole.log( 'Could not get posts, server results: ' + textStatus + ': ' + errorThrown );\r\n\t\t\t})\r\n\t\t\t.always(function() {\r\n\t\t\t\t\/\/alert( \"complete\" );\r\n\t\t\t\tlib_document_order.removeAttr(\"disabled\");\r\n\t\t\t\tlib_document_order.removeClass( \"loading\" );\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n\t\r\n\t$( \".elib_document_select\" ).click(function(event) {\r\n\t\tevent.preventDefault();\r\n\t\tvar elib_document_select_count = $( \".elib_document_select_count\" );\r\n\t\tvar elib_document_select_countdb = $( \".elib_document_select_countdb\" );\r\n\t\tvar elib_tagged_btn = $( \".elib_tagged_btn\" );\r\n\t\tvar elib_document_select = $(this);\r\n\t\t\r\n\t\t\r\n\t\telib_document_select.addClass( \"loading\" );\r\n\t\t\r\n\t\tif( elib_document_select.attr(\"disabled\") == false || typeof elib_document_select.attr(\"disabled\") === \"undefined\"){\r\n\t\t\telib_document_select.prop('checked', true);\r\n\t\t\telib_document_select.attr(\"disabled\", true);\r\n\t\t\t\r\n\t\t\tdocumentid = elib_document_select.data('documentid');\r\n\t\t\tdocumentdb = elib_document_select.data('documentdb');\r\n\t\t\tdocumenttype = elib_document_select.data('documenttype');\r\n\t\t\tdocumentselect = elib_document_select.data('documentselect');\r\n\t\t\t\r\n\t\t\tvar data = {\r\n\t\t\t\taction: 'elib_document_select',\r\n\t\t\t\tnonce_code: elibajax.nonce,\r\n\t\t\t\tdocumentid: documentid,\r\n\t\t\t\tdocumentdb: documentdb,\r\n\t\t\t\tdocumenttype: documenttype,\r\n\t\t\t\tdocumentselect: documentselect\r\n\t\t\t};\r\n\t\t\t\t\r\n\t\t\t$.ajax({\r\n\t\t\t\ttype: 'POST',\r\n\t\t\t\turl: elibajax.url,\r\n\t\t\t\tdataType: 'json',\r\n\t\t\t\tdata: data\r\n\t\t\t})\r\n\t\t\t.done(function(results) {\r\n\t\t\t\t\/\/alert( \"success\" );\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tif( results.success == true ){\r\n\t\t\t\t\t\tif( typeof(results.data) == 'undefined' || results.data === null || results.data === undefined ){\r\n\t\t\t\t\t\t\t\/\/ \u041d\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 results.data.\r\n\t\t\t\t\t\t\t\/\/console.log('\u041d\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 results.data');\r\n\t\t\t\t\t\t\t\/\/elib_document_select.html('<i class=\"far fa-star \" aria-hidden=\"true\"><\/i> \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435');\r\n\t\t\t\t\t\t\telib_document_select.prop('checked', false);\r\n\t\t\t\t\t\t\telib_document_select.removeData(\"documentselect\" );\r\n\t\t\t\t\t\t\telib_document_select.removeAttr(\"data-documentselect\" );\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif( typeof(results.data.count) != 'undefined' && results.data.count !== null && results.data.count !== undefined ){\r\n\t\t\t\t\t\t\t\telib_document_select_count.html(results.data.count);\r\n\t\t\t\t\t\t\t\tif( results.data.count > 0){\r\n\t\t\t\t\t\t\t\t\telib_tagged_btn.show();\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\telib_tagged_btn.hide();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif( typeof(results.data.countdb) != 'undefined' && results.data.countdb !== null && results.data.countdb !== undefined ){\r\n\t\t\t\t\t\t\t\telib_document_select_countdb.html(results.data.countdb);\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\/\/console.log('\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f results.data \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.');\r\n\t\t\t\t\t\t\tif( typeof(results.data.documentselect) == 'undefined' || results.data.documentselect === null || results.data.documentselect === undefined ){\r\n\t\t\t\t\t\t\t\t\/\/ \u041d\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 results.data.documentselect.\r\n\t\t\t\t\t\t\t\t\/\/console.log('\u041d\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 results.data.documentselect');\r\n\t\t\t\t\t\t\t\t\/\/elib_document_select.html('<i class=\"far fa-star \" aria-hidden=\"true\"><\/i> \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435');\r\n\t\t\t\t\t\t\t\telib_document_select.prop('checked', false);\r\n\t\t\t\t\t\t\t\telib_document_select.removeData(\"documentselect\" );\r\n\t\t\t\t\t\t\t\telib_document_select.removeAttr(\"data-documentselect\" );\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\/\/ \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0435\u0441\u0442\u044c.\r\n\t\t\t\t\t\t\t\t\/\/console.log('\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f results.data.documentselect \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442');\r\n\t\t\t\t\t\t\t\t\/\/elib_document_select.html('<i class=\"fa fa-star\" aria-hidden=\"true\"><\/i> \u0423\u0431\u0440\u0430\u0442\u044c \u0438\u0437 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e');\r\n\t\t\t\t\t\t\t\telib_document_select.prop('checked', true);\r\n\t\t\t\t\t\t\t\telib_document_select.data( \"documentselect\", results.data.documentselect);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif(typeof(results.error) == 'undefined' || results.error === null || results.error === undefined){\r\n\t\t\t\t\t\t\t\/\/ \u041d\u0435\u0442 \u0442\u0430\u043a\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.\r\n\t\t\t\t\t\t\talert('\u041e\u0448\u0438\u0431\u043a\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435! ' + JSON.stringify(results) );\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\/\/ \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0435\u0441\u0442\u044c.\r\n\t\t\t\t\t\t\talert('\u041e\u0448\u0438\u0431\u043a\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435! ' + results.error.message);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch(e){\r\n\t\t\t\t\tconsole.log(e);\r\n\t\t\t\t\tconsole.log(results);\r\n\t\t\t\t\talert('Error: invalid json. results: ' + results);\r\n\t\t\t\t}\r\n\t\t\t\telib_document_select.removeAttr(\"disabled\");\r\n\t\t\t\telib_document_select.removeClass( \"loading\" );\r\n\t\t\t})\r\n\t\t\t.fail(function( jqXHR, textStatus, errorThrown ) {\r\n\t\t\t\t\/\/alert( \"error\" );\r\n\t\t\t\telib_document_select.removeAttr(\"disabled\");\r\n\t\t\t\telib_document_select.removeClass( \"loading\" );\r\n\t\t\t\tconsole.log( 'Could not get posts, server results: ' + textStatus + ': ' + errorThrown );\r\n\t\t\t})\r\n\t\t\t.always(function() {\r\n\t\t\t\t\/\/alert( \"complete\" );\r\n\t\t\t\telib_document_select.removeAttr(\"disabled\");\r\n\t\t\t\telib_document_select.removeClass( \"loading\" );\r\n\t\t\t});\r\n\t\t}\r\n\t});\r\n});\r\n<\/script>\r\n\r\n<script>\r\n\/*\r\n * printThis v1.14.1\r\n * @desc Printing plug-in for jQuery\r\n * @author Jason Day\r\n *\r\n * Resources (based on):\r\n * - jPrintArea: http:\/\/plugins.jquery.com\/project\/jPrintArea\r\n * - jqPrint: https:\/\/github.com\/permanenttourist\/jquery.jqprint\r\n * - Ben Nadal: http:\/\/www.bennadel.com\/blog\/1591-Ask-Ben-Print-Part-Of-A-Web-Page-With-jQuery.htm\r\n *\r\n * Licensed under the MIT licence:\r\n *              http:\/\/www.opensource.org\/licenses\/mit-license.php\r\n *\r\n * (c) Jason Day 2015-2018\r\n *\r\n * Usage:\r\n *\r\n *  $(\"#mySelector\").printThis({\r\n *      debug: false,                   \/\/ show the iframe for debugging\r\n *      importCSS: true,                \/\/ import parent page css\r\n *      importStyle: false,             \/\/ import style tags\r\n *      printContainer: true,           \/\/ grab outer container as well as the contents of the selector\r\n *      loadCSS: \"path\/to\/my.css\",      \/\/ path to additional css file - use an array [] for multiple\r\n *      pageTitle: \"\",                  \/\/ add title to print page\r\n *      removeInline: false,            \/\/ remove all inline styles from print elements\r\n *      removeInlineSelector: \"body *\", \/\/ custom selectors to filter inline styles. removeInline must be true\r\n *      printDelay: 333,                \/\/ variable print delay\r\n *      header: null,                   \/\/ prefix to html\r\n *      footer: null,                   \/\/ postfix to html\r\n *      base: false,                    \/\/ preserve the BASE tag, or accept a string for the URL\r\n *      formValues: true,               \/\/ preserve input\/form values\r\n *      canvas: false,                  \/\/ copy canvas elements\r\n *      doctypeString: '...',           \/\/ enter a different doctype for older markup\r\n *      removeScripts: false,           \/\/ remove script tags from print content\r\n *      copyTagClasses: false           \/\/ copy classes from the html & body tag\r\n *      beforePrintEvent: null,         \/\/ callback function for printEvent in iframe\r\n *      beforePrint: null,              \/\/ function called before iframe is filled\r\n *      afterPrint: null                \/\/ function called before iframe is removed\r\n *  });\r\n *\r\n * Notes:\r\n *  - the loadCSS will load additional CSS (with or without @media print) into the iframe, adjusting layout\r\n *\/\r\n;\r\n(function($) {\r\n\r\n    function appendContent($el, content) {\r\n        if (!content) return;\r\n\r\n        \/\/ Simple test for a jQuery element\r\n        $el.append(content.jquery ? content.clone() : content);\r\n    }\r\n\r\n    function appendBody($body, $element, opt) {\r\n        \/\/ Clone for safety and convenience\r\n        \/\/ Calls clone(withDataAndEvents = true) to copy form values.\r\n        var $content = $element.clone(opt.formValues);\r\n\r\n        if (opt.formValues) {\r\n            \/\/ Copy original select and textarea values to their cloned counterpart\r\n            \/\/ Makes up for inability to clone select and textarea values with clone(true)\r\n            copyValues($element, $content, 'select, textarea');\r\n        }\r\n\r\n        if (opt.removeScripts) {\r\n            $content.find('script').remove();\r\n        }\r\n\r\n        if (opt.printContainer) {\r\n            \/\/ grab $.selector as container\r\n            $content.appendTo($body);\r\n        } else {\r\n            \/\/ otherwise just print interior elements of container\r\n            $content.each(function() {\r\n                $(this).children().appendTo($body)\r\n            });\r\n        }\r\n    }\r\n\r\n    \/\/ Copies values from origin to clone for passed in elementSelector\r\n    function copyValues(origin, clone, elementSelector) {\r\n        var $originalElements = origin.find(elementSelector);\r\n\r\n        clone.find(elementSelector).each(function(index, item) {\r\n            $(item).val($originalElements.eq(index).val());\r\n        });\r\n    }\r\n\r\n    var opt;\r\n    $.fn.printThis = function(options) {\r\n        opt = $.extend({}, $.fn.printThis.defaults, options);\r\n        var $element = this instanceof jQuery ? this : $(this);\r\n\r\n        var strFrameName = \"printThis-\" + (new Date()).getTime();\r\n\r\n        if (window.location.hostname !== document.domain && navigator.userAgent.match(\/msie\/i)) {\r\n            \/\/ Ugly IE hacks due to IE not inheriting document.domain from parent\r\n            \/\/ checks if document.domain is set by comparing the host name against document.domain\r\n            var iframeSrc = \"javascript:document.write(\\\"<head><script>document.domain=\\\\\\\"\" + document.domain + \"\\\\\\\";<\/s\" + \"cript><\/head><body><\/body>\\\")\";\r\n            var printI = document.createElement('iframe');\r\n            printI.name = \"printIframe\";\r\n            printI.id = strFrameName;\r\n            printI.className = \"MSIE\";\r\n            document.body.appendChild(printI);\r\n            printI.src = iframeSrc;\r\n\r\n        } else {\r\n            \/\/ other browsers inherit document.domain, and IE works if document.domain is not explicitly set\r\n            var $frame = $(\"<iframe id='\" + strFrameName + \"' name='printIframe' \/>\");\r\n            $frame.appendTo(\"body\");\r\n        }\r\n\r\n        var $iframe = $(\"#\" + strFrameName);\r\n\r\n        \/\/ show frame if in debug mode\r\n        if (!opt.debug) $iframe.css({\r\n            position: \"absolute\",\r\n            width: \"0px\",\r\n            height: \"0px\",\r\n            left: \"-600px\",\r\n            top: \"-600px\"\r\n        });\r\n\r\n        \/\/ before print callback\r\n        if (typeof opt.beforePrint === \"function\") {\r\n            opt.beforePrint();\r\n        }\r\n\r\n        \/\/ $iframe.ready() and $iframe.load were inconsistent between browsers\r\n        setTimeout(function() {\r\n\r\n            \/\/ Add doctype to fix the style difference between printing and render\r\n            function setDocType($iframe, doctype){\r\n                var win, doc;\r\n                win = $iframe.get(0);\r\n                win = win.contentWindow || win.contentDocument || win;\r\n                doc = win.document || win.contentDocument || win;\r\n                doc.open();\r\n                doc.write(doctype);\r\n                doc.close();\r\n            }\r\n\r\n            if (opt.doctypeString){\r\n                setDocType($iframe, opt.doctypeString);\r\n            }\r\n\r\n            var $doc = $iframe.contents(),\r\n                $head = $doc.find(\"head\"),\r\n                $body = $doc.find(\"body\"),\r\n                $base = $('base'),\r\n                baseURL;\r\n\r\n            \/\/ add base tag to ensure elements use the parent domain\r\n            if (opt.base === true && $base.length > 0) {\r\n                \/\/ take the base tag from the original page\r\n                baseURL = $base.attr('href');\r\n            } else if (typeof opt.base === 'string') {\r\n                \/\/ An exact base string is provided\r\n                baseURL = opt.base;\r\n            } else {\r\n                \/\/ Use the page URL as the base\r\n                baseURL = document.location.protocol + '\/\/' + document.location.host;\r\n            }\r\n\r\n            $head.append('<base href=\"' + baseURL + '\">');\r\n\r\n            \/\/ import page stylesheets\r\n            if (opt.importCSS) $(\"link[rel=stylesheet]\").each(function() {\r\n                var href = $(this).attr(\"href\");\r\n                if (href) {\r\n                    var media = $(this).attr(\"media\") || \"all\";\r\n                    $head.append(\"<link type='text\/css' rel='stylesheet' href='\" + href + \"' media='\" + media + \"'>\");\r\n                }\r\n            });\r\n\r\n            \/\/ import style tags\r\n            if (opt.importStyle) $(\"style\").each(function() {\r\n                $head.append(this.outerHTML);\r\n            });\r\n\r\n            \/\/ add title of the page\r\n            if (opt.pageTitle) $head.append(\"<title>\" + opt.pageTitle + \"<\/title>\");\r\n\r\n            \/\/ import additional stylesheet(s)\r\n            if (opt.loadCSS) {\r\n                if ($.isArray(opt.loadCSS)) {\r\n                    jQuery.each(opt.loadCSS, function(index, value) {\r\n                        $head.append(\"<link type='text\/css' rel='stylesheet' href='\" + this + \"'>\");\r\n                    });\r\n                } else {\r\n                    $head.append(\"<link type='text\/css' rel='stylesheet' href='\" + opt.loadCSS + \"'>\");\r\n                }\r\n            }\r\n\r\n            var pageHtml = $('html')[0];\r\n\r\n            \/\/ CSS VAR in html tag when dynamic apply e.g.  document.documentElement.style.setProperty(\"--foo\", bar);\r\n            $doc.find('html').prop('style', pageHtml.style.cssText);\r\n\r\n            \/\/ copy 'root' tag classes\r\n            var tag = opt.copyTagClasses;\r\n            if (tag) {\r\n                tag = tag === true ? 'bh' : tag;\r\n                if (tag.indexOf('b') !== -1) {\r\n                    $body.addClass($('body')[0].className);\r\n                }\r\n                if (tag.indexOf('h') !== -1) {\r\n                    $doc.find('html').addClass(pageHtml.className);\r\n                }\r\n            }\r\n\r\n            \/\/ print header\r\n            appendContent($body, opt.header);\r\n\r\n            if (opt.canvas) {\r\n                \/\/ add canvas data-ids for easy access after cloning.\r\n                var canvasId = 0;\r\n                \/\/ .addBack('canvas') adds the top-level element if it is a canvas.\r\n                $element.find('canvas').addBack('canvas').each(function(){\r\n                    $(this).attr('data-printthis', canvasId++);\r\n                });\r\n            }\r\n\r\n            appendBody($body, $element, opt);\r\n\r\n            if (opt.canvas) {\r\n                \/\/ Re-draw new canvases by referencing the originals\r\n                $body.find('canvas').each(function(){\r\n                    var cid = $(this).data('printthis'),\r\n                        $src = $('[data-printthis=\"' + cid + '\"]');\r\n\r\n                    this.getContext('2d').drawImage($src[0], 0, 0);\r\n\r\n                    \/\/ Remove the markup from the original\r\n                    if ($.isFunction($.fn.removeAttr)) {\r\n                        $src.removeAttr('data-printthis');\r\n                    } else {\r\n                        $.each($src, function(i, el) {\r\n                            el.removeAttribute('data-printthis')\r\n                        });\r\n                    }\r\n                });\r\n            }\r\n\r\n            \/\/ remove inline styles\r\n            if (opt.removeInline) {\r\n                \/\/ Ensure there is a selector, even if it's been mistakenly removed\r\n                var selector = opt.removeInlineSelector || '*';\r\n                \/\/ $.removeAttr available jQuery 1.7+\r\n                if ($.isFunction($.removeAttr)) {\r\n                    $body.find(selector).removeAttr(\"style\");\r\n                } else {\r\n                    $body.find(selector).attr(\"style\", \"\");\r\n                }\r\n            }\r\n\r\n            \/\/ print \"footer\"\r\n            appendContent($body, opt.footer);\r\n\r\n            \/\/ attach event handler function to beforePrint event\r\n            function attachOnBeforePrintEvent($iframe, beforePrintHandler) {\r\n                var win = $iframe.get(0);\r\n                win = win.contentWindow || win.contentDocument || win;\r\n\r\n                if (typeof beforePrintHandler === \"function\") {\r\n                    if ('matchMedia' in win) {\r\n                        win.matchMedia('print').addListener(function(mql) {\r\n                            if(mql.matches)  beforePrintHandler();\r\n                        });\r\n                    } else {\r\n                        win.onbeforeprint = beforePrintHandler;\r\n                    }\r\n                }\r\n            }\r\n            attachOnBeforePrintEvent($iframe, opt.beforePrint);\r\n\r\n            setTimeout(function() {\r\n                if ($iframe.hasClass(\"MSIE\")) {\r\n                    \/\/ check if the iframe was created with the ugly hack\r\n                    \/\/ and perform another ugly hack out of neccessity\r\n                    window.frames[\"printIframe\"].focus();\r\n                    $head.append(\"<script>  window.print(); <\/s\" + \"cript>\");\r\n                } else {\r\n                    \/\/ proper method\r\n                    if (document.queryCommandSupported(\"print\")) {\r\n                        $iframe[0].contentWindow.document.execCommand(\"print\", false, null);\r\n                    } else {\r\n                        $iframe[0].contentWindow.focus();\r\n                        $iframe[0].contentWindow.print();\r\n                    }\r\n                }\r\n\r\n                \/\/ remove iframe after print\r\n                if (!opt.debug) {\r\n                    setTimeout(function() {\r\n                        $iframe.remove();\r\n\r\n                    }, 1000);\r\n                }\r\n\r\n                \/\/ after print callback\r\n                if (typeof opt.afterPrint === \"function\") {\r\n                    opt.afterPrint();\r\n                }\r\n\r\n            }, opt.printDelay);\r\n\r\n        }, 333);\r\n\r\n    };\r\n\r\n    \/\/ defaults\r\n    $.fn.printThis.defaults = {\r\n        debug: false,               \/\/ show the iframe for debugging\r\n        importCSS: true,            \/\/ import parent page css\r\n        importStyle: false,         \/\/ import style tags\r\n        printContainer: true,       \/\/ print outer container\/$.selector\r\n        loadCSS: \"\",                \/\/ path to additional css file - use an array [] for multiple\r\n        pageTitle: \"\",              \/\/ add title to print page\r\n        removeInline: false,        \/\/ remove inline styles from print elements\r\n        removeInlineSelector: \"*\",  \/\/ custom selectors to filter inline styles. removeInline must be true\r\n        printDelay: 333,            \/\/ variable print delay\r\n        header: null,               \/\/ prefix to html\r\n        footer: null,               \/\/ postfix to html\r\n        base: false,                \/\/ preserve the BASE tag or accept a string for the URL\r\n        formValues: true,           \/\/ preserve input\/form values\r\n        canvas: false,              \/\/ copy canvas content\r\n        doctypeString: '<!DOCTYPE html>', \/\/ enter a different doctype for older markup\r\n        removeScripts: false,       \/\/ remove script tags from print content\r\n        copyTagClasses: false,      \/\/ copy classes from the html & body tag\r\n        beforePrintEvent: null,     \/\/ callback function for printEvent in iframe\r\n        beforePrint: null,          \/\/ function called before iframe is filled\r\n        afterPrint: null            \/\/ function called before iframe is removed\r\n    };\r\n})(jQuery);\r\n<\/script>\r\n\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":0,"parent":33370,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"right-sidebar","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"unboxed","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"pgc_sgb_lightbox_settings":"","footnotes":""},"_links":{"self":[{"href":"https:\/\/elib.amu.kz\/ru\/wp-json\/wp\/v2\/pages\/33374"}],"collection":[{"href":"https:\/\/elib.amu.kz\/ru\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/elib.amu.kz\/ru\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/elib.amu.kz\/ru\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/elib.amu.kz\/ru\/wp-json\/wp\/v2\/comments?post=33374"}],"version-history":[{"count":12,"href":"https:\/\/elib.amu.kz\/ru\/wp-json\/wp\/v2\/pages\/33374\/revisions"}],"predecessor-version":[{"id":36255,"href":"https:\/\/elib.amu.kz\/ru\/wp-json\/wp\/v2\/pages\/33374\/revisions\/36255"}],"up":[{"embeddable":true,"href":"https:\/\/elib.amu.kz\/ru\/wp-json\/wp\/v2\/pages\/33370"}],"wp:attachment":[{"href":"https:\/\/elib.amu.kz\/ru\/wp-json\/wp\/v2\/media?parent=33374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}