From: aditya-nambiar Date: Sat, 9 Aug 2014 05:20:19 +0000 (+0530) Subject: preview working X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fe6f9f2f94f9167ab46ea739b6fd6ab771d496c2;p=civicrm-core.git preview working --- diff --git a/js/angular-crmMailingAB.js b/js/angular-crmMailingAB.js index fe37d3f9a6..68cf7f5b9a 100644 --- a/js/angular-crmMailingAB.js +++ b/js/angular-crmMailingAB.js @@ -104,7 +104,7 @@ }) - crmMailingAB.controller('TabsDemoCtrl', function ($scope, crmApi,selectedABTest) { + crmMailingAB.controller('TabsDemoCtrl', function ($scope, crmApi,selectedABTest,$sce) { $scope.abId=""; $scope.whatnext=2; $scope.currentABTest=selectedABTest @@ -179,6 +179,13 @@ } mltokens = CRM.crmMailing.mailTokens; + $scope.deliberatelyTrustDangerousSnippeta = function() { + return $sce.trustAsHtml($scope.previewa); + }; + + $scope.deliberatelyTrustDangerousSnippetb = function() { + return $sce.trustAsHtml($scope.previewb); + }; $scope.tab_val = 0; $scope.max_tab = 0; @@ -381,12 +388,6 @@ $scope.previewa=data.values.html; - $scope.prea='I am an HTMLstring with ' + - 'links! and other stuff'; - - //$scope.previewa1=$scope.previewa.substring(3935); - //$scope.previewa1=''+$scope.previewa.substring(3935); - $scope.previewa1= '
gfgfdgdfgdgdf
' } @@ -400,9 +401,6 @@ console.log(data.values.html); $scope.previewb=data.values.html; - $scope.previewb1=$scope.previewb.substring(3935); - - $scope.$apply(); } }); diff --git a/partials/abtesting/main.html b/partials/abtesting/main.html index c287fc1abc..11b2dcbcf3 100644 --- a/partials/abtesting/main.html +++ b/partials/abtesting/main.html @@ -3,7 +3,6 @@ {{currentABTest.mailing_id_b}}
{{currentABTest.mailing_id_a}}
-{{previewa1}}
-
+
-
+