Like SystemiConnectFri 15 Oct 2021, 04:50
Auto Save MessagesLGforumFri 26 Feb 2021, 13:31
New tutorial questionTheCrowMon 15 Feb 2021, 08:12
Support iOS Emojis (and other platforms)LGforumSun 14 Feb 2021, 01:25
LGforum (2806)
Question about further tweaking AWC using events. Vote_lcapQuestion about further tweaking AWC using events. Voting_barQuestion about further tweaking AWC using events. Vote_rcap 
Mr.Easybb (1587)
Question about further tweaking AWC using events. Vote_lcapQuestion about further tweaking AWC using events. Voting_barQuestion about further tweaking AWC using events. Vote_rcap 
Bloodbath (745)
Question about further tweaking AWC using events. Vote_lcapQuestion about further tweaking AWC using events. Voting_barQuestion about further tweaking AWC using events. Vote_rcap 
Rukiafan (533)
Question about further tweaking AWC using events. Vote_lcapQuestion about further tweaking AWC using events. Voting_barQuestion about further tweaking AWC using events. Vote_rcap 
Dom (513)
Question about further tweaking AWC using events. Vote_lcapQuestion about further tweaking AWC using events. Voting_barQuestion about further tweaking AWC using events. Vote_rcap 
puppycheese (446)
Question about further tweaking AWC using events. Vote_lcapQuestion about further tweaking AWC using events. Voting_barQuestion about further tweaking AWC using events. Vote_rcap 
pedro (330)
Question about further tweaking AWC using events. Vote_lcapQuestion about further tweaking AWC using events. Voting_barQuestion about further tweaking AWC using events. Vote_rcap 
Neymar (301)
Question about further tweaking AWC using events. Vote_lcapQuestion about further tweaking AWC using events. Voting_barQuestion about further tweaking AWC using events. Vote_rcap 
Hitsu (281)
Question about further tweaking AWC using events. Vote_lcapQuestion about further tweaking AWC using events. Voting_barQuestion about further tweaking AWC using events. Vote_rcap 
Flora (275)
Question about further tweaking AWC using events. Vote_lcapQuestion about further tweaking AWC using events. Voting_barQuestion about further tweaking AWC using events. Vote_rcap 


Question about further tweaking AWC using events.

avatarGuest
Fri 24 Apr 2015, 08:07
Question: I was being creative again and couldn't sleep, so I made 2 optional events (1st-timer following: http://www.avacweb.com/t1303-plug-in-add-animation-to-opening-closing-the-chat#23049 as a guideline) for the bottom menus, but... Will it work? I tested it and came to the conclusion I don't know what this avacweb_chat.button.style.backgroundColor should be replaced with and/or what the proper onopen calls for the different buttons are to make this work ...

Fading in and out menus:

Code:
[panda=js]
avacweb_chat_config.add_event('onopenprefs', function(e) {
    e.preventDefault();
    $('#achat_user_prefs').fadeIn(900);
    avacweb_chat.button.style.backgroundColor = '';
});
avacweb_chat_config.add_event('oncloseprefs', function(e) {
    e.preventDefault();
    $('#achat_user_prefs').fadeOut(900);
});
avacweb_chat_config.add_event('onopensmilies', function(e) {
    e.preventDefault();
    $('#achat_smilies').fadeIn(900);
    avacweb_chat.button.style.backgroundColor = '';
});
avacweb_chat_config.add_event('onclosesmilies', function(e) {
    e.preventDefault();
    $('#achat_smilies').fadeOut(900);
});
avacweb_chat_config.add_event('onopencolors', function(e) {
    e.preventDefault();
    $('#achat_colors').fadeIn(900);
    avacweb_chat.button.style.backgroundColor = '';
});
avacweb_chat_config.add_event('onclosecolors', function(e) {
    e.preventDefault();
    $('#achat_colors').fadeOut(900);
});


I also tried something like this:

Code:
[panda=js]avacweb_chat_config.add_event('onopenprefs', function(e) {
    e.preventDefault();
    $('#achat_user_prefs').click(function() {
      $('#achat_user_prefs').fadeIn(900)});
});
avacweb_chat_config.add_event('oncloseprefs', function(e) {
    e.preventDefault();
    $('#achat_user_prefs').click(function() {
      $('#achat_user_prefs').fadeOut(900)});
});


Sliding up and down menus:

Code:
[panda=js]
avacweb_chat_config.add_event('onopenprefs', function(e) {
    e.preventDefault();
    $('#achat_user_prefs').slideUp(900);
    avacweb_chat.button.style.backgroundColor = '';
});
avacweb_chat_config.add_event('oncloseprefs', function(e) {
    e.preventDefault();
    $('#achat_user_prefs').slideDown(900);
});
avacweb_chat_config.add_event('onopensmilies', function(e) {
    e.preventDefault();
    $('#achat_smilies').slideUp(900);
    avacweb_chat.button.style.backgroundColor = '';
});
avacweb_chat_config.add_event('onclosesmilies', function(e) {
    e.preventDefault();
    $('#achat_smilies').slideDown(900);
});
avacweb_chat_config.add_event('onopencolors', function(e) {
    e.preventDefault();
    $('#achat_colors').slideUp(900);
    avacweb_chat.button.style.backgroundColor = '';
});
avacweb_chat_config.add_event('onclosecolors', function(e) {
    e.preventDefault();
    $('#achat_colors').slideDown(900);
});

Is there a list available for AWC to supplement the only 'onopen' and 'onclose' functions I'm aware of? Because I'd also like to further tweak and restyle my AWC and have the buttons to light up in a different color when selected.
LGforumLGforum
Status : Working to restore AWC!

Posts : 2806
Join date : 2011-10-05
Age : 30
Location : UK
Fri 24 Apr 2015, 09:27
Although AWC does allow for custom events, they have to be triggered manually if they don't already exist within AWC.
In order to achieve this you'd have to remove the onclick attribute of the button. Then add your own click event to it.
I could certainly show you if I get on the laptop.