CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Disable AJAX widgets
Pages: [1]

Author Topic: Disable AJAX widgets  (Read 4716 times)

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Disable AJAX widgets
February 11, 2009, 03:44:49 am
Hi,

We're getting a lot of complaints from users about various Civi AJAX widgets, e.g.:
  • Add Relationship - find target contact (see http://forum.civicrm.org/index.php/topic,5969.0.html)
  • Country and State/Province
  • Contact Search block

Various browsers. The problems seem to be worse with the Drupal Zen theme but even with Garland, usability is sometimes not good, especially on a slow connection. Sadly we chose Zen as our base theme a while ago and have produced several Drupal/Civi sites based on Zen but with a lot of styling, so it would be a lot of work to re-do those sites based on a different theme. I will try to figure out why the behaviour is worse in Zen - any pointers on the sort of thing to look for would be welcome. I'll also do a trial upgrade of one of the sites to 2.2 beta and see how that behaves.

In the short term, is it possible to disable the AJAX widgets and go back to old fashioned drop-downs, or are the widgets too tightly integrated into Civi for that to be viable?

Thanks,

Dave J

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Disable AJAX widgets
February 11, 2009, 05:20:35 am
Quote
In the short term, is it possible to disable the AJAX widgets and go back to old fashioned drop-downs, or are the widgets too tightly integrated into Civi for that to be viable?

I guess you will have to manually disable it code or use custom templates. But I wouldn't recommend that. It might lead to unexpected results.

Kurund
Found this reply helpful? Support CiviCRM

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Disable AJAX widgets
February 11, 2009, 07:51:44 am
Hi,

Have you been able to identify what the problems are ? Quite curious about why it wouldn't work with a template.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Re: Disable AJAX widgets
February 11, 2009, 10:24:56 am
Quote from: xavier on February 11, 2009, 07:51:44 am
Have you been able to identify what the problems are ? Quite curious about why it wouldn't work with a template.

There seems to be an issue with focus, it's often difficult to get focus onto the widgets in Zen. I'll post more if I get anywhere with it but not really sure where to start.

Another typical problem is a widget working when you first start typing characters into it but then getting stuck in an inactive state if you then delete some of those characters. The post I mentioned above has more details about issues with Add Relationship - find target contact (see http://forum.civicrm.org/index.php/topic,5969.0.html).

Dave J

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Disable AJAX widgets
February 11, 2009, 04:06:03 pm
Dave - this is a longshot, but I fixed a template recently that was mis-behaving in Zen theme due to "hanging" (unclosed) <script> tag:

http://issues.civicrm.org/jira/browse/CRM-4087

Do you get any errors in Firebug when using these widgets which might give clues?

Replacing the quick Contact Search block behavior is quite easy - a custom version of templates/CRM/Block/Search.tpl eliminating the dojo script code - and just having a plain INPUT field w/ the same name will do it.

The State / Country widget is replaced in 2.2 w/ a cleaner and simpler jquery solution which i suspect will not be a problem - would be good to test it from a user browser that is having trouble w/ the 2.1 dojo version.

Protect your investment in CiviCRM by  becoming a Member!

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Disable AJAX widgets
February 12, 2009, 01:22:04 pm
Hi there,

In case this helps diagnose the problem (or at least part of the problem) in *Zen*, I think it can be generalised to

Only one Ajax request can be processed per ajax widget per page view.  Any further requests don't complete successfuly (davej's "getting stuck in an inactive state if you then delete some of those characters" is one of these cases).

Haven't tested this with all widgets but it is certainly the case for the Contact Search block, Current Employer and Use Household address - each works fine once, but only once, until you refresh.

Hope that helps,
Michael
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Disable AJAX widgets
February 13, 2009, 02:56:26 am
Michael:

Quote
Haven't tested this with all widgets but it is certainly the case for the Contact Search block, Current Employer and Use Household address - each works fine once, but only once, until you refresh.

All 3 widgets seems to working fine, without refreshing..

Kurund
Found this reply helpful? Support CiviCRM

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Re: Disable AJAX widgets
February 13, 2009, 05:11:04 am
Quote from: michaelmcandrew on February 12, 2009, 01:22:04 pm
In case this helps diagnose the problem (or at least part of the problem) in *Zen*, I think it can be generalised to

Only one Ajax request can be processed per ajax widget per page view.  Any further requests don't complete successfuly (davej's "getting stuck in an inactive state if you then delete some of those characters" is one of these cases).

I agree with this summary of the behaviour in Zen.

Quote from: Kurund Jalmi on February 13, 2009, 02:56:26 am
All 3 widgets seems to working fine, without refreshing..

In which theme and which version of Civi?

Dave J

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Disable AJAX widgets
February 13, 2009, 12:22:42 pm
Quote
In which theme and which version of Civi?

Garland theme and CiviCRM v2.2

Kurund
Found this reply helpful? Support CiviCRM

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Disable AJAX widgets
February 16, 2009, 04:51:27 am
I see - the problem I was reporting was in Zen.

Appreciate that you only have so much time and therefore only support the default Drupal/Joomla set ups etc., but is there an argument for giving more attention to Zen given that, although it doesn't come out of the box with Drupal it is a defacto standard theme.

Happy to support this work if it would help.
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Disable AJAX widgets
February 16, 2009, 04:57:15 am
Dave J:

It would be great if you can come up with patch for Zen theme.

michaelmcandrew:
Quote
Happy to support this work if it would help.

Thanx, that would be nice ..

Kurund

Found this reply helpful? Support CiviCRM

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Disable AJAX widgets

This forum was archived on 2017-11-26.