Advertisement
KateBarylo

Untitled

Jan 16th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.32 KB | None | 0 0
  1.         var SearchPerson = function() {
  2.             this.beforeReq = function() {
  3.                 if (heightSearchResult < $(window).height()) {
  4.                     count = Math.round(($(window).height() - heightSearchResult) / 41 + 2) * 4;
  5.                     count = (count > 16 ? count : 16)
  6.                 }
  7.                 idLoaderTimeout = setTimeout(function(){jqueryMap.$loader.show('fast');},100);
  8.  
  9.                 this.url = this.inputData.attr('action') || this.inputData.attr('value');
  10.                 this.data = this.inputData.serialize() + '&' + $.param({data: {start: start, count: count}});
  11.                 return true;
  12.             };
  13.  
  14.             this.successReq = function(resp) {
  15.                 clearTimeout(idLoaderTimeout);
  16.                 lockSearchRequest = false;
  17.                 jqueryMap.$loader.hide(0);
  18.                 if (resp.status == 'USERS_FOUND') {
  19.                     if (start == 0) {
  20.                         returnedTotalCount = resp.result.totalCount;
  21.                         if( !jqueryMap.$resultSearch.is(':empty') ) {
  22.                             jqueryMap.$resultSearch.empty();
  23.                         }
  24.                         if (jqueryMap.$userAbsent.is(':visible')) {
  25.                             jqueryMap.$userAbsent.hide(0);
  26.                         }
  27.                     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement