nextcloud/core/src
Daniel Calviño Sánchez 03f2e8a10e Fix default timeouts in OC.Notification
When no timeout was given "show()" used the default timeout of
"OCP.Toast", which is 7 seconds instead of indefinitely as stated in the
documentation of "show()". "showHtml()" should also indefinitely show
the notification if no timeout is given, but due to the strict
comparison the notification was indefinitely shown only when a timeout
of 0 was explicitly given. Now both methods show the notification
indefinitely (or until it is explicitly hidden) when no timeout is
given.

The unit tests did not catch this error because "showHtml()" had no
tests (as before the move to Toastify it was called from "show()" and
thus implicitly tested), and because "show()" verified that "hide()" was
not called after some time; "hide()" is no longer called from "show()"
since "OCP.Toast" is used internally, so the test always passed even if
the notification was indeed hidden. Now the test is based on whether the
element is found or not, and explicit tests were added too for
"showHtml()".

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2019-07-26 18:46:59 +02:00
..
components adding toggle password to be able to see it 2019-07-09 10:54:21 +02:00
jquery Move OC.requestToken to the bundle, deprecate oc_requesttoken 2019-05-13 08:27:43 +02:00
mixins Vueify the login page 2019-05-29 11:05:16 +02:00
OC Fix default timeouts in OC.Notification 2019-07-26 18:46:59 +02:00
OCA Add OC and OCA namespace declarations to the bundle 2019-01-28 13:32:34 +01:00
OCP Rename parameter in OCP.Toast for consistency with OC.Notification 2019-07-12 16:15:05 +02:00
Polyfill Add wrapper for removed tooltip functions 2019-03-07 10:48:26 +01:00
Util Vueify the login page 2019-05-29 11:05:16 +02:00
views Vueify the login page 2019-05-29 11:05:16 +02:00
globals.js Move OC.theme to the bundle and deprecate oc_defaults 2019-05-14 11:14:29 +02:00
init.js CSS: adjust media query breakpoint to improve tablet readability 2019-05-30 08:28:30 +02:00
login.js Vueify the login page 2019-05-29 11:05:16 +02:00
main.js Move initCore to the bundle 2019-05-10 13:47:21 +02:00
maintenance.js Migrate the maintenance script to a modern module and bundle 2019-05-16 16:45:00 +02:00
session-heartbeat.js Move OC.requestToken to the bundle, deprecate oc_requesttoken 2019-05-13 08:27:43 +02:00