In Drupal 7, the user information was not being passed to Olark through javascript like it should. I have modified the olark.js file to be compliant with Drupal 7 standards and it now works fine.

Comments

ledzepp94’s picture

StatusFileSize
new2.4 KB

Attached is the patch.

kalman.hosszu’s picture

Status: Needs review » Needs work

You should correct the code based on coding standards.

undrgrnd’s picture

StatusFileSize
new2.27 KB

Using the above patch, made a small JS update to better track the users email and name as it wasn't properly working.

undrgrnd’s picture

StatusFileSize
new2.18 KB

Sorry, file I attached had incorrect directory structure, I cleaned it up.

jsagotsky’s picture

StatusFileSize
new2.22 KB

Rerolled to include http://drupal.org/node/1433260

joelpittet’s picture

Issue summary: View changes

Here's a review:

  1. +++ b/olark.js
    @@ -1,27 +1,34 @@
    -}
    +(function ($) {
    ...
    +})(jQuery);
    

    Why the need for jQuery?

  2. +++ b/olark.js
    @@ -1,27 +1,34 @@
    +            //$('#habla_pre_chat_name_input').val(Drupal.settings.olark.name);
    +            //$('#habla_pre_chat_email_input').val(Drupal.settings.olark.mail);
    

    I've removed this upstream no need to keep commented code out.

joelpittet’s picture

Version: 7.x-1.0-beta1 » 7.x-1.x-dev
Status: Needs work » Needs review
StatusFileSize
new2.04 KB

How's this for clean-up?

attach has a settings argument too:)

joelpittet’s picture

Sorry for the 2 year delay into looking at this. Promise if someone reviews this it will get committed this week. If not I'll likely commit it anyways:P

joelpittet’s picture

Assigned: ledzepp94 » Unassigned
joelpittet’s picture

Status: Needs review » Fixed

Committed to -dev.

  • joelpittet committed 171926a on 7.x-1.x authored by undrgrnd
    Issue #1785322 by undrgrnd, joelpittet, ledzepp94, jsagotsky: Javascript...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.