NPM Resource Changed ? ? Pending

User tests: Successful: Unsuccessful:

avatar Fedik
Fedik
11 Apr 2021

Pull Request for Issue #28980 .

Summary of Changes

Add onComplete callback for Joomla.request()

Testing Instructions

Run npm install
Add to index.php of any template:

<script type="module">
  Joomla.request({
    url: Joomla.getOptions('system.paths').base + '/index.php?option=com_ajax&type=plugin',
    onSuccess:  () => console.log('success'),
    onError:  () => console.log('error'),
    onComplete: () => console.log('complete')
  });
  Joomla.request({
    url: Joomla.getOptions('system.paths').base + '/index.php?option=com_ajax&type=plugin&format=raw',
    onSuccess:  () => console.log('success'),
    onError:  () => console.log('error'),
    onComplete: () => console.log('complete')
  });
</script>

Watch result in the browser console.

Actual result BEFORE applying this Pull Request

2 message (1 per request):

error
success

Expected result AFTER applying this Pull Request

4 message (2 per request):

error
complete

success
complete

Documentation Changes Required

If we have a documentation for core.js and Joomla.request, then it need to update.

avatar Fedik Fedik - open - 11 Apr 2021
avatar Fedik Fedik - change - 11 Apr 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 11 Apr 2021
Category JavaScript Repository NPM Change
avatar dgrammatiko dgrammatiko - test_item - 11 Apr 2021 - Tested successfully
avatar dgrammatiko
dgrammatiko - comment - 11 Apr 2021

I have tested this item successfully on 1c9ffe0


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/33099.

avatar Fedik
Fedik - comment - 11 Apr 2021

We have to extend allowed line width to 120 ?

This line has a length of 101.

avatar Fedik Fedik - change - 11 Apr 2021
Labels Added: NPM Resource Changed ?
avatar dgrammatiko
dgrammatiko - comment - 11 Apr 2021

We have to extend allowed line width to 120

it's an easy one

avatar Quy Quy - test_item - 17 Apr 2021 - Tested successfully
avatar Quy
Quy - comment - 17 Apr 2021

I have tested this item successfully on 27f2016


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/33099.

avatar Quy Quy - alter_testresult - 17 Apr 2021 - dgrammatiko: Tested successfully
avatar Quy Quy - change - 17 Apr 2021
Status Pending Ready to Commit
avatar Quy
Quy - comment - 17 Apr 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/33099.

avatar rdeutz rdeutz - change - 17 Apr 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-04-17 09:51:01
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 17 Apr 2021
avatar rdeutz rdeutz - merge - 17 Apr 2021

Add a Comment

Login with GitHub to post a comment