Hi,
I did enhacement of OssnNotifications Box window in GoBlue Theme. In current GoBlue theme is problem to dissapear and close the ossn notification window with simple click outside of notification window somewhere on desktop or browser window. I did enhacement that now you can click outside of notification window and notification window will disapear.
Just add these few lines at begining to /themes/goblue/plugins/default/js/goblue.php file:
//<script>
$(document).ready(function() {
$('body').click(function() {
$('.ossn-notifications-box').click(function(){
$('.ossn-notifications-box').show();
});
$('.ossn-notifications-box').hide();
});
$('[data-toggle="tooltip"]').tooltip({
placement:'left',
});
...
etc.
This functionality should by added to official release of OSSN and GoBlue theme.
Only behavior which is not standard with this solution is that is needed sometimes to click twice to notification box window to show again. But it is minor problem that to have shown notification window still and have problem to close it.
What is the exact code we need to put and where. Can you please post your final code and exact position to put it so that the community can benefit. There are multiple codes posted here by you and we are not sure which one to use and where. Thanks.
When this piece of code :
$("body").click(function() {
$(".ossn-notifications-box").hide();
});
is written on the end of the function :
$(document).ready(function()
in /themes/goblue/plugins/default/js/goblue.php file
than closing notification window by clickin outside the notification window works like sharm.
No problem with twice clicking.
This piece of code should be definitely written in official OSSN distribution.
Thanks for providing your idea, Ondrej.
And yes: This forum is in fact not a fully featured coding platform. To avoid any headaches you'll better do a pull request on Github.
It should be also this:
$(document).ready(function() {
$('body').click(function() {
$('.ossn-notifications-box').hide();
});
$('[data-toggle="tooltip"]').tooltip({
placement:'left',
});
Problem with forum to show right code
The code in /themes/goblue/plugins/default/js/goblue.php file at beginning enter code hereis this:
$(document).ready(function() {
$('body').click(function() {
$('.ossn-notifications-box').click(function(){
$('.ossn-notifications-box').show();
});
$('.ossn-notifications-box').hide();
});
$('[data-toggle="tooltip"]').tooltip({
placement:'left',
});
etc.
Due to the many requests in the past for additonal features and components we have decided to develope a premium version. Features like Hashtags, Videos, Polls, Events, Stories, Link Preview, etc included in it.
$199 (Life Time)