From: Tim Otten Date: Thu, 8 Jan 2015 00:37:56 +0000 (-0800) Subject: crmMailing - Cleanup per jshint X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6bcb856fe634ec10a29ec224e7c2134e8506584b;p=civicrm-core.git crmMailing - Cleanup per jshint --- diff --git a/js/angular-crmMailing/services.js b/js/angular-crmMailing/services.js index f002ed5498..65f1ad5297 100644 --- a/js/angular-crmMailing/services.js +++ b/js/angular-crmMailing/services.js @@ -1,6 +1,6 @@ (function (angular, $, _) { var partialUrl = function (relPath) { - return CRM.resourceUrls['civicrm'] + '/partials/crmMailing/' + relPath; + return CRM.resourceUrls.civicrm + '/partials/crmMailing/' + relPath; }; // The representation of from/reply-to addresses is inconsistent in the mailing data-model, @@ -8,7 +8,7 @@ // the available "From:" addrs. Records are like the underlying OptionValues -- but add "email" // and "author". angular.module('crmMailing').factory('crmFromAddresses', function ($q, crmApi) { - var emailRegex = /^"(.*)" \<([^@\>]*@[^@\>]*)\>$/; + var emailRegex = /^"(.*)" <([^@>]*@[^@>]*)>$/; var addrs = _.map(CRM.crmMailing.fromAddress, function (addr) { var match = emailRegex.exec(addr.label); return angular.extend({}, addr, { @@ -18,7 +18,7 @@ }); function first(array) { - return (array.length == 0) ? null : array[0]; + return (array.length === 0) ? null : array[0]; } return {