1(function($) 2{ 3 $.ETC = $.ETC || {}; 4 $.ETC.JR = $.ETC.JR || {}; 5 // Ðжидание вÑÐ¿Ð¾Ð»Ð½ÐµÐ½Ð¸Ñ Ð¾ÑÑÑÑа Ñ Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸ÐµÐ¼ гÑида 6 $.ETC.JR.RefreshResult = function(frm, args) 7 { 8 stateUrl = args.StateUrl; // url возвÑаÑаÑÑий ÑекÑÑее ÑоÑÑоÑние оÑÑÑÑа 9 _frm = frm; 10 executionVersion = args.ExecutionVersion; // веÑÑÐ¸Ñ Ð¾ÑÑÑÑа, в коÑоÑой он вÑполнÑеÑÑÑ 11 resultUrl = args.ResultUrl; // url показÑваÑÑий ÑезÑлÑÑÐ°Ñ Ð¾ÑÑÑÑа без динамиÑеÑкого Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ 12 progressBar = $('<tr class="executing_report"><td colspan="2">' + 13 '<span class="loading"><div class="progress"></div></span><div class="executing_indicator"></div></td></tr>'); 14 frm.container.find('table.values').prepend(progressBar); 15 refreshPeriod = 2000; 16 setTimeout(waitRefresh, refreshPeriod); 17 } 18 19 var _frm; 20 var stateUrl; 21 var executionVersion; 22 var resultUrl; 23 var refreshPeriod; 24 var progressBar; 25 26 function waitRefresh() 27 { 28 refreshPeriod += 1000; 29 $.ajax({ 30 url: stateUrl, 31 type: 'post', 32 success: function(data) 33 { 34 var progressMessage = data.ProgressMessage == null ? '' : data.ProgressMessage; 35 $('.executing_indicator', progressBar).text(progressMessage); 36 updateGrid(); 37 38 if (data.Version == 0) 39 { 40 $('.loading', progressBar).remove(); 41 $.Dm.Notify('ÐÑÑÑÑ Ð½Ðµ найден. ÐапÑÑÑиÑе оÑÑÑÑ Ð½Ð° вÑполнение еÑÑ Ñаз.'); 42 }
43 else if (data.Version <= executionVersion) 44 { 45 setTimeout(waitRefresh, refreshPeriod); 46 } 47 else if (data.Version > executionVersion) 48 { 49 progressBar.remove(); 50 if (data.ModelState == "Ready") 51 $.Dm.Notify("ÐÑÑÑÑ ÑÑоÑмиÑован"); 52 else // пÑоизоÑла оÑибка, Ð½ÐµÐ¾Ð±Ñ Ð¾Ð´Ð¸Ð¼Ð¾ показаÑÑ formModel.Messages.Errors 53 $.Dm.AjaxNav.go(resultUrl); 54 } 55 }, 56 error: function(jqhxr, status, message) 57 { 58 $('.loading', progressBar).remove(); 59 $('.executing_indicator', progressBar).text('ÐбновиÑе ÑÑÑаниÑÑ. Ajax ÑÑаÑÑc: ' + status +', ' + message); 60 } 61 }); 62 } 63 64 function updateGrid() 65 { 66 var gridDiv = _frm.container.find('.dataContent'); 67 var updateUrl = gridDiv.find("table").data('updateurl').main; 68 $.get(updateUrl, function(gridHtml) 69 { 70 gridDiv.parent().html(gridHtml); 71 }); 72 } 73})(jQuery);
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.