Screen Color Change NOT SKIN RELATED

Discussions about development of VICIDIAL and astGUIclient

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Screen Color Change NOT SKIN RELATED

Postby ecreekgroup » Thu Jan 24, 2008 12:40 pm

I am currently investigating the best way to do a color change whenever a character is populated in the Province field.


We use this field for Permission to Continue and Non-Rebuttal States.

I was thinking a CSS class change using an if statement but i am not sure how server refreshing will work........Is this something that is going to have to be completed with AJAX?
ecreekgroup
 
Posts: 4
Joined: Thu Jan 24, 2008 12:36 pm

Postby mflorell » Thu Jan 24, 2008 12:51 pm

You would need to add a CSS class as well as adding some Javascript code somewhere to do the change of color and then reset the color for the next call.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby ecreekgroup » Fri Jan 25, 2008 12:36 am

I have a CSS class and the JS to change no problem. However I am curious as to get the page to refresh when a call comes in. Must this be done in AJAX to do the detection.

I have read in a previous post edting the AJAX Javascript and db_query.php is risky business.

Meaning how am I going to get javascript to recognize the change without a page refresh without AJAX thus destroying the session and logging out the agent.

Am I just overlooking something?

Just to be clear the Province field gets populated with CRM info when a call gets pushed to the agent via autodial mode.
ecreekgroup
 
Posts: 4
Joined: Thu Jan 24, 2008 12:36 pm

Postby mflorell » Fri Jan 25, 2008 9:08 pm

Changing color of table elements and spans does not involve AJAX, it is 1st generation DHTML actually and is not that difficult to do. It does not involve vdc_db_query.php either, only vicidial.php.

Finding the trigger points might take some time, but it should be possible.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby ecreekgroup » Fri Jan 25, 2008 10:15 pm

Ah I guess im trying to kill a mosquito with a nuke....Yes on static pages elements are changed easy as pie however i was under the impression that the calls were delivered via an xml request refreshing the field.

I will go ahead and slap somethin on there and see if it works i guess. ;)

I was wanting to modify the db query to update to a table weather or not an agent clicks a button for yes permission granted and call continues or no and the call is hungup and disposition happens. Trying to keep the code organized this is where most of your queries happen or no?

I have the panels made already I am just new to voip and asterisk as such nervous about breaking the way calls are handled. The color change is a small part of a bigger picture.

Is there perhaps a code manual I can purchase as we already have purchase the managers manual.
ecreekgroup
 
Posts: 4
Joined: Thu Jan 24, 2008 12:36 pm

Postby mflorell » Sat Jan 26, 2008 12:54 am

If you want to change the way that call data is queried then yes you will need to alter the vdc_db_query.php script and the AJAX that interacts with it on vicidial.php.

There isn't a code manual because the code is so complex that a code manual would end up being a few hundred pages and would take me weeks to do, and if I had weeks of time free I would much rather add something useful like some additional inbound call handling features than writing more documentation that will have limited use.

I would suggest diving into the code and try changing things one at a time, make sure you put plenty of alerts in as you work so you can see if anything stops working. This is generally how I do on-going development on it.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida


Return to Development

Who is online

Users browsing this forum: No registered users and 16 guests