From 882e15589d8cc9d96642e582f1986dfef71c93e9 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 23 Feb 2015 17:05:44 -0800 Subject: [PATCH] ngSanitize - Remove unused module The module is unused. Also, it was inappropriately copied into the "js/" folder. (External deps should go through packages or bower.json.) --- Civi/Angular/Manager.php | 4 ---- js/angular-crmMailing.js | 2 +- js/angular-crmMailingAB.js | 2 +- js/angular-sanitize.js | 18 ------------------ tests/karma/modules.js | 1 - 5 files changed, 2 insertions(+), 25 deletions(-) delete mode 100644 js/angular-sanitize.js diff --git a/Civi/Angular/Manager.php b/Civi/Angular/Manager.php index 99f8942bfc..a92ecd9c18 100644 --- a/Civi/Angular/Manager.php +++ b/Civi/Angular/Manager.php @@ -97,10 +97,6 @@ class Manager { 'ext' => 'civicrm', 'js' => array('bower_components/angular-jquery-dialog-service/dialog-service.js'), ); - $angularModules['ngSanitize'] = array( - 'ext' => 'civicrm', - 'js' => array('js/angular-sanitize.js'), - ); $angularModules['ui.utils'] = array( 'ext' => 'civicrm', 'js' => array('bower_components/angular-ui-utils/ui-utils.min.js'), diff --git a/js/angular-crmMailing.js b/js/angular-crmMailing.js index 1407f85695..8c4cf8b4f7 100644 --- a/js/angular-crmMailing.js +++ b/js/angular-crmMailing.js @@ -2,7 +2,7 @@ angular.module('crmMailing', [ 'crmUtil', 'crmAttachment', 'crmAutosave', 'ngRoute', 'ui.utils', 'crmUi', 'dialogService' - ]); // TODO ngSanitize, unsavedChanges + ]); // Time to wait before triggering AJAX update to recipients list var RECIPIENTS_DEBOUNCE_MS = 100; diff --git a/js/angular-crmMailingAB.js b/js/angular-crmMailingAB.js index 1ef737a4f8..067e5436e5 100644 --- a/js/angular-crmMailingAB.js +++ b/js/angular-crmMailingAB.js @@ -1,6 +1,6 @@ (function (angular, $, _) { - angular.module('crmMailingAB', ['ngRoute', 'ui.utils', 'ngSanitize', 'crmUi', 'crmAttachment', 'crmMailing', 'crmD3']); + angular.module('crmMailingAB', ['ngRoute', 'ui.utils', 'crmUi', 'crmAttachment', 'crmMailing', 'crmD3']); angular.module('crmMailingAB').config([ '$routeProvider', function ($routeProvider) { diff --git a/js/angular-sanitize.js b/js/angular-sanitize.js deleted file mode 100644 index 0c28457fed..0000000000 --- a/js/angular-sanitize.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Created by aditya on 8/9/14. - */ -/* - AngularJS v1.2.22-build.369+sha.a84f9f6 - (c) 2010-2014 Google, Inc. http://angularjs.org - License: MIT - */ -(function(q,g,r){'use strict';function F(a){var d=[];t(d,g.noop).chars(a);return d.join("")}function m(a){var d={};a=a.split(",");var c;for(c=0;c=c;e--)d.end&&d.end(f[e]);f.length=c}}"string"!==typeof a&&(a=null===a||"undefined"===typeof a?"":""+a);var b,l,f=[],n=a,h;for(f.last=function(){return f[f.length-1]};a;){h="";l=!0;if(f.last()&&y[f.last()])a=a.replace(RegExp("(.*)<\\s*\\/\\s*"+f.last()+"[^>]*>","i"),function(a,b){b=b.replace(I,"$1").replace(J,"$1");d.chars&&d.chars(s(b));return""}),e("",f.last());else{if(0===a.indexOf("\x3c!--"))b=a.indexOf("--",4),0<=b&&a.lastIndexOf("--\x3e",b)===b&&(d.comment&&d.comment(a.substring(4, - b)),a=a.substring(b+3),l=!1);else if(z.test(a)){if(b=a.match(z))a=a.replace(b[0],""),l=!1}else if(K.test(a)){if(b=a.match(A))a=a.substring(b[0].length),b[0].replace(A,e),l=!1}else L.test(a)&&((b=a.match(B))?(b[4]&&(a=a.substring(b[0].length),b[0].replace(B,c)),l=!1):(h+="<",a=a.substring(1)));l&&(b=a.indexOf("<"),h+=0>b?a:a.substring(0,b),a=0>b?"":a.substring(b),d.chars&&d.chars(s(h)))}if(a==n)throw M("badparse",a);n=a}e()}function s(a){if(!a)return"";var d=N.exec(a);a=d[1];var c=d[3];if(d=d[2])p.innerHTML= - d.replace(//g,">")}function t(a,d){var c=!1,e=g.bind(a,a.push);return{start:function(a,l,f){a=g.lowercase(a);!c&&y[a]&&(c=a);c||!0!==D[a]||(e("<"),e(a),g.forEach(l,function(c,f){var k= - g.lowercase(f),l="img"===a&&"src"===k||"background"===k;!0!==Q[k]||!0===E[k]&&!d(c,l)||(e(" "),e(f),e('="'),e(C(c)),e('"'))}),e(f?"/>":">"))},end:function(a){a=g.lowercase(a);c||!0!==D[a]||(e(""));a==c&&(c=!1)},chars:function(a){c||e(C(a))}}}var M=g.$$minErr("$sanitize"),B=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,A=/^<\/\s*([\w:-]+)[^>]*>/,H=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,L=/^]*?)>/i,J=/]/,c=/^mailto:/;return function(e,b){function l(a){a&&k.push(F(a))}function f(a,c){k.push("');l(c);k.push("")} - if(!e)return e;for(var n,h=e,k=[],m,p;n=h.match(d);)m=n[0],n[2]==n[3]&&(m="mailto:"+m),p=n.index,l(h.substr(0,p)),f(m,n[0].replace(c,"")),h=h.substring(p+n[0].length);l(h);return a(k.join(""))}}])})(window,window.angular); -//# sourceMappingURL=angular-sanitize.min.js.map \ No newline at end of file diff --git a/tests/karma/modules.js b/tests/karma/modules.js index 142249a45a..1b918e93b2 100644 --- a/tests/karma/modules.js +++ b/tests/karma/modules.js @@ -9,6 +9,5 @@ CRM.angular = { 'crmAttachment', 'crmUi', 'crmUtil', - 'ngSanitize', ] }; -- 2.25.1