Changeset 88986 in spip-zone


Ignore:
Timestamp:
May 2, 2015, 7:50:18 PM (5 years ago)
Author:
claude.codden@…
Message:

Ajout fonction emoticon

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/spipcatchat/trunk/javascript/spipcatchat.js

    r88941 r88986  
    22{
    33        $('#message').val($('#message').val()+''+emoticon);     
     4        $('#emoticon').trigger("play");
    45}
    56
    67function session() {
    78    $(location).attr('href', 'spip.php')
     9   
    810}
    911function spipcatchatrestartmenu(e, t) {
     
    3638    })
    3739}
    38 function spipcatchatShowChat(e, t, n, r, i, s, o, u) {
     40function spipcatchatShowChat(e, t, n, r, i, s, o, u, pack) {
    3941    $.ajax({
    4042        url: e + 'phpscripts/get-autorisation.php',
     
    4244        data: 'id_auteur=' + t + '&id_salon=' + n + '&nom=' + encodeURIComponent(s) + '&url=' + encodeURIComponent(e) + '&char=' + encodeURIComponent(o),
    4345        success: function (s) {
    44             '1' == s || '4' == s ? (startchat(u, '125000', n, t, e, i, r, o), $('#spipcatchatselectsalon').css('display', 'block'))  : '2' == s ? (startchat(u, '125000', n, t, e, i, r, o), $('#pepoletrash').css('display', 'block'), $('#spipcatchatselectsalon').css('display', 'block'))  : '3' == s ? (startchat(u, '125000', n, t, e, i, r, o), $('#pepoletrash').css('display', 'block'), $('#pepoleadd').css('display', 'block'), $('#spipcatchatselectsalon').css('display', 'block'))  : ($('#spipcatchatsalonprive').css('display', 'block'), setTimeout(function () {
     46            '1' == s || '4' == s ? (startchat(u, '125000', n, t, e, i, r, o, pack), $('#spipcatchatselectsalon').css('display', 'block'))  : '2' == s ? (startchat(u, '125000', n, t, e, i, r, o, pack), $('#pepoletrash').css('display', 'block'), $('#spipcatchatselectsalon').css('display', 'block'))  : '3' == s ? (startchat(u, '125000', n, t, e, i, r, o, pack), $('#pepoletrash').css('display', 'block'), $('#pepoleadd').css('display', 'block'), $('#spipcatchatselectsalon').css('display', 'block'))  : ($('#spipcatchatsalonprive').css('display', 'block'), setTimeout(function () {
    4547                window.location = r
    4648            }, 7000))
     
    114116    window.open(e + '/doc/Guide de l utilisateur.pdf', '_blank')
    115117}
    116 function getMessages(e, t, n, r, i) {
     118function getMessages(e, t, n, r, i, pack) {
    117119    $.getJSON(n + 'phpscripts/get-message.php', {
    118120        auteur: t,
     
    123125        var t = $('#text');
    124126        $('#spipcatchatannonce').html('<span class="spipcatchatinfo"><b>' + e.annonce + '</b></span>');
    125         $('#text').html(spipcatchattypo(e.messages, n));
     127        $('#text').html(spipcatchattypo(e.messages, n, pack.trim()));
    126128        1 != scrollBar && (t[0].scrollTop = t[0].scrollHeight, scrollBar = !0);
    127129        void 0 !== t && t[0].childNodes.length > nombreMessage && (t[0].scrollTop = t[0].scrollHeight, $('#soundGet').trigger('play'));
     
    147149    })
    148150}
    149 function startchat(e, t, n, r, i, s, o, u) {
     151function startchat(e, t, n, r, i, s, o, u, pack) {
    150152    document.getElementById('message') && (getOnlineUsers(n, r, i, s, o, u), statusStart = window.setInterval(function () {
    151153        getOnlineUsers(n, r, i, s, o, u)
    152154    }, t), window.setInterval(function () {
    153         getMessages(e, r, i, s, u)
     155        getMessages(e, r, i, s, u, pack)
    154156    }, e), $('#message').focus())
    155157}
Note: See TracChangeset for help on using the changeset viewer.