Bug #94661 » 94661-redirect_pagination_broken.patch
Resources/Public/JavaScript/RedirectsModule.js | ||
---|---|---|
*
|
||
* The TYPO3 project - inspiring people to share!
|
||
*/
|
||
define(["require","exports","TYPO3/CMS/Core/Event/RegularEvent"],(function(e,t,n){"use strict";return new class{constructor(){const e=document.querySelector('form[data-on-submit="processNavigate"]');null!==e&&(new n("change",this.executeSubmit.bind(this)).delegateTo(document,'[data-on-change="submit"]'),new n("submit",this.processNavigate.bind(this)).bindTo(e))}executeSubmit(e,t){t instanceof HTMLSelectElement&&t.form.submit()}processNavigate(e,t){if(!(t instanceof HTMLFormElement))return;e.preventDefault();const n=t.elements.namedItem("paginator-target-page"),a=parseInt(n.dataset.numberOfPages,10);let s=n.dataset.url,r=parseInt(n.value,10);r>a?r=a:r<1&&(r=1),s=s.replace("987654322",r.toString()),self.location.href=s}}}));
|
||
define(["require","exports","TYPO3/CMS/Core/Event/RegularEvent"],(function(e,t,n){"use strict";return new class{constructor(){const e=document.querySelector('form[data-on-submit="processNavigate"]');null!==e&&(new n("change",this.executeSubmit.bind(this)).delegateTo(document,'[data-on-change="submit"]'),new n("submit",this.processNavigate.bind(this)).bindTo(e))}executeSubmit(e){(e.target instanceof HTMLSelectElement||e.target instanceof HTMLInputElement&&"checkbox"===e.target.type)&&e.target.form.submit()}processNavigate(e){if(!(e.target instanceof HTMLFormElement))return;e.preventDefault();const n=e.target.elements.namedItem("paginator-target-page"),a=parseInt(n.dataset.numberOfPages,10);let s=n.dataset.url,r=parseInt(n.value,10);r>a?r=a:r<1&&(r=1),s=s.replace("987654322",r.toString()),self.location.href=s}}}));
|
- « Previous
- 1
- 2
- 3
- Next »