MegaMark16 / django-live-support

A simple live support chat app for django
BSD 3-Clause "New" or "Revised" License
68 stars 15 forks source link

How to Advice admin #5

Open pierreNomazy opened 11 years ago

pierreNomazy commented 11 years ago

In order to answer to visitor, the admin must look carefully at his support/admin page. Can this app advice the admin which has opened other windows that a chat is pending ? like the tool bar in skype or other method ? Pierre

ionics commented 11 years ago

I have added audio notification to the javascript code.

pierreNomazy commented 11 years ago

I can't received audio notification. In which version and file do you have added this notification ?

ionics commented 11 years ago

its not in the official repo yet. I have done something like this.

to change_list.html add:

to live_support_admin.js add: var $ = django.jQuery;

$(document).ready(function() {
soundHandle = document.getElementById('soundHandle'); soundHandle.src = 'https://example.com/media/live_support/attention.mp3'; soundHandle.play(); });

pierreNomazy commented 11 years ago

@ionics, quote "to change_list.html add:" what do you add precisely in this file ?

ionics commented 11 years ago

Sorry! -> GITHUB website is broken and did not present my comment correctly. html content not displayed...

in change_list.html add:

<!audio id="soundHandle" style="display: none;" preload="auto"><!/audio> (remove the "!" github is broken on commenting with html-tags.) at a proper place at the bottom of the file.

sure you need to add your own audio file such as "attention.mp3" to make this work. By the way: audio and video implementation is supported differently in browsers. (mostly bad. bugs like = short audio files not playing etc..) We have tested it in Chrome, FF and Epiphany. Works well now. Does not work for some mobile browsers on Android. Namely - Opera, Android Browser, FF on Android etc...

I don't know your javascript/jQuery config - so you have to know what you are doing to make this luxury work.

good luck