User tests: Successful: Unsuccessful:
Pull Request for Issue # .
The core.js is supposed to be the JS API of Joomla but we keep sneaking methods there with the expectation that these will be useful to somebody...
Since js is becoming more modular inflating some file is against the common practice. So there you have it, methods that are specific to some other functionality are moved to the related files.
Moved:
Joomla.iframeButtonClick
The method applies only to iframes in modals, so the method is moved to the modal initiator file (legacy/bootstrap-init.js)
Joomla.localStorageEnabled
The method is used only in the backend menu so it's moved there
Joomla.resetFilters
The method works only on the search tools (filters) so it's also moved there (searchtools.js)
Consistenly use Joomla.Text
instead of the Joomla.JText
. (the later is still working but deprecated)
Check in the backend that:
Joomla.renderMessages
needs to be cleaned as J4 has only one messaging system so no point supporting also the Bootstrap.
Joomla.Event
that it was introduced in J4 some time ago needs to be completely removed
There is zero benefit having a shortcut for the native methods:
@Fedik do you agree on this one, as you're the one that introduced it?
None
Status | New | ⇒ | Pending |
Category | ⇒ | JavaScript Repository |
Labels |
Added:
?
|
do you agree on this one, as you're the one that introduced it?
hm, need to think,
It is still good to have it, so people see that we offer/support some "joomla specific" events.
However everyone still free to use them directly.
It not that much code.
About once
listener, well, if we do not need ie11, then can remove.
About once listener, well, if we do not need ie11, then can remove.
Actually doing something similar to your approach for delivering ES6+ code to the browser you could also add this tiny polyfill https://github.com/WebReflection/dom4. So all the Event, plus a myriad of other things will be supported in IE 11 (eg closest).
so people see that we offer/support some "joomla specific" events.
Well if Joomla is doing a middleware for Javascript something is going wrong... About the what we offer
: Provide proper documentation of the Joomla related events and how those could be used (with examples). IIRC only subforms utilise this
This mostly fixes drone / rips issues too ;)
Redirect plugin can now be saved, but:
The Save button also Closes the modal and the plugin is checked out.
Opps, side effect, will patch it later on
modal-fields.js
is totally broken IIRC. That script needs to be redone as it's really bad from many aspects...
@dgrammatiko may I try fixing it?
@gnanakeethan sure, it should be custom element, similar to: #20788
@dgrammatiko Thanks. Where should I start? 4.0-dev branch or the previously worked PR?
Can I cherry-pick those changes otherwise?
I'll say fresh start...
@infograf768 should be fine now
@dgrammatiko
No more issue for the redirect plugin.
One notch, but it may be unrelated to this PR: the Redirect Manager is not reloaded after closing the plugin, therefore we do not get any Message about the status of the plugin.
I have tested this item
I have tested this item
@zero-24 @SniperSister RIPS please (tried twice so I assume it’s not a glitch)
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-01-31 12:52:11 |
Closed_By | ⇒ | wilsonge |
Thanks!
@infograf768 unless someone else made a PR for this probably not. I need to find some spare time to do this
@zero-24 why the tests are failing here? Seems unrelated