primo commit
This commit is contained in:
31
media/plg_quickicon_eos310/js/snooze.js
Normal file
31
media/plg_quickicon_eos310/js/snooze.js
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @copyright (C) 2021 Open Source Matters, Inc. <https://www.joomla.org>
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
|
||||
(function ($)
|
||||
{
|
||||
$(document).ready(function ()
|
||||
{
|
||||
var ajaxData = {
|
||||
'option' : 'com_ajax',
|
||||
'group' : 'quickicon',
|
||||
'plugin' : 'SnoozeEOS',
|
||||
'format' : 'json'
|
||||
}
|
||||
|
||||
$('#system-message-container').on('click', '.eosnotify-snooze-btn', function(e)
|
||||
{
|
||||
var button=$(this);
|
||||
$.getJSON('index.php', ajaxData, function(response)
|
||||
{
|
||||
if (response.success)
|
||||
{
|
||||
button.closest('.alert').find('[data-dismiss="alert"]').click();
|
||||
}
|
||||
}
|
||||
);
|
||||
e.preventDefault();
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
Reference in New Issue
Block a user