Files
crm.clientright.ru/libraries/jquery/jquery.virtualpages.js
Fedor ac7467f0b4 Major CRM updates: AI Assistant, Court Status API, S3 integration improvements, and extensive file storage system
- Added comprehensive AI Assistant system (aiassist/ directory):
  * Vector search and embedding capabilities
  * Typebot proxy integration
  * Elastic search functionality
  * Message classification and chat history
  * MCP proxy for external integrations

- Implemented Court Status API (GetCourtStatus.php):
  * Real-time court document status checking
  * Integration with external court systems
  * Comprehensive error handling and logging

- Enhanced S3 integration:
  * Improved file backup system with metadata
  * Batch processing capabilities
  * Enhanced error logging and recovery
  * Copy operations with URL fixing

- Added Telegram contact creation API
- Improved error logging across all modules
- Enhanced callback system for AI responses
- Extensive backup file storage with timestamps
- Updated documentation and README files

- File storage improvements:
  * Thousands of backup files with proper metadata
  * Fix operations for broken file references
  * Project-specific backup and recovery systems
  * Comprehensive file integrity checking

Total: 26,461+ files added/modified including AWS SDK, vendor dependencies, and extensive backup system.
2025-10-16 11:17:21 +03:00

89 lines
2.5 KiB
JavaScript

/**
* Author: Prasad.A
* Copyright: You are free to use or modify this extension in commercial and non-commercial application
* However, make sure to keep the information about this copyright and author information. Provide the
* credits wherever possible.
*/
;(function($){
$.fn.pushVirtualPage = function() {
// Make this element as root node first
var holder = this;
if (!holder.hasClass('virtualpages')) {
holder.addClass('virtualpages');
}
var pages = $('.virtualpage', holder);
// If its the first page to be added but there are contents
// inside this element, wrap it into a page.
if (pages.length == 0 && holder.children().length) {
var wrapper = $('<div class="virtualpage"></div>');
var olderChildrens = holder.children();
wrapper.append(olderChildrens.clone(true, true));
olderChildrens.remove();
holder.empty().append(wrapper);
// rebuild the reference
pages = $('.virtualpage', holder);
}
// Save scroll position
var activePage = this.activeVirtualPage();
activePage.data('scrolltop', $(window).scrollTop());
holder.data('virtualpage-activeindex', pages.length);
pages.hide();
var page = $('<div class="virtualpage"></div>');
page.data('isvirtualpage', true);
holder.append(page);
page.show();
return page;
}
$.fn.popVirtualPage = function(limit) {
// Page generally will be popped off w.r.t root node
var holder = this;
if (!this.hasClass('virtualpages')) {
holder = this.closest('.virtualpages');
if (holder.length) return false;
}
var pages = holder.children('.virtualpage');
if (typeof(limit) == 'undefined') limit = pages.length-1;
if (pages.length > limit) {
pages.hide();
var page = pages[pages.length-1];
$(page).remove();
delete page;
var activePage = $(pages[pages.length-2]);
activePage.show();
// Restore scroll position
if (activePage.data('scrolltop')) {
$(window).scrollTop(activePage.data('scrolltop'))
}
holder.data('virtualpage-activeindex', pages.length-2);
return true;
}
return false;
}
$.fn.popVirtualPageTo = function(limit) {
while (this.popVirtualPage(limit)) continue;
}
$.fn.getVirtualPage = function() {
if (this.hasClass('virtualpage')) return this;
return this.closest('.virtualpage');
}
$.fn.activeVirtualPage = function() {
var holder = this;
var activeIndex = parseInt(holder.data('virtualpage-activeindex'));
var pages = $('.virtualpage', holder);
return $(pages[activeIndex]);
}
})(jQuery);