Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Lite 7

 AfterLogic Forum : AfterLogic WebMail Lite 7
Subject Topic: Error on js searching Contact. Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
rsantellan
Newbie
Newbie


Joined: 14 October 2015
Online Status: Offline
Posts: 11
Posted: 16 October 2015 at 5:37am | IP Logged Quote rsantellan

Hi,

I'm using the add-suggest-contacts-example plugin.

My problem is that when composing a new email and typing the email adress the following errror happend on the app.min.js file.

TypeError: e is null
...ss.getFullEmail=function(e,t){var i="";return i=t.length>0?e.length>0?Utils.Addr...
app.min.js?762 (line 13, col 5857)


Using the app.js I found that the problem is here:

Utils.Address.getFullEmail = function (sName, sEmail)
{
        var sFull = '';

        if (sEmail.length > 0)
        {
               if (sName.length > 0)
               {
                        if (Utils.Address.isCorrectEmail(sName) || sName.indexOf(',') !== -1)
                        {
                                sFull = '"' + sName + '" <' + sEmail + '>';
                        }
                        else
                        {
                                sFull = sName + ' <' + sEmail + '>';
                        }
               }
               else
               {
                        sFull = sEmail;
               }
        }
        else
        {
               sFull = sName;
        }

        return sFull;
};


This line don't check if sName is null

if (sName.length > 0)

So I add the null validation

if (sName != null && sName.length > 0)

And now works like a charm. But I don't know how to minimize the app.js the same way you guys do it so it looks the same.
How can I achieve that? Should I post in another place?

Regards!
Back to Top View rsantellan's Profile Search for other posts by rsantellan
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6092
Posted: 16 October 2015 at 5:56am | IP Logged Quote Igor

You can actually keep using non-minified version of the file, as long as you have the following item added to array defined in data/settings/config.php file:

Code:
'labs.use-app-min-js' => false,


If you wish to minify the file, this can be done with pretty much any JS minifier, we're using the library called Uglify for that purpose.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide