User tests: Successful: Unsuccessful:
Replace the JS alert() for the Joomla alerts in standart buttons where are no boxes checked
Go Components -> Banners -> Banners
Without any box checked, hit publish item
Also, I think the close button is white because the class is not completed, here is where the class is called:
https://github.com/joomla/joomla-cms/blob/4.0-dev/media/system/js/core.js#L333
none
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Title |
|
||||||
Labels |
Added:
?
|
@NunoLopes96 - that last commit you just made in incorrect. This is PHP, not JS ;)
@NunoLopes96 in Order to fix the test you need to edit the test itself your code was correct before the last commit ;)
Ok I'm sorry never used travis before I need to research first a little bit, any tip?
@NunoLopes96 please check this file + line in your branch: https://github.com/NunoLopes96/joomla-cms/blob/replaceJSalerts/tests/unit/suites/libraries/cms/toolbar/JToolbarButtonTest.php#L126
There is the expeced value stored. So this value needs to be changed as we want to change the output.
Category | Libraries | ⇒ | Libraries Unit Tests |
Labels |
Added:
?
|
I have tested this item
I have tested this item
The Joomla alert appears normally after clicking publish item with no item selected after the patch.
Status | Pending | ⇒ | Ready to Commit |
RTC after two successful tests.
Please remove RTC label. You cannot simply change JText::script to JText::_ as look like JText::script has some code to deal with special character in string
For example, with this change, you can edit the file , change administrator\language\en-GB\en-GB.lib_joomla.ini, change the language item
JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST="Please first ' make a selection from the list."
To:
JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST="Please first ' make a selection from the list."
You will get javascript error. Note that the original code works well with this special character in language string
Status | Ready to Commit | ⇒ | Pending |
I am against this.
There should not be any inline scripts in J4 in order to satisfy CSP requirements.
So we have to create a toolbar.js file with the logic needed and then pass form the PHP side the config options, e.g. JFactory->getDocument()->addScriptOptions('Toolbar', $optionsArray).
Please DO NO MERGE this!
It's not the right approach!
CSP?
On 15 Apr 2017 11:06 a.m., "Dimitri Grammatikogianni" <
notifications@github.com> wrote:
I am against this.
There should not be any inline scripts in J4 in order to satisfy CSP
requirements.
So we have to create a toolbar.js file with the logic needed and then pass
form the PHP side the config options, e.g.
JFactory->getDocument()->addScriptOptions('Toolbar',
$optionsArray).
Please DO NO MERGE this!
It's not the right approach!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#15315 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8W1W4nie8QvQ5Ds6PfUC2CeddN1Tks5rwJa9gaJpZM4M-JnG
.
Thanks. I understand exactly your comment now. However you can have a CSP
that allows inline scripts.
On 15 Apr 2017 12:57 p.m., "Dimitri Grammatikogianni" <
notifications@github.com> wrote:
CSP: https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#15315 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8XURxb3k_eU8vsjknQhSYWEeMwo-ks5rwLDCgaJpZM4M-JnG
.
Category | Libraries Unit Tests | ⇒ | Administration Language & Strings Libraries Unit Tests |
Labels |
Added:
?
|
Category | Libraries Unit Tests Administration Language & Strings | ⇒ | Libraries Unit Tests |
Sorry, done
Labels |
Removed:
?
|
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-04-15 20:26:00 |
Closed_By | ⇒ | wilsonge |
Merged - thanks :)
https://travis-ci.org/joomla/joomla-cms/jobs/222232149
Looks good to me? and is working well. Can you fix the travis error above. The other ones are not realted to your PR. I'm going to open a new issue for that.