%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 3.144.19.224 Web Server : Apache/2.4.52 (Ubuntu) System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 User : www-root ( 1010) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/webdebug.antirutin/plugins/element/link_section/ |
Upload File : |
/* See additional vars in sources: \WD\Antirutin\Plugin::printJs() */ $(document).delegate(hid+' input[data-role="filter"]', 'input', function(e){ var text = $.trim($(this).val().toLowerCase()), filtered = !!text.length, select = $(this).closest('[data-role="select_section"]').find('select'), options = select.find('option').not('[value=""]');//.removeAttr('selected'); if(filtered){ options.hide().each(function(){ $(this).text($(this).attr('data-text-full')); if(($(this).val() + $(this).text()).toLowerCase().indexOf(text) != -1){ $(this).show(); } }); } else{ options.show().each(function(){ $(this).text($(this).attr('data-text-lite')); }); } }); // Handle change action $(document).delegate(hid+' select[data-role="action"]', 'change', function(e){ let selectSections = $('select[data-role="section"]', div), selectSectionsName = selectSections.attr('name').replace(/\[\]$/, ''); if($(this).val() == 'add' || $(this).val() == 'delete'){ selectSectionsName += '[]'; selectSections.attr('multiple', 'multiple'); } else{ selectSections.removeAttr('multiple'); } if(selectSectionsName != selectSections.attr('name')){ selectSections.attr('name', selectSectionsName); } $('.plugin-form__field[data-role="selected_section"]').toggle($(this).val() != 'correct'); }); // Handle select sections $(document).delegate(hid+' select[data-role="section"]', 'change', function(e){ let value = $(this).val(); if(value){ value = typeof $(this).val() == 'object' ? value : [value]; $('span[data-role="link_sections_count"]', div).text(value.length); } }); // Plugin load handler $(document).delegate(hid, 'pluginload', function(e){ $('select[data-role="action"]', div).trigger('change'); $('select[data-role="section"]', div).trigger('change'); wdaSelect2($('select[data-role="action"]', div)); }); // Check fields on start wdaOnStartHandler(id, function(id, div, title){ if(!$('select[data-role="action"]', div).val()){ return $('input[data-role="error_no_action"]', div).val(); } let action = $('select[data-role="action"]', div).val(); if(!$('select[data-role="section"]', div).val() && action != 'set' && action != 'correct'){ return $('input[data-role="error_no_section"]', div).val(); } return true; });