Некодим логотипНекодим
МодификацииПубликацииНекодИИмЦены
Некодим логотипНекодим

© 2020-2026 Некодим

Готовые модификации для вашего сайта. Улучшайте функциональность и дизайн без программирования.

Компания

  • Контакты
  • Публичная оферта
  • Политика конфиденциальности
  • Согласие на обработку данных
  • Лицензионное соглашение
  • Реферальная программа

Полезное

  • Модификации
  • Публикации
  • Каталог блоков Tilda
  • MCP для агентов
  • Журнал изменений
  • Доска почёта

Личный кабинет

  • Вход
  • Регистрация
  • Цены
Журнал измененийИстория GitФайлыTilda MCP
Каталог файлов

tilda-members-resources-pageslist.js

Код файла
Версия от 08.10.2026, 07:01:09 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
101	html += '</form>';102 103	html = tma__translate(html, 'resources_dict');104 105	tma__drawPopup({106		id: 'check-email-popup',107		content: html,108		className: 'tlk-popup_check-email',109		closeBtns: [],110	});111 112	var form = document.getElementById('check-email-form');113
История файла и сравнение версий
  • 08.10.2026, 07:01:09 · 56c3b845
114 form.addEventListener('submit', function (event) {
115 event.preventDefault();
116
117 tma__profile__submitEditProfile(form, {
118 onSuccess: function () {
119 // TODO: удалить фолбэк после обновления tilda-members-init.min.js
120 if (typeof tma__getSafeRedirectUrl === 'function') {
121 var safeUrl = tma__getSafeRedirectUrl(url);
122
123 if (safeUrl) {
124 window.location.assign(safeUrl);
125 }
126 } else if (url) {
127 window.location.assign(url);
128 }
129 },
130 });
131 });
132}
133
134/**
135 * Шаблон списка страниц
136 *
137 * @param {object} props - данные доступных ресурсов
138 * @param {object} style - данные стилей
139 * @returns {string} - список страниц
140 */
141function tma__resources__getPagesListHtml(props, style) {
142 var html = '';
143
144 html += '<div class="tlk-resources__container">';
145
146 if (style && (!style.typeId || style.typeId === 'custom') && style.textTop) {
147 html += '<div class="tlk-resources__text-top">' + style.textTop + '</div>';
148 }
149
150 html += '<div class="tlk-resources__wrap">';
151
152 if (props.courses.length === 0 && props.groups.length === 0) {
153 html += '<div class="tlk-resources__empty">';
154 html += '<div class="tlk-resources__empty-wrap">';
155 html += '<div class="tlk-resources__empty-image">';
156 html +=
157 '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="100px" height="100px" viewBox="0 0 64 64" enable-background="new 0 0 64 64" xml:space="preserve">';
158 html +=
159 '<line fill="none" stroke="#c3c3c3" stroke-width="2" stroke-miterlimit="10" x1="7" y1="0" x2="7" y2="64"></line>';
160 html +=
161 '<polyline fill="none" stroke="#c3c3c3" stroke-width="2" stroke-miterlimit="10" points="32.062,6 26,11 26,35 57,35 51,23 57,11 26,11 "></polyline>';
162 html +=
163 '<polyline fill="none" stroke="#c3c3c3" stroke-width="2" stroke-miterlimit="10" points="26,30 7,30 7,6 32,6 32,11 "></polyline>';
164 html += '</svg>';
165 html += '</div>';
166 html += '<div class="tlk-resources__empty-text">';
167 html += '{{resources_empty_text_first}}<br>{{resources_empty_text_second}}';
168 html += '</div>';
169 html += '</div>';
170 html += '</div>';
171 } else {
172 if (props.courses.length !== 0) {
173 html += '<div class="tlk-resources__courses">';
174
175 for (var i = 0; i < props.courses.length; i++) {
176 html += tma__resources__getCourseItemHtml(props.courses[i]);
177 }
178
179 html += '</div>';
180 }
181
182 if (props.groups.length !== 0) {
183 html += '<div class="tlk-resources__groups">';
184
185 for (var i = 0; i < props.groups.length; i++) {
186 html += tma__resources__getGroupItemHtml(props.groups[i]);
187 }
188
189 html += '</div>';
190 }
191 }
192
193 html += '</div>';
194
195 if (style && (!style.typeId || style.typeId === 'custom') && style.textBottom) {
196 html += '<div class="tlk-resources__text-bottom">' + style.textBottom + '</div>';
197 }
198
199 html += '</div>';
200
Предыдущие 100 строкСледующие 100 строк